]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/mail.php
move schema.type.php to typeschema.php like other files
[quix0rs-gnu-social.git] / lib / mail.php
index 94d5dcb121053fe74828cc3a6d2f36476f3b93e6..c724764cc8fc5f28cc35ca78bc6ebbc0e5a2e711 100644 (file)
@@ -251,11 +251,11 @@ function mail_subscribe_notify_profile($listenee, $other)
                         common_config('site', 'name'),
                         $other->profileurl,
                         ($other->location) ?
-                        sprintf(_("Location: %s\n"), $other->location) : '',
+                        sprintf(_("Location: %s"), $other->location) . "\n" : '',
                         ($other->homepage) ?
-                        sprintf(_("Homepage: %s\n"), $other->homepage) : '',
+                        sprintf(_("Homepage: %s"), $other->homepage) . "\n" : '',
                         ($other->bio) ?
-                        sprintf(_("Bio: %s\n\n"), $other->bio) : '',
+                        sprintf(_("Bio: %s"), $other->bio) . "\n\n" : '',
                         common_config('site', 'name'),
                         common_local_url('emailsettings'));
 
@@ -546,6 +546,10 @@ function mail_notify_message($message, $from=null, $to=null)
 
 function mail_notify_fave($other, $user, $notice)
 {
+    if (!$user->hasRight(Right::EMAILONFAVE)) {
+        return;
+    }
+
     $profile = $user->getProfile();
 
     $bestname = $profile->getBestName();
@@ -595,6 +599,14 @@ function mail_notify_attn($user, $notice)
 
     $sender = $notice->getProfile();
 
+    if ($sender->id == $user->id) {
+        return;
+    }
+
+    if (!$sender->hasRight(Right::EMAILONREPLY)) {
+        return;
+    }
+
     $bestname = $sender->getBestName();
 
     common_init_locale($user->language);
@@ -640,4 +652,3 @@ function mail_notify_attn($user, $notice)
     common_init_locale();
     mail_to_user($user, $subject, $body);
 }
-