Merge "Show user names as subpages of special pages in autocomplete search"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 30 Dec 2015 00:16:20 +0000 (00:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 30 Dec 2015 00:16:20 +0000 (00:16 +0000)
1  2 
autoload.php
includes/db/Database.php

diff --combined autoload.php
@@@ -352,21 -352,21 +352,21 @@@ $wgAutoloadLocalClasses = array
        'DoubleReplacer' => __DIR__ . '/includes/libs/replacers/DoubleReplacer.php',
        'DummyLinker' => __DIR__ . '/includes/Linker.php',
        'DummyTermColorer' => __DIR__ . '/maintenance/term/MWTerm.php',
 -      'Dump7ZipOutput' => __DIR__ . '/includes/Export.php',
 -      'DumpBZip2Output' => __DIR__ . '/includes/Export.php',
 +      'Dump7ZipOutput' => __DIR__ . '/includes/export/Dump7ZipOutput.php',
 +      'DumpBZip2Output' => __DIR__ . '/includes/export/DumpBZip2Output.php',
        'DumpDBZip2Output' => __DIR__ . '/maintenance/backup.inc',
 -      'DumpFileOutput' => __DIR__ . '/includes/Export.php',
 -      'DumpFilter' => __DIR__ . '/includes/Export.php',
 -      'DumpGZipOutput' => __DIR__ . '/includes/Export.php',
 +      'DumpFileOutput' => __DIR__ . '/includes/export/DumpFileOutput.php',
 +      'DumpFilter' => __DIR__ . '/includes/export/DumpFilter.php',
 +      'DumpGZipOutput' => __DIR__ . '/includes/export/DumpGZipOutput.php',
        'DumpIterator' => __DIR__ . '/maintenance/dumpIterator.php',
 -      'DumpLatestFilter' => __DIR__ . '/includes/Export.php',
 +      'DumpLatestFilter' => __DIR__ . '/includes/export/DumpLatestFilter.php',
        'DumpLinks' => __DIR__ . '/maintenance/dumpLinks.php',
        'DumpMessages' => __DIR__ . '/maintenance/language/dumpMessages.php',
 -      'DumpMultiWriter' => __DIR__ . '/includes/Export.php',
 -      'DumpNamespaceFilter' => __DIR__ . '/includes/Export.php',
 -      'DumpNotalkFilter' => __DIR__ . '/includes/Export.php',
 -      'DumpOutput' => __DIR__ . '/includes/Export.php',
 -      'DumpPipeOutput' => __DIR__ . '/includes/Export.php',
 +      'DumpMultiWriter' => __DIR__ . '/includes/export/DumpMultiWriter.php',
 +      'DumpNamespaceFilter' => __DIR__ . '/includes/export/DumpNamespaceFilter.php',
 +      'DumpNotalkFilter' => __DIR__ . '/includes/export/DumpNotalkFilter.php',
 +      'DumpOutput' => __DIR__ . '/includes/export/DumpOutput.php',
 +      'DumpPipeOutput' => __DIR__ . '/includes/export/DumpPipeOutput.php',
        'DumpRenderer' => __DIR__ . '/maintenance/renderDump.php',
        'DumpRev' => __DIR__ . '/maintenance/storage/dumpRev.php',
        'DuplicateJob' => __DIR__ . '/includes/jobqueue/jobs/DuplicateJob.php',
        'UserCache' => __DIR__ . '/includes/cache/UserCache.php',
        'UserDupes' => __DIR__ . '/maintenance/userDupes.inc',
        'UserMailer' => __DIR__ . '/includes/mail/UserMailer.php',
+       'UserNamePrefixSearch' => __DIR__ . '/includes/user/UserNamePrefixSearch.php',
        'UserNotLoggedIn' => __DIR__ . '/includes/exception/UserNotLoggedIn.php',
        'UserOptions' => __DIR__ . '/maintenance/userOptions.inc',
        'UserPasswordPolicy' => __DIR__ . '/includes/password/UserPasswordPolicy.php',
        'WebResponse' => __DIR__ . '/includes/WebResponse.php',
        'WikiCategoryPage' => __DIR__ . '/includes/page/WikiCategoryPage.php',
        'WikiDiff3' => __DIR__ . '/includes/diff/WikiDiff3.php',
 -      'WikiExporter' => __DIR__ . '/includes/Export.php',
 +      'WikiExporter' => __DIR__ . '/includes/export/WikiExporter.php',
        'WikiFilePage' => __DIR__ . '/includes/page/WikiFilePage.php',
        'WikiImporter' => __DIR__ . '/includes/Import.php',
        'WikiMap' => __DIR__ . '/includes/WikiMap.php',
        'XMPValidate' => __DIR__ . '/includes/media/XMPValidate.php',
        'Xhprof' => __DIR__ . '/includes/libs/Xhprof.php',
        'Xml' => __DIR__ . '/includes/Xml.php',
 -      'XmlDumpWriter' => __DIR__ . '/includes/Export.php',
 +      'XmlDumpWriter' => __DIR__ . '/includes/export/XmlDumpWriter.php',
        'XmlJsCode' => __DIR__ . '/includes/Xml.php',
        'XmlSelect' => __DIR__ . '/includes/XmlSelect.php',
        'XmlTypeCheck' => __DIR__ . '/includes/libs/XmlTypeCheck.php',
diff --combined includes/db/Database.php
@@@ -1286,13 -1286,14 +1286,14 @@@ abstract class DatabaseBase implements 
         * @param string|array $cond The condition array. See DatabaseBase::select() for details.
         * @param string $fname The function name of the caller.
         * @param string|array $options The query options. See DatabaseBase::select() for details.
+        * @param string|array $join_conds The join conditions. See DatabaseBase::select() for details.
         *
         * @return bool|array The values from the field, or false on failure
         * @throws DBUnexpectedError
         * @since 1.25
         */
        public function selectFieldValues(
-               $table, $var, $cond = '', $fname = __METHOD__, $options = array()
+               $table, $var, $cond = '', $fname = __METHOD__, $options = array(), $join_conds = array()
        ) {
                if ( $var === '*' ) { // sanity
                        throw new DBUnexpectedError( $this, "Cannot use a * field: got '$var'" );
                        $options = array( $options );
                }
  
-               $res = $this->select( $table, $var, $cond, $fname, $options );
+               $res = $this->select( $table, $var, $cond, $fname, $options, $join_conds );
                if ( $res === false ) {
                        return false;
                }
                }
        }
  
 +      final public function doAtomicSection( $fname, $callback ) {
 +              if ( !is_callable( $callback ) ) {
 +                      throw new UnexpectedValueException( "Invalid callback." );
 +              };
 +
 +              $this->startAtomic( $fname );
 +              try {
 +                      call_user_func_array( $callback, array( $this, $fname ) );
 +              } catch ( Exception $e ) {
 +                      $this->rollback( $fname );
 +                      throw $e;
 +              }
 +              $this->endAtomic( $fname );
 +      }
 +
        /**
         * Begin a transaction. If a transaction is already in progress,
         * that transaction will be committed before the new transaction is started.