Dan-nl has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/186237

Change subject: GWToolset Special:Log Issue
......................................................................

GWToolset Special:Log Issue

GWToolset relies on PHP_SAPI in order to determine whether or not
a script is being run as a job runner job or from a browser. When
the job runner started to use hhvm instead of php, this caused
an issue; this patch attempts to fix that issue.

Bug: T87040
Change-Id: I6301d6960a1ec30ed1f1f1a4f73aa94bfa253bc3
---
M includes/Handlers/Forms/MetadataMappingHandler.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset 
refs/changes/37/186237/1

diff --git a/includes/Handlers/Forms/MetadataMappingHandler.php 
b/includes/Handlers/Forms/MetadataMappingHandler.php
index 3d1b844..e361e4f 100644
--- a/includes/Handlers/Forms/MetadataMappingHandler.php
+++ b/includes/Handlers/Forms/MetadataMappingHandler.php
@@ -438,7 +438,7 @@
                );
 
                // this method is being run by a wiki job.
-               if ( PHP_SAPI === 'cli' || empty( $this->SpecialPage ) ) {
+               if ( PHP_SAPI === 'cli' || PHP_SAPI === 'srv' || empty( 
$this->SpecialPage ) ) {
                        // add jobs created earlier by 
$this->_UploadHandler::saveMediafileViaJob to the JobQueue
                        if ( count( $this->_UploadHandler->mediafile_jobs ) > 0 
) {
                                JobQueueGroup::singleton()->push( 
$this->_UploadHandler->mediafile_jobs );
@@ -562,7 +562,7 @@
                        // when PHP_SAPI !== 'cli', this method is being run by 
a user as a SpecialPage,
                        // thus this is the creation of the initial 
uploadMetadataJob. subsequent
                        // uploadMetadataJobs are created in 
$this->processMetadata() when necessary.
-                       if ( PHP_SAPI !== 'cli' ) {
+                       if ( PHP_SAPI !== 'cli' && PHP_SAPI !== 'srv' ) {
                                $result =
                                        Html::rawElement(
                                                'h2',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6301d6960a1ec30ed1f1f1a4f73aa94bfa253bc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl <d_ent...@yahoo.com>

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

Reply via email to