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 +- web/lib/pkgfuncs.inc.php | 88 ++++++++++++++++++++-------------------- web/template/actions_form.php | 4 +- web/template/pkg_comments.php | 2 +- web/template/pkg_details.php | 12 +++--- web/template/pkg_search_form.php | 2 +- web/template/pkgbase_details.php | 6 +-- 11 files changed, 90 insertions(+), 90 deletions(-) (limited to 'web') diff --git a/web/html/index.php b/web/html/index.php index fe74857c..921839a8 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 876e2c07..bf325cf3 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 42705edd..24bbbdc3 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"); - + " /> " /> - + " title="" /> " title="" /> diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index d7181184..ca4abc6d 100644 --- a/web/template/pkg_comments.php +++ b/web/template/pkg_comments.php @@ -1,7 +1,7 @@

diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index ed1b030f..3eaeac79 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -4,7 +4,7 @@ $uid = uid_from_sid($SID); $pkgid = intval($row['ID']); -$catarr = pkg_categories(); +$catarr = pkgbase_categories(); $submitter = username_from_id($row["SubmitterUID"]); $maintainer = username_from_id($row["MaintainerUID"]); @@ -22,11 +22,11 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("Y-m-d", intval($ $urlpath = URL_DIR . substr($row['BaseName'], 0, 2) . "/" . $row['BaseName']; -$deps = package_dependencies($row["ID"]); -$requiredby = package_required($row["Name"]); +$deps = pkg_dependencies($row["ID"]); +$requiredby = pkg_required($row["Name"]); # $sources[0] = 'src'; -$sources = package_sources($row["ID"]); +$sources = pkg_sources($row["ID"]); ?>

@@ -54,7 +54,7 @@ $sources = package_sources($row["ID"]); - +
  • @@ -69,7 +69,7 @@ $sources = package_sources($row["ID"]);
  • - +
  • diff --git a/web/template/pkg_search_form.php b/web/template/pkg_search_form.php index d004acc4..74282506 100644 --- a/web/template/pkg_search_form.php +++ b/web/template/pkg_search_form.php @@ -47,7 +47,7 @@ $per_page = array(50, 100, 250); @@ -64,7 +64,7 @@ $pkgs = pkgbase_get_pkgnames($base_id);
  • - +
  • -- cgit v1.2.3-24-g4f1b