summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgfuncs.inc.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-04-05 15:13:01 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-04-05 15:54:21 +0200
commitd16f7cf712f0f2f14343ff55a625b12603f542a4 (patch)
treed03b4552c1b5beaadee6a921db8888e048ceedec /web/lib/pkgfuncs.inc.php
parentf4613442114b36d32e903b5b0608b73e32bdbc3f (diff)
downloadaur-d16f7cf712f0f2f14343ff55a625b12603f542a4.tar.gz
aur-d16f7cf712f0f2f14343ff55a625b12603f542a4.tar.xz
Use snake case for all package functions
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/pkgfuncs.inc.php')
-rw-r--r--web/lib/pkgfuncs.inc.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 4e37d2f4..01d7c3e1 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -13,7 +13,7 @@ include_once("config.inc.php");
*
* @return bool True if the user can delete the comment, otherwise false
*/
-function canDeleteComment($comment_id=0, $atype="", $uid=0) {
+function can_delete_comment($comment_id=0, $atype="", $uid=0) {
if (!$uid) {
/* Unauthenticated users cannot delete anything. */
return false;
@@ -49,7 +49,7 @@ function canDeleteComment($comment_id=0, $atype="", $uid=0) {
*
* @return bool True if the user can delete the comment, otherwise false
*/
-function canDeleteCommentArray($comment, $atype="", $uid=0) {
+function can_delete_comment_array($comment, $atype="", $uid=0) {
if (!$uid) {
/* Unauthenticated users cannot delete anything. */
return false;
@@ -73,7 +73,7 @@ function canDeleteCommentArray($comment, $atype="", $uid=0) {
*
* @return bool True if the user can submit blacklisted packages, otherwise false
*/
-function canSubmitBlacklisted($atype = "") {
+function can_submit_blacklisted($atype = "") {
if ($atype == "Trusted User" || $atype == "Developer") {
/* Only TUs and developers can submit blacklisted packages. */
return true;
@@ -90,7 +90,7 @@ function canSubmitBlacklisted($atype = "") {
*
* @return array All package categories
*/
-function pkgCategories() {
+function pkg_categories() {
$cats = array();
$dbh = DB::connect();
$q = "SELECT * FROM PackageCategories WHERE ID != 1 ";
@@ -608,7 +608,7 @@ function pkg_search_page($SID="") {
*/
if ($SID)
$myuid = uid_from_sid($SID);
- $cats = pkgCategories($dbh);
+ $cats = pkg_categories($dbh);
/* Sanitize paging variables. */
if (isset($_GET['O'])) {
@@ -1455,7 +1455,7 @@ function pkg_delete_comment($atype) {
$dbh = DB::connect();
$uid = uid_from_sid($_COOKIE["AURSID"]);
- if (canDeleteComment($comment_id, $atype, $uid)) {
+ if (can_delete_comment($comment_id, $atype, $uid)) {
$q = "UPDATE PackageComments ";
$q.= "SET DelUsersID = ".$uid." ";
$q.= "WHERE ID = ".intval($comment_id);
@@ -1485,7 +1485,7 @@ function pkg_change_category($pid, $atype) {
}
$dbh = DB::connect();
- $catArray = pkgCategories($dbh);
+ $catArray = pkg_categories($dbh);
if (!array_key_exists($category_id, $catArray)) {
return array(false, __("Invalid category ID."));
}