portdb: improved 'localrepo' function and added 'version' variable to index.php
This commit is contained in:
parent
82337d86d4
commit
566f9f455e
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
$version = "3.0";
|
||||
|
||||
require('DB.php');
|
||||
|
||||
$dbhandle = "sqlite:////home/crux/public_html/local/portdb.db";
|
||||
@ -15,8 +17,8 @@ function sanitize($str) {
|
||||
}
|
||||
|
||||
function localrepo($name) {
|
||||
if (is_dir("/home/crux/git-to-rsync-working-copy/crux-2.7/{$name}")) {
|
||||
return "http://crux.nu/ports/crux-2.7/{$name}/";
|
||||
if (is_dir("/home/crux/git-to-rsync-working-copy/crux-".$version."/{$name}")) {
|
||||
return "http://crux.nu/ports/crux-".$version."/{$name}/";
|
||||
}
|
||||
else {
|
||||
return "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user