Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions classes/DirItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ class DirItem extends Item
* @var DirectoryList The list of this directory's contents
*/
private $temp_list;

/**
* @return string Always returns 'dir', since this is a directory, not a file
*/
public function file_ext()
{
return 'dir';
}

/**
* @return int The total size in bytes of the folder (recursive)
*/
Expand All @@ -63,7 +63,7 @@ private function dir_size()
}
return $this -> temp_list -> size_recursive();
}

/**
* @return int The total number of files in the folder (recursive)
*/
Expand All @@ -75,7 +75,7 @@ public function num_subfiles()
}
return $this -> temp_list -> num_files();
}

/**
* @param string $path
* @return string The parent directory of $path
Expand All @@ -96,15 +96,15 @@ public static function get_parent_dir($path)
$path = substr($path, 0, $pos + 1);
return (($path === false) ? '' : $path);
}

/**
* @param string $parent_dir
* @param string $filename
*/
public function __construct($parent_dir, $filename)
public function __construct($parent_dir, $filename, $filemtime = null)
{
$filename = self::make_sure_slash($filename);
parent::__construct($parent_dir, $filename);
parent::__construct($parent_dir, $filename, $filemtime);
global $config, $subdir;
$this -> downloads = ' ';
if ($filename == '../')
Expand All @@ -131,7 +131,7 @@ public function __construct($parent_dir, $filename)
else
//regular folder
{
if (!@is_dir($this -> parent_dir . $filename))
if (false && !@is_dir($this -> parent_dir . $filename))
{
throw new ExceptionDisplay('Directory <em>'
. Url::html_output($this -> parent_dir . $filename)
Expand All @@ -143,7 +143,7 @@ public function __construct($parent_dir, $filename)
. Url::translate_uri(substr($this -> parent_dir, strlen($config -> __get('base_dir'))) . $filename);
}
}

/**
* @param string $var The key to look for
* @return mixed The data stored at the key
Expand All @@ -164,4 +164,4 @@ public function __get($var)
}
}

?>
?>
Loading