https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113267
Revision: 113267
Author: emsmith
Date: 2012-03-07 18:45:21 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
bug 35035 - apparently prototype not only doesn't RUN jobs it doesn't even have
a jobs table - so to keep the entire thing from blowing up, overriding the
insert method so if no email address is given, no job table insert is attempted
Modified Paths:
--------------
trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php
Modified: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php
===================================================================
--- trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php
2012-03-07 18:43:22 UTC (rev 113266)
+++ trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5MailerJob.php
2012-03-07 18:45:21 UTC (rev 113267)
@@ -99,4 +99,21 @@
return array($subject, $body);
}
+ /**
+ * Override insert - prototype does not even have a jobs table and will
+ * bomb miserably on this
+ *
+ * @return bool true on success
+ */
+ function insert() {
+ global $wgArticleFeedbackv5OversightEmails;
+
+ // if the oversight email address is empty we're going to just
skip all this, but return true
+ if ( null === $wgArticleFeedbackv5OversightEmails ) {
+ return true;
+ }
+
+ return parent::insert();
+ }
+
}
\ No newline at end of file
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs