diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-04-05 15:41:29 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-04-05 15:55:31 +0200 |
commit | 676595f9bf4ecb3de96d02c89440a6fdaf7fc797 (patch) | |
tree | 9da03d5c8c8c9cea1a2b89a6f4b9673a4011e7bc /web/html | |
parent | d16f7cf712f0f2f14343ff55a625b12603f542a4 (diff) |
Prefix package functions with pkg_/pkgbase_
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html')
-rw-r--r-- | web/html/index.php | 2 | ||||
-rw-r--r-- | web/html/packages.php | 10 | ||||
-rw-r--r-- | web/html/pkgbase.php | 32 | ||||
-rw-r--r-- | web/html/pkgsubmit.php | 20 | ||||
-rw-r--r-- | web/html/voters.php | 2 |
5 files changed, 33 insertions, 33 deletions
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.")."<br />\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); <?php include('pkg_search_form.php'); if (isset($_COOKIE["AURSID"])) { - display_pkgbase_details($base_id, $details, $_COOKIE["AURSID"]); + pkgbase_display_details($base_id, $details, $_COOKIE["AURSID"]); } else { - display_pkgbase_details($base_id, $details, null); + pkgbase_display_details($base_id, $details, null); } html_footer(AUR_VERSION); diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 95566f7..7db81a5 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -259,7 +259,7 @@ if ($uid): } /* Check if package name is blacklisted. */ - if (!$base_id && pkgname_is_blacklisted($pi['pkgname']) && !can_submit_blacklisted(account_from_sid($_COOKIE["AURSID"]))) { + if (!$base_id && pkg_name_is_blacklisted($pi['pkgname']) && !can_submit_blacklisted(account_from_sid($_COOKIE["AURSID"]))) { $error = __( "%s is on the package blacklist, please check if it's available in the official repos.", $pi['pkgname']); break; } @@ -329,30 +329,30 @@ if ($uid): */ $was_orphan = (pkgbase_maintainer_uid($base_id) === NULL); - update_pkgbase($base_id, $pkgbase_info['pkgbase'], $uid); + pkgbase_update($base_id, $pkgbase_info['pkgbase'], $uid); if ($category_id > 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(); ?> <?php if ($error): ?> @@ -406,7 +406,7 @@ html_header("Submit"); <select id="id_category" name="category"> <option value="1"><?= __("Select Category"); ?></option> <?php - foreach ($pkg_categories as $num => $cat): + foreach ($pkgbase_categories as $num => $cat): print '<option value="' . $num . '"'; if (isset($_POST['category']) && $_POST['category'] == $cat): print ' selected="selected"'; diff --git a/web/html/voters.php b/web/html/voters.php index 9a0bdd3..bbcf547 100644 --- a/web/html/voters.php +++ b/web/html/voters.php @@ -5,7 +5,7 @@ include_once('pkgfuncs.inc.php'); $SID = $_COOKIE['AURSID']; $pkgname = htmlspecialchars($_GET['N']); -$votes = votes_for_pkgname($pkgname); +$votes = pkgbase_votes_from_name($pkgname); $atype = account_from_sid($SID); html_header(__("Voters")); |