]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/surfbar_functions.php
IS_LOGGED_IN() renamed to IS_MEMBER(), some HTML fixes
[mailer.git] / inc / libs / surfbar_functions.php
index 2104068759b7e296545acb58cacf0577a82091ce..a715e8148639c7a61ea698aad275df06229ef702 100644 (file)
@@ -101,7 +101,7 @@ function SURFBAR_MEMBER_ADD_URL ($url) {
        global $_CONFIG;
 
        // Do some pre-checks
-       if (!IS_LOGGED_IN()) {
+       if (!IS_MEMBER()) {
                // Not a member
                return false;
        } elseif (!VALIDATE_URL($url)) {
@@ -253,10 +253,15 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) {
        eval($eval);
 
        // Send the notification out
-       SEND_ADMIN_NOTIFICATION($subject, $templateName, $content, $content['uid']);
+       return SEND_ADMIN_NOTIFICATION($subject, $templateName, $content, $content['uid']);
 }
 // Notify the user about the performed action
 function SURFBAR_NOTIFY_USER ($messageType, $content) {
+       // Skip notification if userid is zero
+       if ($content['uid'] == 0) {
+               return false;
+       } // END - if
+
        // Prepare template name
        $templateName = sprintf("member_surfbar_%s", $messageType);
 
@@ -270,7 +275,7 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) {
        $mailText = LOAD_EMAIL_TEMPLATE($templateName, $content);
 
        // Send the email
-       SEND_EMAIL($content['uid'], $subject, $mailText);
+       return SEND_EMAIL($content['uid'], $subject, $mailText);
 }
 // Translate the URL status
 function SURFBAR_TRANSLATE_STATUS ($status) {
@@ -416,7 +421,7 @@ function SURFBAR_GET_TOTAL_USER_URLS ($uid=0) {
        global $_CONFIG;
 
        // Is the user 0 and user is logged in?
-       if (($uid == 0) && (IS_LOGGED_IN())) {
+       if (($uid == 0) && (IS_MEMBER())) {
                // Then use this userid
                $uid = $GLOBALS['userid'];
        } elseif ($uid == 0) {
@@ -592,7 +597,7 @@ function SURFBAR_DETERMINE_DEPLETED_USERIDS() {
        $UIDs = array();
 
        // Do we have a current user id?
-       if (IS_LOGGED_IN()) {
+       if (IS_MEMBER()) {
                // Then add this as well
                $UIDs[] = $GLOBALS['userid'];