SpecialRunJobs: Remove unused JSON response
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 11 Oct 2017 23:47:28 +0000 (00:47 +0100)
committerKrinkle <krinklemail@gmail.com>
Thu, 12 Oct 2017 17:20:40 +0000 (17:20 +0000)
In preparation of making SpecialRunJobs a normal special page
that doesn't override output handling, but instead uses normal
HTML-based responses for sync, and DeferredUpdates for async,
start by removing the text/plain JSON response it currently
has (also to verify that it really isn't used).

Bug: T175146
Change-Id: I8621c4e2ba94a7d312adaf04a46e1a214af909fe

includes/specials/SpecialRunJobs.php

index cb1e892..73fe70f 100644 (file)
@@ -99,13 +99,13 @@ class SpecialRunJobs extends UnlistedSpecialPage {
                // Do all of the specified tasks...
                if ( in_array( 'jobs', explode( '|', $params['tasks'] ) ) ) {
                        $runner = new JobRunner( LoggerFactory::getInstance( 'runJobs' ) );
-                       $response = $runner->run( [
+                       $runner->run( [
                                'type'     => $params['type'],
                                'maxJobs'  => $params['maxjobs'] ? $params['maxjobs'] : 1,
                                'maxTime'  => $params['maxtime'] ? $params['maxjobs'] : 30
                        ] );
                        if ( !$params['async'] ) {
-                               print FormatJson::encode( $response, true );
+                               print "Done\n";
                        }
                }
        }