From 7c3d3d54bd6bc15e376ec981bdc1658d6a2828d2 Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Fri, 6 Oct 2017 19:50:45 -0700 Subject: [PATCH] Get rid of $IP in Command Change-Id: Iccfe1b79963462f9cad80ff327ccd574ee1122c5 --- includes/shell/Command.php | 4 +--- includes/{ => shell}/limit.sh | 0 2 files changed, 1 insertion(+), 3 deletions(-) rename includes/{ => shell}/limit.sh (100%) diff --git a/includes/shell/Command.php b/includes/shell/Command.php index fd8f6a0ca7..cefe573762 100644 --- a/includes/shell/Command.php +++ b/includes/shell/Command.php @@ -199,8 +199,6 @@ class Command { * @throws ShellDisabledError */ public function execute() { - global $IP; - $this->everExecuted = true; $profileMethod = $this->method ?: wfGetCaller(); @@ -235,7 +233,7 @@ class Command { $filesize = intval( $this->limits['filesize'] ); if ( $time > 0 || $mem > 0 || $filesize > 0 || $wallTime > 0 ) { - $cmd = '/bin/bash ' . escapeshellarg( "$IP/includes/limit.sh" ) . ' ' . + $cmd = '/bin/bash ' . escapeshellarg( __DIR__ . '/limit.sh' ) . ' ' . escapeshellarg( $cmd ) . ' ' . escapeshellarg( "MW_INCLUDE_STDERR=" . ( $this->useStderr ? '1' : '' ) . ';' . diff --git a/includes/limit.sh b/includes/shell/limit.sh similarity index 100% rename from includes/limit.sh rename to includes/shell/limit.sh -- 2.20.1