Merge "Improve some parameter docs"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 10 Sep 2017 22:57:48 +0000 (22:57 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 10 Sep 2017 22:57:48 +0000 (22:57 +0000)
1  2 
includes/libs/virtualrest/ParsoidVirtualRESTService.php
includes/page/WikiPage.php

@@@ -58,14 -58,15 +58,14 @@@ class ParsoidVirtualRESTService extend
                        'url' => 'http://localhost:8000/',
                        'prefix' => 'localhost',
                        'domain' => 'localhost',
 +                      'timeout' => null,
                        'forwardCookies' => false,
                        'HTTPProxy' => null,
                ], $params );
                // Ensure that the url parameter has a trailing slash.
 -              $mparams['url'] = preg_replace(
 -                      '#/?$#',
 -                      '/',
 -                      $mparams['url']
 -              );
 +              if ( substr( $mparams['url'], -1 ) !== '/' ) {
 +                      $mparams['url'] .= '/';
 +              }
                // Ensure the correct domain format: strip protocol, port,
                // and trailing slash if present.  This lets us use
                // $wgCanonicalServer as a default value, which is very convenient.
         * Visual Editor "pretends" the V1 API is like.  A previous version of
         * ParsoidVirtualRESTService translated these to the "real" Parsoid v1
         * API.  We now translate these to the "real" Parsoid v3 API.
+        * @param array $req
+        * @param Closure $idGeneratorFunc
+        * @return array
+        * @throws Exception
         */
        public function onParsoid1Request( array $req, Closure $idGeneratorFunc ) {
                $parts = explode( '/', $req['url'] );
@@@ -213,6 -213,7 +213,7 @@@ class WikiPage implements Page, IDBAcce
         * @todo Move this UI stuff somewhere else
         *
         * @see ContentHandler::getActionOverrides
+        * @return array
         */
        public function getActionOverrides() {
                return $this->getContentHandler()->getActionOverrides();
                }
  
                if ( $useParserCache ) {
 -                      $parserOutput = ParserCache::singleton()->get( $this, $parserOptions );
 +                      $parserOutput = MediaWikiServices::getInstance()->getParserCache()
 +                              ->get( $this, $parserOptions );
                        if ( $parserOutput !== false ) {
                                return $parserOutput;
                        }
  
                // Save it to the parser cache.
                // Make sure the cache time matches page_touched to avoid double parsing.
 -              ParserCache::singleton()->save(
 +              MediaWikiServices::getInstance()->getParserCache()->save(
                        $editInfo->output, $this, $editInfo->popts,
                        $revision->getTimestamp(), $editInfo->revid
                );
         * @param array|string &$error Array of errors to append to
         * @param User $user The deleting user
         * @param array $tags Tags to apply to the deletion action
+        * @param string $logsubtype
         * @return Status Status object; if successful, $status->value is the log_id of the
         *   deletion log entry. If the page couldn't be deleted because it wasn't
         *   found, $status is a non-fatal 'cannotdelete' error