jenkins-bot has submitted this change and it was merged.

Change subject: Make processEchoEmailBatch check that Echo is actually enabled 
before doing anything
......................................................................


Make processEchoEmailBatch check that Echo is actually enabled before doing 
anything

Like CentralAuth does in createLocalAccount.php. In large wiki clusters where
you want Echo on for some wikis and not others, but don't want to keep a list
of Echo wikis (say, you want to make it on by default), this makes it possible
to safely run the script even on wikis where Echo is not enabled, where it will
just do nothing.

See also Ibde4c0c1, I741d2485

Bug: T59375
Change-Id: I3537206fccb459eb80de9fd61d2213dfb525c5f0
---
M maintenance/processEchoEmailBatch.php
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/processEchoEmailBatch.php 
b/maintenance/processEchoEmailBatch.php
index 9a628c5..f826a5d 100644
--- a/maintenance/processEchoEmailBatch.php
+++ b/maintenance/processEchoEmailBatch.php
@@ -30,6 +30,10 @@
        public function execute() {
                global $wgEchoCluster;
 
+               if ( !class_exists( 'EchoHooks' ) ) {
+                       $this->error( "Echo isn't enabled on this wiki\n", 1 );
+               }
+
                $ignoreConfiguredSchedule = $this->getOption( 
"ignoreConfiguredSchedule", 0 );
 
                $this->output( "Started processing... \n" );

-- 
To view, visit https://gerrit.wikimedia.org/r/214913
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3537206fccb459eb80de9fd61d2213dfb525c5f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <kren...@gmail.com>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to