summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose V Beneyto <sepen@crux.nu>2013-02-05 13:21:18 +0100
committerJose V Beneyto <sepen@crux.nu>2013-02-05 13:21:18 +0100
commit566f9f455eb5b9eefb807db26addb58df8478f64 (patch)
tree06ee6fa8daf253f742c86841794f276a9e5a7c71
parent82337d86d48cfcb580182027d8daa3506b812879 (diff)
downloadwebtools-566f9f455eb5b9eefb807db26addb58df8478f64.tar.gz
webtools-566f9f455eb5b9eefb807db26addb58df8478f64.tar.xz
portdb: improved 'localrepo' function and added 'version' variable to index.php
-rwxr-xr-xportdb/portdb/index.php6
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 "";

Generated by cgit