diff options
author | Alib <aliboba@free.fr> | 2010-02-19 14:17:40 +0100 |
---|---|---|
committer | Alib <aliboba@free.fr> | 2010-02-19 14:17:40 +0100 |
commit | 4f004b86274a9a308ee62e396142d1cfb7ae5521 (patch) | |
tree | 37b90f9ab69abdf01dc26e7d719f21ab4bbddf08 /includes | |
parent | d51a739856f635eeb2e1422ec7912943e9e42043 (diff) | |
download | istreamdev-4f004b86274a9a308ee62e396142d1cfb7ae5521.tar.gz istreamdev-4f004b86274a9a308ee62e396142d1cfb7ae5521.tar.bz2 |
corrected media listing if directory is empty
Diffstat (limited to 'includes')
-rwxr-xr-x | includes/inc_media.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/includes/inc_media.php b/includes/inc_media.php index 59399bd..5e73d6b 100755 --- a/includes/inc_media.php +++ b/includes/inc_media.php @@ -33,8 +33,8 @@ print "</div>\r\n"; print "<div id=\"content\">\r\n"; print " <span class=\"graytitle\">Media</span>\r\n"; print "<br>"; -print " <span class=\"graytitle\">{$subdir}</span>\r\n"; print " <ul class=\"pageitem\">"; +print " <li class=\"textbox\"><span class=\"header\">/{$subdir}</span></li>"; $dir_handle = @opendir($dir); if (!$dir_handle) @@ -52,9 +52,15 @@ else while ($medianame = readdir($dir_handle)) //closedir? // +if ($medianame_array[0] == NULL) +{ +//do nothing +} +else +{ sort($medianame_array); foreach($medianame_array as $value) -{ + { $medianame2=addslashes($value); // Directories if (is_dir($dir ."/" .$value)) @@ -83,7 +89,7 @@ foreach($medianame_array as $value) print "</form>\r\n"; } } - + } } $updir = dirname($dir); |