X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fsurfbar_functions.php;h=ec045622f3b728ba6420dfb4f509b69b79b7d2b7;hp=7df9fd5b8173bd60c9aac3a65b28af1aabd8f8b5;hb=9d81813f782e6e9edf693eabcc73e5ce4660aee6;hpb=04036a4a4742c06629a5acba7c6c6ad2b5a03c5a diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 7df9fd5b81..ec045622f3 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -53,7 +53,7 @@ function SURFBAR_ADMIN_ADD_URL ($url) { } elseif (SURFBAR_LOOKUP_BY_URL($url, "0")) { // URL already found in surfbar! return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS("0")) { + } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more allowed! return false; } @@ -110,7 +110,7 @@ function SURFBAR_MEMBER_ADD_URL ($url) { } elseif (SURFBAR_LOOKUP_BY_URL($url, $GLOBALS['userid'])) { // URL already found in surfbar! return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { + } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($GLOBALS['userid'])) { // No more allowed! return false; } @@ -413,8 +413,8 @@ WHERE userid NOT IN (".implode(",", $UIDs).") AND status='%s'", function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) { global $_CONFIG; - // Simply check it out - return (SURFBAR_GET_TOTAL_USER_URLS($uid) < $_CONFIG['surfbar_max_order']); + // Is this admin and userid is zero or does the user has some URLs left to book? + return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid) < $_CONFIG['surfbar_max_order'])); } // Get total amount of URLs of given status for current user function SURFBAR_GET_TOTAL_USER_URLS ($uid=0) {