} 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;
}
} 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;
}
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) {