r97952 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97951‎ | r97952 | r97953 >
Date:20:20, 23 September 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix single character access
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -767,7 +767,7 @@
768768
769769 /**
770770 * Return the prefixed title with spaces _without_ the interwiki prefix
771 - *
 771+ *
772772 * @return \type{\string} the title, prefixed by the namespace but not by the interwiki prefix, with spaces
773773 */
774774 public function getSemiPrefixedText() {
@@ -776,7 +776,7 @@
777777 $s = str_replace( '_', ' ', $s );
778778 $this->mSemiPrefixedText = $s;
779779 }
780 - return $this->mSemiPrefixedText;
 780+ return $this->mSemiPrefixedText;
781781 }
782782
783783 /**
@@ -1007,7 +1007,7 @@
10081008 public function escapeFullURL( $query = '' ) {
10091009 return htmlspecialchars( $this->getFullURL( $query ) );
10101010 }
1011 -
 1011+
10121012 /**
10131013 * HTML-escaped version of getCanonicalURL()
10141014 */
@@ -1019,7 +1019,7 @@
10201020 * Get the URL form for an internal link.
10211021 * - Used in various Squid-related code, in case we have a different
10221022 * internal hostname for the server from the exposed one.
1023 - *
 1023+ *
10241024 * This uses $wgInternalServer to qualify the path, or $wgServer
10251025 * if $wgInternalServer is not set. If the server variable used is
10261026 * protocol-relative, the URL will be expanded to http://
@@ -1044,9 +1044,9 @@
10451045 * Get the URL for a canonical link, for use in things like IRC and
10461046 * e-mail notifications. Uses $wgCanonicalServer and the
10471047 * GetCanonicalURL hook.
1048 - *
 1048+ *
10491049 * NOTE: Unlike getInternalURL(), the canonical URL includes the fragment
1050 - *
 1050+ *
10511051 * @param $query string An optional query string
10521052 * @param $variant string Language variant of URL (for sr, zh, ...)
10531053 * @return string The URL
@@ -1797,7 +1797,7 @@
17981798 // Interwiki title or immovable namespace. Hooks don't get to override here
17991799 return false;
18001800 }
1801 -
 1801+
18021802 $result = true;
18031803 wfRunHooks( 'TitleIsMovable', array( $this, &$result ) );
18041804 return $result;
@@ -2826,7 +2826,7 @@
28272827 : $dbkey;
28282828
28292829 // Any remaining initial :s are illegal.
2830 - if ( $dbkey !== '' && ':' == $dbkey { 0 } ) {
 2830+ if ( $dbkey !== '' && ':' == $dbkey[0] ) {
28312831 return false;
28322832 }
28332833
@@ -3392,7 +3392,7 @@
33933393 array( 'rc_timestamp' => $rcts, 'rc_namespace' => $newns, 'rc_title' => $newdbk, 'rc_new' => 1 ),
33943394 __METHOD__
33953395 );
3396 -
 3396+
33973397 if ( $wgEnableInterwikiTemplatesTracking && $wgGlobalDatabase ) {
33983398 $dbw2 = wfGetDB( DB_MASTER, array(), $wgGlobalDatabase );
33993399 $dbw2->delete( 'globaltemplatelinks',

Status & tagging log