fixed the url parser so all urlhandlers have ^ tacked to the start
[glcas.git] / plugins / repo.php
index 27ae54c..55eaed3 100644 (file)
@@ -746,7 +746,16 @@ class GLCASRepo {
                        $content .= "<table>";
                        $dh = opendir($dir);
                        while(($file = readdir($dh))!==false) {
-                               if($file != "." && $file != "..") $content .= "<tr><td><a href=\"$uri/$file\">$file</a></td></tr>";
+                               if($file != "." && $file != "..") {
+                                       if(is_dir("$dir/$file")) {
+                                               $fsize = "";
+                                               $icon = "/icons/folder.png";
+                                       } else {
+                                               $fsize = filesize("$dir/$file");
+                                               $icon = "/icons/text.png";
+                                       }
+                                       $content .= "<tr><td><img src=\"$icon\"></td><td><a href=\"$uri/$file\">$file</a></td><td>$fsize</td></tr>";
+                               }
                        }
                        $content .= "</table></body></html>";
                                
@@ -781,7 +790,11 @@ class GLCASRepo {
                        }
                }
                $existing_repos["nrepos"] = $repos;
+               
+               // TODO: these need to be "calculated"
                $existing_repos["distros"] = "Ubuntu, Debian";
+               $existing_repos["versions"] = "8.04LTS, 9.10, 10.04LTS, 10.10, 11.04, 11.10";
+               $existing_repos["arch"] = "x86_64, i386";
                
                
                return $existing_repos;