More self:: to $this->
authorSam Reed <reedy@users.mediawiki.org>
Sun, 25 Jul 2010 18:13:56 +0000 (18:13 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 25 Jul 2010 18:13:56 +0000 (18:13 +0000)
includes/parser/Parser.php
includes/upload/UploadBase.php
languages/Language.php
languages/classes/LanguageKk_cyrl.php

index 0645e8a..ae1e3f1 100644 (file)
@@ -212,7 +212,7 @@ class Parser {
                 */
                # $this->mUniqPrefix = "\x07UNIQ" . Parser::getRandomString();
                # Changed to \x7f to allow XML double-parsing -- TS
-               $this->mUniqPrefix = "\x7fUNIQ" . self::getRandomString();
+               $this->mUniqPrefix = "\x7fUNIQ" . $this->getRandomString();
 
 
                # Clear these on every parse, bug 4549
index e531012..21fc888 100644 (file)
@@ -362,7 +362,7 @@ abstract class UploadBase {
                        return array( 'uploadscripted' );
                }
                if( $this->mFinalExtension == 'svg' || $mime == 'image/svg+xml' ) {
-                       if( self::detectScriptInSvg( $this->mTempPath ) ) {
+                       if( $this->detectScriptInSvg( $this->mTempPath ) ) {
                                return array( 'uploadscripted' );
                        }
                }
index 29c1cee..211cf05 100644 (file)
@@ -1597,23 +1597,23 @@ class Language {
                        return ucfirst( $str );
                } else {
                        // fall back to more complex logic in case of multibyte strings
-                       return self::uc( $str, true );
+                       return $this->uc( $str, true );
                }
        }
 
        function uc( $str, $first = false ) {
                if ( function_exists( 'mb_strtoupper' ) ) {
                        if ( $first ) {
-                               if ( self::isMultibyte( $str ) ) {
+                               if ( $this->isMultibyte( $str ) ) {
                                        return mb_strtoupper( mb_substr( $str, 0, 1 ) ) . mb_substr( $str, 1 );
                                } else {
                                        return ucfirst( $str );
                                }
                        } else {
-                               return self::isMultibyte( $str ) ? mb_strtoupper( $str ) : strtoupper( $str );
+                               return $this->isMultibyte( $str ) ? mb_strtoupper( $str ) : strtoupper( $str );
                        }
                } else {
-                       if ( self::isMultibyte( $str ) ) {
+                       if ( $this->isMultibyte( $str ) ) {
                                list( $wikiUpperChars ) = $this->getCaseMaps();
                                $x = $first ? '^' : '';
                                return preg_replace_callback(
@@ -1632,7 +1632,7 @@ class Language {
                if ( !$o ) {
                        return strval( $str );
                } elseif ( $o >= 128 ) {
-                       return self::lc( $str, true );
+                       return $this->lc( $str, true );
                } elseif ( $o > 96 ) {
                        return $str;
                } else {
@@ -1644,16 +1644,16 @@ class Language {
        function lc( $str, $first = false ) {
                if ( function_exists( 'mb_strtolower' ) ) {
                        if ( $first ) {
-                               if ( self::isMultibyte( $str ) ) {
+                               if ( $this->isMultibyte( $str ) ) {
                                        return mb_strtolower( mb_substr( $str, 0, 1 ) ) . mb_substr( $str, 1 );
                                } else {
                                        return strtolower( substr( $str, 0, 1 ) ) . substr( $str, 1 );
                                }
                        } else {
-                               return self::isMultibyte( $str ) ? mb_strtolower( $str ) : strtolower( $str );
+                               return $this->isMultibyte( $str ) ? mb_strtolower( $str ) : strtolower( $str );
                        }
                } else {
-                       if ( self::isMultibyte( $str ) ) {
+                       if ( $this->isMultibyte( $str ) ) {
                                list( , $wikiLowerChars ) = self::getCaseMaps();
                                $x = $first ? '^' : '';
                                return preg_replace_callback(
@@ -1672,8 +1672,8 @@ class Language {
        }
 
        function ucwords( $str ) {
-               if ( self::isMultibyte( $str ) ) {
-                       $str = self::lc( $str );
+               if ( $this->isMultibyte( $str ) ) {
+                       $str = $this->lc( $str );
 
                        // regexp to find first letter in each word (i.e. after each space)
                        $replaceRegexp = "/^([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)| ([a-z]|[\\xc0-\\xff][\\x80-\\xbf]*)/";
@@ -1699,8 +1699,8 @@ class Language {
 
        # capitalize words at word breaks
        function ucwordbreaks( $str ) {
-               if ( self::isMultibyte( $str ) ) {
-                       $str = self::lc( $str );
+               if ( $this->isMultibyte( $str ) ) {
+                       $str = $this->lc( $str );
 
                        // since \b doesn't work for UTF-8, we explicitely define word break chars
                        $breaks = "[ \-\(\)\}\{\.,\?!]";
index 8eb35b7..1d52c63 100644 (file)
@@ -257,7 +257,7 @@ class LanguageKk_cyrl extends Language {
                $secondPerson = array( "z" ); // 1st plural, 2nd formal
                $thirdPerson = array( "ı", "i" ); // 3rd
 
-               $lastLetter = self::lastLetter( $word, $allVowels );
+               $lastLetter = $this->lastLetter( $word, $allVowels );
                $wordEnding =& $lastLetter[0];
                $wordLastVowel =& $lastLetter[1];