From 571b74b9017169ed6181a57d637ad737fd15f6b3 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 21 Nov 2014 11:34:38 +0100 Subject: Always use virtual URLs Support for non-virtual URLs has been broken for a long time and is no longer used on the official AUR setup. Signed-off-by: Lukas Fleischer --- conf/config.proto | 1 - upgrading/3.5.0.txt | 2 ++ web/lib/pkgbasefuncs.inc.php | 1 - web/lib/pkgfuncs.inc.php | 1 - web/lib/routing.inc.php | 33 +++-------------- web/template/actions_form.php | 38 -------------------- web/template/pkg_details.php | 72 ++++++++++++------------------------- web/template/pkgbase_details.php | 66 ++++++++++------------------------ web/template/tu_last_votes_list.php | 4 --- 9 files changed, 47 insertions(+), 171 deletions(-) delete mode 100644 web/template/actions_form.php diff --git a/conf/config.proto b/conf/config.proto index 280c1e8..f00b352 100644 --- a/conf/config.proto +++ b/conf/config.proto @@ -22,7 +22,6 @@ max_filesize_uncompressed = 8388608 disable_http_login = 1 aur_location = http://localhost package_url = /packages/ -use_virtual_urls = 1 max_rpc_results = 5000 aur_request_ml = aur-requests@archlinux.org request_idle_time = 1209600 diff --git a/upgrading/3.5.0.txt b/upgrading/3.5.0.txt index e8af4af..006f9b3 100644 --- a/upgrading/3.5.0.txt +++ b/upgrading/3.5.0.txt @@ -21,3 +21,5 @@ INSERT INTO PackageCategories (Category) VALUES ('wayland'); 4. The configuration file format has been changed. Make sure you convert web/lib/config.inc.php to the new format (see conf/config.proto for an example configuration) and put the resulting file in conf/config. + +5. Support for non-virtual URLs has been removed. diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index 322ea60..9cdd8a3 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -236,7 +236,6 @@ function pkgbase_display_details($base_id, $row, $SID="") { include('pkgbase_details.php'); if ($SID) { - include('actions_form.php'); include('pkg_comment_form.php'); } diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 948e2ae..7e7a98f 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -481,7 +481,6 @@ function pkg_display_details($id=0, $row, $SID="") { include('pkg_details.php'); if ($SID) { - include('actions_form.php'); include('pkg_comment_form.php'); } diff --git a/web/lib/routing.inc.php b/web/lib/routing.inc.php index 9585304..833ea0f 100644 --- a/web/lib/routing.inc.php +++ b/web/lib/routing.inc.php @@ -26,10 +26,6 @@ $PKGBASE_PATH = '/pkgbase'; $PKGREQ_PATH = '/requests'; $USER_PATH = '/account'; -function use_virtual_urls() { - return config_get_bool('options', 'use_virtual_urls'); -} - function get_route($path) { global $ROUTES; @@ -42,13 +38,7 @@ function get_route($path) { } function get_uri($path) { - global $ROUTES; - - if (use_virtual_urls()) { - return $path; - } else { - return get_route($path); - } + return $path; } function get_pkg_route() { @@ -68,22 +58,12 @@ function get_pkgreq_route() { function get_pkg_uri($pkgname) { global $PKG_PATH; - - if (use_virtual_urls()) { - return $PKG_PATH . '/' . urlencode($pkgname) . '/'; - } else { - return '/' . get_route($PKG_PATH) . '?N=' . urlencode($pkgname); - } + return $PKG_PATH . '/' . urlencode($pkgname) . '/'; } function get_pkgbase_uri($pkgbase_name) { global $PKGBASE_PATH; - - if (use_virtual_urls()) { - return $PKGBASE_PATH . '/' . urlencode($pkgbase_name) . '/'; - } else { - return '/' . get_route($PKGBASE_PATH) . '?N=' . urlencode($pkgbase_name); - } + return $PKGBASE_PATH . '/' . urlencode($pkgbase_name) . '/'; } function get_user_route() { @@ -93,10 +73,5 @@ function get_user_route() { function get_user_uri($username) { global $USER_PATH; - - if (use_virtual_urls()) { - return $USER_PATH . '/' . urlencode($username) . '/'; - } else { - return '/' . get_route($USER_PATH) . '?U=' . urlencode($username); - } + return $USER_PATH . '/' . urlencode($username) . '/'; } diff --git a/web/template/actions_form.php b/web/template/actions_form.php deleted file mode 100644 index f18c01c..0000000 --- a/web/template/actions_form.php +++ /dev/null @@ -1,38 +0,0 @@ - -
-
-
- - - - - - " /> - - " /> - - - - " title="" /> - - " title="" /> - - - - " /> - - " /> - - - - " /> - - - - - - -
-
-
- diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index faec0dc..a8a0b3e 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -83,7 +83,7 @@ $sources = pkg_sources($row["ID"]);
  • - +
  • @@ -279,69 +279,41 @@ if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))): - - - - - - - - - + + + + + - + - - - + - - - - - + + + - + - - - - + + - - - - - + + + - + - - - - - - - + + + - + diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index 406408b..b8d36ed 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -34,7 +34,7 @@ $pkgs = pkgbase_get_pkgnames($base_id);
  • - +
  • @@ -138,69 +138,41 @@ if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))): - - - + - - - - - + + + - + - - - + - - - - - + + + - + - - - + - - - - - + + + - + - - + - - - - + - + diff --git a/web/template/tu_last_votes_list.php b/web/template/tu_last_votes_list.php index 0b0ee48..f7b07bc 100644 --- a/web/template/tu_last_votes_list.php +++ b/web/template/tu_last_votes_list.php @@ -21,11 +21,7 @@ ?> - - - - -- cgit v1.2.3-70-g09d2