diff options
author | Jose V Beneyto <sepen@crux.nu> | 2013-02-05 13:21:18 +0100 |
---|---|---|
committer | Jose V Beneyto <sepen@crux.nu> | 2013-02-05 13:21:18 +0100 |
commit | 566f9f455eb5b9eefb807db26addb58df8478f64 (patch) | |
tree | 06ee6fa8daf253f742c86841794f276a9e5a7c71 | |
parent | 82337d86d48cfcb580182027d8daa3506b812879 (diff) | |
download | webtools-566f9f455eb5b9eefb807db26addb58df8478f64.tar.gz webtools-566f9f455eb5b9eefb807db26addb58df8478f64.tar.xz |
portdb: improved 'localrepo' function and added 'version' variable to index.php
-rwxr-xr-x | portdb/portdb/index.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/portdb/portdb/index.php b/portdb/portdb/index.php index 5ce7c25..62a4cd3 100755 --- a/portdb/portdb/index.php +++ b/portdb/portdb/index.php @@ -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 ""; |