X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitle.php;h=29615005311720f1ecd98393efc27bf6dabf6399;hb=075b90235e86de663c000db2c90253509bb97375;hp=09c5a3a1d5643dff0c5b6546e500e3f4110239de;hpb=fcf8c469eae9ed925a210522a78452ad4415de6a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Title.php b/includes/Title.php index 09c5a3a1d5..2961500531 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -273,7 +273,7 @@ class Title { /** * Make a Title object from a DB row * - * @param $row Object database row (needs at least page_title,page_namespace) + * @param stdClass $row Object database row (needs at least page_title,page_namespace) * @return Title corresponding Title */ public static function newFromRow( $row ) { @@ -286,7 +286,7 @@ class Title { * Load Title object fields from a DB row. * If false is given, the title will be treated as non-existing. * - * @param $row Object|bool database row + * @param $row stdClass|bool database row */ public function loadFromRow( $row ) { if ( $row ) { // page found @@ -1548,9 +1548,9 @@ class Title { $url = false; $matches = array(); - if ( !empty( $wgActionPaths ) && - preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches ) ) - { + if ( !empty( $wgActionPaths ) + && preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches ) + ) { $action = urldecode( $matches[2] ); if ( isset( $wgActionPaths[$action] ) ) { $query = $matches[1]; @@ -1564,12 +1564,12 @@ class Title { } } - if ( $url === false && - $wgVariantArticlePath && - $wgContLang->getCode() === $this->getPageLanguage()->getCode() && - $this->getPageLanguage()->hasVariants() && - preg_match( '/^variant=([^&]*)$/', $query, $matches ) ) - { + if ( $url === false + && $wgVariantArticlePath + && $wgContLang->getCode() === $this->getPageLanguage()->getCode() + && $this->getPageLanguage()->hasVariants() + && preg_match( '/^variant=([^&]*)$/', $query, $matches ) + ) { $variant = urldecode( $matches[1] ); if ( $this->getPageLanguage()->hasVariant( $variant ) ) { // Only do the variant replacement if the given variant is a valid @@ -2125,9 +2125,9 @@ class Title { if ( $title_protection['pt_create_perm'] == 'autoconfirmed' ) { $title_protection['pt_create_perm'] = 'editsemiprotected'; // B/C } - if ( $title_protection['pt_create_perm'] == '' || - !$user->isAllowed( $title_protection['pt_create_perm'] ) ) - { + if ( $title_protection['pt_create_perm'] == '' + || !$user->isAllowed( $title_protection['pt_create_perm'] ) + ) { $errors[] = array( 'titleprotected', User::whoIs( $title_protection['pt_user'] ), $title_protection['pt_reason'] ); } } @@ -2148,8 +2148,8 @@ class Title { } } elseif ( $action == 'delete' ) { if ( $doExpensiveQueries && $wgDeleteRevisionsLimit - && !$this->userCan( 'bigdelete', $user ) && $this->isBigDeletion() ) - { + && !$this->userCan( 'bigdelete', $user ) && $this->isBigDeletion() + ) { $errors[] = array( 'delete-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ); } } @@ -3216,8 +3216,8 @@ class Title { # Redundant interwiki prefix to the local wiki if ( $wgLocalInterwiki !== false - && 0 == strcasecmp( $this->mInterwiki, $wgLocalInterwiki ) ) - { + && 0 == strcasecmp( $this->mInterwiki, $wgLocalInterwiki ) + ) { if ( $dbkey == '' ) { # Can't have an empty self-link return false; @@ -3995,9 +3995,9 @@ class Title { // We don't know whether this function was called before // or after moving the root page, so check both // $this and $nt - if ( $oldSubpage->getArticleID() == $this->getArticleID() || - $oldSubpage->getArticleID() == $nt->getArticleID() ) - { + if ( $oldSubpage->getArticleID() == $this->getArticleID() + || $oldSubpage->getArticleID() == $nt->getArticleID() + ) { // When moving a page to a subpage of itself, // don't move it twice continue; @@ -4830,7 +4830,7 @@ class Title { $langObj = wfGetLangObj( $contentHandler->getPageLanguage( $this ) ); $this->mPageLanguage = array( $langObj->getCode(), $wgLanguageCode ); } else { - $langObj = wfGetLangObj( $this->mPageLanguage[0] ); + $langObj = wfGetLangObj( $this->mPageLanguage[0] ); } wfProfileOut( __METHOD__ ); return $langObj;