https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113077

Revision: 113077
Author:   ialex
Date:     2012-03-05 20:08:43 +0000 (Mon, 05 Mar 2012)
Log Message:
-----------
svn:eol-style native

Modified Paths:
--------------
    trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php

Property Changed:
----------------
    trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php
    trunk/extensions/Genderize/AGPL-3.0.txt
    trunk/extensions/Genderize/README
    trunk/extensions/HidePrefix/AGPL-3.0.txt
    trunk/extensions/HidePrefix/README
    trunk/extensions/SemanticTitle/AGPL-3.0.txt
    trunk/extensions/SemanticTitle/README

Modified: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php
===================================================================
--- trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php   
2012-03-05 19:55:06 UTC (rev 113076)
+++ trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php   
2012-03-05 20:08:43 UTC (rev 113077)
@@ -1,103 +1,103 @@
-<?php
-/**
- * SpecialArticleFeedbackv5 class
- *
- * @package    ArticleFeedback
- * @subpackage Job
- * @author     Elizabeth M Smith <[email protected]>
- * @version    $Id$
- */
-
-/**
- * This is a job to do mailings for oversight requests
- *
- * @package    ArticleFeedback
- * @subpackage Job
- */
-class ArticleFeedbackv5MailerJob extends Job {
-
-       /**
-        * Passthrough that sends the name of the class as the name of the job
-        *
-        * @param $command
-        * @param $title
-        * @param $params array
-        * @param int $id
-        */
-       function __construct( $title, $params, $id = 0 ) {
-               parent::__construct( __CLASS__, $title, $params, $id );
-       }
-
-       /**
-        * Run the job
-        * @return boolean success
-        */
-       function run() {
-               global $wgArticleFeedbackv5OversightEmails, 
$wgArticleFeedbackv5OversightEmailName;
-               global $wgPasswordSender, $wgPasswordSenderName, 
$wgNoReplyAddress;
-
-               $params = $this->params;
-
-               // if the oversight email address is empty we're going to just 
skip all this, but return true
-               if ( null === $wgArticleFeedbackv5OversightEmails ) {
-                       return true;
-               }
-
-               // if we don't have the right params set return false, job 
can't run
-               if (   !array_key_exists( 'user_name', $params)
-                   || !array_key_exists( 'user_url', $params)
-                   || !array_key_exists( 'page_name', $params)
-                   || !array_key_exists( 'page_url', $params)
-                   || !array_key_exists( 'permalink', $params)) {
-                       return false;
-                   }
-
-               // get our addresses
-               $to = new MailAddress( $wgArticleFeedbackv5OversightEmails, 
$wgArticleFeedbackv5OversightEmailName );
-               $from = new MailAddress( $wgPasswordSender, 
$wgPasswordSenderName );
-               $replyto = new MailAddress( $wgNoReplyAddress );
-
-               // get our text
-               list($subject, $body) = $this->composeMail($params['user_name'],
-                                                          $params['user_url'],
-                                                          $params['page_name'],
-                                                          $params['page_url'],
-                                                          
$params['permalink']);
-
-               return UserMailer::send( $to, $from, $subject, 
-                                               $body, $replyto );
-       }
-
-       /**
-        * Generate the "an oversight request has been made" email for sending
-        * to the mailing list
-        *
-        * @param string $requestor_name      user name
-        * @param string $requestor_url       link to user page
-        * @param string $page_name           page title
-        * @param string $page_url            page url
-        * @param string $feedback_permalink  permalink url to feedback
-        */
-       protected function composeMail( $requestor_name, $requestor_url, 
$page_name, $page_url, $feedback_permalink ) {
-               global $wgPasswordSender, $wgPasswordSenderName, 
$wgNoReplyAddress, $wgRequest;
-
-               // build the subject
-               $subject = wfMessage( 
'articlefeedbackv5-email-request-oversight-subject' )->params(
-                               $requestor_name,
-                               $page_name )->escaped();
-
-               //text version, no need to escape since client will interpret 
it as plain text
-               $body = wfMessage( 
'articlefeedbackv5-email-request-oversight-body' )
-                               ->rawParams(
-                                       $requestor_url,
-                                       $page_url,
-                                       $feedback_permalink)
-                               ->params(
-                                       $requestor_name,
-                                       $page_name)
-                               ->text();
-
-               return array($subject, $body);
-       }
-
+<?php
+/**
+ * SpecialArticleFeedbackv5 class
+ *
+ * @package    ArticleFeedback
+ * @subpackage Job
+ * @author     Elizabeth M Smith <[email protected]>
+ * @version    $Id$
+ */
+
+/**
+ * This is a job to do mailings for oversight requests
+ *
+ * @package    ArticleFeedback
+ * @subpackage Job
+ */
+class ArticleFeedbackv5MailerJob extends Job {
+
+       /**
+        * Passthrough that sends the name of the class as the name of the job
+        *
+        * @param $command
+        * @param $title
+        * @param $params array
+        * @param int $id
+        */
+       function __construct( $title, $params, $id = 0 ) {
+               parent::__construct( __CLASS__, $title, $params, $id );
+       }
+
+       /**
+        * Run the job
+        * @return boolean success
+        */
+       function run() {
+               global $wgArticleFeedbackv5OversightEmails, 
$wgArticleFeedbackv5OversightEmailName;
+               global $wgPasswordSender, $wgPasswordSenderName, 
$wgNoReplyAddress;
+
+               $params = $this->params;
+
+               // if the oversight email address is empty we're going to just 
skip all this, but return true
+               if ( null === $wgArticleFeedbackv5OversightEmails ) {
+                       return true;
+               }
+
+               // if we don't have the right params set return false, job 
can't run
+               if (   !array_key_exists( 'user_name', $params)
+                   || !array_key_exists( 'user_url', $params)
+                   || !array_key_exists( 'page_name', $params)
+                   || !array_key_exists( 'page_url', $params)
+                   || !array_key_exists( 'permalink', $params)) {
+                       return false;
+                   }
+
+               // get our addresses
+               $to = new MailAddress( $wgArticleFeedbackv5OversightEmails, 
$wgArticleFeedbackv5OversightEmailName );
+               $from = new MailAddress( $wgPasswordSender, 
$wgPasswordSenderName );
+               $replyto = new MailAddress( $wgNoReplyAddress );
+
+               // get our text
+               list($subject, $body) = $this->composeMail($params['user_name'],
+                                                          $params['user_url'],
+                                                          $params['page_name'],
+                                                          $params['page_url'],
+                                                          
$params['permalink']);
+
+               return UserMailer::send( $to, $from, $subject, 
+                                               $body, $replyto );
+       }
+
+       /**
+        * Generate the "an oversight request has been made" email for sending
+        * to the mailing list
+        *
+        * @param string $requestor_name      user name
+        * @param string $requestor_url       link to user page
+        * @param string $page_name           page title
+        * @param string $page_url            page url
+        * @param string $feedback_permalink  permalink url to feedback
+        */
+       protected function composeMail( $requestor_name, $requestor_url, 
$page_name, $page_url, $feedback_permalink ) {
+               global $wgPasswordSender, $wgPasswordSenderName, 
$wgNoReplyAddress, $wgRequest;
+
+               // build the subject
+               $subject = wfMessage( 
'articlefeedbackv5-email-request-oversight-subject' )->params(
+                               $requestor_name,
+                               $page_name )->escaped();
+
+               //text version, no need to escape since client will interpret 
it as plain text
+               $body = wfMessage( 
'articlefeedbackv5-email-request-oversight-body' )
+                               ->rawParams(
+                                       $requestor_url,
+                                       $page_url,
+                                       $feedback_permalink)
+                               ->params(
+                                       $requestor_name,
+                                       $page_name)
+                               ->text();
+
+               return array($subject, $body);
+       }
+
 }
\ No newline at end of file


Property changes on: 
trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: trunk/extensions/Genderize/AGPL-3.0.txt
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: trunk/extensions/Genderize/README
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: trunk/extensions/HidePrefix/AGPL-3.0.txt
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: trunk/extensions/HidePrefix/README
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: trunk/extensions/SemanticTitle/AGPL-3.0.txt
___________________________________________________________________
Added: svn:eol-style
   + native


Property changes on: trunk/extensions/SemanticTitle/README
___________________________________________________________________
Added: svn:eol-style
   + native


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to