From 676595f9bf4ecb3de96d02c89440a6fdaf7fc797 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 5 Apr 2014 15:41:29 +0200 Subject: Prefix package functions with pkg_/pkgbase_ Signed-off-by: Lukas Fleischer --- web/html/index.php | 2 +- web/html/packages.php | 10 +++++----- web/html/pkgbase.php | 32 ++++++++++++++++---------------- web/html/pkgsubmit.php | 20 ++++++++++---------- web/html/voters.php | 2 +- 5 files changed, 33 insertions(+), 33 deletions(-) (limited to 'web/html') diff --git a/web/html/index.php b/web/html/index.php index fe74857..921839a 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -13,7 +13,7 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { * the routing framework to the individual pages instead of * initializing arbitrary variables here. */ $pkgname = $tokens[2]; - $pkgid = pkgid_from_name($pkgname); + $pkgid = pkg_from_name($pkgname); if (!$pkgid) { header("HTTP/1.0 404 Not Found"); diff --git a/web/html/packages.php b/web/html/packages.php index 876e2c0..bf325cf 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -11,9 +11,9 @@ check_sid(); # see if they're still logged in if (!isset($pkgid) || !isset($pkgname)) { if (isset($_GET['ID'])) { $pkgid = intval($_GET['ID']); - $pkgname = pkgname_from_id($_GET['ID']); + $pkgname = pkg_name_from_id($_GET['ID']); } else if (isset($_GET['N'])) { - $pkgid = pkgid_from_name($_GET['N']); + $pkgid = pkg_from_name($_GET['N']); $pkgname = $_GET['N']; } else { unset($pkgid, $pkgname); @@ -44,7 +44,7 @@ if (isset($_COOKIE["AURSID"])) { $details = array(); if (isset($pkgname)) { - $details = get_package_details($pkgid); + $details = pkg_get_details($pkgid); } html_header($title, $details); @@ -55,10 +55,10 @@ if (isset($pkgid)) { include('pkg_search_form.php'); if ($pkgid) { if (isset($_COOKIE["AURSID"])) { - display_package_details($pkgid, $details, $_COOKIE["AURSID"]); + pkg_display_details($pkgid, $details, $_COOKIE["AURSID"]); } else { - display_package_details($pkgid, $details, null); + pkg_display_details($pkgid, $details, null); } } else { print __("Error trying to retrieve package details.")."
\n"; diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php index 42705ed..24bbbdc 100644 --- a/web/html/pkgbase.php +++ b/web/html/pkgbase.php @@ -55,27 +55,27 @@ $ret = false; $output = ""; if (check_token()) { if (current_action("do_Flag")) { - list($ret, $output) = pkg_flag($atype, $ids); + list($ret, $output) = pkgbase_flag($atype, $ids); } elseif (current_action("do_UnFlag")) { - list($ret, $output) = pkg_unflag($atype, $ids); + list($ret, $output) = pkgbase_unflag($atype, $ids); } elseif (current_action("do_Adopt")) { - list($ret, $output) = pkg_adopt($atype, $ids, true); + list($ret, $output) = pkgbase_adopt($atype, $ids, true); } elseif (current_action("do_Disown")) { - list($ret, $output) = pkg_adopt($atype, $ids, false); + list($ret, $output) = pkgbase_adopt($atype, $ids, false); } elseif (current_action("do_Vote")) { - list($ret, $output) = pkg_vote($atype, $ids, true); + list($ret, $output) = pkgbase_vote($atype, $ids, true); } elseif (current_action("do_UnVote")) { - list($ret, $output) = pkg_vote($atype, $ids, false); + list($ret, $output) = pkgbase_vote($atype, $ids, false); } elseif (current_action("do_Delete")) { if (isset($_POST['confirm_Delete'])) { if (!isset($_POST['merge_Into']) || empty($_POST['merge_Into'])) { - list($ret, $output) = pkg_delete($atype, $ids, NULL); + list($ret, $output) = pkgbase_delete($atype, $ids, NULL); unset($_GET['ID']); } else { $merge_base_id = pkgbase_from_name($_POST['merge_Into']); if ($merge_base_id) { - list($ret, $output) = pkg_delete($atype, $ids, $merge_base_id); + list($ret, $output) = pkgbase_delete($atype, $ids, $merge_base_id); unset($_GET['ID']); } else { @@ -87,18 +87,18 @@ if (check_token()) { $output = __("The selected packages have not been deleted, check the confirmation checkbox."); } } elseif (current_action("do_Notify")) { - list($ret, $output) = pkg_notify($atype, $ids); + list($ret, $output) = pkgbase_notify($atype, $ids); } elseif (current_action("do_UnNotify")) { - list($ret, $output) = pkg_notify($atype, $ids, false); + list($ret, $output) = pkgbase_notify($atype, $ids, false); } elseif (current_action("do_DeleteComment")) { - list($ret, $output) = pkg_delete_comment($atype); + list($ret, $output) = pkgbase_delete_comment($atype); } elseif (current_action("do_ChangeCategory")) { - list($ret, $output) = pkg_change_category($base_id, $atype); + list($ret, $output) = pkgbase_change_category($base_id, $atype); } if (isset($_REQUEST['comment'])) { $uid = uid_from_sid($_COOKIE["AURSID"]); - add_package_comment($base_id, $uid, $_REQUEST['comment']); + pkgbase_add_comment($base_id, $uid, $_REQUEST['comment']); $ret = true; } @@ -115,7 +115,7 @@ if (check_token()) { } } -$details = get_pkgbase_details($base_id); +$details = pkgbase_get_details($base_id); html_header($title, $details); ?> @@ -126,9 +126,9 @@ html_header($title, $details); 1) { - update_pkgbase_category($base_id, $category_id); + pkgbase_update_category($base_id, $category_id); } pkgbase_delete_packages($base_id); } else { /* This is a brand new package. */ $was_orphan = true; - $base_id = create_pkgbase($pkgbase_name, $category_id, $uid); + $base_id = pkgbase_create($pkgbase_name, $category_id, $uid); } foreach ($pkginfo as $pi) { - $pkgid = create_pkg($base_id, $pi['pkgname'], $pi['license'], $pi['full-version'], $pi['pkgdesc'], $pi['url']); + $pkgid = pkg_create($base_id, $pi['pkgname'], $pi['license'], $pi['full-version'], $pi['pkgdesc'], $pi['url']); foreach ($pi['depends'] as $dep) { $deppkgname = preg_replace("/(<|=|>).*/", "", $dep); $depcondition = str_replace($deppkgname, "", $dep); - add_pkg_dep($pkgid, $deppkgname, $depcondition); + pkg_add_dep($pkgid, $deppkgname, $depcondition); } foreach ($pi['source'] as $src) { - add_pkg_src($pkgid, $src); + pkg_add_src($pkgid, $src); } } @@ -362,7 +362,7 @@ if ($uid): * notification list. */ if ($was_orphan) { - pkg_notify(account_from_sid($_COOKIE["AURSID"]), array($base_id), true); + pkgbase_notify(account_from_sid($_COOKIE["AURSID"]), array($base_id), true); } end_atomic_commit(); @@ -387,7 +387,7 @@ html_header("Submit"); # give the visitor the default upload form if (ini_get("file_uploads")): - $pkg_categories = pkg_categories(); + $pkgbase_categories = pkgbase_categories(); ?> @@ -406,7 +406,7 @@ html_header("Submit");