Merge "Do correct average year length arithmetic."
[lhc/web/wiklou.git] / includes / UserMailer.php
index 8d1ed68..b8b6aa8 100644 (file)
@@ -231,12 +231,7 @@ class UserMailer {
                        # PEAR MAILER
                        #
 
-                       if ( function_exists( 'stream_resolve_include_path' ) ) {
-                               $found = stream_resolve_include_path( 'Mail.php' );
-                       } else {
-                               $found = Fallback::stream_resolve_include_path( 'Mail.php' );
-                       }
-                       if ( !$found ) {
+                       if ( ! stream_resolve_include_path( 'Mail.php' ) ) {
                                throw new MWException( 'PEAR mail package is not installed' );
                        }
                        require_once( 'Mail.php' );
@@ -517,6 +512,8 @@ class EmailNotification {
         * @param $minorEdit bool
         * @param $oldid int Revision ID
         * @param $watchers array of user IDs
+        * @param string $pageStatus
+        * @throws MWException
         */
        public function actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit,
                $oldid, $watchers, $pageStatus = 'changed' ) {
@@ -780,13 +777,15 @@ class EmailNotification {
        /**
         * Same as sendPersonalised but does impersonal mail suitable for bulk
         * mailing.  Takes an array of MailAddress objects.
-        * @return Status
+        * @param $addresses array
+        * @return Status|null
         */
        function sendImpersonal( $addresses ) {
                global $wgContLang;
 
-               if ( empty( $addresses ) )
-                       return;
+               if ( empty( $addresses ) ) {
+                       return null;
+               }
 
                $body = str_replace(
                                array( '$WATCHINGUSERNAME',