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

Change subject: Use wfShellWikiCmd() for the shell command in cleanupSpam.php
......................................................................


Use wfShellWikiCmd() for the shell command in cleanupSpam.php

Change-Id: Id2c1dc9b313e1d833154a68a8eafa1e675d3b65c
---
M maintenance/cleanupSpam.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/cleanupSpam.php b/maintenance/cleanupSpam.php
index 4b8c9fe..12b1241 100644
--- a/maintenance/cleanupSpam.php
+++ b/maintenance/cleanupSpam.php
@@ -39,7 +39,7 @@
        }
 
        public function execute() {
-               global $wgLocalDatabases, $wgUser;
+               global $IP, $wgLocalDatabases, $wgUser;
 
                $username = wfMessage( 'spambot_username' )->text();
                $wgUser = User::newFromName( $username );
@@ -67,7 +67,9 @@
                                        array( 'el_index' . $dbr->buildLike( 
$like ) ), __METHOD__ );
                                if ( $count ) {
                                        $found = true;
-                                       passthru( "php cleanupSpam.php 
--wiki='$wikiID' $spec | sed 's/^/$wikiID:  /'" );
+                                       $cmd = wfShellWikiCmd( 
"$IP/maintenance/cleanupSpam.php",
+                                               array( '--wiki', $wikiID, $spec 
) );
+                                       passthru( "$cmd | sed 's/^/$wikiID:  
/'" );
                                }
                        }
                        if ( $found ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2c1dc9b313e1d833154a68a8eafa1e675d3b65c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex <coderev...@emsenhuber.ch>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Parent5446 <tylerro...@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