diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-16 13:33:49 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-04-16 13:33:49 -0400 |
commit | 1799f4bead5cc0cc155543d641b0254a0e037308 (patch) | |
tree | 0307850a2589596406537ae91ffebea56239f60b | |
parent | 0336259f342131562c30f59b34ec28f2df8bf82d (diff) |
better detection of repos
-rw-r--r-- | index.php | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -57,11 +57,14 @@ function classify($root, $dirname, $filename) { $classes = array(); if (count($parts) == 0) { // in the top-level - if (in_array($filename, $repos_arch_project )) { array_push($classes, 'repo', 'arch'); } - if (in_array($filename, $repos_para_project )) { array_push($classes, 'repo', 'para'); } - if (in_array($filename, $repos_arch_community)) { array_push($classes, 'repo', 'arch', 'community'); } - if (in_array($filename, $repos_para_community)) { array_push($classes, 'repo', 'para', 'community'); } - if ($filename[0] === '~' ) { array_push($classes, 'repo', 'para', 'community'); } + if (is_dir($filename.'/os')) { + array_push($classes, 'repo'); + if (in_array($filename, $repos_arch_project )) { array_push($classes, 'arch'); } + if (in_array($filename, $repos_para_project )) { array_push($classes, 'para'); } + if (in_array($filename, $repos_arch_community)) { array_push($classes, 'arch', 'community'); } + if (in_array($filename, $repos_para_community)) { array_push($classes, 'para', 'community'); } + if ($filename[0] === '~' ) { array_push($classes, 'para', 'community'); } + } } elseif ($dirname == "pool" || $dirname == "sources") { switch($filename) { case "packages": array_push($classes, 'pool', 'arch' ); break; |