Merge "Add a test for named vs. positional parameter whitespace stripping"
[lhc/web/wiklou.git] / includes / Title.php
index b1569e2..c1e2ccf 100644 (file)
@@ -1398,7 +1398,7 @@ class Title {
         *
 
         * @param $query string|array an optional query string,
-        *   not used for interwiki     links. Can be specified as an associative array as well,
+        *   not used for interwiki links. Can be specified as an associative array as well,
         *   e.g., array( 'action' => 'edit' ) (keys and values will be URL-escaped).
         *   Some query patterns will trigger various shorturl path replacements.
         * @param $query2 Mixed: An optional secondary query array. This one MUST
@@ -3816,6 +3816,7 @@ class Title {
                        $newid = $redirectArticle->insertOn( $dbw );
                        if ( $newid ) { // sanity
                                $redirectRevision = new Revision( array(
+                                       'title'   => $this, // for determining the default content model
                                        'page'    => $newid,
                                        'comment' => $comment,
                                        'content'    => $redirectContent ) );
@@ -4474,7 +4475,7 @@ class Title {
 
        /**
         * Update page_touched timestamps and send squid purge messages for
-        * pages linking to this title. May be sent to the job queue depending
+        * pages linking to this title. May be sent to the job queue depending
         * on the number of links. Typically called on create and delete.
         */
        public function touchLinks() {
@@ -4701,8 +4702,6 @@ class Title {
                $contentHandler = ContentHandler::getForTitle( $this );
                $pageLang = $contentHandler->getPageLanguage( $this );
 
-               // Hook at the end because we don't want to override the above stuff
-               wfRunHooks( 'PageContentLanguage', array( $this, &$pageLang, $wgLang ) );
                return wfGetLangObj( $pageLang );
        }