From 3d60242fb5ee620e91d5301001fcded2dab05b24 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 22 Aug 2004 17:24:50 +0000 Subject: [PATCH] massive double to single quotes conversion. I have not noticed any bug after a lot of testing --- includes/Article.php | 47 +- includes/Block.php | 6 +- includes/Credits.php | 12 +- includes/Database.php | 158 +- includes/DatabaseFunctions.php | 14 +- includes/DatabasePostgreSQL.php | 38 +- includes/DateFormatter.php | 24 +- includes/DefaultSettings.php | 2 +- includes/Defines.php | 40 +- includes/DifferenceEngine.php | 60 +- includes/EditPage.php | 160 +- includes/GlobalFunctions.php | 48 +- includes/Image.php | 26 +- includes/ImagePage.php | 50 +- includes/LinkCache.php | 14 +- includes/LinksUpdate.php | 46 +- includes/LoadBalancer.php | 34 +- includes/LogPage.php | 26 +- includes/MagicWord.php | 74 +- includes/Math.php | 74 +- includes/MemcachedSessions.php | 4 +- includes/MessageCache.php | 50 +- includes/Metadata.php | 34 +- includes/Namespace.php | 36 +- includes/ObjectCache.php | 24 +- includes/OutputPage.php | 194 +- includes/PageHistory.php | 46 +- includes/Parser.php | 110 +- includes/ParserCache.php | 2 +- includes/ParserXML.php | 20 +- includes/Profiling.php | 38 +- includes/QueryPage.php | 10 +- includes/RecentChange.php | 46 +- includes/SearchEngine.php | 176 +- includes/SearchUpdate.php | 10 +- includes/Setup.php | 2 +- includes/SiteConfiguration.php | 2 +- includes/SiteStatsUpdate.php | 24 +- includes/SpecialRecentchanges.php | 20 +- includes/SquidUpdate.php | 6 +- includes/Title.php | 26 +- includes/Tokenizer.php | 12 +- includes/UpdateClasses.php | 14 +- includes/UserMailer.php | 26 +- includes/UserTalkUpdate.php | 4 +- includes/Utf8Case.php | 2962 ++++++++++++++--------------- includes/WebRequest.php | 12 +- includes/killthread.php | 14 +- includes/proxy_check.php | 4 +- 49 files changed, 2439 insertions(+), 2442 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index ebe5fb092a..03b2cf9790 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -45,7 +45,7 @@ class Article { $flagsField = $prefix . 'flags'; if ( isset( $row->$flagsField ) ) { - $flags = explode( ",", $row->$flagsField ); + $flags = explode( ',', $row->$flagsField ); } else { $flags = array(); } @@ -349,11 +349,11 @@ class Article { $t = $this->mTitle->getPrefixedText(); if ( isset( $oldid ) ) { $oldid = IntVal( $oldid ); - $t .= ",oldid={$oldid}"; + $t .= ',oldid='.$oldid; } if ( isset( $redirect ) ) { $redirect = ($redirect == 'no') ? 'no' : 'yes'; - $t .= ",redirect={$redirect}"; + $t .= ',redirect='.$redirect; } $this->mContent = wfMsg( 'missingarticle', $t ); @@ -371,6 +371,7 @@ class Article { # not to by either the function parameter or the query if ( ( 'no' != $redirect ) && ( false == $noredir ) ) { $rt = Title::newFromRedirect( $s->cur_text ); + # process if title object is valid and not special:userlogout if ( $rt && ! ( $rt->getNamespace() == NS_SPECIAL && $rt->getText() == 'Userlogout' ) ) { # Gotta hand redirects to special pages differently: # Fill the HTTP response "Location" header and ignore @@ -482,7 +483,7 @@ class Article { $this->mCounter = $s->cur_counter; $this->mTimestamp = wfTimestamp(TS_MW,$s->cur_timestamp); $this->mTouched = wfTimestamp(TS_MW,$s->cur_touched); - $this->mTitle->mRestrictions = explode( ",", trim( $s->cur_restrictions ) ); + $this->mTitle->mRestrictions = explode( ',', trim( $s->cur_restrictions ) ); $this->mTitle->mRestrictionsLoaded = true; } else { # oldid set, retrieve historical version $s = $dbr->selectRow( 'old', $this->getOldContentFields(), array( 'old_id' => $oldid ), @@ -540,7 +541,7 @@ class Article { if ( -1 == $this->mCounter ) { $id = $this->getID(); $dbr =& $this->getDB(); - $this->mCounter = $dbr->selectField( 'cur', 'cur_counter', "cur_id={$id}", + $this->mCounter = $dbr->selectField( 'cur', 'cur_counter', 'cur_id='.$id, 'Article::getCount', $this->getSelectOptions() ); } return $this->mCounter; @@ -733,12 +734,12 @@ class Article { $wgOut->addHTML( '
'.htmlspecialchars($this->mContent)."\n
" ); } else if ( $rt = Title::newFromRedirect( $text ) ) { # Display redirect - $imageUrl = "$wgStylePath/images/redirect.png"; + $imageUrl = $wgStylePath.'/images/redirect.png'; $targetUrl = $rt->escapeLocalURL(); $titleText = htmlspecialchars( $rt->getPrefixedText() ); $link = $sk->makeLinkObj( $rt ); - $wgOut->addHTML( "" . - "$link" ); + $wgOut->addHTML( '' . + ''.$link.'' ); } else if ( $pcache ) { # Display content and save to parser cache $wgOut->addPrimaryWikiText( $text, $this ); @@ -755,7 +756,7 @@ class Article { { $wgOut->addHTML( wfMsg ( 'markaspatrolledlink', $sk->makeKnownLinkObj ( $this->mTitle, wfMsg ( 'markaspatrolledtext' ), - "action=markpatrolled&rcid={$rcid}" ) + 'action=markpatrolled&rcid='.$rcid ) ) ); } @@ -1087,7 +1088,7 @@ class Article { function validate () { global $wgOut, $wgUseValidation; if( $wgUseValidation ) { - $wgOut->setPagetitle( wfMsg( 'validate' ) . ": " . $this->mTitle->getPrefixedText() ); + $wgOut->setPagetitle( wfMsg( 'validate' ) . ': ' . $this->mTitle->getPrefixedText() ); $wgOut->setRobotpolicy( 'noindex,follow' ); if( $this->mTitle->getNamespace() != 0 ) { $wgOut->addHTML( wfMsg( 'val_validate_article_namespace_only' ) ); @@ -1096,7 +1097,7 @@ class Article { $v = new Validation; $v->validate_form( $this->mTitle->getDBkey() ); } else { - $wgOut->errorpage( "nosuchaction", "nosuchactiontext" ); + $wgOut->errorpage( 'nosuchaction', 'nosuchactiontext' ); } } @@ -1210,7 +1211,7 @@ class Article { ); $log = new LogPage( wfMsg( 'protectlogpage' ), wfMsg( 'protectlogtext' ) ); - if ( $limit === "" ) { + if ( $limit === '' ) { $log->addEntry( wfMsg( 'unprotectedarticle', $this->mTitle->getPrefixedText() ), $reason ); } else { $log->addEntry( wfMsg( 'protectedarticle', $this->mTitle->getPrefixedText() ), $reason ); @@ -1458,7 +1459,7 @@ class Article { function doDelete( $reason ) { global $wgOut, $wgUser, $wgLang; $fname = 'Article::doDelete'; - wfDebug( "$fname\n" ); + wfDebug( $fname."\n" ); if ( $this->doDeleteArticle( $reason ) ) { $deleted = $this->mTitle->getPrefixedText(); @@ -1470,7 +1471,7 @@ class Article { $loglink = $sk->makeKnownLink( $wgLang->getNsText( NS_WIKIPEDIA ) . ':' . wfMsg( 'dellogpage' ), wfMsg( 'deletionlog' ) ); - $text = wfMsg( "deletedtext", $deleted, $loglink ); + $text = wfMsg( 'deletedtext', $deleted, $loglink ); $wgOut->addHTML( '

' . $text . "

\n" ); $wgOut->returnToMain( false ); @@ -1603,7 +1604,7 @@ class Article { function rollback() { global $wgUser, $wgLang, $wgOut, $wgRequest; - $fname = "Article::rollback"; + $fname = 'Article::rollback'; if ( ! $wgUser->isSysop() ) { $wgOut->sysopRequired(); @@ -1979,7 +1980,7 @@ class Article { $fname = 'Article::info'; if ( !$wgAllowPageInfo ) { - $wgOut->errorpage( "nosuchaction", "nosuchactiontext" ); + $wgOut->errorpage( 'nosuchaction', 'nosuchactiontext' ); return; } @@ -1991,18 +1992,18 @@ class Article { $wl_clause = array( 'wl_title' => $wgTitle->getDBkey(), 'wl_namespace' => $basenamespace ); $fullTitle = $wgTitle->makeName($basenamespace, $wgTitle->getDBKey()); $wgOut->setPagetitle( $fullTitle ); - $wgOut->setSubtitle( wfMsg( "infosubtitle" )); + $wgOut->setSubtitle( wfMsg( 'infosubtitle' )); # first, see if the page exists at all. $exists = $dbr->selectField( 'cur', 'COUNT(*)', $cur_clause, $fname, $this->getSelectOptions() ); if ($exists < 1) { - $wgOut->addHTML( wfMsg("noarticletext") ); + $wgOut->addHTML( wfMsg('noarticletext') ); } else { $numwatchers = $dbr->selectField( 'watchlist', 'COUNT(*)', $wl_clause, $fname, $this->getSelectOptions() ); - $wgOut->addHTML( "' ); } } } diff --git a/includes/Block.php b/includes/Block.php index 3be78ede0c..823fb5a794 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -47,7 +47,7 @@ class Block } # Get a ban from the DB, with either the given address or the given username - function load( $address = "", $user = 0, $killExpired = true ) + function load( $address = '', $user = 0, $killExpired = true ) { $fname = 'Block::load'; @@ -62,7 +62,7 @@ class Block } $ipblocks = $db->tableName( 'ipblocks' ); - if ( 0 == $user && $address=="" ) { + if ( 0 == $user && $address=='' ) { $sql = "SELECT * from $ipblocks $options"; } elseif ($address=="") { $sql = "SELECT * FROM $ipblocks WHERE ipb_user={$user} $options"; @@ -174,7 +174,7 @@ class Block $fname = 'Block::delete'; $dbw =& wfGetDB( DB_MASTER ); - if ( $this->mAddress == "" ) { + if ( $this->mAddress == '' ) { $condition = array( 'ipb_id' => $this->mId ); } else { $condition = array( 'ipb_address' => $this->mAddress ); diff --git a/includes/Credits.php b/includes/Credits.php index 4a68f2e556..312d4f1c57 100644 --- a/includes/Credits.php +++ b/includes/Credits.php @@ -24,18 +24,18 @@ function showCreditsPage($article) { global $wgOut; - $fname = "showCreditsPage"; + $fname = 'showCreditsPage'; wfProfileIn( $fname ); $wgOut->setPageTitle( $article->mTitle->getPrefixedText() ); - $wgOut->setSubtitle( wfMsg( "creditspage" ) ); + $wgOut->setSubtitle( wfMsg( 'creditspage' ) ); $wgOut->setArticleFlag( false ); $wgOut->setArticleRelated( true ); - $wgOut->setRobotpolicy( "noindex,nofollow" ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); if( $article->mTitle->getArticleID() == 0 ) { - $s = wfMsg( "nocredits" ); + $s = wfMsg( 'nocredits' ); } else { $s = getCredits($article, -1); } @@ -159,14 +159,14 @@ function getContributorCredits($article, $cnt, $showIfMax) { function creditLink($user_name, $link_text = '') { global $wgUser, $wgLang; $skin = $wgUser->getSkin(); - return $skin->makeLink($wgLang->getNsText(NS_USER) . ":" . $user_name, + return $skin->makeLink($wgLang->getNsText(NS_USER) . ':' . $user_name, (empty($link_text)) ? $user_name : $link_text); } function creditOthersLink($article) { global $wgUser, $wgLang; $skin = $wgUser->getSkin(); - return $skin->makeKnownLink($article->mTitle->getPrefixedText(), wfMsg('others'), "action=credits"); + return $skin->makeKnownLink($article->mTitle->getPrefixedText(), wfMsg('others'), 'action=credits'); } ?> diff --git a/includes/Database.php b/includes/Database.php index 6e8bfec1c8..d9adba7e8b 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -3,25 +3,25 @@ # This file deals with MySQL interface functions # and query specifics/optimisations # -require_once( "CacheManager.php" ); +require_once( 'CacheManager.php' ); -define( "LIST_COMMA", 0 ); -define( "LIST_AND", 1 ); -define( "LIST_SET", 2 ); +define( 'LIST_COMMA', 0 ); +define( 'LIST_AND', 1 ); +define( 'LIST_SET', 2 ); # Number of times to re-try an operation in case of deadlock -define( "DEADLOCK_TRIES", 4 ); +define( 'DEADLOCK_TRIES', 4 ); # Minimum time to wait before retry, in microseconds -define( "DEADLOCK_DELAY_MIN", 500000 ); +define( 'DEADLOCK_DELAY_MIN', 500000 ); # Maximum time to wait before retry -define( "DEADLOCK_DELAY_MAX", 1500000 ); +define( 'DEADLOCK_DELAY_MAX', 1500000 ); class Database { #------------------------------------------------------------------------------ # Variables #------------------------------------------------------------------------------ - /* private */ var $mLastQuery = ""; + /* private */ var $mLastQuery = ''; /* private */ var $mServer, $mUser, $mPassword, $mConn, $mDBname; /* private */ var $mOut, $mOpened = false; @@ -143,7 +143,7 @@ class Database { $success = false; @/**/$this->mConn = mysql_connect( $server, $user, $password ); - if ( $dbName != "" ) { + if ( $dbName != '' ) { if ( $this->mConn !== false ) { $success = @/**/mysql_select_db( $dbName, $this->mConn ); if ( !$success ) { @@ -184,7 +184,7 @@ class Database { } } - /* private */ function reportConnectionError( $msg = "") + /* private */ function reportConnectionError( $msg = '') { if ( $this->mFailFunction ) { if ( !is_int( $this->mFailFunction ) ) { @@ -198,14 +198,14 @@ class Database { # Usually aborts on failure # If errors are explicitly ignored, returns success - function query( $sql, $fname = "", $tempIgnore = false ) + function query( $sql, $fname = '', $tempIgnore = false ) { global $wgProfiling, $wgCommandLineMode; if ( $wgProfiling ) { # generalizeSQL will probably cut down the query to reasonable # logging size most of the time. The substr is really just a sanity check. - $profName = "query: " . substr( Database::generalizeSQL( $sql ), 0, 255 ); + $profName = 'query: ' . substr( Database::generalizeSQL( $sql ), 0, 255 ); wfProfileIn( $profName ); } @@ -213,7 +213,7 @@ class Database { if ( $this->debug() ) { $sqlx = substr( $sql, 0, 500 ); - $sqlx = wordwrap(strtr($sqlx,"\t\n"," ")); + $sqlx = wordwrap(strtr($sqlx,"\t\n",' ')); wfDebug( "SQL: $sqlx\n" ); } # Add a comment for easy SHOW PROCESSLIST interpretation @@ -287,7 +287,7 @@ class Database { @/**/$row = mysql_fetch_object( $res ); # FIXME: HACK HACK HACK HACK debug if( mysql_errno() ) { - wfDebugDieBacktrace( "Error in fetchObject(): " . htmlspecialchars( mysql_error() ) ); + wfDebugDieBacktrace( 'Error in fetchObject(): ' . htmlspecialchars( mysql_error() ) ); } return $row; } @@ -295,7 +295,7 @@ class Database { function fetchRow( $res ) { @/**/$row = mysql_fetch_array( $res ); if (mysql_errno() ) { - wfDebugDieBacktrace( "Error in fetchRow(): " . htmlspecialchars( mysql_error() ) ); + wfDebugDieBacktrace( 'Error in fetchRow(): ' . htmlspecialchars( mysql_error() ) ); } return $row; } @@ -303,7 +303,7 @@ class Database { function numRows( $res ) { @/**/$n = mysql_num_rows( $res ); if( mysql_errno() ) { - wfDebugDieBacktrace( "Error in numRows(): " . htmlspecialchars( mysql_error() ) ); + wfDebugDieBacktrace( 'Error in numRows(): ' . htmlspecialchars( mysql_error() ) ); } return $n; } @@ -318,7 +318,7 @@ class Database { # Simple UPDATE wrapper # Usually aborts on failure # If errors are explicitly ignored, returns success - function set( $table, $var, $value, $cond, $fname = "Database::set" ) + function set( $table, $var, $value, $cond, $fname = 'Database::set' ) { $table = $this->tableName( $table ); $sql = "UPDATE $table SET $var = '" . @@ -326,14 +326,14 @@ class Database { return !!$this->query( $sql, DB_MASTER, $fname ); } - function getField( $table, $var, $cond="", $fname = "Database::get", $options = array() ) { - return $this->selectField( $table, $var, $cond, $fname = "Database::get", $options = array() ); + function getField( $table, $var, $cond='', $fname = 'Database::get', $options = array() ) { + return $this->selectField( $table, $var, $cond, $fname = 'Database::get', $options = array() ); } # Simple SELECT wrapper, returns a single field, input must be encoded # Usually aborts on failure # If errors are explicitly ignored, returns FALSE on failure - function selectField( $table, $var, $cond="", $fname = "Database::selectField", $options = array() ) + function selectField( $table, $var, $cond='', $fname = 'Database::selectField', $options = array() ) { if ( !is_array( $options ) ) { $options = array( $options ); @@ -385,19 +385,19 @@ class Database { } # SELECT wrapper - function select( $table, $vars, $conds="", $fname = "Database::select", $options = array() ) + function select( $table, $vars, $conds='', $fname = 'Database::select', $options = array() ) { if ( is_array( $vars ) ) { - $vars = implode( ",", $vars ); + $vars = implode( ',', $vars ); } - if ($table!="") - $from = " FROM " .$this->tableName( $table ); + if ($table!='') + $from = ' FROM ' .$this->tableName( $table ); else - $from = ""; + $from = ''; list( $useIndex, $tailOpts ) = $this->makeSelectOptions( $options ); - if ( $conds !== false && $conds != "" ) { + if ( $conds !== false && $conds != '' ) { if ( is_array( $conds ) ) { $conds = $this->makeList( $conds, LIST_AND ); } @@ -408,7 +408,7 @@ class Database { return $this->query( $sql, $fname ); } - function getArray( $table, $vars, $conds, $fname = "Database::getArray", $options = array() ) { + function getArray( $table, $vars, $conds, $fname = 'Database::getArray', $options = array() ) { return $this->selectRow( $table, $vars, $conds, $fname, $options ); } @@ -421,7 +421,7 @@ class Database { # Takes an array of selected variables, and a condition map, which is ANDed # e.g. selectRow( "cur", array( "cur_id" ), array( "cur_namespace" => 0, "cur_title" => "Astronomy" ) ) # would return an object where $obj->cur_id is the ID of the Astronomy article - function selectRow( $table, $vars, $conds, $fname = "Database::selectRow", $options = array() ) { + function selectRow( $table, $vars, $conds, $fname = 'Database::selectRow', $options = array() ) { $options['LIMIT'] = 1; $res = $this->select( $table, $vars, $conds, $fname, $options ); if ( $res === false || !$this->numRows( $res ) ) { @@ -441,17 +441,17 @@ class Database { # as to avoid crashing php on some large strings. # $sql = preg_replace ( "/'([^\\\\']|\\\\.)*'|\"([^\\\\\"]|\\\\.)*\"/", "'X'", $sql); - $sql = str_replace ( "\\\\", "", $sql); - $sql = str_replace ( "\\'", "", $sql); - $sql = str_replace ( "\\\"", "", $sql); + $sql = str_replace ( "\\\\", '', $sql); + $sql = str_replace ( "\\'", '', $sql); + $sql = str_replace ( "\\\"", '', $sql); $sql = preg_replace ("/'.*'/s", "'X'", $sql); $sql = preg_replace ('/".*"/s', "'X'", $sql); # All newlines, tabs, etc replaced by single space - $sql = preg_replace ( "/\s+/", " ", $sql); + $sql = preg_replace ( "/\s+/", ' ', $sql); # All numbers => N - $sql = preg_replace ('/-?[0-9]+/s', "N", $sql); + $sql = preg_replace ('/-?[0-9]+/s', 'N', $sql); return $sql; } @@ -459,10 +459,10 @@ class Database { # Determines whether a field exists in a table # Usually aborts on failure # If errors are explicitly ignored, returns NULL on failure - function fieldExists( $table, $field, $fname = "Database::fieldExists" ) + function fieldExists( $table, $field, $fname = 'Database::fieldExists' ) { $table = $this->tableName( $table ); - $res = $this->query( "DESCRIBE $table", DB_SLAVE, $fname ); + $res = $this->query( 'DESCRIBE '.$table, DB_SLAVE, $fname ); if ( !$res ) { return NULL; } @@ -481,7 +481,7 @@ class Database { # Determines whether an index exists # Usually aborts on failure # If errors are explicitly ignored, returns NULL on failure - function indexExists( $table, $index, $fname = "Database::indexExists" ) + function indexExists( $table, $index, $fname = 'Database::indexExists' ) { $info = $this->indexInfo( $table, $index, $fname ); if ( is_null( $info ) ) { @@ -491,12 +491,12 @@ class Database { } } - function indexInfo( $table, $index, $fname = "Database::indexInfo" ) { + function indexInfo( $table, $index, $fname = 'Database::indexInfo' ) { # SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not. # SHOW INDEX should work for 3.x and up: # http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html $table = $this->tableName( $table ); - $sql = "SHOW INDEX FROM $table"; + $sql = 'SHOW INDEX FROM '.$table; $res = $this->query( $sql, $fname ); if ( !$res ) { return NULL; @@ -549,8 +549,8 @@ class Database { return !$indexInfo->Non_unique; } - function insertArray( $table, $a, $fname = "Database::insertArray", $options = array() ) { - return $this->insert( $table, $a, $fname = "Database::insertArray", $options = array() ); + function insertArray( $table, $a, $fname = 'Database::insertArray', $options = array() ) { + return $this->insert( $table, $a, $fname = 'Database::insertArray', $options = array() ); } # INSERT wrapper, inserts an array into a table @@ -560,7 +560,7 @@ class Database { # # Usually aborts on failure # If errors are explicitly ignored, returns success - function insert( $table, $a, $fname = "Database::insert", $options = array() ) + function insert( $table, $a, $fname = 'Database::insert', $options = array() ) { # No rows to insert, easy just return now if ( !count( $a ) ) { @@ -588,7 +588,7 @@ class Database { if ( $first ) { $first = false; } else { - $sql .= ","; + $sql .= ','; } $sql .= '(' . $this->makeList( $row ) . ')'; } @@ -598,12 +598,12 @@ class Database { return !!$this->query( $sql, $fname ); } - function updateArray( $table, $values, $conds, $fname = "Database::updateArray" ) { + function updateArray( $table, $values, $conds, $fname = 'Database::updateArray' ) { return $this->update( $table, $values, $conds, $fname ); } # UPDATE wrapper, takes a condition array and a SET array - function update( $table, $values, $conds, $fname = "Database::update" ) + function update( $table, $values, $conds, $fname = 'Database::update' ) { $table = $this->tableName( $table ); $sql = "UPDATE $table SET " . $this->makeList( $values, LIST_SET ); @@ -622,13 +622,13 @@ class Database { } $first = true; - $list = ""; + $list = ''; foreach ( $a as $field => $value ) { if ( !$first ) { if ( $mode == LIST_AND ) { - $list .= " AND "; + $list .= ' AND '; } else { - $list .= ","; + $list .= ','; } } else { $first = false; @@ -637,7 +637,7 @@ class Database { $list .= "($value)"; } else { if ( $mode == LIST_AND || $mode == LIST_SET ) { - $list .= "$field="; + $list .= $field.'='; } $list .= $this->addQuotes( $value ); } @@ -654,7 +654,7 @@ class Database { function startTimer( $timeout ) { global $IP; - if( function_exists( "mysql_thread_id" ) ) { + if( function_exists( 'mysql_thread_id' ) ) { # This will kill the query if it's still running after $timeout seconds. $tid = mysql_thread_id( $this->mConn ); exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" ); @@ -708,7 +708,7 @@ class Database { # USE INDEX clause # PostgreSQL doesn't have them and returns "" function useIndexClause( $index ) { - return "USE INDEX ($index)"; + return 'USE INDEX ('.$index.')'; } # REPLACE query wrapper @@ -720,7 +720,7 @@ class Database { # It may be more efficient to leave off unique indexes which are unlikely to collide. # However if you do this, you run the risk of encountering errors which wouldn't have # occurred in MySQL - function replace( $table, $uniqueIndexes, $rows, $fname = "Database::replace" ) { + function replace( $table, $uniqueIndexes, $rows, $fname = 'Database::replace' ) { $table = $this->tableName( $table ); # Single row case @@ -728,15 +728,15 @@ class Database { $rows = array( $rows ); } - $sql = "REPLACE INTO $table (" . implode( ',', array_flip( $rows[0] ) ) .") VALUES "; + $sql = "REPLACE INTO $table (" . implode( ',', array_flip( $rows[0] ) ) .') VALUES '; $first = true; foreach ( $rows as $row ) { if ( $first ) { $first = false; } else { - $sql .= ","; + $sql .= ','; } - $sql .= "(" . $this->makeList( $row ) . ")"; + $sql .= '(' . $this->makeList( $row ) . ')'; } return $this->query( $sql, $fname ); } @@ -754,7 +754,7 @@ class Database { # join condition matches, set $conds='*' # # DO NOT put the join condition in $conds - function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = "Database::deleteJoin" ) { + function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = 'Database::deleteJoin' ) { if ( !$conds ) { wfDebugDieBacktrace( 'Database::deleteJoin() called with empty $conds' ); } @@ -763,7 +763,7 @@ class Database { $joinTable = $this->tableName( $joinTable ); $sql = "DELETE $delTable FROM $delTable, $joinTable WHERE $delVar=$joinVar "; if ( $conds != '*' ) { - $sql .= " AND " . $this->makeList( $conds, LIST_AND ); + $sql .= ' AND ' . $this->makeList( $conds, LIST_AND ); } return $this->query( $sql, $fname ); @@ -773,7 +773,7 @@ class Database { function textFieldSize( $table, $field ) { $table = $this->tableName( $table ); $sql = "SHOW COLUMNS FROM $table LIKE \"$field\";"; - $res = $this->query( $sql, "Database::textFieldSize" ); + $res = $this->query( $sql, 'Database::textFieldSize' ); $row = $this->fetchObject( $res ); $this->freeResult( $res ); @@ -790,14 +790,14 @@ class Database { } # Use $conds == "*" to delete all rows - function delete( $table, $conds, $fname = "Database::delete" ) { + function delete( $table, $conds, $fname = 'Database::delete' ) { if ( !$conds ) { - wfDebugDieBacktrace( "Database::delete() called with no conditions" ); + wfDebugDieBacktrace( 'Database::delete() called with no conditions' ); } $table = $this->tableName( $table ); $sql = "DELETE FROM $table "; if ( $conds != '*' ) { - $sql .= "WHERE " . $this->makeList( $conds, LIST_AND ); + $sql .= 'WHERE ' . $this->makeList( $conds, LIST_AND ); } return $this->query( $sql, $fname ); } @@ -809,17 +809,17 @@ class Database { function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'Database::insertSelect' ) { $destTable = $this->tableName( $destTable ); $srcTable = $this->tableName( $srcTable ); - $sql = "INSERT INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ")" . - " SELECT " . implode( ',', $varMap ) . + $sql = "INSERT INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ')' . + ' SELECT ' . implode( ',', $varMap ) . " FROM $srcTable"; if ( $conds != '*' ) { - $sql .= " WHERE " . $this->makeList( $conds, LIST_AND ); + $sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND ); } return $this->query( $sql, $fname ); } function limitResult($limit,$offset) { - return " LIMIT ".(is_numeric($offset)?"{$offset},":"")."{$limit} "; + return ' LIMIT '.(is_numeric($offset)?"{$offset},":"")."{$limit} "; } function wasDeadlock() { @@ -829,7 +829,7 @@ class Database { function deadlockLoop() { $myFname = 'Database::deadlockLoop'; - $this->query( "BEGIN", $myFname ); + $this->query( 'BEGIN', $myFname ); $args = func_get_args(); $function = array_shift( $args ); $oldIgnore = $dbw->ignoreErrors( true ); @@ -856,11 +856,11 @@ class Database { } while( $dbw->wasDeadlock && --$tries > 0 ); $this->ignoreErrors( $oldIgnore ); if ( $tries <= 0 ) { - $this->query( "ROLLBACK", $myFname ); + $this->query( 'ROLLBACK', $myFname ); $this->reportQueryError( $error, $errno, $sql, $fname ); return false; } else { - $this->query( "COMMIT", $myFname ); + $this->query( 'COMMIT', $myFname ); return $retVal; } } @@ -869,7 +869,7 @@ class Database { function masterPosWait( $file, $pos, $timeout ) { $encFile = $this->strencode( $file ); $sql = "SELECT MASTER_POS_WAIT('$encFile', $pos, $timeout)"; - $res = $this->query( $sql, "Database::masterPosWait" ); + $res = $this->query( $sql, 'Database::masterPosWait' ); if ( $res && $row = $this->fetchRow( $res ) ) { $this->freeResult( $res ); return $row[0]; @@ -957,14 +957,14 @@ function wfEmergencyAbort( &$conn, $error ) { global $wgTitle, $wgUseFileCache, $title, $wgInputEncoding, $wgSiteNotice, $wgOutputEncoding; if( !headers_sent() ) { - header( "HTTP/1.0 500 Internal Server Error" ); - header( "Content-type: text/html; charset=$wgOutputEncoding" ); + header( 'HTTP/1.0 500 Internal Server Error' ); + header( 'Content-type: text/html; charset='.$wgOutputEncoding ); /* Don't cache error pages! They cause no end of trouble... */ - header( "Cache-control: none" ); - header( "Pragma: nocache" ); + header( 'Cache-control: none' ); + header( 'Pragma: nocache' ); } $msg = $wgSiteNotice; - if($msg == "") $msg = wfMsgNoDB( "noconnect", $error ); + if($msg == '') $msg = wfMsgNoDB( 'noconnect', $error ); $text = $msg; if($wgUseFileCache) { @@ -975,20 +975,20 @@ function wfEmergencyAbort( &$conn, $error ) { $t = Title::newFromURL( $title ); } elseif (@/**/$_REQUEST['search']) { $search = $_REQUEST['search']; - echo wfMsgNoDB( "searchdisabled" ); - echo wfMsgNoDB( "googlesearch", htmlspecialchars( $search ), $wgInputEncoding ); + echo wfMsgNoDB( 'searchdisabled' ); + echo wfMsgNoDB( 'googlesearch', htmlspecialchars( $search ), $wgInputEncoding ); wfErrorExit(); } else { - $t = Title::newFromText( wfMsgNoDB( "mainpage" ) ); + $t = Title::newFromText( wfMsgNoDB( 'mainpage' ) ); } } $cache = new CacheManager( $t ); if( $cache->isFileCached() ) { - $msg = "

$msg
\n" . - wfMsgNoDB( "cachederror" ) . "

\n"; + $msg = '

'.$msg."
\n" . + wfMsgNoDB( 'cachederror' ) . "

\n"; - $tag = "
"; + $tag = '
'; $text = str_replace( $tag, $tag . $msg, diff --git a/includes/DatabaseFunctions.php b/includes/DatabaseFunctions.php index e0a766d0e4..8bd5b6a92e 100644 --- a/includes/DatabaseFunctions.php +++ b/includes/DatabaseFunctions.php @@ -7,12 +7,12 @@ # Usually aborts on failure # If errors are explicitly ignored, returns success -function wfQuery( $sql, $db, $fname = "" ) +function wfQuery( $sql, $db, $fname = '' ) { global $wgOut; if ( !is_numeric( $db ) ) { # Someone has tried to call this the old way - $wgOut->fatalError( wfMsgNoDB( "wrong_wfQuery_params", $db, $sql ) ); + $wgOut->fatalError( wfMsgNoDB( 'wrong_wfQuery_params', $db, $sql ) ); } $c =& wfGetDB( $db ); if ( $c !== false ) { @@ -22,7 +22,7 @@ function wfQuery( $sql, $db, $fname = "" ) } } -function wfSingleQuery( $sql, $dbi, $fname = "" ) +function wfSingleQuery( $sql, $dbi, $fname = '' ) { $db =& wfGetDB( $dbi ); $res = $db->query($sql, $fname ); @@ -200,7 +200,7 @@ function wfSetSQL( $table, $var, $value, $cond, $dbi = DB_MASTER ) } } -function wfGetSQL( $table, $var, $cond="", $dbi = DB_LAST ) +function wfGetSQL( $table, $var, $cond='', $dbi = DB_LAST ) { $db =& wfGetDB( $dbi ); if ( $db !== false ) { @@ -230,7 +230,7 @@ function wfIndexExists( $table, $index, $dbi = DB_LAST ) } } -function wfInsertArray( $table, $array, $fname = "wfInsertArray", $dbi = DB_MASTER ) +function wfInsertArray( $table, $array, $fname = 'wfInsertArray', $dbi = DB_MASTER ) { $db =& wfGetDB( $dbi ); if ( $db !== false ) { @@ -240,7 +240,7 @@ function wfInsertArray( $table, $array, $fname = "wfInsertArray", $dbi = DB_MAST } } -function wfGetArray( $table, $vars, $conds, $fname = "wfGetArray", $dbi = DB_LAST ) +function wfGetArray( $table, $vars, $conds, $fname = 'wfGetArray', $dbi = DB_LAST ) { $db =& wfGetDB( $dbi ); if ( $db !== false ) { @@ -250,7 +250,7 @@ function wfGetArray( $table, $vars, $conds, $fname = "wfGetArray", $dbi = DB_LAS } } -function wfUpdateArray( $table, $values, $conds, $fname = "wfUpdateArray", $dbi = DB_MASTER ) +function wfUpdateArray( $table, $values, $conds, $fname = 'wfUpdateArray', $dbi = DB_MASTER ) { $db =& wfGetDB( $dbi ); if ( $db !== false ) { diff --git a/includes/DatabasePostgreSQL.php b/includes/DatabasePostgreSQL.php index 1cef1f2ee0..f98814f816 100644 --- a/includes/DatabasePostgreSQL.php +++ b/includes/DatabasePostgreSQL.php @@ -14,7 +14,7 @@ # # Hashar -require_once( "Database.php" ); +require_once( 'Database.php' ); class DatabasePgsql extends Database { var $mInsertId = NULL; @@ -49,7 +49,7 @@ class DatabasePgsql extends Database { $success = false; - if ( "" != $dbName ) { + if ( '' != $dbName ) { # start a database connection @$this->mConn = pg_connect("host=$server dbname=$dbName user=$user password=$password"); if ( $this->mConn == false ) { @@ -79,7 +79,7 @@ class DatabasePgsql extends Database { return $this->mLastResult=pg_query( $this->mConn , $sql); } - function queryIgnore( $sql, $fname = "" ) { + function queryIgnore( $sql, $fname = '' ) { return $this->query( $sql, $fname, true ); } @@ -96,7 +96,7 @@ class DatabasePgsql extends Database { # hashar : not sure if the following test really trigger if the object # fetching failled. if( pg_last_error($this->mConn) ) { - wfDebugDieBacktrace( "SQL error: " . htmlspecialchars( pg_last_error($this->mConn) ) ); + wfDebugDieBacktrace( 'SQL error: ' . htmlspecialchars( pg_last_error($this->mConn) ) ); } return $row; } @@ -104,7 +104,7 @@ class DatabasePgsql extends Database { function fetchRow( $res ) { @$row = pg_fetch_array( $res ); if( pg_last_error($this->mConn) ) { - wfDebugDieBacktrace( "SQL error: " . htmlspecialchars( pg_last_error($this->mConn) ) ); + wfDebugDieBacktrace( 'SQL error: ' . htmlspecialchars( pg_last_error($this->mConn) ) ); } return $row; } @@ -112,7 +112,7 @@ class DatabasePgsql extends Database { function numRows( $res ) { @$n = pg_num_rows( $res ); if( pg_last_error($this->mConn) ) { - wfDebugDieBacktrace( "SQL error: " . htmlspecialchars( pg_last_error($this->mConn) ) ); + wfDebugDieBacktrace( 'SQL error: ' . htmlspecialchars( pg_last_error($this->mConn) ) ); } return $n; } @@ -134,7 +134,7 @@ class DatabasePgsql extends Database { # Returns information about an index # If errors are explicitly ignored, returns NULL on failure - function indexInfo( $table, $index, $fname = "Database::indexExists" ) + function indexInfo( $table, $index, $fname = 'Database::indexExists' ) { $sql = "SELECT indexname FROM pg_indexes WHERE tablename='$table'"; $res = $this->query( $sql, $fname ); @@ -152,7 +152,7 @@ class DatabasePgsql extends Database { function fieldInfo( $table, $field ) { - wfDebugDieBacktrace( "Database::fieldInfo() error : mysql_fetch_field() not implemented for postgre" ); + wfDebugDieBacktrace( 'Database::fieldInfo() error : mysql_fetch_field() not implemented for postgre' ); /* $res = $this->query( "SELECT * FROM '$table' LIMIT 1" ); $n = pg_num_fields( $res ); @@ -167,7 +167,7 @@ class DatabasePgsql extends Database { return false;*/ } - function insertArray( $table, $a, $fname = "Database::insertArray", $options = array() ) { + function insertArray( $table, $a, $fname = 'Database::insertArray', $options = array() ) { # PostgreSQL doesn't support options # We have a go at faking one of them # TODO: DELAYED, LOW_PRIORITY @@ -193,7 +193,7 @@ class DatabasePgsql extends Database { function startTimer( $timeout ) { global $IP; - wfDebugDieBacktrace( "Database::startTimer() error : mysql_thread_id() not implemented for postgre" ); + wfDebugDieBacktrace( 'Database::startTimer() error : mysql_thread_id() not implemented for postgre' ); /*$tid = mysql_thread_id( $this->mConn ); exec( "php $IP/killthread.php $timeout $tid &>/dev/null &" );*/ } @@ -219,7 +219,7 @@ class DatabasePgsql extends Database { # Return the next in a sequence, save the value for retrieval via insertId() function nextSequenceValue( $seqName ) { - $value = $this->getField(""," nextval('" . $seqName . "')"); + $value = $this->getField(''," nextval('" . $seqName . "')"); $this->mInsertId = $value; return $value; } @@ -239,7 +239,7 @@ class DatabasePgsql extends Database { # It may be more efficient to leave off unique indexes which are unlikely to collide. # However if you do this, you run the risk of encountering errors which wouldn't have # occurred in MySQL - function replace( $table, $uniqueIndexes, $rows, $fname = "Database::replace" ) { + function replace( $table, $uniqueIndexes, $rows, $fname = 'Database::replace' ) { $table = $this->tableName( $table ); # Single row case @@ -256,7 +256,7 @@ class DatabasePgsql extends Database { if ( $first ) { $first = false; } else { - $sql .= ") OR ("; + $sql .= ') OR ('; } if ( is_array( $index ) ) { $first2 = true; @@ -265,15 +265,15 @@ class DatabasePgsql extends Database { if ( $first2 ) { $first2 = false; } else { - $sql .= " AND "; + $sql .= ' AND '; } - $sql .= "$col=" . $this->addQuotes( $row[$col] ); + $sql .= $col.'=' . $this->addQuotes( $row[$col] ); } } else { - $sql .= "$index=" . $this->addQuotes( $row[$index] ); + $sql .= $index.'=' . $this->addQuotes( $row[$index] ); } } - $sql .= ")"; + $sql .= ')'; $this->query( $sql, $fname ); } @@ -294,9 +294,9 @@ class DatabasePgsql extends Database { $joinTable = $this->tableName( $joinTable ); $sql = "DELETE FROM $delTable WHERE $delVar IN (SELECT $joinVar FROM $joinTable "; if ( $conds != '*' ) { - $sql .= "WHERE " . $this->makeList( $conds, LIST_AND ); + $sql .= 'WHERE ' . $this->makeList( $conds, LIST_AND ); } - $sql .= ")"; + $sql .= ')'; $this->query( $sql, $fname ); } diff --git a/includes/DateFormatter.php b/includes/DateFormatter.php index 45196512f5..2d3fdef36c 100755 --- a/includes/DateFormatter.php +++ b/includes/DateFormatter.php @@ -1,17 +1,17 @@ diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 7b9acb8991..744dbe778b 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -20,16 +20,16 @@ class DifferenceEngine { function showDiffPage() { global $wgUser, $wgTitle, $wgOut, $wgLang, $wgOnlySysopsCanPatrol, $wgUseRCPatrol; - $fname = "DifferenceEngine::showDiffPage"; + $fname = 'DifferenceEngine::showDiffPage'; wfProfileIn( $fname ); $t = $wgTitle->getPrefixedText() . " (Diff: {$this->mOldid}, " . "{$this->mNewid})"; - $mtext = wfMsg( "missingarticle", $t ); + $mtext = wfMsg( 'missingarticle', $t ); $wgOut->setArticleFlag( false ); if ( ! $this->loadText() ) { - $wgOut->setPagetitle( wfMsg( "errorpagetitle" ) ); + $wgOut->setPagetitle( wfMsg( 'errorpagetitle' ) ); $wgOut->addHTML( $mtext ); wfProfileOut( $fname ); return; @@ -41,10 +41,10 @@ class DifferenceEngine { if( $oldTitle == $newTitle ) { $wgOut->setPageTitle( $newTitle ); } else { - $wgOut->setPageTitle( $oldTitle . ", " . $newTitle ); + $wgOut->setPageTitle( $oldTitle . ', ' . $newTitle ); } - $wgOut->setSubtitle( wfMsg( "difference" ) ); - $wgOut->setRobotpolicy( "noindex,follow" ); + $wgOut->setSubtitle( wfMsg( 'difference' ) ); + $wgOut->setRobotpolicy( 'noindex,follow' ); if ( !( $this->mOldPage->userCanRead() && $this->mNewPage->userCanRead() ) ) { $wgOut->loginToUse(); @@ -55,7 +55,7 @@ class DifferenceEngine { $sk = $wgUser->getSkin(); $talk = $wgLang->getNsText( NS_TALK ); - $contribs = wfMsg( "contribslink" ); + $contribs = wfMsg( 'contribslink' ); $this->mOldComment = $sk->formatComment($this->mOldComment); $this->mNewComment = $sk->formatComment($this->mNewComment); @@ -64,23 +64,23 @@ class DifferenceEngine { $newUserLink = $sk->makeLinkObj( Title::makeTitle( NS_USER, $this->mNewUser ), $this->mNewUser ); $oldUTLink = $sk->makeLinkObj( Title::makeTitle( NS_USER_TALK, $this->mOldUser ), $talk ); $newUTLink = $sk->makeLinkObj( Title::makeTitle( NS_USER_TALK, $this->mNewUser ), $talk ); - $oldContribs = $sk->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, "Contributions" ), $contribs, - "target=" . urlencode($this->mOldUser) ); - $newContribs = $sk->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, "Contributions" ), $contribs, - "target=" . urlencode($this->mNewUser) ); + $oldContribs = $sk->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, 'Contributions' ), $contribs, + 'target=' . urlencode($this->mOldUser) ); + $newContribs = $sk->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, 'Contributions' ), $contribs, + 'target=' . urlencode($this->mNewUser) ); if ( !$this->mNewid && $wgUser->isSysop() ) { - $rollback = "   [" . $sk->makeKnownLinkObj( $wgTitle, wfMsg( "rollbacklink" ), - "action=rollback&from=" . urlencode($this->mNewUser) ) . "]"; + $rollback = '   [' . $sk->makeKnownLinkObj( $wgTitle, wfMsg( 'rollbacklink' ), + 'action=rollback&from=' . urlencode($this->mNewUser) ) . ']'; } else { - $rollback = ""; + $rollback = ''; } if ( $wgUseRCPatrol && $this->mRcidMarkPatrolled != 0 && $wgUser->getID() != 0 && ( $wgUser->isSysop() || !$wgOnlySysopsCanPatrol ) ) { - $patrol = " [" . $sk->makeKnownLinkObj( $wgTitle, wfMsg( 'markaspatrolleddiff' ), - "action=markpatrolled&rcid={$this->mRcidMarkPatrolled}" ) . "]"; + $patrol = ' [' . $sk->makeKnownLinkObj( $wgTitle, wfMsg( 'markaspatrolleddiff' ), + "action=markpatrolled&rcid={$this->mRcidMarkPatrolled}" ) . ']'; } else { - $patrol = ""; + $patrol = ''; } $oldHeader = "{$this->mOldtitle}
$oldUserLink " . @@ -112,7 +112,7 @@ cellpadding='0' cellspacing='4px' class='diff'> {$ntitle} \n" ); if ( $wgUseExternalDiffEngine ) { - dl("php_wikidiff.so"); + dl('php_wikidiff.so'); $wgOut->addHTML( wikidiff_do_diff( $otext, $ntext, 2) ); } else { $ota = explode( "\n", $otext); @@ -132,12 +132,12 @@ cellpadding='0' cellspacing='4px' class='diff'> function loadText() { global $wgTitle, $wgOut, $wgLang; - $fname = "DifferenceEngine::loadText"; + $fname = 'DifferenceEngine::loadText'; $dbr =& wfGetDB( DB_SLAVE ); if ( 0 == $this->mNewid || 0 == $this->mOldid ) { $wgOut->setArticleFlag( true ); - $this->mNewtitle = wfMsg( "currentrev" ); + $this->mNewtitle = wfMsg( 'currentrev' ); $id = $wgTitle->getArticleID(); $s = $dbr->getArray( 'cur', array( 'cur_text', 'cur_user_text', 'cur_comment' ), @@ -162,7 +162,7 @@ cellpadding='0' cellspacing='4px' class='diff'> $t = $wgLang->timeanddate( $s->old_timestamp, true ); $this->mNewPage = Title::MakeTitle( $s->old_namespace, $s->old_title ); - $this->mNewtitle = wfMsg( "revisionasof", $t ); + $this->mNewtitle = wfMsg( 'revisionasof', $t ); $this->mNewUser = $s->old_user_text; $this->mNewComment = $s->old_comment; } @@ -188,7 +188,7 @@ cellpadding='0' cellspacing='4px' class='diff'> $this->mOldtext = Article::getRevisionText( $s ); $t = $wgLang->timeanddate( $s->old_timestamp, true ); - $this->mOldtitle = wfMsg( "revisionasof", $t ); + $this->mOldtitle = wfMsg( 'revisionasof', $t ); $this->mOldUser = $s->old_user_text; $this->mOldComment = $s->old_comment; @@ -210,7 +210,7 @@ class _DiffOp { var $closing; function reverse() { - trigger_error("pure virtual", E_USER_ERROR); + trigger_error('pure virtual', E_USER_ERROR); } function norig() { @@ -809,7 +809,7 @@ class Diff } $lcs = $this->lcs(); - trigger_error("Diff okay: LCS = $lcs", E_USER_NOTICE); + trigger_error('Diff okay: LCS = '.$lcs, E_USER_NOTICE); } } @@ -966,7 +966,7 @@ class DiffFormatter elseif ($edit->type == 'change') $this->_changed($edit->orig, $edit->closing); else - trigger_error("Unknown edit type", E_USER_ERROR); + trigger_error('Unknown edit type', E_USER_ERROR); } $this->_end_block(); } @@ -1007,10 +1007,10 @@ class DiffFormatter } function _added($lines) { - $this->_lines($lines, ">"); + $this->_lines($lines, '>'); } function _deleted($lines) { - $this->_lines($lines, "<"); + $this->_lines($lines, '<'); } function _changed($orig, $closing) { @@ -1137,8 +1137,8 @@ class TableDiffFormatter extends DiffFormatter } function _block_header( $xbeg, $xlen, $ybeg, $ylen ) { - $l1 = wfMsg( "lineno", $xbeg ); - $l2 = wfMsg( "lineno", $ybeg ); + $l1 = wfMsg( 'lineno', $xbeg ); + $l2 = wfMsg( 'lineno', $ybeg ); $r = ''.$l1."\n" . ''.$l2."\n"; @@ -1153,7 +1153,7 @@ class TableDiffFormatter extends DiffFormatter function _end_block() { } - function _lines( $lines, $prefix=' ', $color="white" ) { + function _lines( $lines, $prefix=' ', $color='white' ) { } function addedLine( $line ) { diff --git a/includes/EditPage.php b/includes/EditPage.php index 0018b5a907..1486d20560 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -13,8 +13,8 @@ class EditPage { # Form values var $save = false, $preview = false; var $minoredit = false, $watchthis = false; - var $textbox1 = "", $textbox2 = "", $summary = ""; - var $edittime = "", $section = ""; + var $textbox1 = '', $textbox2 = '', $summary = ''; + var $edittime = '', $section = ''; var $oldid = 0; function EditPage( $article ) { @@ -47,18 +47,18 @@ class EditPage { } if ( wfReadOnly() ) { if( $this->save || $this->preview ) { - $this->editForm( "preview" ); + $this->editForm( 'preview' ); } else { $wgOut->readOnlyPage( $this->mArticle->getContent( true ) ); } return; } if ( $this->save ) { - $this->editForm( "save" ); + $this->editForm( 'save' ); } else if ( $this->preview ) { - $this->editForm( "preview" ); + $this->editForm( 'preview' ); } else { # First time through - $this->editForm( "initial" ); + $this->editForm( 'initial' ); } } @@ -66,12 +66,12 @@ class EditPage { # These fields need to be checked for encoding. # Also remove trailing whitespace, but don't remove _initial_ # whitespace from the text boxes. This may be significant formatting. - $this->textbox1 = rtrim( $request->getText( "wpTextbox1" ) ); - $this->textbox2 = rtrim( $request->getText( "wpTextbox2" ) ); - $this->summary = trim( $request->getText( "wpSummary" ) ); + $this->textbox1 = rtrim( $request->getText( 'wpTextbox1' ) ); + $this->textbox2 = rtrim( $request->getText( 'wpTextbox2' ) ); + $this->summary = trim( $request->getText( 'wpSummary' ) ); $this->edittime = $request->getVal( 'wpEdittime' ); - if( !preg_match( '/^\d{14}$/', $this->edittime )) $this->edittime = ""; + if( !preg_match( '/^\d{14}$/', $this->edittime )) $this->edittime = ''; $this->preview = $request->getCheck( 'wpPreview' ); $this->save = $request->wasPosted() && !$this->preview; @@ -117,11 +117,11 @@ class EditPage { $isCssJsSubpage = (Namespace::getUser() == $wgTitle->getNamespace() and preg_match("/\\.(css|js)$/", $wgTitle->getText() )); if(!$this->mTitle->getArticleID()) { # new article - $wgOut->addWikiText(wfmsg("newarticletext")); + $wgOut->addWikiText(wfmsg('newarticletext')); } if( Namespace::isTalk( $this->mTitle->getNamespace() ) ) { - $wgOut->addWikiText(wfmsg("talkpagetext")); + $wgOut->addWikiText(wfmsg('talkpagetext')); } # Attempt submission here. This will check for edit conflicts, @@ -129,7 +129,7 @@ class EditPage { # that edit() already checked just in case someone tries to sneak # in the back door with a hand-edited submission URL. - if ( "save" == $formtype ) { + if ( 'save' == $formtype ) { # Check for spam if ( $wgSpamRegex && preg_match( $wgSpamRegex, $this->textbox1, $matches ) ) { $this->spamPage ( $matches ); @@ -156,8 +156,8 @@ class EditPage { $aid = $this->mTitle->getArticleID( GAID_FOR_UPDATE ); if ( 0 == $aid ) { # Don't save a new article if it's blank. - if ( ( "" == $this->textbox1 ) || - ( wfMsg( "newarticletext" ) == $this->textbox1 ) ) { + if ( ( '' == $this->textbox1 ) || + ( wfMsg( 'newarticletext' ) == $this->textbox1 ) ) { $wgOut->redirect( $this->mTitle->getFullURL() ); return; } @@ -170,7 +170,7 @@ class EditPage { $this->mArticle->clear(); # Force reload of dates, etc. $this->mArticle->forUpdate( true ); # Lock the article - if( ( $this->section != "new" ) && + if( ( $this->section != 'new' ) && ($this->mArticle->getTimestamp() != $this->edittime ) ) { $isConflict = true; } @@ -190,7 +190,7 @@ class EditPage { // Successful merge! Maybe we should tell the user the good news? $isConflict = false; } else { - $this->section = ""; + $this->section = ''; $this->textbox1 = $text; } } @@ -231,33 +231,33 @@ class EditPage { # First time through: get contents, set time for conflict # checking, etc. - if ( "initial" == $formtype ) { + if ( 'initial' == $formtype ) { $this->edittime = $this->mArticle->getTimestamp(); $this->textbox1 = $this->mArticle->getContent( true ); - $this->summary = ""; + $this->summary = ''; $this->proxyCheck(); } - $wgOut->setRobotpolicy( "noindex,nofollow" ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); # Enabled article-related sidebar, toplinks, etc. $wgOut->setArticleRelated( true ); if ( $isConflict ) { - $s = wfMsg( "editconflict", $this->mTitle->getPrefixedText() ); + $s = wfMsg( 'editconflict', $this->mTitle->getPrefixedText() ); $wgOut->setPageTitle( $s ); - $wgOut->addHTML( wfMsg( "explainconflict" ) ); + $wgOut->addHTML( wfMsg( 'explainconflict' ) ); $this->textbox2 = $this->textbox1; $this->textbox1 = $this->mArticle->getContent( true ); $this->edittime = $this->mArticle->getTimestamp(); } else { - $s = wfMsg( "editing", $this->mTitle->getPrefixedText() ); + $s = wfMsg( 'editing', $this->mTitle->getPrefixedText() ); - if( $this->section != "" ) { - if( $this->section == "new" ) { - $s.=wfMsg("commentedit"); + if( $this->section != '' ) { + if( $this->section == 'new' ) { + $s.=wfMsg('commentedit'); } else { - $s.=wfMsg("sectionedit"); + $s.=wfMsg('sectionedit'); } if(!$this->preview) { $sectitle=preg_match("/^=+(.*?)=+/mi", @@ -271,49 +271,49 @@ class EditPage { $wgOut->setPageTitle( $s ); if ( $this->oldid ) { $this->mArticle->setOldSubtitle(); - $wgOut->addHTML( wfMsg( "editingold" ) ); + $wgOut->addHTML( wfMsg( 'editingold' ) ); } } if( wfReadOnly() ) { - $wgOut->addHTML( "" . - wfMsg( "readonlywarning" ) . + $wgOut->addHTML( '' . + wfMsg( 'readonlywarning' ) . "" ); - } else if ( $isCssJsSubpage and "preview" != $formtype) { - $wgOut->addHTML( wfMsg( "usercssjsyoucanpreview" )); + } else if ( $isCssJsSubpage and 'preview' != $formtype) { + $wgOut->addHTML( wfMsg( 'usercssjsyoucanpreview' )); } if( $this->mTitle->isProtected() ) { - $wgOut->addHTML( "" . wfMsg( "protectedpagewarning" ) . + $wgOut->addHTML( '' . wfMsg( 'protectedpagewarning' ) . "
\n" ); } $kblength = (int)(strlen( $this->textbox1 ) / 1024); if( $kblength > 29 ) { - $wgOut->addHTML( "" . - wfMsg( "longpagewarning", $kblength ) - . "" ); + $wgOut->addHTML( '' . + wfMsg( 'longpagewarning', $kblength ) + . '' ); } - $rows = $wgUser->getOption( "rows" ); - $cols = $wgUser->getOption( "cols" ); + $rows = $wgUser->getOption( 'rows' ); + $cols = $wgUser->getOption( 'cols' ); - $ew = $wgUser->getOption( "editwidth" ); + $ew = $wgUser->getOption( 'editwidth' ); if ( $ew ) $ew = " style=\"width:100%\""; - else $ew = "" ; + else $ew = ''; - $q = "action=submit"; + $q = 'action=submit'; #if ( "no" == $redirect ) { $q .= "&redirect=no"; } $action = $this->mTitle->escapeLocalURL( $q ); - $summary = wfMsg( "summary" ); - $subject = wfMsg("subject"); - $minor = wfMsg( "minoredit" ); - $watchthis = wfMsg ("watchthis"); - $save = wfMsg( "savearticle" ); - $prev = wfMsg( "showpreview" ); + $summary = wfMsg('summary'); + $subject = wfMsg('subject'); + $minor = wfMsg('minoredit'); + $watchthis = wfMsg ('watchthis'); + $save = wfMsg('savearticle'); + $prev = wfMsg('showpreview'); $cancel = $sk->makeKnownLink( $this->mTitle->getPrefixedText(), - wfMsg( "cancel" ) ); + wfMsg('cancel') ); $edithelpurl = $sk->makeUrl( wfMsg( 'edithelppage' )); $edithelp = ''. htmlspecialchars( wfMsg( 'edithelp' ) ).' '. @@ -321,21 +321,21 @@ class EditPage { global $wgRightsText; $copywarn = "
\n" . - wfMsg( $wgRightsText ? "copyrightwarning" : "copyrightwarning2", - "[[" . wfMsg( "copyrightpage" ) . "]]", + wfMsg( $wgRightsText ? 'copyrightwarning' : 'copyrightwarning2', + '[[' . wfMsg( 'copyrightpage' ) . ']]', $wgRightsText ) . "\n
"; - if( $wgUser->getOption("showtoolbar") and !$isCssJsSubpage ) { + if( $wgUser->getOption('showtoolbar') and !$isCssJsSubpage ) { # prepare toolbar for edit buttons $toolbar = $sk->getEditToolbar(); } else { - $toolbar = ""; + $toolbar = ''; } // activate checkboxes if user wants them to be always active if( !$this->preview ) { - if( $wgUser->getOption( "watchdefault" ) ) $this->watchthis = true; - if( $wgUser->getOption( "minordefault" ) ) $this->minoredit = true; + if( $wgUser->getOption( 'watchdefault' ) ) $this->watchthis = true; + if( $wgUser->getOption( 'minordefault' ) ) $this->minoredit = true; // activate checkbox also if user is already watching the page, // require wpWatchthis to be unset so that second condition is not @@ -343,7 +343,7 @@ class EditPage { if( !$this->watchthis && $this->mTitle->userIsWatching() ) $this->watchthis = true; } - $minoredithtml = ""; + $minoredithtml = ''; if ( 0 != $wgUser->getID() || $wgAllowAnonymousMinor ) { $minoredithtml = @@ -352,7 +352,7 @@ class EditPage { ""; } - $watchhtml = ""; + $watchhtml = ''; if ( 0 != $wgUser->getID() ) { $watchhtml = "watchthis?" checked='checked'":""). @@ -360,13 +360,13 @@ class EditPage { ""; } - $checkboxhtml = $minoredithtml . $watchhtml . "
"; + $checkboxhtml = $minoredithtml . $watchhtml . '
'; - if ( "preview" == $formtype) { - $previewhead="

" . wfMsg( "preview" ) . "

\n

" . - wfMsg( "note" ) . wfMsg( "previewnote" ) . "

\n"; + if ( 'preview' == $formtype) { + $previewhead='

' . wfMsg( 'preview' ) . "

\n

" . + wfMsg( 'note' ) . wfMsg( 'previewnote' ) . "

\n"; if ( $isConflict ) { - $previewhead.="

" . wfMsg( "previewconflict" ) . + $previewhead.='

' . wfMsg( 'previewconflict' ) . "

\n"; } @@ -391,7 +391,7 @@ class EditPage { $wgTitle, $parserOptions ); $previewHTML = $parserOutput->mText; - if($wgUser->getOption("previewontop")) { + if($wgUser->getOption('previewontop')) { $wgOut->addHTML($previewhead); $wgOut->addHTML($previewHTML); } @@ -404,17 +404,17 @@ class EditPage { # if this is a comment, show a subject line at the top, which is also the edit summary. # Otherwise, show a summary field at the bottom $summarytext = htmlspecialchars( $wgLang->recodeForEdit( $this->summary ) ); # FIXME - if( $this->section == "new" ) { + if( $this->section == 'new' ) { $commentsubject="{$subject}:
"; - $editsummary = ""; + $editsummary = ''; } else { - $commentsubject = ""; + $commentsubject = ''; $editsummary="{$summary}:
"; } if( !$this->preview ) { # Don't select the edit box on preview; this interferes with seeing what's going on. - $wgOut->setOnloadHandler( "document.editform.wpTextbox1.focus()" ); + $wgOut->setOnloadHandler( 'document.editform.wpTextbox1.focus()' ); } # Prepare a list of templates used by this page $db =& wfGetDB( DB_SLAVE ); @@ -434,7 +434,7 @@ class EditPage { } $templates .= ''; } else { - $templates = ""; + $templates = ''; } $wgOut->addHTML( " {$toolbar} @@ -481,8 +481,8 @@ htmlspecialchars( $wgLang->recodeForEdit( $this->textbox1 ) ) . { global $wgOut, $wgUser, $wgLang, $wgIP; - $wgOut->setPageTitle( wfMsg( "blockedtitle" ) ); - $wgOut->setRobotpolicy( "noindex,nofollow" ); + $wgOut->setPageTitle( wfMsg( 'blockedtitle' ) ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); $wgOut->setArticleRelated( false ); $id = $wgUser->blockedBy(); @@ -494,10 +494,10 @@ htmlspecialchars( $wgLang->recodeForEdit( $this->textbox1 ) ) . } else { $name = $id; } - $link = "[[" . $wgLang->getNsText( Namespace::getUser() ) . + $link = '[[' . $wgLang->getNsText( Namespace::getUser() ) . ":{$name}|{$name}]]"; - $wgOut->addWikiText( wfMsg( "blockedtext", $link, $reason, $ip, $name ) ); + $wgOut->addWikiText( wfMsg( 'blockedtext', $link, $reason, $ip, $name ) ); $wgOut->returnToMain( false ); } @@ -507,19 +507,19 @@ htmlspecialchars( $wgLang->recodeForEdit( $this->textbox1 ) ) . { global $wgOut, $wgUser, $wgLang; - $wgOut->setPageTitle( wfMsg( "whitelistedittitle" ) ); - $wgOut->setRobotpolicy( "noindex,nofollow" ); + $wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); $wgOut->setArticleRelated( false ); - $wgOut->addWikiText( wfMsg( "whitelistedittext" ) ); + $wgOut->addWikiText( wfMsg( 'whitelistedittext' ) ); $wgOut->returnToMain( false ); } function spamPage ( $matches = array() ) { global $wgOut; - $wgOut->setPageTitle( wfMsg( "spamprotectiontitle" ) ); - $wgOut->setRobotpolicy( "noindex,nofollow" ); + $wgOut->setPageTitle( wfMsg( 'spamprotectiontitle' ) ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); $wgOut->setArticleRelated( false ); $wgOut->addWikiText( wfMsg( 'spamprotectiontext' ) ); @@ -543,7 +543,7 @@ htmlspecialchars( $wgLang->recodeForEdit( $this->textbox1 ) ) . # Get MemCached key $skip = false; if ( $wgUseMemCached ) { - $mcKey = "$wgDBname:proxy:ip:$wgIP"; + $mcKey = $wgDBname.':proxy:ip:'.$wgIP; $mcValue = $wgMemc->get( $mcKey ); if ( $mcValue ) { $skip = true; @@ -552,12 +552,12 @@ htmlspecialchars( $wgLang->recodeForEdit( $this->textbox1 ) ) . # Fork the processes if ( !$skip ) { - $title = Title::makeTitle( NS_SPECIAL, "Blockme" ); + $title = Title::makeTitle( NS_SPECIAL, 'Blockme' ); $iphash = md5( $wgIP . $wgProxyKey ); - $url = $title->getFullURL( "ip=$iphash" ); + $url = $title->getFullURL( 'ip='.$iphash ); foreach ( $wgProxyPorts as $port ) { - $params = implode( " ", array( + $params = implode( ' ', array( escapeshellarg( $wgProxyScriptPath ), escapeshellarg( $wgIP ), escapeshellarg( $port ), diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5cb78fb839..606b98fd8b 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -90,10 +90,10 @@ function wfLocalUrl( $a, $q = '' ) if( '' == $q ) { $a = $wgScript; } else { - $a = "{$wgScript}?{$q}"; + $a = $wgScript.'?'.$q; } } else if ( '' == $q ) { - $a = str_replace( "$1", $a, $wgArticlePath ); + $a = str_replace( '$1', $a, $wgArticlePath ); } else if ($wgScript != '' ) { $a = "{$wgScript}?title={$a}&{$q}"; } else { //XXX hackish solution for toplevel wikis @@ -202,7 +202,7 @@ function wfDebug( $text, $logonly = false ) if ( isset( $wgOut ) && $wgDebugComments && !$logonly ) { $wgOut->debug( $text ); } - if ( "" != $wgDebugLogFile && !$wgProfileOnly ) { + if ( '' != $wgDebugLogFile && !$wgProfileOnly ) { error_log( $text, 3, $wgDebugLogFile ); } } @@ -211,7 +211,7 @@ function wfDebug( $text, $logonly = false ) function wfLogDBError( $text ) { global $wgDBerrorLog; if ( $wgDBerrorLog ) { - $text = date("D M j G:i:s T Y") . "\t$text"; + $text = date('D M j G:i:s T Y') . "\t".$text; error_log( $text, 3, $wgDBerrorLog ); } } @@ -222,7 +222,7 @@ function logProfilingData() global $wgProfiling, $wgProfileStack, $wgProfileLimit, $wgUser; $now = wfTime(); - list( $usec, $sec ) = explode( " ", $wgRequestTime ); + list( $usec, $sec ) = explode( ' ', $wgRequestTime ); $start = (float)$sec + (float)$usec; $elapsed = $now - $start; if ( $wgProfiling ) { @@ -252,13 +252,13 @@ function logProfilingData() function wfReadOnly() { global $wgReadOnlyFile; - if ( "" == $wgReadOnlyFile ) { + if ( '' == $wgReadOnlyFile ) { return false; } return is_file( $wgReadOnlyFile ); } -$wgReplacementKeys = array( "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9" ); +$wgReplacementKeys = array( '$1', '$2', '$3', '$4', '$5', '$6', '$7', '$8', '$9' ); # Get a message from anywhere function wfMsg( $key ) { @@ -357,10 +357,10 @@ function wfDebugDieBacktrace( $msg = '' ) { if ( $wgCommandLineMode ) { $msg .= "$file line {$call['line']} calls "; } else { - $msg .= '
  • ' . $file . " line " . $call['line'] . ' calls '; + $msg .= '
  • ' . $file . ' line ' . $call['line'] . ' calls '; } if( !empty( $call['class'] ) ) $msg .= $call['class'] . '::'; - $msg .= $call['function'] . "()"; + $msg .= $call['function'] . '()'; if ( $wgCommandLineMode ) { $msg .= "\n"; @@ -400,13 +400,13 @@ function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) $po = $offset - $limit; if ( $po < 0 ) { $po = 0; } $q = "limit={$limit}&offset={$po}"; - if ( '' != $query ) { $q .= "&{$query}"; } + if ( '' != $query ) { $q .= '&'.$query; } $plink = '{$prev}"; } else { $plink = $prev; } $no = $offset + $limit; - $q = "limit={$limit}&offset={$no}"; - if ( "" != $query ) { $q .= "&{$query}"; } + $q = 'limit='.$limit.'&offset='.$no; + if ( '' != $query ) { $q .= '&'.$query; } if ( $atend ) { $nlink = $next; @@ -426,8 +426,8 @@ function wfNumLink( $offset, $limit, $link, $query = '' ) { global $wgUser, $wgLang; if ( '' == $query ) { $q = ''; } - else { $q = "{$query}&"; } - $q .= "limit={$limit}&offset={$offset}"; + else { $q = $query.'&'; } + $q .= 'limit='.$limit.'&offset='.$offset; $fmtLimit = $wgLang->formatNum( $limit ); $s = '{$fmtLimit}"; @@ -553,7 +553,7 @@ function wfArrayToCGI( $array1, $array2 = NULL ) if ( '' != $cgi ) { $cgi .= '&'; } - $cgi .= "{$key}={$value}"; + $cgi .= $key.'='.$value; } } return $cgi; @@ -762,20 +762,20 @@ function wfTimestamp2Unix( $ts ) { } function wfUnix2Timestamp( $unixtime ) { - return gmdate( "YmdHis", $unixtime ); + return gmdate( 'YmdHis', $unixtime ); } function wfTimestampNow() { # return NOW - return gmdate( "YmdHis" ); + return gmdate( 'YmdHis' ); } # Sorting hack for MySQL 3, which doesn't use index sorts for DESC function wfInvertTimestamp( $ts ) { return strtr( $ts, - "0123456789", - "9876543210" + '0123456789', + '9876543210' ); } @@ -805,9 +805,9 @@ function wfRestoreWarnings() { } # Autodetect, convert and provide timestamps of various types -define("TS_UNIX",0); # Standard unix timestamp (number of seconds since 1 Jan 1970) -define("TS_MW",1); # Mediawiki concatenated string timestamp (yyyymmddhhmmss) -define("TS_DB",2); # Standard database timestamp (yyyy-mm-dd hh:mm:ss) +define('TS_UNIX',0); # Standard unix timestamp (number of seconds since 1 Jan 1970) +define('TS_MW',1); # Mediawiki concatenated string timestamp (yyyymmddhhmmss) +define('TS_DB',2); # Standard database timestamp (yyyy-mm-dd hh:mm:ss) function wfTimestamp($outputtype=TS_UNIX,$ts=0) { if (preg_match("/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/",$ts,$da)) { @@ -830,10 +830,10 @@ function wfTimestamp($outputtype=TS_UNIX,$ts=0) { return $uts; break; case TS_MW: - return gmdate( "YmdHis", $uts ); + return gmdate( 'YmdHis', $uts ); break; case TS_DB: - return gmdate( "Y-m-d H:i:s", $uts ); + return gmdate( 'Y-m-d H:i:s', $uts ); break; default: return; diff --git a/includes/Image.php b/includes/Image.php index cf935d628d..ae2ca8e041 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -29,7 +29,7 @@ class Image $this->title = Title::makeTitle( Namespace::getImage(), $this->name ); //$this->imagePath = wfImagePath( $name ); $hash = md5( $this->title->getDBkey() ); - $this->imagePath = $wgUploadDirectory . "/" . $hash{0} . "/" .substr( $hash, 0, 2 ) . "/{$name}"; + $this->imagePath = $wgUploadDirectory . '/' . $hash{0} . '/' .substr( $hash, 0, 2 ) . "/{$name}"; $this->url = $this->wfImageUrl( $name ); @@ -41,8 +41,8 @@ class Image $this->height = $gis[1]; $this->type = $gis[2]; $this->attr = $gis[3]; - if ( isset( $gis["bits"] ) ) { - $this->bits = $gis["bits"]; + if ( isset( $gis['bits'] ) ) { + $this->bits = $gis['bits']; } else { $this->bits = 0; } @@ -109,7 +109,7 @@ class Image return $this->fileExists; } - function thumbUrl( $width, $subdir="thumb" ) { + function thumbUrl( $width, $subdir='thumb' ) { global $wgUploadPath; $name = $this->thumbName( $width ); @@ -139,19 +139,19 @@ class Image $width = IntVal( $width ); $thumbName = $this->thumbName( $width ); - $thumbPath = wfImageThumbDir( $thumbName )."/".$thumbName; + $thumbPath = wfImageThumbDir( $thumbName ).'/'.$thumbName; $thumbUrl = $this->thumbUrl( $width ); if ( ! $this->exists() ) { # If there is no image, there will be no thumbnail - return ""; + return ''; } # Sanity check $width if( $width <= 0 ) { # BZZZT - return ""; + return ''; } if( $width > $this->width ) { @@ -196,7 +196,7 @@ class Image $src_image = imagecreatefromxbm( $this->imagePath ); break; default: - return "Image type not supported"; + return 'Image type not supported'; break; } $height = floor( $this->height * ( $width/$this->width ) ); @@ -236,7 +236,7 @@ class Image # no disk space is available or some other error occurs # $thumbstat = stat( $thumbPath ); - if( $thumbstat["size"] == 0 ) + if( $thumbstat['size'] == 0 ) { unlink( $thumbPath ); } @@ -263,7 +263,7 @@ class Image // 2, ... return next old version from above query function nextHistoryLine() { - $fname = "Image::nextHistoryLine()"; + $fname = 'Image::nextHistoryLine()'; $dbr =& wfGetDB( DB_SLAVE ); if ( $this->historyLine == 0 ) {// called for the first time, return line from cur $this->historyRes = $dbr->select( 'image', @@ -324,7 +324,7 @@ function wfImageArchiveDir( $fname , $subdir='archive') # Suppress warning messages here; if the file itself can't # be written we'll worry about it then. - $archive = "{$wgUploadDirectory}/{$subdir}"; + $archive = $wgUploadDirectory.'/'.$subdir; if ( ! is_dir( $archive ) ) { @mkdir( $archive, 0777 ); } $archive .= '/' . $hash{0}; if ( ! is_dir( $archive ) ) { @mkdir( $archive, 0777 ); } @@ -455,8 +455,8 @@ function wfImageArchiveUrl( $name ) global $wgUploadPath; $hash = md5( substr( $name, 15) ); - $url = "{$wgUploadPath}/archive/" . $hash{0} . "/" . - substr( $hash, 0, 2 ) . "/{$name}"; + $url = $wgUploadPath.'/archive/' . $hash{0} . '/' . + substr( $hash, 0, 2 ) . '/'.$name; return wfUrlencode($url); } diff --git a/includes/ImagePage.php b/includes/ImagePage.php index fc63c881a4..585f933894 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -4,7 +4,7 @@ Special handling for image description pages */ -require_once( "Image.php" ); +require_once( 'Image.php' ); class ImagePage extends Article { @@ -34,15 +34,15 @@ class ImagePage extends Article { global $wgOut, $wgUser, $wgRequest, $wgMaxImageWidth, $wgUseImageResize; $this->img = Image::newFromTitle( $this->mTitle ); $url = $this->img->getUrl(); - $anchoropen = ""; - $anchorclose = ""; + $anchoropen = ''; + $anchorclose = ''; if ( $this->img->exists() ) { $sk = $wgUser->getSkin(); - if ( $this->img->getType() != "" ) { + if ( $this->img->getType() != '' ) { # image $width = $this->img->getWidth(); $height = $this->img->getHeight(); @@ -91,7 +91,7 @@ class ImagePage extends Article { $line->img_user_text, $line->img_size, $line->img_description ); } $s .= $sk->endImageHistoryList(); - } else { $s=""; } + } else { $s=''; } $wgOut->addHTML( $s ); } @@ -99,7 +99,7 @@ class ImagePage extends Article { { global $wgUser, $wgOut; - $wgOut->addHTML( "

    " . wfMsg( "imagelinks" ) . "

    \n" ); + $wgOut->addHTML( '

    ' . wfMsg( 'imagelinks' ) . "

    \n" ); $dbr =& wfGetDB( DB_SLAVE ); $cur = $dbr->tableName( 'cur' ); @@ -110,10 +110,10 @@ class ImagePage extends Article { $res = $dbr->query( $sql, DB_SLAVE, "Article::imageLinks" ); if ( 0 == $dbr->numRows( $res ) ) { - $wgOut->addHtml( "

    " . wfMsg( "nolinkstoimage" ) . "

    \n" ); + $wgOut->addHtml( '

    ' . wfMsg( "nolinkstoimage" ) . "

    \n" ); return; } - $wgOut->addHTML( "

    " . wfMsg( "linkstoimage" ) . "

    \n
      " ); + $wgOut->addHTML( '

      ' . wfMsg( 'linkstoimage' ) . "

      \n
        " ); $sk = $wgUser->getSkin(); while ( $s = $dbr->fetchObject( $res ) ) { @@ -144,10 +144,10 @@ class ImagePage extends Article { } # Better double-check that it hasn't been deleted yet! - $wgOut->setPagetitle( wfMsg( "confirmdelete" ) ); + $wgOut->setPagetitle( wfMsg( 'confirmdelete' ) ); if ( !is_null( $image ) ) { - if ( "" == trim( $image ) ) { - $wgOut->fatalError( wfMsg( "cannotdelete" ) ); + if ( '' == trim( $image ) ) { + $wgOut->fatalError( wfMsg( 'cannotdelete' ) ); return; } } @@ -159,11 +159,11 @@ class ImagePage extends Article { } if ( !is_null( $image ) ) { - $q = "&image=" . urlencode( $image ); + $q = '&image=' . urlencode( $image ); } else if ( !is_null( $oldimage ) ) { - $q = "&oldimage=" . urlencode( $oldimage ); + $q = '&oldimage=' . urlencode( $oldimage ); } else { - $q = ""; + $q = ''; } return $this->confirmDelete( $q, $wgRequest->getText( 'wpReason' ) ); } @@ -172,7 +172,7 @@ class ImagePage extends Article { { global $wgOut, $wgUser, $wgLang, $wgRequest; global $wgUseSquid, $wgInternalServer, $wgDeferredUpdateList; - $fname = "Article::doDelete"; + $fname = 'Article::doDelete'; $reason = $wgRequest->getVal( 'wpReason' ); $image = $wgRequest->getVal( 'image' ); @@ -237,17 +237,17 @@ class ImagePage extends Article { $this->doDeleteArticle( $reason ); # ignore errors $deleted = $this->mTitle->getPrefixedText(); } - $wgOut->setPagetitle( wfMsg( "actioncomplete" ) ); - $wgOut->setRobotpolicy( "noindex,nofollow" ); + $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); $sk = $wgUser->getSkin(); $loglink = $sk->makeKnownLink( $wgLang->getNsText( Namespace::getWikipedia() ) . - ":" . wfMsg( "dellogpage" ), wfMsg( "deletionlog" ) ); + ':' . wfMsg( 'dellogpage' ), wfMsg( 'deletionlog' ) ); - $text = wfMsg( "deletedtext", $deleted, $loglink ); + $text = wfMsg( 'deletedtext', $deleted, $loglink ); - $wgOut->addHTML( "

        " . $text . "

        \n" ); + $wgOut->addHTML( '

        ' . $text . "

        \n" ); $wgOut->returnToMain( false ); } @@ -270,7 +270,7 @@ class ImagePage extends Article { $oldimage = $wgRequest->getText( 'oldimage' ); if ( strlen( $oldimage ) < 16 ) { - $wgOut->unexpectedValueError( "oldimage", $oldimage ); + $wgOut->unexpectedValueError( 'oldimage', $oldimage ); return; } if ( wfReadOnly() ) { @@ -294,7 +294,7 @@ class ImagePage extends Article { $oldver = wfTimestampNow() . "!{$name}"; $dbr =& wfGetDB( DB_SLAVE ); - $size = $dbr->getField( "oldimage", "oi_size", "oi_archive_name='" . + $size = $dbr->getField( 'oldimage', 'oi_size', 'oi_archive_name=\'' . $dbr->strencode( $oldimage ) . "'" ); if ( ! rename( $curfile, "${archive}/{$oldver}" ) ) { @@ -314,9 +314,9 @@ class ImagePage extends Article { wfPurgeSquidServers($urlArr); } - $wgOut->setPagetitle( wfMsg( "actioncomplete" ) ); - $wgOut->setRobotpolicy( "noindex,nofollow" ); - $wgOut->addHTML( wfMsg( "imagereverted" ) ); + $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); + $wgOut->addHTML( wfMsg( 'imagereverted' ) ); $wgOut->returnToMain( false ); } } diff --git a/includes/LinkCache.php b/includes/LinkCache.php index 4bb1dfea01..10aac8b9f4 100644 --- a/includes/LinkCache.php +++ b/includes/LinkCache.php @@ -18,7 +18,7 @@ class LinkCache { /* private */ function getKey( $title ) { global $wgDBname; - return "$wgDBname:lc:title:$title"; + return $wgDBname.':lc:title:'.$title; } function LinkCache() @@ -123,13 +123,13 @@ class LinkCache { $id = $this->getGoodLinkID( $title ); if ( 0 != $id ) { return $id; } - $fname = "LinkCache::addLinkObj"; + $fname = 'LinkCache::addLinkObj'; wfProfileIn( $fname ); $ns = $nt->getNamespace(); $t = $nt->getDBkey(); - if ( "" == $title ) { + if ( '' == $title ) { wfProfileOut( $fname ); return 0; } @@ -164,7 +164,7 @@ class LinkCache { { global $wgEnablePersistentLC; - $fname = "LinkCache::preFill"; + $fname = 'LinkCache::preFill'; wfProfileIn( $fname ); # Note -- $fromtitle is a Title *object* @@ -307,7 +307,7 @@ class LinkCache { } $cacheobj = false; - if( function_exists( "gzuncompress" ) ) + if( function_exists( 'gzuncompress' ) ) $cacheobj = @gzuncompress( $raw ); if($cacheobj == FALSE){ @@ -327,7 +327,7 @@ class LinkCache { /* private */ function saveToLinkscc( $pid ){ global $wgCompressedPersistentLC; - if( $wgCompressedPersistentLC and function_exists( "gzcompress" ) ) { + if( $wgCompressedPersistentLC and function_exists( 'gzcompress' ) ) { $ser = gzcompress( serialize( $this ), 3 ); } else { $ser = serialize( $this ); @@ -341,7 +341,7 @@ class LinkCache { /* static */ function linksccClearLinksTo( $pid ){ global $wgEnablePersistentLC; if ( $wgEnablePersistentLC ) { - $fname = "LinkCache::linksccClearLinksTo"; + $fname = 'LinkCache::linksccClearLinksTo'; $pid = intval( $pid ); $dbw =& wfGetDB( DB_MASTER ); # Delete linkscc rows which link to here diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index a64328db28..707cd5e5aa 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -20,7 +20,7 @@ class LinksUpdate { /* Update link tables with outgoing links from an updated article */ /* Relies on the 'link cache' to be filled out */ - $fname = "LinksUpdate::doUpdate"; + $fname = 'LinksUpdate::doUpdate'; wfProfileIn( $fname ); $del = array(); @@ -39,7 +39,7 @@ class LinksUpdate { # Delete where necessary if ( count( $del ) ) { $sql = "DELETE FROM $links WHERE l_from={$this->mId} AND l_to IN(". - implode( ",", $del ) . ")"; + implode( ',', $del ) . ')'; $dbw->query( $sql, $fname ); } } else { @@ -51,7 +51,7 @@ class LinksUpdate { } # Do the insertion - $sql = ""; + $sql = ''; if ( 0 != count( $add ) ) { $arr=array(); foreach($add as $lt=>$lid) @@ -76,11 +76,11 @@ class LinksUpdate { if ( $first ) { $first = false; } else { - $sql .= ","; + $sql .= ','; } $sql .= $dbw->addQuotes( $badTitle ); } - $sql .= ")"; + $sql .= ')'; $dbw->query( $sql, $fname ); } } else { @@ -92,7 +92,7 @@ class LinksUpdate { } # Do additions - $sql = ""; + $sql = ''; if ( 0 != count ( $add ) ) { $arr=array(); foreach( $add as $blt ) { @@ -114,7 +114,7 @@ class LinksUpdate { $add = $wgLinkCache->getImageLinks(); # Do the insertion - $sql = ""; + $sql = ''; $image = Namespace::getImage(); if ( 0 != count ( $add ) ) { $sql = "INSERT IGNORE INTO $imagelinks (il_from,il_to) VALUES "; @@ -126,13 +126,13 @@ class LinksUpdate { $nt->invalidateCache(); $iname = $dbw->strencode( $iname ); - if ( ! $first ) { $sql .= ","; } + if ( ! $first ) { $sql .= ','; } $first = false; $sql .= "({$this->mId},'{$iname}')"; } } - if ( "" != $sql ) { + if ( '' != $sql ) { $dbw->query( $sql, $fname ); } @@ -146,7 +146,7 @@ class LinksUpdate { $add = $wgLinkCache->getCategoryLinks(); # Do the insertion - $sql = ""; + $sql = ''; if ( 0 != count ( $add ) ) { $sql = "INSERT IGNORE INTO $categorylinks (cl_from,cl_to,cl_sortkey) VALUES "; $first = true; @@ -156,14 +156,14 @@ class LinksUpdate { if( !$nt ) continue; $nt->invalidateCache(); - if ( ! $first ) { $sql .= ","; } + if ( ! $first ) { $sql .= ','; } $first = false; $sql .= "({$this->mId},'" . $dbw->strencode( $cname ) . "','" . $dbw->strencode( $sortkey ) . "')"; } } - if ( "" != $sql ) { + if ( '' != $sql ) { $dbw->query( $sql, $fname ); } } @@ -178,7 +178,7 @@ class LinksUpdate { # Old inefficient update function # Used for rebuilding the link table global $wgLinkCache, $wgDBtransactions, $wgUseCategoryMagic; - $fname = "LinksUpdate::doDumbUpdate"; + $fname = 'LinksUpdate::doDumbUpdate'; wfProfileIn( $fname ); @@ -192,7 +192,7 @@ class LinksUpdate { $dbw->query( $sql, $fname ); $a = $wgLinkCache->getGoodLinks(); - $sql = ""; + $sql = ''; if ( 0 != count( $a ) ) { $sql = "INSERT IGNORE INTO $links (l_from,l_to) VALUES "; $first = true; @@ -203,7 +203,7 @@ class LinksUpdate { $sql .= "({$this->mId},{$lid})"; } } - if ( "" != $sql ) { + if ( '' != $sql ) { $dbw->query( $sql, $fname ); } @@ -211,7 +211,7 @@ class LinksUpdate { $dbw->query( $sql, $fname ); $a = $wgLinkCache->getBadLinks(); - $sql = ""; + $sql = ''; if ( 0 != count ( $a ) ) { $sql = "INSERT IGNORE INTO $brokenlinks (bl_from,bl_to) VALUES "; $first = true; @@ -223,7 +223,7 @@ class LinksUpdate { $sql .= "({$this->mId},'{$blt}')"; } } - if ( "" != $sql ) { + if ( '' != $sql ) { $dbw->query( $sql, $fname ); } @@ -231,7 +231,7 @@ class LinksUpdate { $dbw->query( $sql, $fname ); $a = $wgLinkCache->getImageLinks(); - $sql = ""; + $sql = ''; if ( 0 != count ( $a ) ) { $sql = "INSERT IGNORE INTO $imagelinks (il_from,il_to) VALUES "; $first = true; @@ -243,7 +243,7 @@ class LinksUpdate { $sql .= "({$this->mId},'{$iname}')"; } } - if ( "" != $sql ) { + if ( '' != $sql ) { $dbw->query( $sql, $fname ); } @@ -255,7 +255,7 @@ class LinksUpdate { $add = $wgLinkCache->getCategoryLinks(); # Do the insertion - $sql = ""; + $sql = ''; if ( 0 != count ( $add ) ) { $sql = "INSERT IGNORE INTO $categorylinks (cl_from,cl_to,cl_sortkey) VALUES "; $first = true; @@ -272,7 +272,7 @@ class LinksUpdate { "','" . $dbw->strencode( $sortkey ) . "')"; } } - if ( "" != $sql ) { + if ( '' != $sql ) { $dbw->query( $sql, $fname ); } } @@ -283,7 +283,7 @@ class LinksUpdate { function fixBrokenLinks() { /* Update any brokenlinks *to* this page */ /* Call for a newly created page, or just to make sure state is consistent */ - $fname = "LinksUpdate::fixBrokenLinks"; + $fname = 'LinksUpdate::fixBrokenLinks'; $dbw =& wfGetDB( DB_MASTER ); $cur = $dbw->tableName( 'cur' ); @@ -306,7 +306,7 @@ class LinksUpdate { $sql .= "({$row->bl_from},{$this->mId})"; $sql2 .= $row->bl_from; } - $sql2 .= ")"; + $sql2 .= ')'; $dbw->query( $sql, $fname ); $dbw->query( $sql2, $fname ); diff --git a/includes/LoadBalancer.php b/includes/LoadBalancer.php index fed5fc9129..13f01fc823 100644 --- a/includes/LoadBalancer.php +++ b/includes/LoadBalancer.php @@ -1,30 +1,30 @@ get( $key ); if ( $memcPos ) { list( $file, $pos ) = explode( ' ', $memcPos ); @@ -192,7 +192,7 @@ class LoadBalancer { # Get a connection by index function &getConnection( $i, $fail = true ) { - $fname = "LoadBalancer::getConnection"; + $fname = 'LoadBalancer::getConnection'; wfProfileIn( $fname ); /* # Task-based index @@ -300,7 +300,7 @@ class LoadBalancer { if ( $this->mFailFunction ) { $conn->failFunction( $this->mFailFunction ); } else { - $conn->failFunction( "wfEmergencyAbort" ); + $conn->failFunction( 'wfEmergencyAbort' ); } $conn->reportConnectionError(); $reporting = false; diff --git a/includes/LogPage.php b/includes/LogPage.php index dbae362d27..0e5aea962c 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -11,7 +11,7 @@ class LogPage { { # For now, assume title is correct dbkey # and log pages always go in Wikipedia namespace - $this->mTitle = str_replace( " ", "_", $title ); + $this->mTitle = str_replace( ' ', '_', $title ); $this->mId = 0; $this->mUpdateRecentChanges = true ; $this->mContentLoaded = false; @@ -56,7 +56,7 @@ class LogPage { if( wfReadOnly() ) return; global $wgUser; - $fname = "LogPage::saveContent"; + $fname = 'LogPage::saveContent'; $dbw =& wfGetDB( DB_MASTER ); $uid = $wgUser->getID(); @@ -110,7 +110,7 @@ class LogPage { return true; } - function addEntry( $action, $comment, $textaction = "" ) + function addEntry( $action, $comment, $textaction = '' ) { global $wgLang, $wgUser; @@ -121,7 +121,7 @@ class LogPage { $ut = $wgUser->getName(); $uid = $wgUser->getID(); if( $uid ) { - $ul = "[[" . + $ul = '[[' . $wgLang->getNsText( Namespace::getUser() ) . ":{$ut}|{$ut}]]"; } else { @@ -135,8 +135,8 @@ class LogPage { $before = $m[1]; $after = $m[2]; } else { - $before = ""; - $after = ""; + $before = ''; + $after = ''; } if($textaction) @@ -144,12 +144,12 @@ class LogPage { else $this->mComment = $action; - if ( "" == $comment ) { - $inline = ""; + if ( '' == $comment ) { + $inline = ''; } else { $inline = " ({$comment_esc})"; # comment gets escaped again, so we use the unescaped version - $this->mComment .= ": {$comment}"; + $this->mComment .= ': '.$comment; } $this->mContent = "{$before}
        • {$d} {$ul} {$action}{$inline}
        • \n{$after}"; @@ -158,7 +158,7 @@ class LogPage { return $this->saveContent(); } - function replaceContent( $text, $comment = "" ) + function replaceContent( $text, $comment = '' ) { $this->mContent = $text; $this->mComment = $comment; @@ -173,10 +173,10 @@ class LogPage { # Client cache fresh and headers sent, nothing more to do. return; } - $func = ( $rawhtml ? "addHTML" : "addWikiText" ); + $func = ( $rawhtml ? 'addHTML' : 'addWikiText' ); $wgOut->$func( - "

          " . wfMsg( "perfdisabled" ) . "

          \n\n" . - "

          " . wfMsg( "perfdisabledsub", $wgLang->timeanddate( $this->getTimestamp() ) ) . "

          \n\n" . + "

          " . wfMsg( 'perfdisabled' ) . "

          \n\n" . + "

          " . wfMsg( 'perfdisabledsub', $wgLang->timeanddate( $this->getTimestamp() ) ) . "

          \n\n" . "
          \n\n" . $this->getContent() ); diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 767331da6f..efa11448b2 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -13,40 +13,40 @@ /*private*/ $wgMagicFound = false; -define("MAG_REDIRECT", 0); -define("MAG_NOTOC", 1); -define("MAG_START", 2); -define("MAG_CURRENTMONTH", 3); -define("MAG_CURRENTMONTHNAME", 4); -define("MAG_CURRENTDAY", 5); -define("MAG_CURRENTDAYNAME", 6); -define("MAG_CURRENTYEAR", 7); -define("MAG_CURRENTTIME", 8); -define("MAG_NUMBEROFARTICLES", 9); -define("MAG_CURRENTMONTHNAMEGEN", 10); -define("MAG_MSG", 11); -define("MAG_SUBST", 12); -define("MAG_MSGNW", 13); -define("MAG_NOEDITSECTION", 14); -define("MAG_END", 15); -define("MAG_IMG_THUMBNAIL", 16); -define("MAG_IMG_RIGHT", 17); -define("MAG_IMG_LEFT", 18); -define("MAG_IMG_NONE", 19); -define("MAG_IMG_WIDTH", 20); -define("MAG_IMG_CENTER", 21); -define("MAG_INT", 22); -define("MAG_FORCETOC", 23); -define("MAG_SITENAME", 24); -define("MAG_NS", 25); -define("MAG_LOCALURL", 26); -define("MAG_LOCALURLE", 27); -define("MAG_SERVER", 28); -define("MAG_IMG_FRAMED", 29); -define("MAG_PAGENAME", 30); -define("MAG_PAGENAMEE", 31); -define("MAG_NAMESPACE", 32); -define("MAG_TOC", 33); +define('MAG_REDIRECT', 0); +define('MAG_NOTOC', 1); +define('MAG_START', 2); +define('MAG_CURRENTMONTH', 3); +define('MAG_CURRENTMONTHNAME', 4); +define('MAG_CURRENTDAY', 5); +define('MAG_CURRENTDAYNAME', 6); +define('MAG_CURRENTYEAR', 7); +define('MAG_CURRENTTIME', 8); +define('MAG_NUMBEROFARTICLES', 9); +define('MAG_CURRENTMONTHNAMEGEN', 10); +define('MAG_MSG', 11); +define('MAG_SUBST', 12); +define('MAG_MSGNW', 13); +define('MAG_NOEDITSECTION', 14); +define('MAG_END', 15); +define('MAG_IMG_THUMBNAIL', 16); +define('MAG_IMG_RIGHT', 17); +define('MAG_IMG_LEFT', 18); +define('MAG_IMG_NONE', 19); +define('MAG_IMG_WIDTH', 20); +define('MAG_IMG_CENTER', 21); +define('MAG_INT', 22); +define('MAG_FORCETOC', 23); +define('MAG_SITENAME', 24); +define('MAG_NS', 25); +define('MAG_LOCALURL', 26); +define('MAG_LOCALURLE', 27); +define('MAG_SERVER', 28); +define('MAG_IMG_FRAMED', 29); +define('MAG_PAGENAME', 30); +define('MAG_PAGENAMEE', 31); +define('MAG_NAMESPACE', 32); +define('MAG_TOC', 33); $wgVariableIDs = array( MAG_CURRENTMONTH, @@ -105,9 +105,9 @@ class MagicWord { # Preliminary initialisation /* private */ function initRegex() { $variableClass = Title::legalChars(); - $escSyn = array_map( "preg_quote", $this->mSynonyms ); - $this->mBaseRegex = implode( "|", $escSyn ); - $case = $this->mCaseSensitive ? "" : "i"; + $escSyn = array_map( 'preg_quote', $this->mSynonyms ); + $this->mBaseRegex = implode( '|', $escSyn ); + $case = $this->mCaseSensitive ? '' : 'i'; $this->mRegex = "/{$this->mBaseRegex}/{$case}"; $this->mRegexStart = "/^{$this->mBaseRegex}/{$case}"; $this->mVariableRegex = str_replace( "\\$1", "([$variableClass]*?)", $this->mRegex ); diff --git a/includes/Math.php b/includes/Math.php index 8dce2b8945..f22226c1d5 100644 --- a/includes/Math.php +++ b/includes/Math.php @@ -9,11 +9,11 @@ class MathRenderer { var $mode = MW_MATH_MODERN; - var $tex = ""; - var $inputhash = ""; - var $hash = ""; - var $html = ""; - var $mathml = ""; + var $tex = ''; + var $inputhash = ''; + var $hash = ''; + var $html = ''; + var $mathml = ''; var $conservativeness = 0; function MathRenderer( $tex ) { @@ -37,39 +37,39 @@ class MathRenderer { # Ensure that the temp and output directories are available before continuing... if( !file_exists( $wgMathDirectory ) ) { if( !@mkdir( $wgMathDirectory ) ) { - return $this->_error( "math_bad_output" ); + return $this->_error( 'math_bad_output' ); } } elseif( !is_dir( $wgMathDirectory ) || !is_writable( $wgMathDirectory ) ) { - return $this->_error( "math_bad_output" ); + return $this->_error( 'math_bad_output' ); } if( !file_exists( $wgTmpDirectory ) ) { if( !@mkdir( $wgTmpDirectory ) ) { - return $this->_error( "math_bad_tmpdir" ); + return $this->_error( 'math_bad_tmpdir' ); } } elseif( !is_dir( $wgTmpDirectory ) || !is_writable( $wgTmpDirectory ) ) { - return $this->_error( "math_bad_tmpdir" ); + return $this->_error( 'math_bad_tmpdir' ); } if( !is_executable( $wgTexvc ) ) { - return $this->_error( "math_notexvc" ); + return $this->_error( 'math_notexvc' ); } - $cmd = $wgTexvc." ". - wfEscapeShellArg($wgTmpDirectory)." ". - wfEscapeShellArg($wgMathDirectory)." ". - wfEscapeShellArg($this->tex)." ". + $cmd = $wgTexvc.' '. + wfEscapeShellArg($wgTmpDirectory).' '. + wfEscapeShellArg($wgMathDirectory).' '. + wfEscapeShellArg($this->tex).' '. wfEscapeShellArg($wgInputEncoding); - wfDebug( "TeX: $cmd" ); + wfDebug( 'TeX: '.$cmd ); $contents = `$cmd`; if (strlen($contents) == 0) { - return $this->_error( "math_unknown_error" ); + return $this->_error( 'math_unknown_error' ); } $retval = substr ($contents, 0, 1); - if (($retval == "C") || ($retval == "M") || ($retval == "L")) { - if ($retval == "C") + if (($retval == 'C') || ($retval == 'M') || ($retval == 'L')) { + if ($retval == 'C') $this->conservativeness = 2; - else if ($retval == "M") + else if ($retval == 'M') $this->conservativeness = 1; else $this->conservativeness = 0; @@ -79,46 +79,46 @@ class MathRenderer { $this->html = substr($outdata, 0, $i); $this->mathml = substr($outdata, $i+1); - } else if (($retval == "c") || ($retval == "m") || ($retval == "l")) { + } else if (($retval == 'c') || ($retval == 'm') || ($retval == 'l')) { $this->html = substr ($contents, 33); - if ($retval == "c") + if ($retval == 'c') $this->conservativeness = 2; - else if ($retval == "m") + else if ($retval == 'm') $this->conservativeness = 1; else $this->conservativeness = 0; $this->mathml = NULL; - } else if ($retval == "X") { + } else if ($retval == 'X') { $outhtml = NULL; $this->mathml = substr ($contents, 33); $this->conservativeness = 0; - } else if ($retval == "+") { + } else if ($retval == '+') { $this->outhtml = NULL; $this->mathml = NULL; $this->conservativeness = 0; } else { $errbit = htmlspecialchars( substr($contents, 1) ); switch( $retval ) { - case "E": return $this->_error( "math_lexing_error", $errbit ); - case "S": return $this->_error( "math_syntax_error", $errbit ); - case "F": return $this->_error( "math_unknown_function", $errbit ); - default: return $this->_error( "math_unknown_error", $errbit ); + case 'E': return $this->_error( 'math_lexing_error', $errbit ); + case 'S': return $this->_error( 'math_syntax_error', $errbit ); + case 'F': return $this->_error( 'math_unknown_function', $errbit ); + default: return $this->_error( 'math_unknown_error', $errbit ); } } $this->hash = substr ($contents, 1, 32); if (!preg_match("/^[a-f0-9]{32}$/", $this->hash)) { - return $this->_error( "math_unknown_error" ); + return $this->_error( 'math_unknown_error' ); } if( !file_exists( "$wgMathDirectory/{$this->hash}.png" ) ) { - return $this->_error( "math_image_error" ); + return $this->_error( 'math_image_error' ); } # Now save it back to the DB: - $outmd5_sql = pack("H32", $this->hash); + $outmd5_sql = pack('H32', $this->hash); - $md5_sql = pack("H32", $this->md5); # Binary packed, not hex + $md5_sql = pack('H32', $this->md5); # Binary packed, not hex $dbw =& wfGetDB( DB_MASTER ); $dbw->replace( 'math', array( 'math_inputhash' ), @@ -136,9 +136,9 @@ class MathRenderer { return $this->_doRender(); } - function _error( $msg, $append = "" ) { - $mf = htmlspecialchars( wfMsg( "math_failure" ) ); - $munk = htmlspecialchars( wfMsg( "math_unknown_error" ) ); + function _error( $msg, $append = '' ) { + $mf = htmlspecialchars( wfMsg( 'math_failure' ) ); + $munk = htmlspecialchars( wfMsg( 'math_unknown_error' ) ); $errmsg = htmlspecialchars( wfMsg( $msg ) ); $source = htmlspecialchars($this->tex); return "$mf ($errmsg$append): $source\n"; @@ -158,7 +158,7 @@ class MathRenderer { if( $rpage !== false ) { # Tailing 0x20s can get dropped by the database, add it back on if necessary: - $xhash = unpack( "H32md5", $rpage->math_outputhash . " " ); + $xhash = unpack( 'H32md5', $rpage->math_outputhash . " " ); $this->hash = $xhash ['md5']; $this->conservativeness = $rpage->math_html_conservativeness; @@ -200,7 +200,7 @@ class MathRenderer { function renderMath( $tex ) { global $wgUser; $math = new MathRenderer( $tex ); - $math->setOutputMode( $wgUser->getOption("math")); + $math->setOutputMode( $wgUser->getOption('math')); return $math->render(); } diff --git a/includes/MemcachedSessions.php b/includes/MemcachedSessions.php index 435d32fb7a..304cceb869 100644 --- a/includes/MemcachedSessions.php +++ b/includes/MemcachedSessions.php @@ -28,7 +28,7 @@ function memsess_close() { function memsess_read( $id ) { global $wgMemc; $data = $wgMemc->get( memsess_key( $id ) ); - if( ! $data ) return ""; + if( ! $data ) return ''; return $data; } @@ -49,6 +49,6 @@ function memsess_gc( $maxlifetime ) { return true; } -session_set_save_handler( "memsess_open", "memsess_close", "memsess_read", "memsess_write", "memsess_destroy", "memsess_gc" ); +session_set_save_handler( 'memsess_open', 'memsess_close', 'memsess_read', 'memsess_write', 'memsess_destroy', 'memsess_gc' ); ?> diff --git a/includes/MessageCache.php b/includes/MessageCache.php index 47da59a43e..67ec220812 100755 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -3,9 +3,9 @@ # Message cache # Performs various useful MediaWiki namespace-related functions -define( "MSG_LOAD_TIMEOUT", 60); -define( "MSG_LOCK_TIMEOUT", 10); -define( "MSG_WAIT_TIMEOUT", 10); +define( 'MSG_LOAD_TIMEOUT', 60); +define( 'MSG_LOCK_TIMEOUT', 10); +define( 'MSG_WAIT_TIMEOUT', 10); class MessageCache { @@ -16,22 +16,22 @@ class MessageCache var $mInitialised = false; function initialise( &$memCached, $useDB, $expiry, $memcPrefix ) { - $fname = "MessageCache::initialise"; + $fname = 'MessageCache::initialise'; wfProfileIn( $fname ); $this->mUseCache = !is_null( $memCached ); $this->mMemc = &$memCached; $this->mDisable = !$useDB; $this->mExpiry = $expiry; $this->mDisableTransform = false; - $this->mMemcKey = "$memcPrefix:messages"; + $this->mMemcKey = $memcPrefix.':messages'; $this->mKeys = false; # initialised on demand $this->mInitialised = true; - wfProfileIn( "$fname-parseropt" ); + wfProfileIn( $fname.'-parseropt' ); $this->mParserOptions = ParserOptions::newFromUser( $u=NULL ); - wfProfileOut( "$fname-parseropt" ); - wfProfileIn( "$fname-parser" ); + wfProfileOut( $fname.'-parseropt' ); + wfProfileIn( $fname.'-parser' ); $this->mParser = new Parser; - wfProfileOut( "$fname-parser" ); + wfProfileOut( $fname.'-parser' ); $this->load(); wfProfileOut( $fname ); @@ -47,14 +47,14 @@ class MessageCache wfDebug( "MessageCache::load(): disabled\n" ); return true; } - $fname = "MessageCache::load"; + $fname = 'MessageCache::load'; wfProfileIn( $fname ); $success = true; if ( $this->mUseCache ) { - wfProfileIn( "$fname-fromcache" ); + wfProfileIn( $fname.'-fromcache' ); $this->mCache = $this->mMemc->get( $this->mMemcKey ); - wfProfileOut( "$fname-fromcache" ); + wfProfileOut( $fname.'-fromcache' ); # If there's nothing in memcached, load all the messages from the database if ( !$this->mCache ) { @@ -63,18 +63,18 @@ class MessageCache # Other threads don't need to load the messages if another thread is doing it. $success = $this->mMemc->set( $this->mMemcKey, "loading", MSG_LOAD_TIMEOUT ); if ( $success ) { - wfProfileIn( "$fname-load" ); + wfProfileIn( $fname.'-load' ); $this->loadFromDB(); - wfProfileOut( "$fname-load" ); + wfProfileOut( $fname.'-load' ); # Save in memcached # Keep trying if it fails, this is kind of important - wfProfileIn( "$fname-save" ); + wfProfileIn( $fname.'-save' ); for ( $i=0; $i<20 && !$this->mMemc->set( $this->mMemcKey, $this->mCache, $this->mExpiry ); $i++ ) { usleep(mt_rand(500000,1500000)); } - wfProfileOut( "$fname-save" ); + wfProfileOut( $fname.'-save' ); if ( $i == 20 ) { - $this->mMemc->set( $this->mMemcKey, "error", 86400 ); + $this->mMemc->set( $this->mMemcKey, 'error', 86400 ); wfDebug( "MemCached set error in MessageCache: restart memcached server!\n" ); } } @@ -106,7 +106,7 @@ class MessageCache # Loads all cacheable messages from the database function loadFromDB() { - $fname = "MessageCache::loadFromDB"; + $fname = 'MessageCache::loadFromDB'; $dbr =& wfGetDB( DB_SLAVE ); $res = $dbr->select( 'cur', array( 'cur_title', 'cur_text' ), @@ -161,7 +161,7 @@ class MessageCache return true; } - $lockKey = $this->mMemcKey . "lock"; + $lockKey = $this->mMemcKey . 'lock'; for ($i=0; $i < MSG_WAIT_TIMEOUT && !$this->mMemc->add( $lockKey, 1, MSG_LOCK_TIMEOUT ); $i++ ) { sleep(1); } @@ -174,7 +174,7 @@ class MessageCache return; } - $lockKey = $this->mMemcKey . "lock"; + $lockKey = $this->mMemcKey . 'lock'; $this->mMemc->delete( $lockKey ); } @@ -199,9 +199,9 @@ class MessageCache # If it wasn't in the cache, load each message from the DB individually if ( !$message && $useDB) { $dbr =& wfGetDB( DB_SLAVE ); - $result = $dbr->getArray( "cur", array("cur_text"), - array( "cur_namespace" => NS_MEDIAWIKI, "cur_title" => $title ), - "MessageCache::get" ); + $result = $dbr->getArray( 'cur', array('cur_text'), + array( 'cur_namespace' => NS_MEDIAWIKI, 'cur_title' => $title ), + 'MessageCache::get' ); if ( $result ) { $message = $result->cur_text; } @@ -218,7 +218,7 @@ class MessageCache } # Try the English array - if ( !$message && $wgLanguageCode != "en" ) { + if ( !$message && $wgLanguageCode != 'en' ) { $message = Language::getMessage( $key ); } @@ -234,7 +234,7 @@ class MessageCache function transform( $message ) { if( !$this->mDisableTransform ) { - if ( strstr( $message, "{{" ) !== false ) { + if ( strstr( $message, '{{' ) !== false ) { $message = $this->mParser->transformMsg( $message, $this->mParserOptions ); } } diff --git a/includes/Metadata.php b/includes/Metadata.php index f6ed8c2312..bf1869be1e 100644 --- a/includes/Metadata.php +++ b/includes/Metadata.php @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -define("RDF_TYPE_PREFS", "application/rdf+xml,text/xml;q=0.7,application/xml;q=0.5,text/rdf;q=0.1"); +define('RDF_TYPE_PREFS', "application/rdf+xml,text/xml;q=0.7,application/xml;q=0.5,text/rdf;q=0.1"); function wfDublinCoreRdf($article) { @@ -151,21 +151,21 @@ function wfCreativeCommonsRdf($article) { foreach ($terms as $term) { switch ($term) { case 're': - ccTerm('permits', "Reproduction"); break; + ccTerm('permits', 'Reproduction'); break; case 'di': - ccTerm('permits', "Distribution"); break; + ccTerm('permits', 'Distribution'); break; case 'de': - ccTerm('permits', "DerivativeWorks"); break; + ccTerm('permits', 'DerivativeWorks'); break; case 'nc': - ccTerm('prohibits', "CommercialUse"); break; + ccTerm('prohibits', 'CommercialUse'); break; case 'no': - ccTerm('requires', "Notice"); break; + ccTerm('requires', 'Notice'); break; case 'by': - ccTerm('requires', "Attribution"); break; + ccTerm('requires', 'Attribution'); break; case 'sa': - ccTerm('requires', "ShareAlike"); break; + ccTerm('requires', 'ShareAlike'); break; case 'sc': - ccTerm('requires', "SourceCode"); break; + ccTerm('requires', 'SourceCode'); break; } } } @@ -184,8 +184,8 @@ function wfCreativeCommonsRdf($article) { } /* private */ function dcDate($timestamp) { - return substr($timestamp, 0, 4) . "-" - . substr($timestamp, 4, 2) . "-" + return substr($timestamp, 0, 4) . '-' + . substr($timestamp, 4, 2) . '-' . substr($timestamp, 6, 2); } @@ -212,11 +212,11 @@ function wfCreativeCommonsRdf($article) { print " \n"; } -/* private */ function dcPerson($name, $id, $user_name="", $user_real_name="") { +/* private */ function dcPerson($name, $id, $user_name='', $user_real_name='') { global $wgLang; if ($id == 0) { - dcElement($name, wfMsg("anonymous")); + dcElement($name, wfMsg('anonymous')); } else if ( !empty($user_real_name) ) { dcElement($name, $user_real_name); } else { @@ -224,7 +224,7 @@ function wfCreativeCommonsRdf($article) { if( empty( $user_name ) ) { $user_name = User::whoIs($id); } - dcPageOrString($name, $wgLang->getNsText(NS_USER) . ":" . $user_name, wfMsg("siteuser", $user_name)); + dcPageOrString($name, $wgLang->getNsText(NS_USER) . ':' . $user_name, wfMsg('siteuser', $user_name)); } } @@ -283,11 +283,11 @@ function wfCreativeCommonsRdf($article) { /* Handle the GPL and LGPL, too. */ - $knownLicenses["http://creativecommons.org/licenses/GPL/2.0/"] = + $knownLicenses['http://creativecommons.org/licenses/GPL/2.0/'] = array('de', 're', 'di', 'no', 'sa', 'sc'); - $knownLicenses["http://creativecommons.org/licenses/LGPL/2.1/"] = + $knownLicenses['http://creativecommons.org/licenses/LGPL/2.1/'] = array('de', 're', 'di', 'no', 'sa', 'sc'); - $knownLicenses["http://www.gnu.org/copyleft/fdl.html"] = + $knownLicenses['http://www.gnu.org/copyleft/fdl.html'] = array('de', 're', 'di', 'no', 'sa', 'sc'); return $knownLicenses; diff --git a/includes/Namespace.php b/includes/Namespace.php index 3ef9dcc369..c8ea57db76 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -1,7 +1,7 @@ "Media", - NS_SPECIAL => "Special", - NS_TALK => "Talk", - NS_USER => "User", - NS_USER_TALK => "User_talk", - NS_WIKIPEDIA => "Project", - NS_WIKIPEDIA_TALK => "Project_talk", - NS_IMAGE => "Image", - NS_IMAGE_TALK => "Image_talk", - NS_MEDIAWIKI => "MediaWiki", - NS_MEDIAWIKI_TALK => "MediaWiki_talk", - NS_TEMPLATE => "Template", - NS_TEMPLATE_TALK => "Template_talk", - NS_HELP => "Help", - NS_HELP_TALK => "Help_talk", - NS_CATEGORY => "Category", - NS_CATEGORY_TALK => "Category_talk" + NS_MEDIA => 'Media', + NS_SPECIAL => 'Special', + NS_TALK => 'Talk', + NS_USER => 'User', + NS_USER_TALK => 'User_talk', + NS_WIKIPEDIA => 'Project', + NS_WIKIPEDIA_TALK => 'Project_talk', + NS_IMAGE => 'Image', + NS_IMAGE_TALK => 'Image_talk', + NS_MEDIAWIKI => 'MediaWiki', + NS_MEDIAWIKI_TALK => 'MediaWiki_talk', + NS_TEMPLATE => 'Template', + NS_TEMPLATE_TALK => 'Template_talk', + NS_HELP => 'Help', + NS_HELP_TALK => 'Help_talk', + NS_CATEGORY => 'Category', + NS_CATEGORY_TALK => 'Category_talk' ); class Namespace { diff --git a/includes/ObjectCache.php b/includes/ObjectCache.php index 093f6716c2..53e947c249 100644 --- a/includes/ObjectCache.php +++ b/includes/ObjectCache.php @@ -196,7 +196,7 @@ CREATE TABLE objectcache ( */ class /* abstract */ SqlBagOStuff extends BagOStuff { var $table; - function SqlBagOStuff($tablename = "objectcache") { + function SqlBagOStuff($tablename = 'objectcache') { $this->table = $tablename; } @@ -214,7 +214,7 @@ class /* abstract */ SqlBagOStuff extends BagOStuff { $this->_debug("get: retrieved data; exp time is " . $row->exptime); return unserialize($row->value); } else { - $this->_debug("get: no matching rows"); + $this->_debug('get: no matching rows'); } return false; } @@ -248,13 +248,13 @@ class /* abstract */ SqlBagOStuff extends BagOStuff { // ewwww for($i=0;$i_strencode($reps[$i]), $sql); } $res = $this->_doquery($sql); if($res == false) { - $this->_debug("query failed: " . $this->_dberror($res)); + $this->_debug('query failed: ' . $this->_dberror($res)); } return $res; } @@ -265,11 +265,11 @@ class /* abstract */ SqlBagOStuff extends BagOStuff { } function _doquery($sql) { - die( "abstract function SqlBagOStuff::_doquery() must be defined" ); + die( 'abstract function SqlBagOStuff::_doquery() must be defined' ); } function _fetchrow($res) { - die( "abstract function SqlBagOStuff::_fetchrow() must be defined" ); + die( 'abstract function SqlBagOStuff::_fetchrow() must be defined' ); } function _freeresult($result) { @@ -279,15 +279,15 @@ class /* abstract */ SqlBagOStuff extends BagOStuff { function _dberror($result) { /* stub */ - return "unknown error"; + return 'unknown error'; } function _maxdatetime() { - die( "abstract function SqlBagOStuff::_maxdatetime() must be defined" ); + die( 'abstract function SqlBagOStuff::_maxdatetime() must be defined' ); } function _fromunixtime() { - die( "abstract function SqlBagOStuff::_fromunixtime() must be defined" ); + die( 'abstract function SqlBagOStuff::_fromunixtime() must be defined' ); } function expireall() { @@ -305,7 +305,7 @@ class /* abstract */ SqlBagOStuff extends BagOStuff { class MediaWikiBagOStuff extends SqlBagOStuff { function _doquery($sql) { $dbw =& wfGetDB( DB_MASTER ); - return $dbw->query($sql, "MediaWikiBagOStuff:_doquery"); + return $dbw->query($sql, 'MediaWikiBagOStuff:_doquery'); } function _fetchobject($result) { $dbw =& wfGetDB( DB_MASTER ); @@ -320,10 +320,10 @@ class MediaWikiBagOStuff extends SqlBagOStuff { return $dbw->lastError(); } function _maxdatetime() { - return "9999-12-31 12:59:59"; + return '9999-12-31 12:59:59'; } function _fromunixtime($ts) { - return gmdate( "Y-m-d H:i:s", $ts ); + return gmdate( 'Y-m-d H:i:s', $ts ); } function _strencode($s) { $dbw =& wfGetDB( DB_MASTER ); diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 948fc41f26..bfa3989525 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1,11 +1,11 @@ addLink( $linkarr ); $haveMeta = true; } @@ -84,14 +84,14 @@ class OutputPage { wfDebug( "-- bad client, not caching\n", false ); return; } - if( $wgUser->getOption( "nocache" ) ) { + if( $wgUser->getOption( 'nocache' ) ) { wfDebug( "USER DISABLED CACHE\n", false ); return; } $lastmod = gmdate( "D, j M Y H:i:s", wfTimestamp2Unix( max( $timestamp, $wgUser->mTouched ) ) ) . " GMT"; - if( !empty( $_SERVER["HTTP_IF_MODIFIED_SINCE"] ) ) { + if( !empty( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) ) { # IE sends sizes after the date like this: # Wed, 20 Aug 2003 06:51:19 GMT; length=5202 # this breaks strtotime(). @@ -151,10 +151,10 @@ class OutputPage { if(!empty($action)) { $taction = $this->getPageTitleActionText(); if( !empty( $taction ) ) { - $name .= " - $taction"; + $name .= ' - '.$taction; } } - $this->setHTMLTitle( $name . " - " . wfMsg( "wikititlesuffix" ) ); + $this->setHTMLTitle( $name . ' - ' . wfMsg( 'wikititlesuffix' ) ); } function getHTMLTitle() { return $this->mHTMLtitle; } function getPageTitle() { return $this->mPagetitle; } @@ -278,9 +278,9 @@ class OutputPage { function sendCacheControl() { global $wgUseSquid, $wgUseESI; # FIXME: This header may cause trouble with some versions of Internet Explorer - header( "Vary: Accept-Encoding, Cookie" ); + header( 'Vary: Accept-Encoding, Cookie' ); if( $this->mEnableClientCache ) { - if( $wgUseSquid && ! isset( $_COOKIE[ini_get( "session.name") ] ) && + if( $wgUseSquid && ! isset( $_COOKIE[ini_get( 'session.name') ] ) && ! $this->isPrintable() && $this->mSquidMaxage != 0 ) { if ( $wgUseESI ) { @@ -315,9 +315,9 @@ class OutputPage { # In general, the absence of a last modified header should be enough to prevent # the client from using its cache. We send a few other things just to make sure. - header( "Expires: -1" ); - header( "Cache-Control: no-cache, no-store, max-age=0, must-revalidate" ); - header( "Pragma: no-cache" ); + header( 'Expires: -1' ); + header( 'Cache-Control: no-cache, no-store, max-age=0, must-revalidate' ); + header( 'Pragma: no-cache' ); } } @@ -332,13 +332,13 @@ class OutputPage { if( $this->mDoNothing ){ return; } - $fname = "OutputPage::output"; + $fname = 'OutputPage::output'; wfProfileIn( $fname ); $sk = $wgUser->getSkin(); - if ( "" != $this->mRedirect ) { - if( substr( $this->mRedirect, 0, 4 ) != "http" ) { + if ( '' != $this->mRedirect ) { + if( substr( $this->mRedirect, 0, 4 ) != 'http' ) { # Standards require redirect URLs to be absolute global $wgServer; $this->mRedirect = $wgServer . $this->mRedirect; @@ -347,7 +347,7 @@ class OutputPage { if( !$wgDebugRedirects ) { header("HTTP/1.1 {$this->mRedirectCode} Moved Permanently"); } - $this->mLastModified = gmdate( "D, j M Y H:i:s" ) . " GMT"; + $this->mLastModified = gmdate( 'D, j M Y H:i:s' ) . ' GMT'; } $this->sendCacheControl(); @@ -358,7 +358,7 @@ class OutputPage { print "

          Location: $url

          \n"; print "\n\n"; } else { - header( "Location: {$this->mRedirect}" ); + header( 'Location: '.$this->mRedirect ); } if ( isset( $wgProfiler ) ) { wfDebug( $wgProfiler->getOutput() ); } return; @@ -373,11 +373,11 @@ class OutputPage { $sk->postParseLinkColour( false ); header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" ); - header( "Content-language: {$wgLanguageCode}" ); + header( 'Content-language: '.$wgLanguageCode ); $exp = time() + $wgCookieExpiration; foreach( $this->mCookies as $name => $val ) { - setcookie( $name, $val, $exp, "/" ); + setcookie( $name, $val, $exp, '/' ); } $sk->outputPage( $this ); @@ -451,13 +451,13 @@ class OutputPage { global $wgRequestTime; $now = wfTime(); - list( $usec, $sec ) = explode( " ", $wgRequestTime ); + list( $usec, $sec ) = explode( ' ', $wgRequestTime ); $start = (float)$sec + (float)$usec; $elapsed = $now - $start; # Use real server name if available, so we know which machine # in a server farm generated the current page. - if ( function_exists( "posix_uname" ) ) { + if ( function_exists( 'posix_uname' ) ) { $uname = @posix_uname(); } else { $uname = false; @@ -479,17 +479,17 @@ class OutputPage { { global $wgTitle; - $this->mDebugtext .= "Original title: " . + $this->mDebugtext .= 'Original title: ' . $wgTitle->getPrefixedText() . "\n"; $this->setPageTitle( wfMsg( $title ) ); - $this->setHTMLTitle( wfMsg( "errorpagetitle" ) ); - $this->setRobotpolicy( "noindex,nofollow" ); + $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) ); + $this->setRobotpolicy( 'noindex,nofollow' ); $this->setArticleRelated( false ); $this->enableClientCache( false ); - $this->mRedirect = ""; + $this->mRedirect = ''; - $this->mBodytext = ""; - $this->addHTML( "

          " . wfMsg( $msg ) . "

          \n" ); + $this->mBodytext = ''; + $this->addHTML( '

          ' . wfMsg( $msg ) . "

          \n" ); $this->returnToMain( false ); $this->output(); @@ -500,15 +500,15 @@ class OutputPage { { global $wgUser; - $this->setPageTitle( wfMsg( "sysoptitle" ) ); - $this->setHTMLTitle( wfMsg( "errorpagetitle" ) ); - $this->setRobotpolicy( "noindex,nofollow" ); + $this->setPageTitle( wfMsg( 'sysoptitle' ) ); + $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) ); + $this->setRobotpolicy( 'noindex,nofollow' ); $this->setArticleRelated( false ); - $this->mBodytext = ""; + $this->mBodytext = ''; $sk = $wgUser->getSkin(); - $ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" ); - $this->addHTML( wfMsg( "sysoptext", $ap ) ); + $ap = $sk->makeKnownLink( wfMsg( 'administrators' ), '' ); + $this->addHTML( wfMsg( 'sysoptext', $ap ) ); $this->returnToMain(); } @@ -516,15 +516,15 @@ class OutputPage { { global $wgUser; - $this->setPageTitle( wfMsg( "developertitle" ) ); - $this->setHTMLTitle( wfMsg( "errorpagetitle" ) ); - $this->setRobotpolicy( "noindex,nofollow" ); + $this->setPageTitle( wfMsg( 'developertitle' ) ); + $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) ); + $this->setRobotpolicy( 'noindex,nofollow' ); $this->setArticleRelated( false ); - $this->mBodytext = ""; + $this->mBodytext = ''; $sk = $wgUser->getSkin(); - $ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" ); - $this->addHTML( wfMsg( "developertext", $ap ) ); + $ap = $sk->makeKnownLink( wfMsg( 'administrators' ), '' ); + $this->addHTML( wfMsg( 'developertext', $ap ) ); $this->returnToMain(); } @@ -532,19 +532,19 @@ class OutputPage { { global $wgUser, $wgTitle, $wgLang; - $this->setPageTitle( wfMsg( "loginreqtitle" ) ); - $this->setHTMLTitle( wfMsg( "errorpagetitle" ) ); - $this->setRobotpolicy( "noindex,nofollow" ); + $this->setPageTitle( wfMsg( 'loginreqtitle' ) ); + $this->setHTMLTitle( wfMsg( 'errorpagetitle' ) ); + $this->setRobotpolicy( 'noindex,nofollow' ); $this->setArticleFlag( false ); - $this->mBodytext = ""; - $this->addWikiText( wfMsg( "loginreqtext" ) ); + $this->mBodytext = ''; + $this->addWikiText( wfMsg( 'loginreqtext' ) ); # We put a comment in the .html file so a Sysop can diagnose the page the # user can't see. $this->addHTML( "\n" ); + ':' . + $wgTitle->getDBkey() . '-->' ); $this->returnToMain(); # Flip back to the main page after 10 seconds. } @@ -552,22 +552,22 @@ class OutputPage { { global $wgUser, $wgCommandLineMode; - $this->setPageTitle( wfMsgNoDB( "databaseerror" ) ); - $this->setRobotpolicy( "noindex,nofollow" ); + $this->setPageTitle( wfMsgNoDB( 'databaseerror' ) ); + $this->setRobotpolicy( 'noindex,nofollow' ); $this->setArticleRelated( false ); $this->enableClientCache( false ); - $this->mRedirect = ""; + $this->mRedirect = ''; if ( $wgCommandLineMode ) { - $msg = wfMsgNoDB( "dberrortextcl", htmlspecialchars( $sql ), + $msg = wfMsgNoDB( 'dberrortextcl', htmlspecialchars( $sql ), htmlspecialchars( $fname ), $errno, htmlspecialchars( $error ) ); } else { - $msg = wfMsgNoDB( "dberrortext", htmlspecialchars( $sql ), + $msg = wfMsgNoDB( 'dberrortext', htmlspecialchars( $sql ), htmlspecialchars( $fname ), $errno, htmlspecialchars( $error ) ); } if ( $wgCommandLineMode || !is_object( $wgUser )) { - print "$msg\n"; + print $msg."\n"; wfErrorExit(); } $this->mBodytext = $msg; @@ -579,24 +579,24 @@ class OutputPage { { global $wgUser, $wgReadOnlyFile; - $this->setRobotpolicy( "noindex,nofollow" ); + $this->setRobotpolicy( 'noindex,nofollow' ); $this->setArticleRelated( false ); if( $protected ) { - $this->setPageTitle( wfMsg( "viewsource" ) ); - $this->addWikiText( wfMsg( "protectedtext" ) ); + $this->setPageTitle( wfMsg( 'viewsource' ) ); + $this->addWikiText( wfMsg( 'protectedtext' ) ); } else { - $this->setPageTitle( wfMsg( "readonly" ) ); + $this->setPageTitle( wfMsg( 'readonly' ) ); $reason = file_get_contents( $wgReadOnlyFile ); - $this->addWikiText( wfMsg( "readonlytext", $reason ) ); + $this->addWikiText( wfMsg( 'readonlytext', $reason ) ); } if( is_string( $source ) ) { - if( strcmp( $source, "" ) == 0 ) { - $source = wfMsg( "noarticletext" ); + if( strcmp( $source, '' ) == 0 ) { + $source = wfMsg( 'noarticletext' ); } - $rows = $wgUser->getOption( "rows" ); - $cols = $wgUser->getOption( "cols" ); + $rows = $wgUser->getOption( 'rows' ); + $cols = $wgUser->getOption( 'cols' ); $text = "\n"; $this->addHTML( $text ); @@ -611,7 +611,7 @@ class OutputPage { $this->setRobotpolicy( "noindex,nofollow" ); $this->setArticleRelated( false ); $this->enableClientCache( false ); - $this->mRedirect = ""; + $this->mRedirect = ''; $this->mBodytext = $message; $this->output(); @@ -620,27 +620,27 @@ class OutputPage { function unexpectedValueError( $name, $val ) { - $this->fatalError( wfMsg( "unexpected", $name, $val ) ); + $this->fatalError( wfMsg( 'unexpected', $name, $val ) ); } function fileCopyError( $old, $new ) { - $this->fatalError( wfMsg( "filecopyerror", $old, $new ) ); + $this->fatalError( wfMsg( 'filecopyerror', $old, $new ) ); } function fileRenameError( $old, $new ) { - $this->fatalError( wfMsg( "filerenameerror", $old, $new ) ); + $this->fatalError( wfMsg( 'filerenameerror', $old, $new ) ); } function fileDeleteError( $name ) { - $this->fatalError( wfMsg( "filedeleteerror", $name ) ); + $this->fatalError( wfMsg( 'filedeleteerror', $name ) ); } function fileNotFoundError( $name ) { - $this->fatalError( wfMsg( "filenotfound", $name ) ); + $this->fatalError( wfMsg( 'filenotfound', $name ) ); } // return from error messages or notes @@ -655,15 +655,15 @@ class OutputPage { } $sk = $wgUser->getSkin(); - if ( "" == $returnto ) { - $returnto = wfMsg( "mainpage" ); + if ( '' == $returnto ) { + $returnto = wfMsg( 'mainpage' ); } - $link = $sk->makeKnownLink( $returnto, "" ); + $link = $sk->makeKnownLink( $returnto, '' ); - $r = wfMsg( "returnto", $link ); + $r = wfMsg( 'returnto', $link ); if ( $auto ) { $titleObj = Title::newFromText( $returnto ); - $wgOut->addMeta( "http:Refresh", "10;url=" . $titleObj->escapeFullURL() ); + $wgOut->addMeta( 'http:Refresh', '10;url=' . $titleObj->escapeFullURL() ); } $wgOut->addHTML( "\n

          $r

          \n" ); } @@ -677,14 +677,14 @@ class OutputPage { $bad = array_keys ( $wgLinkCache->mBadLinks ) ; $a = array_merge ( $good , $bad ) ; $a = array_slice ( $a , 0 , 10 ) ; # 10 keywords max - $a = implode ( "," , $a ) ; + $a = implode ( ',' , $a ) ; $strip = array( "/<.*?" . ">/" => '', "/[_]/" => ' ' ); $a = htmlspecialchars(preg_replace(array_keys($strip), array_values($strip),$a )); - $wgOut->addMeta ( "KEYWORDS" , $a ) ; + $wgOut->addMeta ( 'KEYWORDS' , $a ) ; } /* private */ function headElement() @@ -696,7 +696,7 @@ class OutputPage { if( $xml ) { $ret = "<" . "?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n"; } else { - $ret = ""; + $ret = ''; } $ret .= "\n"; @@ -707,9 +707,9 @@ class OutputPage { if( $xml ) { $xmlbits = "xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\""; } else { - $xmlbits = ""; + $xmlbits = ''; } - $rtl = $wgLang->isRTL() ? " dir='RTL'" : ""; + $rtl = $wgLang->isRTL() ? " dir='RTL'" : ''; $ret .= "\n"; $ret .= "\n" . htmlspecialchars( $this->mHTMLtitle ) . "\n"; array_push( $this->mMetatags, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) ); @@ -717,7 +717,7 @@ class OutputPage { $ret .= $this->getHeadLinks(); global $wgStylePath; if( $this->isPrintable() ) { - $media = ""; + $media = ''; } else { $media = "media='print'"; } @@ -735,18 +735,18 @@ class OutputPage { function getHeadLinks() { global $wgRequest, $wgStylePath; - $ret = ""; + $ret = ''; foreach ( $this->mMetatags as $tag ) { - if ( 0 == strcasecmp( "http:", substr( $tag[0], 0, 5 ) ) ) { - $a = "http-equiv"; + if ( 0 == strcasecmp( 'http:', substr( $tag[0], 0, 5 ) ) ) { + $a = 'http-equiv'; $tag[0] = substr( $tag[0], 5 ); } else { - $a = "name"; + $a = 'name'; } $ret .= "\n"; } $p = $this->mRobotpolicy; - if ( "" == $p ) { $p = "index,follow"; } + if ( '' == $p ) { $p = 'index,follow'; } $ret .= "\n"; if ( count( $this->mKeywords ) > 0 ) { @@ -758,7 +758,7 @@ class OutputPage { htmlspecialchars(preg_replace(array_keys($strip), array_values($strip),implode( ",", $this->mKeywords ))) . "\" />\n"; } foreach ( $this->mLinktags as $tag ) { - $ret .= " $val ) { $ret .= " $attr=\"" . htmlspecialchars( $val ) . "\""; } @@ -766,9 +766,9 @@ class OutputPage { } if( $this->isSyndicated() ) { # FIXME: centralize the mime-type and name information in Feed.php - $link = $wgRequest->escapeAppendQuery( "feed=rss" ); + $link = $wgRequest->escapeAppendQuery( 'feed=rss' ); $ret .= "\n"; - $link = $wgRequest->escapeAppendQuery( "feed=atom" ); + $link = $wgRequest->escapeAppendQuery( 'feed=atom' ); $ret .= "\n"; } # FIXME: get these working @@ -805,12 +805,12 @@ class OutputPage { $colours = array(); # Get placeholders from body - wfProfileIn( "$fname-match" ); + wfProfileIn( $fname.'-match' ); preg_match_all( "//", $text, $tmpLinks ); - wfProfileOut( "$fname-match" ); + wfProfileOut( $fname.'-match' ); if ( !empty( $tmpLinks[0] ) ) { - wfProfileIn( "$fname-check" ); + wfProfileIn( $fname.'-check' ); $dbr =& wfGetDB( DB_SLAVE ); $cur = $dbr->tableName( 'cur' ); $sk = $wgUser->getSkin(); @@ -856,16 +856,16 @@ class OutputPage { $current = $val; $query .= ")) OR (cur_namespace=$val AND cur_title IN("; } else { - $query .= ", "; + $query .= ', '; } $query .= $dbr->addQuotes( $dbkeys[$key] ); } } if ( $query ) { - $query .= "))"; + $query .= '))'; if ( $options & RLH_FOR_UPDATE ) { - $query .= " FOR UPDATE"; + $query .= ' FOR UPDATE'; } $res = $dbr->query( $query, $fname ); @@ -891,10 +891,10 @@ class OutputPage { } } } - wfProfileOut( "$fname-check" ); + wfProfileOut( $fname.'-check' ); # Construct search and replace arrays - wfProfileIn( "$fname-construct" ); + wfProfileIn( $fname.'-construct' ); global $outputReplace; $outputReplace = array(); foreach ( $namespaces as $key => $ns ) { @@ -911,16 +911,16 @@ class OutputPage { $outputReplace[$searchkey] = $sk->makeStubLinkObj( $title, $texts[$key], $queries[$key] ); } } - wfProfileOut( "$fname-construct" ); + wfProfileOut( $fname.'-construct' ); # Do the thing - wfProfileIn( "$fname-replace" ); + wfProfileIn( $fname.'-replace' ); $text = preg_replace_callback( '/()/', "outputReplaceMatches", $text); - wfProfileOut( "$fname-replace" ); + wfProfileOut( $fname.'-replace' ); } wfProfileOut( $fname ); return $colours; diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 3aa6ae2563..d519385f6a 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -25,17 +25,17 @@ class PageHistory { # Client cache fresh and headers sent, nothing more to do. return; } - $fname = "PageHistory::history"; + $fname = 'PageHistory::history'; wfProfileIn( $fname ); $wgOut->setPageTitle( $this->mTitle->getPRefixedText() ); - $wgOut->setSubtitle( wfMsg( "revhistory" ) ); + $wgOut->setSubtitle( wfMsg( 'revhistory' ) ); $wgOut->setArticleFlag( false ); $wgOut->setArticleRelated( true ); - $wgOut->setRobotpolicy( "noindex,nofollow" ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); if( $this->mTitle->getArticleID() == 0 ) { - $wgOut->addHTML( wfMsg( "nohistory" ) ); + $wgOut->addHTML( wfMsg( 'nohistory' ) ); wfProfileOut( $fname ); return; } @@ -80,7 +80,7 @@ class PageHistory { $numbar = wfViewPrevNext( $offset, $limit, $this->mTitle->getPrefixedText(), - "action=history", $atend ); + 'action=history', $atend ); $s = $numbar; if($this->linesonpage > 0) { $submitpart1 = ''; + $this->lastdate = $this->lastline = ''; + $s = "\n

          " . wfMsg( 'histlegend' ).'

          '; $s .="\n
          escapeLocalURL( '-' ) . "\" method=\"get\">"; $s .= "getPrefixedDbKey())."\"/>\n"; $s .= !empty($this->submitbuttonhtml1) ? $this->submitbuttonhtml1."\n":''; @@ -130,9 +130,9 @@ class PageHistory { function endHistoryList( $skip = false ) { - $last = wfMsg( "last" ); + $last = wfMsg( 'last' ); - $s = $skip ? "" : preg_replace( "/!OLDID![0-9]+!/", $last, $this->lastline ); + $s = $skip ? '' : preg_replace( "/!OLDID![0-9]+!/", $last, $this->lastline ); $s .= "
        "; $s .= !empty($this->submitbuttonhtml2) ? $this->submitbuttonhtml2."\n":''; $s .= "\n"; @@ -144,44 +144,44 @@ class PageHistory { global $wgLang; $artname = Title::makeName( $ns, $ttl ); - $last = wfMsg( "last" ); - $cur = wfMsg( "cur" ); - $cr = wfMsg( "currentrev" ); + $last = wfMsg( 'last' ); + $cur = wfMsg( 'cur' ); + $cr = wfMsg( 'currentrev' ); if ( $oid && $this->lastline ) { $ret = preg_replace( "/!OLDID!([0-9]+)!/", $this->mSkin->makeKnownLink( $artname, $last, "diff=\\1&oldid={$oid}",'' ,'' ,' tabindex="'.$counter.'"' ), $this->lastline ); } else { - $ret = ""; + $ret = ''; } $dt = $wgLang->timeanddate( $ts, true ); if ( $oid ) { - $q = "oldid={$oid}"; + $q = 'oldid='.$oid; } else { - $q = ""; + $q = ''; } $link = $this->mSkin->makeKnownLink( $artname, $dt, $q ); if ( 0 == $u ) { - $ul = $this->mSkin->makeKnownLink( $wgLang->specialPage( "Contributions" ), - htmlspecialchars( $ut ), "target=" . urlencode( $ut ) ); + $ul = $this->mSkin->makeKnownLink( $wgLang->specialPage( 'Contributions' ), + htmlspecialchars( $ut ), 'target=' . urlencode( $ut ) ); } else { $ul = $this->mSkin->makeLink( $wgLang->getNsText( - Namespace::getUser() ) . ":{$ut}", htmlspecialchars( $ut ) ); + Namespace::getUser() ) . ':'.$ut , htmlspecialchars( $ut ) ); } - $s = "
      • "; + $s = '
      • '; if ( $oid ) { $curlink = $this->mSkin->makeKnownLink( $artname, $cur, - "diff=0&oldid={$oid}" ); + 'diff=0&oldid='.$oid ); } else { $curlink = $cur; } - $arbitrary = ""; + $arbitrary = ''; if( $this->linesonpage > 1) { # XXX: move title texts to javascript - $checkmark = ""; + $checkmark = ''; if ( !$oid ) { $arbitrary = ''; $checkmark = ' checked="checked"'; @@ -196,7 +196,7 @@ class PageHistory { $s .= $isminor ? ' '.wfMsg( "minoreditletter" ).'': '' ; - if ( "" != $c && "*" != $c ) { + if ( '' != $c && '*' != $c ) { $c = $this->mSkin->formatcomment($c); $s .= " (" . $c . ")"; diff --git a/includes/Parser.php b/includes/Parser.php index 071df0705a..f95cbfa9d9 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -32,13 +32,13 @@ # the generated page would be proportional to the square of the input size. # Hence, we limit the number of inclusions of any given page, thus bringing any # attack back to O(N). -define( "MAX_INCLUDE_REPEAT", 100 ); -define( "MAX_INCLUDE_SIZE", 1000000 ); // 1 Million +define( 'MAX_INCLUDE_REPEAT', 100 ); +define( 'MAX_INCLUDE_SIZE', 1000000 ); // 1 Million # Allowed values for $mOutputType -define( "OT_HTML", 1 ); -define( "OT_WIKI", 2 ); -define( "OT_MSG" , 3 ); +define( 'OT_HTML', 1 ); +define( 'OT_WIKI', 2 ); +define( 'OT_MSG' , 3 ); # string parameter for extractTags which will cause it # to strip HTML comments in addition to regular @@ -108,7 +108,7 @@ class Parser # function parse( $text, &$title, $options, $linestart = true, $clearState = true ) { global $wgUseTidy; - $fname = "Parser::parse"; + $fname = 'Parser::parse'; wfProfileIn( $fname ); if ( $clearState ) { @@ -176,7 +176,7 @@ class Parser # If $tag is set to STRIP_COMMENTS, the function will extract # - /* static */ function extractTags($tag, $text, &$content, $uniq_prefix = ""){ + /* static */ function extractTags($tag, $text, &$content, $uniq_prefix = ''){ $rnd = $uniq_prefix . '-' . $tag . Parser::getRandomString(); if ( !$content ) { $content = array( ); @@ -239,7 +239,7 @@ class Parser # Raw and unchecked for validity. $html_content[$marker] = $content; } else { - $html_content[$marker] = "$content"; + $html_content[$marker] = ''.$content.''; } } } @@ -250,7 +250,7 @@ class Parser if( $render ){ $nowiki_content[$marker] = wfEscapeHTMLTagsOnly( $content ); } else { - $nowiki_content[$marker] = "$content"; + $nowiki_content[$marker] = ''.$content.''; } } @@ -261,10 +261,10 @@ class Parser if( $this->mOptions->getUseTeX() ) { $math_content[$marker] = renderMath( $content ); } else { - $math_content[$marker] = "<math>$content<math>"; + $math_content[$marker] = '<math>'.$content.'<math>'; } } else { - $math_content[$marker] = "$content"; + $math_content[$marker] = ''.$content.''; } } @@ -274,7 +274,7 @@ class Parser if( $render ){ $pre_content[$marker] = '
        ' . wfEscapeHTMLTagsOnly( $content ) . '
        '; } else { - $pre_content[$marker] = "
        $content
        "; + $pre_content[$marker] = '
        '.$content.'
        '; } } @@ -282,7 +282,7 @@ class Parser if($stripcomments) { $text = Parser::extractTags(STRIP_COMMENTS, $text, $comment_content, $uniq_prefix); foreach( $comment_content as $marker => $content ){ - $comment_content[$marker] = ""; + $comment_content[$marker] = ''; } } @@ -400,7 +400,7 @@ class Parser "(in_array(strtolower(\"\$1\"),\$htmlattrs)?(\"\$1\".((\"x\$3\" != \"x\")?\"=\$3\":'')):'')", $t); - $t = str_replace ( "<>" , "" , $t ) ; # This should fix bug 980557 + $t = str_replace ( '<>' , '' , $t ) ; # This should fix bug 980557 # Strip javascript "expression" from stylesheets. Brute force approach: # If anythin offensive is found, all attributes of the HTML tag are dropped @@ -481,8 +481,8 @@ class Parser if ( preg_match( '/^(:*)\{\|(.*)$/', $x, $matches ) ) { $indent_level = strlen( $matches[1] ); $t[$k] = "\n" . - str_repeat( "
        ", $indent_level ) . - "fixTagAttributes ( $matches[2] ) . '>' ; + str_repeat( '
        ', $indent_level ) . + '
        fixTagAttributes ( $matches[2] ) . '>' ; array_push ( $td , false ) ; array_push ( $ltd , '' ) ; array_push ( $tr , false ) ; @@ -495,7 +495,7 @@ class Parser if ( array_pop ( $tr ) ) $z = '' . $z ; if ( array_pop ( $td ) ) $z = '' . $z ; array_pop ( $ltr ) ; - $t[$k] = $z . str_repeat( "", $indent_level ); + $t[$k] = $z . str_repeat( '', $indent_level ); } else if ( '|-' == substr ( $x , 0 , 2 ) ) { # Allows for |--------------- $x = substr ( $x , 1 ) ; @@ -706,9 +706,9 @@ class Parser { $x1 = substr ($arr[$i-1], -1); $x2 = substr ($arr[$i-1], -2, 1); - if ($x1 == " ") { + if ($x1 == ' ') { if ($firstspace == -1) $firstspace = $i; - } else if ($x2 == " ") { + } else if ($x2 == ' ') { if ($firstsingleletterword == -1) $firstsingleletterword = $i; } else { if ($firstmultiletterword == -1) $firstmultiletterword = $i; @@ -758,41 +758,41 @@ class Parser if (strlen ($r) == 2) { if ($state == 'em') - { $output .= ""; $state = ''; } + { $output .= ''; $state = ''; } else if ($state == 'strongem') - { $output .= ""; $state = 'strong'; } + { $output .= ''; $state = 'strong'; } else if ($state == 'emstrong') - { $output .= ""; $state = 'strong'; } + { $output .= ''; $state = 'strong'; } else if ($state == 'both') - { $output .= "{$buffer}"; $state = 'strong'; } + { $output .= ''.$buffer.''; $state = 'strong'; } else # $state can be 'strong' or '' - { $output .= ""; $state .= 'em'; } + { $output .= ''; $state .= 'em'; } } else if (strlen ($r) == 3) { if ($state == 'strong') - { $output .= ""; $state = ''; } + { $output .= ''; $state = ''; } else if ($state == 'strongem') - { $output .= ""; $state = 'em'; } + { $output .= ''; $state = 'em'; } else if ($state == 'emstrong') - { $output .= ""; $state = 'em'; } + { $output .= ''; $state = 'em'; } else if ($state == 'both') - { $output .= "{$buffer}"; $state = 'em'; } + { $output .= ''.$buffer.''; $state = 'em'; } else # $state can be 'em' or '' - { $output .= ""; $state .= 'strong'; } + { $output .= ''; $state .= 'strong'; } } else if (strlen ($r) == 5) { if ($state == 'strong') - { $output .= ""; $state = 'em'; } + { $output .= ''; $state = 'em'; } else if ($state == 'em') - { $output .= ""; $state = 'strong'; } + { $output .= ''; $state = 'strong'; } else if ($state == 'strongem') - { $output .= ""; $state = ''; } + { $output .= ''; $state = ''; } else if ($state == 'emstrong') - { $output .= ""; $state = ''; } + { $output .= ''; $state = ''; } else if ($state == 'both') - { $output .= "{$buffer}"; $state = ''; } + { $output .= ''.$buffer.''; $state = ''; } else # ($state == '') { $buffer = ''; $state = 'both'; } } @@ -807,7 +807,7 @@ class Parser if ($state == 'strongem') $output .= ''; if ($state == 'both') - $output .= "{$buffer}"; + $output .= ''.$buffer.''; return $output; } } @@ -846,7 +846,7 @@ class Parser if ( $text == '' ) { # Autonumber if allowed if ( strpos( HTTP_PROTOCOLS, $protocol ) !== false ) { - $text = "[" . ++$this->mAutonumber . "]"; + $text = '[' . ++$this->mAutonumber . ']'; } else { # Otherwise just use the URL $text = htmlspecialchars( $url ); @@ -862,7 +862,7 @@ class Parser $encUrl = htmlspecialchars( $url ); # Bit in parentheses showing the URL for the printable version - if( $url == $text || preg_match( "!$protocol://" . preg_quote( $text, "/" ) . "/?$!", $url ) ) { + if( $url == $text || preg_match( "!$protocol://" . preg_quote( $text, '/' ) . "/?$!", $url ) ) { $paren = ''; } else { # Expand the URL for printable version @@ -1092,7 +1092,7 @@ class Parser if ( $ns == NS_CATEGORY ) { $t = $nt->getText() ; - $nnt = Title::newFromText ( Namespace::getCanonicalName(NS_CATEGORY).":".$t ) ; + $nnt = Title::newFromText ( Namespace::getCanonicalName(NS_CATEGORY).':'.$t ) ; $wgLinkCache->suspend(); # Don't save in links/brokenlinks $pPLC=$sk->postParseLinkColour(); @@ -1279,7 +1279,7 @@ class Parser # FIXME: This is dupe of code above if( preg_match( '/^(.*?(?:\s| )):(.*)$/', $t, $match ) ) { $term = $match[1]; - $output .= $term . $this->nextItem( ":" ); + $output .= $term . $this->nextItem( ':' ); $t = $match[2]; } } @@ -1307,7 +1307,7 @@ class Parser $inBlockElem = true; } } else if ( !$inBlockElem && !$this->mInPre ) { - if ( " " == $t{0} and ( $this->mLastSection == 'pre' or trim($t) != '' ) ) { + if ( ' ' == $t{0} and ( $this->mLastSection == 'pre' or trim($t) != '' ) ) { // pre if ($this->mLastSection != 'pre') { $paragraphStack = false; @@ -1472,8 +1472,8 @@ class Parser $argc = count($args); $i = 0; for ( $i = 0; $i < $argc-1; $i++ ) { - if ( substr_count ( $args[$i], "[[" ) != substr_count ( $args[$i], "]]" ) ) { - $args[$i] .= "|".$args[$i+1]; + if ( substr_count ( $args[$i], '[[' ) != substr_count ( $args[$i], ']]' ) ) { + $args[$i] .= '|'.$args[$i+1]; array_splice($args, $i+1, 1); $i--; $argc--; @@ -2007,7 +2007,7 @@ class Parser } # give headline the correct tag - @$head[$headlineCount] .= ""; + @$head[$headlineCount] .= "'; $headlineCount++; } @@ -2057,7 +2057,7 @@ class Parser $fname = 'Parser::magicISBN'; wfProfileIn( $fname ); - $a = split( 'ISBN ', " $text" ); + $a = split( 'ISBN ', ' '.$text ); if ( count ( $a ) < 2 ) { wfProfileOut( $fname ); return $text; @@ -2083,7 +2083,7 @@ class Parser } else { $titleObj = Title::makeTitle( NS_SPECIAL, 'Booksources' ); $text .= 'escapeLocalUrl( 'isbn='.$num ) . "\" class=\"internal\">ISBN $isbn"; $text .= $x; } @@ -2099,13 +2099,13 @@ class Parser wfProfileIn( $fname ); # These next five lines are only for the ~35000 U.S. Census Rambot pages... - $directions = array ( "N" => "North" , "S" => "South" , "E" => "East" , "W" => "West" ) ; + $directions = array ( 'N' => 'North' , 'S' => 'South' , 'E' => 'East' , 'W' => 'West' ) ; $text = preg_replace ( "/(\d+)°(\d+)'(\d+)\" {$directions['N']}, (\d+)°(\d+)'(\d+)\" {$directions['W']}/" , "(GEO +\$1.\$2.\$3:-\$4.\$5.\$6)" , $text ) ; $text = preg_replace ( "/(\d+)°(\d+)'(\d+)\" {$directions['N']}, (\d+)°(\d+)'(\d+)\" {$directions['E']}/" , "(GEO +\$1.\$2.\$3:+\$4.\$5.\$6)" , $text ) ; $text = preg_replace ( "/(\d+)°(\d+)'(\d+)\" {$directions['S']}, (\d+)°(\d+)'(\d+)\" {$directions['W']}/" , "(GEO +\$1.\$2.\$3:-\$4.\$5.\$6)" , $text ) ; $text = preg_replace ( "/(\d+)°(\d+)'(\d+)\" {$directions['S']}, (\d+)°(\d+)'(\d+)\" {$directions['E']}/" , "(GEO +\$1.\$2.\$3:+\$4.\$5.\$6)" , $text ) ; - $a = split( 'GEO ', " $text" ); + $a = split( 'GEO ', ' '.$text ); if ( count ( $a ) < 2 ) { wfProfileOut( $fname ); return $text; @@ -2126,12 +2126,12 @@ class Parser $num = str_replace( '+', '', $geo ); $num = str_replace( ' ', '', $num ); - if ( '' == $num || count ( explode ( ":" , $num , 3 ) ) < 2 ) { + if ( '' == $num || count ( explode ( ':' , $num , 3 ) ) < 2 ) { $text .= "GEO $blank$x"; } else { $titleObj = Title::makeTitle( NS_SPECIAL, 'Geo' ); $text .= 'escapeLocalUrl( 'coordinates='.$num ) . "\" class=\"internal\">GEO $geo"; $text .= $x; } @@ -2166,7 +2166,7 @@ class Parser $url = wfmsg( 'rfcurl' ); $url = str_replace( '$1', $rfc, $url); $sk =& $this->mOptions->getSkin(); - $la = $sk->getExternalLinkAttributes( $url, "RFC {$rfc}" ); + $la = $sk->getExternalLinkAttributes( $url, 'RFC '.$rfc ); $text .= "RFC {$rfc}{$x}"; } } @@ -2316,14 +2316,14 @@ class ParserOutput var $mText, $mLanguageLinks, $mCategoryLinks, $mContainsOldMagic; var $mCacheTime; # Used in ParserCache - function ParserOutput( $text = "", $languageLinks = array(), $categoryLinks = array(), + function ParserOutput( $text = '', $languageLinks = array(), $categoryLinks = array(), $containsOldMagic = false ) { $this->mText = $text; $this->mLanguageLinks = $languageLinks; $this->mCategoryLinks = $categoryLinks; $this->mContainsOldMagic = $containsOldMagic; - $this->mCacheTime = ""; + $this->mCacheTime = ''; } function getText() { return $this->mText; } @@ -2396,7 +2396,7 @@ class ParserOptions function initialiseFromUser( &$userInput ) { global $wgUseTeX, $wgUseCategoryMagic, $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages; - $fname = "ParserOptions::initialiseFromUser"; + $fname = 'ParserOptions::initialiseFromUser'; wfProfileIn( $fname ); if ( !$userInput ) { $user = new User; @@ -2410,9 +2410,9 @@ class ParserOptions $this->mUseDynamicDates = $wgUseDynamicDates; $this->mInterwikiMagic = $wgInterwikiMagic; $this->mAllowExternalImages = $wgAllowExternalImages; - wfProfileIn( "$fname-skin" ); + wfProfileIn( $fname.'-skin' ); $this->mSkin =& $user->getSkin(); - wfProfileOut( "$fname-skin" ); + wfProfileOut( $fname.'-skin' ); $this->mDateFormat = $user->getOption( 'date' ); $this->mEditSection = $user->getOption( 'editsection' ); $this->mEditSectionOnRightClick = $user->getOption( 'editsectiononrightclick' ); diff --git a/includes/ParserCache.php b/includes/ParserCache.php index 8634a3b7d6..2d2f4e0291 100644 --- a/includes/ParserCache.php +++ b/includes/ParserCache.php @@ -12,7 +12,7 @@ class ParserCache function get( &$article, &$user ) { global $wgMemc, $wgCacheEpoch; - $fname = "ParserCache::get"; + $fname = 'ParserCache::get'; wfProfileIn( $fname ); $hash = $user->getPageRenderingHash(); diff --git a/includes/ParserXML.php b/includes/ParserXML.php index ee0cbfadc6..c91fe14057 100644 --- a/includes/ParserXML.php +++ b/includes/ParserXML.php @@ -4,27 +4,27 @@ // the base class for an element class element { - var $name = ""; + var $name = ''; var $attrs = array(); var $children = array(); function myPrint() { - echo "
          "; + echo '
            '; echo "
          • Name: $this->name"; // print attributes - echo "
          • Attributes: "; + echo '
          • Attributes: '; foreach ($this->attrs as $name => $value) { echo "$name => $value; " ; } // print children foreach ($this->children as $child) { if ( is_string($child) ) { - echo "
          • $child"; + echo '
          • '.$child; } else { $child->myPrint(); } } - echo "
          "; + echo '
        '; } } @@ -76,10 +76,10 @@ class xml2php { $ancStack = array(); $xml_parser = xml_parser_create(); - xml_set_element_handler($xml_parser, "wgXMLstartElement", "wgXMLendElement"); - xml_set_character_data_handler($xml_parser, "wgXMLcharacterData"); - if (!($fp = fopen($filename, "r"))) { - die("could not open XML input"); + xml_set_element_handler($xml_parser, 'wgXMLstartElement', 'wgXMLendElement'); + xml_set_character_data_handler($xml_parser, 'wgXMLcharacterData'); + if (!($fp = fopen($filename, 'r'))) { + die('could not open XML input'); } while ($data = fread($fp, 4096)) { if (!xml_parse($xml_parser, $data, feof($fp))) { @@ -103,4 +103,4 @@ $result->myPrint(); return 0; -?> \ No newline at end of file +?> diff --git a/includes/Profiling.php b/includes/Profiling.php index a6c49eb944..a07adac877 100755 --- a/includes/Profiling.php +++ b/includes/Profiling.php @@ -6,7 +6,7 @@ function wfProfileIn( $functionname ) $wgProfiler->profileIn( $functionname ); } -function wfProfileOut( $functionname = "missing" ) +function wfProfileOut( $functionname = 'missing' ) { global $wgProfiler; $wgProfiler->profileOut( $functionname ); @@ -46,8 +46,8 @@ class Profiler function profileIn( $functionname ) { global $wgDebugFunctionEntry; - if ( $wgDebugFunctionEntry && function_exists( "wfDebug" ) ) { - wfDebug( str_repeat( " ", count( $this->mWorkStack ) ) . "Entering $functionname\n" ); + if ( $wgDebugFunctionEntry && function_exists( 'wfDebug' ) ) { + wfDebug( str_repeat( ' ', count( $this->mWorkStack ) ) . 'Entering '.$functionname."\n" ); } array_push( $this->mWorkStack, array($functionname, count( $this->mWorkStack ), microtime(), memory_get_usage() ) ); } @@ -57,8 +57,8 @@ class Profiler $memory = memory_get_usage(); global $wgDebugProfiling, $wgDebugFunctionEntry; - if ( $wgDebugFunctionEntry && function_exists( "wfDebug" ) ) { - wfDebug( str_repeat( " ", count( $this->mWorkStack ) - 1 ) . "Exiting $functionname\n" ); + if ( $wgDebugFunctionEntry && function_exists( 'wfDebug' ) ) { + wfDebug( str_repeat( ' ', count( $this->mWorkStack ) - 1 ) . 'Exiting '.$functionname."\n" ); } $bit = array_pop( $this->mWorkStack ); @@ -67,7 +67,7 @@ class Profiler wfDebug( "Profiling error, !\$bit: $functionname\n" ); } else { if ( $wgDebugProfiling ) { - if ( $functionname == "close" ) { + if ( $functionname == 'close' ) { wfDebug( "Profile section ended by close(): {$bit[0]}\n" ); } elseif ( $bit[0] != $functionname ) { wfDebug( "Profiling error: in({$bit[0]}), out($functionname)\n" ); @@ -82,7 +82,7 @@ class Profiler function close() { while ( count( $this->mWorkStack ) ) { - $this->profileOut( "close" ); + $this->profileOut( 'close' ); } } @@ -99,27 +99,27 @@ class Profiler $format = "%-" . ($width - 34) . "s %6d %6.3f %6.3f %6.3f%% %6d\n"; $titleFormat = "%-" . ($width - 34) . "s %9s %9s %9s %9s %6s\n"; $prof = "\nProfiling data\n"; - $prof .= sprintf( $titleFormat, "Name", "Calls", "Total", "Each", "%", "Mem" ); + $prof .= sprintf( $titleFormat, 'Name', 'Calls', 'Total', 'Each', '%', 'Mem' ); $this->mCollated = array(); $this->mCalls = array(); $this->mMemory = array(); # Estimate profiling overhead $profileCount = count( $this->mStack ); - wfProfileIn( "-overhead-total" ); + wfProfileIn( '-overhead-total' ); for ($i=0; $i<$profileCount ; $i++) { - wfProfileIn( "-overhead-internal" ); - wfProfileOut( "-overhead-internal" ); + wfProfileIn( '-overhead-internal' ); + wfProfileOut( '-overhead-internal' ); } - wfProfileOut( "-overhead-total" ); + wfProfileOut( '-overhead-total' ); # Collate foreach ( $this->mStack as $entry ) { $fname = $entry[0]; $thislevel = $entry[1]; - $start = explode( " ", $entry[2]); + $start = explode( ' ', $entry[2]); $start = (float)$start[0] + (float)$start[1]; - $end = explode( " ", $entry[4]); + $end = explode( ' ', $entry[4]); $end = (float)$end[0] + (float)$end[1]; $elapsed = $end - $start; @@ -136,16 +136,16 @@ class Profiler $this->mMemory[$fname] += $memory; } - $total = @$this->mCollated["-total"]; - $overhead = $this->mCollated["-overhead-internal"] / $profileCount; - $this->mCalls["-overhead-total"] = $profileCount; + $total = @$this->mCollated['-total']; + $overhead = $this->mCollated['-overhead-internal'] / $profileCount; + $this->mCalls['-overhead-total'] = $profileCount; # Output arsort( $this->mCollated, SORT_NUMERIC ); foreach ( $this->mCollated as $fname => $elapsed ) { $calls = $this->mCalls[$fname]; # Adjust for overhead - if ( $fname[0] != "-" ) { + if ( $fname[0] != '-' ) { $elapsed -= $overhead * $calls; } @@ -194,5 +194,5 @@ class Profiler $wgProfiler = new Profiler(); -$wgProfiler->profileIn( "-total" ); +$wgProfiler->profileIn( '-total' ); ?> diff --git a/includes/QueryPage.php b/includes/QueryPage.php index ca5d371101..ce602fe596 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -126,7 +126,7 @@ class QueryPage { FROM $querycache WHERE qc_type='$type'"; } if( $wgMiserMode ) { - $wgOut->addWikiText( wfMsg( "perfcached" ) ); + $wgOut->addWikiText( wfMsg( 'perfcached' ) ); } } if ( $res === false ) { @@ -158,7 +158,7 @@ class QueryPage { $s .= "{$format}\n"; } $dbr->freeResult( $res ); - $s .= ""; + $s .= ''; $wgOut->addHTML( $s ); $wgOut->addHTML( "

        {$sl}

        \n" ); } @@ -230,7 +230,7 @@ class QueryPage { } if( isset( $row->text ) ) { - $text = "

        " . htmlspecialchars( wfMsg( "summary" ) ) . ": " . $text . "

        \n
        \n
        " . + $text = '

        ' . htmlspecialchars( wfMsg( 'summary' ) ) . ': ' . $text . "

        \n
        \n
        " . nl2br( htmlspecialchars( $row->text ) ) . "
        ";; } return $text; @@ -252,7 +252,7 @@ class QueryPage { } function feedDesc() { - return wfMsg( "fromwikipedia" ); + return wfMsg( 'fromwikipedia' ); } function feedUrl() { @@ -270,7 +270,7 @@ class PageQueryPage extends QueryPage { function formatResult( $skin, $result ) { $nt = Title::makeTitle( $result->namespace, $result->title ); - return $skin->makeKnownLinkObj( $nt, "" ); + return $skin->makeKnownLinkObj( $nt, '' ); } } diff --git a/includes/RecentChange.php b/includes/RecentChange.php index dfb5fe14f6..11931c54d2 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -1,11 +1,11 @@ mExtra) ) { @@ -105,7 +105,7 @@ class RecentChange $this->mAttribs['rc_cur_time']=$dbw->timestamp($this->mAttribs['rc_cur_time']); # Insert new row - $dbw->insertArray( "recentchanges", $this->mAttribs, $fname ); + $dbw->insertArray( 'recentchanges', $this->mAttribs, $fname ); # Update old rows, if necessary if ( $this->mAttribs['rc_type'] == RC_EDIT ) { @@ -146,7 +146,7 @@ class RecentChange # Marks a certain row as patrolled function markPatrolled( $rcid ) { - $fname = "RecentChange::markPatrolled"; + $fname = 'RecentChange::markPatrolled'; $dbw =& wfGetDB( DB_MASTER ); @@ -163,7 +163,7 @@ class RecentChange /*static*/ function notifyEdit( $timestamp, &$title, $minor, &$user, $comment, $oldId, $lastTimestamp, $bot = "default", $ip = '' ) { - if ( $bot == "default " ) { + if ( $bot == 'default ' ) { $bot = $user->isBot(); } @@ -208,7 +208,7 @@ class RecentChange global $wgIP; $ip = empty( $wgIP ) ? '' : $wgIP; } - if ( $bot == "default" ) { + if ( $bot == 'default' ) { $bot = $user->isBot(); } @@ -332,16 +332,16 @@ class RecentChange function loadFromCurRow( $row ) { $this->mAttribs = array( - "rc_timestamp" => $row->cur_timestamp, - "rc_cur_time" => $row->cur_timestamp, - "rc_user" => $row->cur_user, - "rc_user_text" => $row->cur_user_text, - "rc_namespace" => $row->cur_namespace, - "rc_title" => $row->cur_title, - "rc_comment" => $row->cur_comment, - "rc_minor" => !!$row->cur_minor_edit, - "rc_type" => $row->cur_is_new ? RC_NEW : RC_EDIT, - "rc_cur_id" => $row->cur_id, + 'rc_timestamp' => $row->cur_timestamp, + 'rc_cur_time' => $row->cur_timestamp, + 'rc_user' => $row->cur_user, + 'rc_user_text' => $row->cur_user_text, + 'rc_namespace' => $row->cur_namespace, + 'rc_title' => $row->cur_title, + 'rc_comment' => $row->cur_comment, + 'rc_minor' => !!$row->cur_minor_edit, + 'rc_type' => $row->cur_is_new ? RC_NEW : RC_EDIT, + 'rc_cur_id' => $row->cur_id, 'rc_this_oldid' => 0, 'rc_last_oldid' => 0, 'rc_bot' => 0, @@ -365,12 +365,12 @@ class RecentChange $trail = "curid=" . (int)($this->mAttribs['rc_cur_id']) . "&oldid=" . (int)($this->mAttribs['rc_last_oldid']); if ( $forceCur ) { - $trail .= "&diff=0" ; + $trail .= '&diff=0' ; } else { - $trail .= "&diff=" . (int)($this->mAttribs['rc_this_oldid']); + $trail .= '&diff=' . (int)($this->mAttribs['rc_this_oldid']); } } else { - $trail = ""; + $trail = ''; } return $trail; } diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index 94162cff32..e0713dc724 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -1,8 +1,8 @@ *+-"; } @@ -33,19 +33,19 @@ class SearchEngine { # Return a partial WHERE clause to limit the search to the given namespaces function queryNamespaces() { - $namespaces = implode( ",", $this->namespacesToSearch ); - if ($namespaces == "") { - $namespaces = "0"; + $namespaces = implode( ',', $this->namespacesToSearch ); + if ($namespaces == '') { + $namespaces = '0'; } - return "AND cur_namespace IN (" . $namespaces . ")"; + return "AND cur_namespace IN (" . $namespaces . ')'; } # Return a partial WHERE clause to include or exclude redirects from results function searchRedirects() { if ( $this->doSearchRedirects ) { - return ""; + return ''; } else { - return "AND cur_is_redirect=0 "; + return 'AND cur_is_redirect=0 '; } } @@ -55,7 +55,7 @@ class SearchEngine { if ($wgUser->getID()) { // User is logged in so we retrieve his default namespaces - return $wgUser->getOption( "searchNs".$i ); + return $wgUser->getOption( 'searchNs'.$i ); } else { // User is not logged in so we give him the global default namespaces return !empty($wgNamespacesToBeSearchedDefault[ $i ]); @@ -72,11 +72,11 @@ class SearchEngine { $searchx = $wgRequest->getVal( 'searchx' ); $listredirs = $wgRequest->getVal( 'redirs' ); - $ret = wfMsg("powersearchtext"); # Text to be returned - $tempText = ""; # Temporary text, for substitution into $ret + $ret = wfMsg('powersearchtext'); # Text to be returned + $tempText = ''; # Temporary text, for substitution into $ret - if( isset( $_REQUEST["searchx"] ) ) { - $this->addToQuery["searchx"] = "1"; + if( isset( $_REQUEST['searchx'] ) ) { + $this->addToQuery['searchx'] = '1'; } # Do namespace checkboxes @@ -87,7 +87,7 @@ class SearchEngine { continue; } - $formVar = "ns$i"; + $formVar = 'ns'.$i; # Initialise checkboxValues, either from defaults or from # a previous invocation @@ -97,46 +97,46 @@ class SearchEngine { $checkboxValue = $wgRequest->getVal( $formVar ); } - $checked = ""; + $checked = ''; if ( $checkboxValue == 1 ) { - $checked = " checked='checked'"; - $this->addToQuery["ns{$i}"] = 1; + $checked = ' checked="checked"'; + $this->addToQuery['ns'.$i] = 1; array_push( $this->namespacesToSearch, $i ); } - $name = str_replace( "_", " ", $namespaces[$i] ); - if ( "" == $name ) { - $name = wfMsg( "blanknamespace" ); + $name = str_replace( '_', ' ', $namespaces[$i] ); + if ( '' == $name ) { + $name = wfMsg( 'blanknamespace' ); } - if ( $tempText !== "" ) { - $tempText .= " "; + if ( $tempText !== '' ) { + $tempText .= ' '; } $tempText .= "{$name}\n"; } - $ret = str_replace ( "$1", $tempText, $ret ); + $ret = str_replace ( '$1', $tempText, $ret ); # List redirects checkbox - $checked = ""; + $checked = ''; if ( $listredirs == 1 ) { - $this->addToQuery["redirs"] = 1; - $checked = " checked='checked'"; + $this->addToQuery['redirs'] = 1; + $checked = ' checked="checked"'; } $tempText = "\n"; - $ret = str_replace( "$2", $tempText, $ret ); + $ret = str_replace( '$2', $tempText, $ret ); # Search field $tempText = "\n"; + htmlspecialchars( $search ) ."\" width=\"80\" />\n"; $ret = str_replace( "$3", $tempText, $ret ); # Searchx button - $tempText = "\n"; - $ret = str_replace( "$9", $tempText, $ret ); + $tempText = '\n"; + $ret = str_replace( '$9', $tempText, $ret ); $action = $sk->escapeSearchLink(); $ret = "

        \n
        setPageTitle( wfMsg( "searchresults" ) ); - $wgOut->setSubtitle( wfMsg( "searchquery", htmlspecialchars( $this->rawText ) ) ); + $wgOut->setPageTitle( wfMsg( 'searchresults' ) ); + $wgOut->setSubtitle( wfMsg( 'searchquery', htmlspecialchars( $this->rawText ) ) ); $wgOut->setArticleRelated( false ); - $wgOut->setRobotpolicy( "noindex,nofollow" ); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); } # Perform the search and construct the results page function showResults() { global $wgUser, $wgTitle, $wgOut, $wgLang; global $wgDisableTextSearch, $wgInputEncoding; - $fname = "SearchEngine::showResults"; + $fname = 'SearchEngine::showResults'; $search = $this->rawText; @@ -171,19 +171,19 @@ class SearchEngine { $this->setupPage(); $sk = $wgUser->getSkin(); - $wgOut->addWikiText( wfMsg( "searchresulttext" ) ); + $wgOut->addWikiText( wfMsg( 'searchresulttext' ) ); if ( !$this->parseQuery() ) { $wgOut->addWikiText( - "==" . wfMsg( "badquery" ) . "==\n" . - wfMsg( "badquerytext" ) ); + '==' . wfMsg( 'badquery' ) . "==\n" . + wfMsg( 'badquerytext' ) ); return; } - list( $limit, $offset ) = wfCheckLimits( 20, "searchlimit" ); + list( $limit, $offset ) = wfCheckLimits( 20, 'searchlimit' ); if ( $wgDisableTextSearch ) { - $wgOut->addHTML( wfMsg( "searchdisabled" ) ); - $wgOut->addHTML( wfMsg( "googlesearch", + $wgOut->addHTML( wfMsg( 'searchdisabled' ) ); + $wgOut->addHTML( wfMsg( 'googlesearch', htmlspecialchars( $this->rawText ), htmlspecialchars( $wgInputEncoding ) ) ); return; @@ -203,21 +203,21 @@ class SearchEngine { $wgOut->addHTML( "

        {$top}

        \n" ); # For powersearch - $a2l = ""; + $a2l = ''; $akk = array_keys( $this->addToQuery ); foreach ( $akk AS $ak ) { $a2l .= "&{$ak}={$this->addToQuery[$ak]}" ; } - $prevnext = wfViewPrevNext( $offset, $limit, "", - "search=" . wfUrlencode( $this->filteredText ) . $a2l ); + $prevnext = wfViewPrevNext( $offset, $limit, '', + 'search=' . wfUrlencode( $this->filteredText ) . $a2l ); $wgOut->addHTML( "
        {$prevnext}\n" ); - $foundsome = $this->showMatches( $titleMatches, $offset, "notitlematches", "titlematches" ) - || $this->showMatches( $textMatches, $offset, "notextmatches", "textmatches" ); + $foundsome = $this->showMatches( $titleMatches, $offset, 'notitlematches', 'titlematches' ) + || $this->showMatches( $textMatches, $offset, 'notextmatches', 'textmatches' ); if ( !$foundsome ) { - $wgOut->addWikiText( wfMsg( "nonefound" ) ); + $wgOut->addWikiText( wfMsg( 'nonefound' ) ); } $wgOut->addHTML( "

        {$prevnext}

        \n" ); $wgOut->addHTML( $powersearch ); @@ -243,26 +243,26 @@ class SearchEngine { global $wgDBminWordLen, $wgLang; # on non mysql4 database: get list of words we don't want to search for - require_once( "FulltextStoplist.php" ); + require_once( 'FulltextStoplist.php' ); - $lc = SearchEngine::legalSearchChars() . "()"; + $lc = SearchEngine::legalSearchChars() . '()'; $q = preg_replace( "/([()])/", " \\1 ", $this->filteredText ); $q = preg_replace( "/\\s+/", " ", $q ); - $w = explode( " ", trim( $q ) ); + $w = explode( ' ', trim( $q ) ); - $last = $cond = ""; + $last = $cond = ''; foreach ( $w as $word ) { $word = $wgLang->stripForSearch( $word ); - if ( "and" == $word || "or" == $word || "not" == $word - || "(" == $word || ")" == $word ) { - $cond .= " " . strtoupper( $word ); - $last = ""; + if ( 'and' == $word || 'or' == $word || 'not' == $word + || '(' == $word || ')' == $word ) { + $cond .= ' ' . strtoupper( $word ); + $last = ''; } else if ( strlen( $word ) < $wgDBminWordLen ) { continue; } else if ( FulltextStoplist::inList( $word ) ) { continue; } else { - if ( "" != $last ) { $cond .= " AND"; } + if ( '' != $last ) { $cond .= ' AND'; } $cond .= " (MATCH (##field##) AGAINST ('" . $this->db->strencode( $word ). "'))"; $last = $word; @@ -273,11 +273,11 @@ class SearchEngine { return MW_SEARCH_BAD_QUERY; } - $this->titleCond = "(" . str_replace( "##field##", - "si_title", $cond ) . " )"; + $this->titleCond = '(' . str_replace( '##field##', + 'si_title', $cond ) . ' )'; - $this->textCond = "(" . str_replace( "##field##", - "si_text", $cond ) . " AND (cur_is_redirect=0) )"; + $this->textCond = '(' . str_replace( '##field##', + 'si_text', $cond ) . ' AND (cur_is_redirect=0) )'; return MW_SEARCH_OK; } @@ -285,16 +285,16 @@ class SearchEngine { function parseQuery4() { global $wgLang; $lc = SearchEngine::legalSearchChars(); - $searchon = ""; + $searchon = ''; $this->searchTerms = array(); # FIXME: This doesn't handle parenthetical expressions. if( preg_match_all( '/([-+<>~]?)(([' . $lc . ']+)(\*?)|"[^"]*")/', $this->filteredText, $m, PREG_SET_ORDER ) ) { foreach( $m as $terms ) { - if( $searchon !== "" ) $searchon .= " "; - if( $this->strictMatching && ($terms[1] == "") ) { - $terms[1] = "+"; + if( $searchon !== '' ) $searchon .= ' '; + if( $this->strictMatching && ($terms[1] == '') ) { + $terms[1] = '+'; } $searchon .= $terms[1] . $wgLang->stripForSearch( $terms[2] ); if( $terms[3] ) { @@ -329,7 +329,7 @@ class SearchEngine { "{$searchnamespaces} {$redircond} " . $this->db->limitResult( $limit, $offset ); - $res = $this->db->query( $sql, "SearchEngine::getMatches" ); + $res = $this->db->query( $sql, 'SearchEngine::getMatches' ); $matches = array(); while ( $row = $this->db->fetchObject( $res ) ) { $matches[] = $row; @@ -368,13 +368,13 @@ class SearchEngine { } $sk = $wgUser->getSkin(); - $contextlines = $wgUser->getOption( "contextlines" ); - if ( "" == $contextlines ) { $contextlines = 5; } - $contextchars = $wgUser->getOption( "contextchars" ); - if ( "" == $contextchars ) { $contextchars = 50; } + $contextlines = $wgUser->getOption( 'contextlines' ); + if ( '' == $contextlines ) { $contextlines = 5; } + $contextchars = $wgUser->getOption( 'contextchars' ); + if ( '' == $contextchars ) { $contextchars = 50; } - $link = $sk->makeKnownLink( $t, "" ); - $size = wfMsg( "nbytes", strlen( $row->cur_text ) ); + $link = $sk->makeKnownLink( $t, '' ); + $size = wfMsg( 'nbytes', strlen( $row->cur_text ) ); $wgOut->addHTML( "
      • {$link} ({$size})" ); $lines = explode( "\n", $row->cur_text ); @@ -391,18 +391,18 @@ class SearchEngine { continue; } - $pre = $wgLang->truncate( $m[1], -$contextchars, "..." ); + $pre = $wgLang->truncate( $m[1], -$contextchars, '...' ); if ( count( $m ) < 3 ) { - $post = ""; + $post = ''; } else { - $post = $wgLang->truncate( $m[3], $contextchars, "..." ); + $post = $wgLang->truncate( $m[3], $contextchars, '...' ); } $found = $m[2]; $line = htmlspecialchars( $pre . $found . $post ); - $pat2 = "/(" . implode( "|", $this->searchTerms ) . ")/i"; + $pat2 = '/(' . implode( '|', $this->searchTerms ) . ")/i"; $line = preg_replace( $pat2, "\\1", $line ); @@ -451,7 +451,7 @@ class SearchEngine { function goResult() { global $wgOut, $wgGoToEdit; global $wgDisableTextSearch; - $fname = "SearchEngine::goResult"; + $fname = 'SearchEngine::goResult'; # Try to go to page as entered. # @@ -475,16 +475,16 @@ class SearchEngine { # If the feature is enabled, go straight to the edit page if ( $wgGoToEdit ) { - $wgOut->redirect( $t->getFullURL( "action=edit" ) ); + $wgOut->redirect( $t->getFullURL( 'action=edit' ) ); return; } if( $t ) { - $editurl = $t->escapeLocalURL( "action=edit" ); + $editurl = $t->escapeLocalURL( 'action=edit' ); } else { - $editurl = ""; # ?? + $editurl = ''; # ?? } - $wgOut->addHTML( "

        " . wfMsg("nogomatch", $editurl ) . "

        \n" ); + $wgOut->addHTML( '

        ' . wfMsg('nogomatch', $editurl ) . "

        \n" ); # Try a fuzzy title search $anyhit = false; @@ -506,25 +506,25 @@ class SearchEngine { $this->setupPage(); $sstr = ucfirst($search); - $sstr = str_replace(" ", "_", $sstr); + $sstr = str_replace(' ', '_', $sstr); $fuzzymatches = SearchEngine::fuzzyTitles( $sstr, $namespace ); $fuzzymatches = array_slice($fuzzymatches, 0, 10); $slen = strlen( $search ); - $wikitext = ""; + $wikitext = ''; foreach($fuzzymatches as $res){ - $t = str_replace("_", " ", $res[1]); + $t = str_replace('_', ' ', $res[1]); $tfull = $wgLang->getNsText( $namespace ) . ":$t|$t"; if( $namespace == NS_MAIN ) $tfull = "$t"; $distance = $res[0]; $closeness = (strlen( $search ) - $distance) / strlen( $search ); - $percent = intval( $closeness * 100 ) . "%"; - $stars = str_repeat("*", ceil(5 * $closeness) ); + $percent = intval( $closeness * 100 ) . '%'; + $stars = str_repeat('*', ceil(5 * $closeness) ); $wikitext .= "* [[$tfull]] $percent ($stars)\n"; } if( $wikitext ){ if( $namespace != NS_MAIN ) - $wikitext = "=== " . $wgLang->getNsText( $namespace ) . " ===\n" . $wikitext; + $wikitext = '=== ' . $wgLang->getNsText( $namespace ) . " ===\n" . $wikitext; $wgOut->addWikiText( $wikitext ); return true; } @@ -552,7 +552,7 @@ class SearchEngine { $cnt++; } } - usort($result, "SearchEngine_pcmp"); + usort($result, 'SearchEngine_pcmp'); return $result; } diff --git a/includes/SearchUpdate.php b/includes/SearchUpdate.php index 4c8a8609e3..c6563a004c 100644 --- a/includes/SearchUpdate.php +++ b/includes/SearchUpdate.php @@ -30,11 +30,11 @@ class SearchUpdate { if( $wgDisableSearchUpdate || !$this->mId ) { return false; } - $fname = "SearchUpdate::doUpdate"; + $fname = 'SearchUpdate::doUpdate'; wfProfileIn( $fname ); require_once( 'SearchEngine.php' ); - $lc = SearchEngine::legalSearchChars() . "&#;"; + $lc = SearchEngine::legalSearchChars() . '&#;'; $db =& wfGetDB( DB_MASTER ); $searchindex = $db->tableName( 'searchindex' ); @@ -52,9 +52,9 @@ class SearchUpdate { # Language-specific strip/conversion $text = $wgLang->stripForSearch( $this->mText ); - wfProfileIn( "$fname-regexps" ); + wfProfileIn( $fname.'-regexps' ); $text = preg_replace( "/<\\/?\\s*[A-Za-z][A-Za-z0-9]*\\s*([^>]*?)>/", - " ", strtolower( " " . $text /*$this->mText*/ . " " ) ); # Strip HTML markup + ' ', strtolower( " " . $text /*$this->mText*/ . " " ) ); # Strip HTML markup $text = preg_replace( "/(^|\\n)\\s*==\\s+([^\\n]+)\\s+==\\s/sD", "\\2 \\2 \\2 ", $text ); # Emphasize headings @@ -104,7 +104,7 @@ class SearchUpdate { $sql = "REPLACE INTO $searchindex (si_page,si_title,si_text) VALUES ({$this->mId},'" . $db->strencode( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) . "','" . $db->strencode( $text ) . "')"; - $db->query( $sql, "SearchUpdate::doUpdate" ); + $db->query( $sql, 'SearchUpdate::doUpdate' ); wfProfileOut( $fname ); } } diff --git a/includes/Setup.php b/includes/Setup.php index 0dfdb4c392..c1a303ef16 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -1,7 +1,7 @@ settings[$setting][$wiki]; } elseif ( array_key_exists( $suffix, $this->settings[$setting] ) ) { $retval = $this->settings[$setting][$suffix]; - } elseif ( array_key_exists( "default", $this->settings[$setting] ) ) { + } elseif ( array_key_exists( 'default', $this->settings[$setting] ) ) { $retval = $this->settings[$setting]['default']; } else { $retval = NULL; diff --git a/includes/SiteStatsUpdate.php b/includes/SiteStatsUpdate.php index 247adabc56..536908dba2 100644 --- a/includes/SiteStatsUpdate.php +++ b/includes/SiteStatsUpdate.php @@ -17,28 +17,28 @@ class SiteStatsUpdate { { $a = array(); - if ( $this->mViews < 0 ) { $m = "-1"; } - else if ( $this->mViews > 0 ) { $m = "+1"; } - else $m = ""; + if ( $this->mViews < 0 ) { $m = '-1'; } + else if ( $this->mViews > 0 ) { $m = '+1'; } + else $m = ''; array_push( $a, "ss_total_views=(ss_total_views$m)" ); - if ( $this->mEdits < 0 ) { $m = "-1"; } - else if ( $this->mEdits > 0 ) { $m = "+1"; } - else $m = ""; + if ( $this->mEdits < 0 ) { $m = '-1'; } + else if ( $this->mEdits > 0 ) { $m = '+1'; } + else $m = ''; array_push( $a, "ss_total_edits=(ss_total_edits$m)" ); - if ( $this->mGood < 0 ) { $m = "-1"; } - else if ( $this->mGood > 0 ) { $m = "+1"; } - else $m = ""; + if ( $this->mGood < 0 ) { $m = '-1'; } + else if ( $this->mGood > 0 ) { $m = '+1'; } + else $m = ''; array_push( $a, "ss_good_articles=(ss_good_articles$m)" ); $db =& wfGetDB( DB_MASTER ); $site_stats = $db->tableName( 'site_stats' ); $lowpri = $db->lowPriorityOption(); - $sql = "UPDATE $lowpri $site_stats SET " . implode ( ",", $a ) . - " WHERE ss_row_id=1"; - $db->query( $sql, "SiteStatsUpdate::doUpdate" ); + $sql = "UPDATE $lowpri $site_stats SET " . implode ( ',', $a ) . + ' WHERE ss_row_id=1'; + $db->query( $sql, 'SiteStatsUpdate::doUpdate' ); } } diff --git a/includes/SpecialRecentchanges.php b/includes/SpecialRecentchanges.php index 13e1ad854e..1efacda692 100644 --- a/includes/SpecialRecentchanges.php +++ b/includes/SpecialRecentchanges.php @@ -22,6 +22,8 @@ function wfSpecialRecentchanges( $par ) $hideliu = $wgRequest->getBool( 'hideliu', false ) ? 1 : 0; $hidepatrolled = $wgRequest->getBool( 'hidepatrolled', false ) ? 1 : 0; + list( $limit, $offset ) = wfCheckLimits( 100, 'rclimit' ); + # Get query parameters from path if( $par ) { $bits = preg_split( '/\s*,\s*/', trim( $par ) ); @@ -33,6 +35,8 @@ function wfSpecialRecentchanges( $par ) if( in_array( 'hidepatrolled', $bits) ) $hidepatrolled = 1; } + + # Database connection and caching $dbr =& wfGetDB( DB_SLAVE ); extract( $dbr->tableNames( 'recentchanges', 'watchlist' ) ); @@ -44,20 +48,11 @@ function wfSpecialRecentchanges( $par ) return; } - # The next few lines can probably be commented out now that wfMsg can get text from the DB -/* $rctext = $dbr->selectField( 'cur', 'cur_text', - array( 'cur_namespace' => NS_WIKIPEDIA, 'cur_title' => 'Recentchanges' ), - $fname - ); - if( !$rctext ) { - $rctext = wfMsg( "recentchangestext" ); - } */ - + # Output header $rctext = wfMsg( "recentchangestext" ); - $wgOut->addWikiText( $rctext ); - list( $limit, $offset ) = wfCheckLimits( 100, 'rclimit' ); + $now = wfTimestampNow(); $cutoff_unixtime = time() - ( $days * 86400 ); $cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime % 86400); @@ -69,6 +64,7 @@ function wfSpecialRecentchanges( $par ) } $sk = $wgUser->getSkin(); + $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' )); $hidem = ( $hideminor ) ? 'AND rc_minor=0' : ''; @@ -77,7 +73,7 @@ function wfSpecialRecentchanges( $par ) $hidem .= ( $hidepatrolled )? ' AND rc_patrolled=0' : ''; $urlparams = array( 'hideminor' => $hideminor, 'hideliu' => $hideliu, - 'hidebots' => $hidebots, 'hidepatrolled' => $hidepatrolled ); + 'hidebots' => $hidebots, 'hidepatrolled' => $hidepatrolled); $hideparams = wfArrayToCGI( $urlparams ); $minorLink = $sk->makeKnownLink( $wgLang->specialPage( 'Recentchanges' ), diff --git a/includes/SquidUpdate.php b/includes/SquidUpdate.php index d78bdca761..d0a2424998 100644 --- a/includes/SquidUpdate.php +++ b/includes/SquidUpdate.php @@ -86,7 +86,7 @@ class SquidUpdate { /* static */ function purge( $urlArr ) { global $wgSquidServers; - if ( $wgSquidServers == "echo" ) { + if ( $wgSquidServers == 'echo' ) { echo implode("
        \n", $urlArr); return; } @@ -126,7 +126,7 @@ class SquidUpdate { $failed = true; $totalsockets -= $sockspersq; } else { - $msg ="PURGE " . $firsturl . " HTTP/1.0\r\n". + $msg = 'PURGE ' . $firsturl . " HTTP/1.0\r\n". "Connection: Keep-Alive\r\n\r\n"; #$this->debug($msg); @fputs($socket,$msg); @@ -169,7 +169,7 @@ class SquidUpdate { } } $urindex = $r + $urlspersocket * ($s - $sockspersq * floor($s / $sockspersq)); - $msg = "PURGE " . $urlArr[$urindex] . " HTTP/1.0\r\n". + $msg = 'PURGE ' . $urlArr[$urindex] . " HTTP/1.0\r\n". "Connection: Keep-Alive\r\n\r\n"; #$this->debug($msg); @fputs($sockets[$s],$msg); diff --git a/includes/Title.php b/includes/Title.php index 010494b5d5..4028ed6cfb 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -238,8 +238,8 @@ class Title { global $wgLang; $n = $wgLang->getNsText( $ns ); - if ( "" == $n ) { return $title; } - else { return "{$n}:{$title}"; } + if ( '' == $n ) { return $title; } + else { return $n.':'.$title; } } # Arguably static @@ -261,13 +261,13 @@ class Title { } $dbr =& wfGetDB( DB_SLAVE ); $res = $dbr->select( 'interwiki', array( 'iw_url', 'iw_local' ), array( 'iw_prefix' => $key ), $fname ); - if(!$res) return ""; + if(!$res) return ''; $s = $dbr->fetchObject( $res ); if(!$s) { # Cache non-existence: create a blank object and save it to memcached $s = (object)false; - $s->iw_url = ""; + $s->iw_url = ''; $s->iw_local = 0; } $wgMemc->set( $k, $s, $wgInterwikiExpiry ); @@ -545,7 +545,7 @@ class Title { # Compatibility with old settings if( $this->getNamespace() == NS_MAIN ) { - if( in_array( ":" . $name, $wgWhitelistRead ) ) return true; + if( in_array( ':' . $name, $wgWhitelistRead ) ) return true; } return false; } @@ -669,7 +669,7 @@ class Title { # Initialisation if ( $imgpre === false ) { - $imgpre = ':' . $wgLang->getNsText( Namespace::getImage() ) . ":"; + $imgpre = ':' . $wgLang->getNsText( Namespace::getImage() ) . ':'; # % is needed as well $rxTc = '/[^' . Title::legalChars() . ']/'; } @@ -805,7 +805,7 @@ class Title { $links = $db->tableName( 'links' ); $sql = "SELECT cur_namespace,cur_title,cur_id FROM $cur,$links WHERE l_from=cur_id AND l_to={$id} $options"; - $res = $db->query( $sql, "Title::getLinksTo" ); + $res = $db->query( $sql, 'Title::getLinksTo' ); $retVal = array(); if ( $db->numRows( $res ) ) { while ( $row = $db->fetchObject( $res ) ) { @@ -907,7 +907,7 @@ class Title { $sql = "UPDATE categorylinks SET cl_sortkey=" . $dbw->addQuotes( $nt->getPrefixedText() ) . " WHERE cl_from=" . $dbw->addQuotes( $this->getArticleID() ) . " AND cl_sortkey=" . $dbw->addQuotes( $this->getPrefixedText() ); - $dbw->query( $sql, "SpecialMovepage::doSubmit" ); + $dbw->query( $sql, 'SpecialMovepage::doSubmit' ); # Update watchlists @@ -923,7 +923,7 @@ class Title { # Update search engine $u = new SearchUpdate( $oldid, $nt->getPrefixedDBkey() ); $u->doUpdate(); - $u = new SearchUpdate( $newid, $this->getPrefixedDBkey(), "" ); + $u = new SearchUpdate( $newid, $this->getPrefixedDBkey(), '' ); $u->doUpdate(); return true; @@ -934,7 +934,7 @@ class Title { /* private */ function moveOverExistingRedirect( &$nt ) { global $wgUser, $wgLinkCache, $wgUseSquid, $wgMwRedir; $fname = 'Title::moveOverExistingRedirect'; - $comment = wfMsg( "1movedto2", $this->getPrefixedText(), $nt->getPrefixedText() ); + $comment = wfMsg( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() ); $now = wfTimestampNow(); $won = wfInvertTimestamp( $now ); @@ -966,7 +966,7 @@ class Title { 'inverse_timestamp' => $won, 'cur_namespace' => $this->getNamespace(), 'cur_title' => $this->getDBkey(), - 'cur_text' => $wgMwRedir->getSynonym( 0 ) . " [[" . $nt->getPrefixedText() . "]]\n", + 'cur_text' => $wgMwRedir->getSynonym( 0 ) . ' [[' . $nt->getPrefixedText() . "]]\n", 'cur_comment' => $comment, 'cur_user' => $wgUser->getID(), 'cur_minor_edit' => 0, @@ -1189,7 +1189,7 @@ class Title { return false; } - $fname = "Title::createRedirect"; + $fname = 'Title::createRedirect'; $dbw =& wfGetDB( DB_MASTER ); $now = wfTimestampNow(); $won = wfInvertTimestamp( $now ); @@ -1280,7 +1280,7 @@ class Title { foreach ( array_reverse($stack) as $child => $parent ) { # make a link of that parent - $result .= $sk->makeLink($wgLang->getNSText ( Namespace::getCategory() ).":".$parent,$parent); + $result .= $sk->makeLink($wgLang->getNSText ( Namespace::getCategory() ).':'.$parent,$parent); $result .= ' > '; $lastchild = $child; } diff --git a/includes/Tokenizer.php b/includes/Tokenizer.php index 129d5e0931..f281617d2e 100644 --- a/includes/Tokenizer.php +++ b/includes/Tokenizer.php @@ -67,7 +67,7 @@ class Tokenizer { // still one token from the last round around. Return that one first. $token = array_shift( $this->mQueuedToken ); } else if ( $this->mPos > $this->mTextLength ) { - // If no text is left, return "false". + // If no text is left, return 'false'. $token = false; } else { @@ -185,7 +185,7 @@ class Tokenizer { // strip blank from Token $token['text'] = substr( $token['text'], 0, -1 ); $queueToken['type'] = 'blank'; - $queueToken['text'] = " {$ch}"; + $queueToken['text'] = ' '.$ch; $this->mQueuedToken[] = $queueToken; $this->mPos ++; break 2; // switch + while @@ -202,7 +202,7 @@ class Tokenizer { case '8': case '9': if ( ($this->mTextLength >= $this->mPos +2) - && ($this->mText[$this->mPos+1] == " ") + && ($this->mText[$this->mPos+1] == ' ') && ctype_digit( $this->mText[$this->mPos+2] ) ) { $queueToken['type'] = 'blank'; @@ -235,10 +235,10 @@ class Tokenizer { break; case '&': //extensions like , since HTML stripping has already been done, //those look like <timeline> - if ( $this->continues( "lt;timeline>" ) ) + if ( $this->continues( 'lt;timeline>' ) ) { - $queueToken['type'] = ""; - $queueToken['text'] = "<timeline>"; + $queueToken['type'] = ''; + $queueToken['text'] = '<timeline>'; $this->mQueuedToken[] = $queueToken; $this->mPos += 16; break 2; // switch + while diff --git a/includes/UpdateClasses.php b/includes/UpdateClasses.php index 442de37377..b36c569636 100644 --- a/includes/UpdateClasses.php +++ b/includes/UpdateClasses.php @@ -1,11 +1,11 @@ diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 5921962031..25b721217a 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -12,33 +12,33 @@ function userMailer( $to, $from, $subject, $body ) if (is_array( $wgSMTP )) { - require_once( "Mail.php" ); + require_once( 'Mail.php' ); $timestamp = time(); - $headers["From"] = $from; + $headers['From'] = $from; /* removing to: field as it should be set by the send() function below UNTESTED - Hashar */ // $headers["To"] = $qto; - $headers["Subject"] = $subject; - $headers["MIME-Version"] = "1.0"; - $headers["Content-type"] = "text/plain; charset={$wgOutputEncoding}"; - $headers["Content-transfer-encoding"] = "8bit"; - $headers["Message-ID"] = "<{$timestamp}" . $wgUser->getName() . "@" . $wgSMTP["IDHost"] . ">"; - $headers["X-Mailer"] = "MediaWiki interuser e-mailer"; + $headers['Subject"] = $subject; + $headers['MIME-Version'] = '1.0'; + $headers['Content-type'] = 'text/plain; charset='.$wgOutputEncoding; + $headers['Content-transfer-encoding'] = '8bit'; + $headers['Message-ID'] = "<{$timestamp}" . $wgUser->getName() . '@' . $wgSMTP['IDHost'] . '>'; + $headers['X-Mailer'] = 'MediaWiki interuser e-mailer'; // Create the mail object using the Mail::factory method - $mail_object =& Mail::factory("smtp", $wgSMTP); + $mail_object =& Mail::factory('smtp', $wgSMTP); $mailResult =& $mail_object->send($to, $headers, $body); # Based on the result return an error string, if ($mailResult === true) - return ""; + return ''; else if (is_object($mailResult)) return $mailResult->getMessage(); else - return "Mail object return unknown error."; + return 'Mail object return unknown error.'; } else @@ -50,8 +50,8 @@ function userMailer( $to, $from, $subject, $body ) "From: {$from}\n" . "X-Mailer: MediaWiki interuser e-mailer"; - $wgErrorString = ""; - set_error_handler( "mailErrorHandler" ); + $wgErrorString = ''; + set_error_handler( 'mailErrorHandler' ); mail( $to, $subject, $body, $headers ); restore_error_handler(); diff --git a/includes/UserTalkUpdate.php b/includes/UserTalkUpdate.php index 95cfa7e00e..b31463526a 100644 --- a/includes/UserTalkUpdate.php +++ b/includes/UserTalkUpdate.php @@ -9,14 +9,14 @@ class UserTalkUpdate { { $this->mAction = $action; $this->mNamespace = $ns; - $this->mTitle = str_replace( "_", " ", $title ); + $this->mTitle = str_replace( '_', ' ', $title ); } function doUpdate() { global $wgUser, $wgLang, $wgMemc, $wgDBname; - $fname = "UserTalkUpdate::doUpdate"; + $fname = 'UserTalkUpdate::doUpdate'; # If namespace isn't User_talk:, do nothing. diff --git a/includes/Utf8Case.php b/includes/Utf8Case.php index 624eaab9d0..6ebe9af7f6 100644 --- a/includes/Utf8Case.php +++ b/includes/Utf8Case.php @@ -8,1489 +8,1489 @@ # up a big array manually. See also languages/LanguageUtf8.php $wikiUpperChars = array( - "a" => "A", - "b" => "B", - "c" => "C", - "d" => "D", - "e" => "E", - "f" => "F", - "g" => "G", - "h" => "H", - "i" => "I", - "j" => "J", - "k" => "K", - "l" => "L", - "m" => "M", - "n" => "N", - "o" => "O", - "p" => "P", - "q" => "Q", - "r" => "R", - "s" => "S", - "t" => "T", - "u" => "U", - "v" => "V", - "w" => "W", - "x" => "X", - "y" => "Y", - "z" => "Z", - "\xc2\xb5" => "\xce\x9c", - "\xc3\xa0" => "\xc3\x80", - "\xc3\xa1" => "\xc3\x81", - "\xc3\xa2" => "\xc3\x82", - "\xc3\xa3" => "\xc3\x83", - "\xc3\xa4" => "\xc3\x84", - "\xc3\xa5" => "\xc3\x85", - "\xc3\xa6" => "\xc3\x86", - "\xc3\xa7" => "\xc3\x87", - "\xc3\xa8" => "\xc3\x88", - "\xc3\xa9" => "\xc3\x89", - "\xc3\xaa" => "\xc3\x8a", - "\xc3\xab" => "\xc3\x8b", - "\xc3\xac" => "\xc3\x8c", - "\xc3\xad" => "\xc3\x8d", - "\xc3\xae" => "\xc3\x8e", - "\xc3\xaf" => "\xc3\x8f", - "\xc3\xb0" => "\xc3\x90", - "\xc3\xb1" => "\xc3\x91", - "\xc3\xb2" => "\xc3\x92", - "\xc3\xb3" => "\xc3\x93", - "\xc3\xb4" => "\xc3\x94", - "\xc3\xb5" => "\xc3\x95", - "\xc3\xb6" => "\xc3\x96", - "\xc3\xb8" => "\xc3\x98", - "\xc3\xb9" => "\xc3\x99", - "\xc3\xba" => "\xc3\x9a", - "\xc3\xbb" => "\xc3\x9b", - "\xc3\xbc" => "\xc3\x9c", - "\xc3\xbd" => "\xc3\x9d", - "\xc3\xbe" => "\xc3\x9e", - "\xc3\xbf" => "\xc5\xb8", - "\xc4\x81" => "\xc4\x80", - "\xc4\x83" => "\xc4\x82", - "\xc4\x85" => "\xc4\x84", - "\xc4\x87" => "\xc4\x86", - "\xc4\x89" => "\xc4\x88", - "\xc4\x8b" => "\xc4\x8a", - "\xc4\x8d" => "\xc4\x8c", - "\xc4\x8f" => "\xc4\x8e", - "\xc4\x91" => "\xc4\x90", - "\xc4\x93" => "\xc4\x92", - "\xc4\x95" => "\xc4\x94", - "\xc4\x97" => "\xc4\x96", - "\xc4\x99" => "\xc4\x98", - "\xc4\x9b" => "\xc4\x9a", - "\xc4\x9d" => "\xc4\x9c", - "\xc4\x9f" => "\xc4\x9e", - "\xc4\xa1" => "\xc4\xa0", - "\xc4\xa3" => "\xc4\xa2", - "\xc4\xa5" => "\xc4\xa4", - "\xc4\xa7" => "\xc4\xa6", - "\xc4\xa9" => "\xc4\xa8", - "\xc4\xab" => "\xc4\xaa", - "\xc4\xad" => "\xc4\xac", - "\xc4\xaf" => "\xc4\xae", - "\xc4\xb1" => "I", - "\xc4\xb3" => "\xc4\xb2", - "\xc4\xb5" => "\xc4\xb4", - "\xc4\xb7" => "\xc4\xb6", - "\xc4\xba" => "\xc4\xb9", - "\xc4\xbc" => "\xc4\xbb", - "\xc4\xbe" => "\xc4\xbd", - "\xc5\x80" => "\xc4\xbf", - "\xc5\x82" => "\xc5\x81", - "\xc5\x84" => "\xc5\x83", - "\xc5\x86" => "\xc5\x85", - "\xc5\x88" => "\xc5\x87", - "\xc5\x8b" => "\xc5\x8a", - "\xc5\x8d" => "\xc5\x8c", - "\xc5\x8f" => "\xc5\x8e", - "\xc5\x91" => "\xc5\x90", - "\xc5\x93" => "\xc5\x92", - "\xc5\x95" => "\xc5\x94", - "\xc5\x97" => "\xc5\x96", - "\xc5\x99" => "\xc5\x98", - "\xc5\x9b" => "\xc5\x9a", - "\xc5\x9d" => "\xc5\x9c", - "\xc5\x9f" => "\xc5\x9e", - "\xc5\xa1" => "\xc5\xa0", - "\xc5\xa3" => "\xc5\xa2", - "\xc5\xa5" => "\xc5\xa4", - "\xc5\xa7" => "\xc5\xa6", - "\xc5\xa9" => "\xc5\xa8", - "\xc5\xab" => "\xc5\xaa", - "\xc5\xad" => "\xc5\xac", - "\xc5\xaf" => "\xc5\xae", - "\xc5\xb1" => "\xc5\xb0", - "\xc5\xb3" => "\xc5\xb2", - "\xc5\xb5" => "\xc5\xb4", - "\xc5\xb7" => "\xc5\xb6", - "\xc5\xba" => "\xc5\xb9", - "\xc5\xbc" => "\xc5\xbb", - "\xc5\xbe" => "\xc5\xbd", - "\xc5\xbf" => "S", - "\xc6\x83" => "\xc6\x82", - "\xc6\x85" => "\xc6\x84", - "\xc6\x88" => "\xc6\x87", - "\xc6\x8c" => "\xc6\x8b", - "\xc6\x92" => "\xc6\x91", - "\xc6\x95" => "\xc7\xb6", - "\xc6\x99" => "\xc6\x98", - "\xc6\xa1" => "\xc6\xa0", - "\xc6\xa3" => "\xc6\xa2", - "\xc6\xa5" => "\xc6\xa4", - "\xc6\xa8" => "\xc6\xa7", - "\xc6\xad" => "\xc6\xac", - "\xc6\xb0" => "\xc6\xaf", - "\xc6\xb4" => "\xc6\xb3", - "\xc6\xb6" => "\xc6\xb5", - "\xc6\xb9" => "\xc6\xb8", - "\xc6\xbd" => "\xc6\xbc", - "\xc6\xbf" => "\xc7\xb7", - "\xc7\x85" => "\xc7\x84", - "\xc7\x86" => "\xc7\x84", - "\xc7\x88" => "\xc7\x87", - "\xc7\x89" => "\xc7\x87", - "\xc7\x8b" => "\xc7\x8a", - "\xc7\x8c" => "\xc7\x8a", - "\xc7\x8e" => "\xc7\x8d", - "\xc7\x90" => "\xc7\x8f", - "\xc7\x92" => "\xc7\x91", - "\xc7\x94" => "\xc7\x93", - "\xc7\x96" => "\xc7\x95", - "\xc7\x98" => "\xc7\x97", - "\xc7\x9a" => "\xc7\x99", - "\xc7\x9c" => "\xc7\x9b", - "\xc7\x9d" => "\xc6\x8e", - "\xc7\x9f" => "\xc7\x9e", - "\xc7\xa1" => "\xc7\xa0", - "\xc7\xa3" => "\xc7\xa2", - "\xc7\xa5" => "\xc7\xa4", - "\xc7\xa7" => "\xc7\xa6", - "\xc7\xa9" => "\xc7\xa8", - "\xc7\xab" => "\xc7\xaa", - "\xc7\xad" => "\xc7\xac", - "\xc7\xaf" => "\xc7\xae", - "\xc7\xb2" => "\xc7\xb1", - "\xc7\xb3" => "\xc7\xb1", - "\xc7\xb5" => "\xc7\xb4", - "\xc7\xb9" => "\xc7\xb8", - "\xc7\xbb" => "\xc7\xba", - "\xc7\xbd" => "\xc7\xbc", - "\xc7\xbf" => "\xc7\xbe", - "\xc8\x81" => "\xc8\x80", - "\xc8\x83" => "\xc8\x82", - "\xc8\x85" => "\xc8\x84", - "\xc8\x87" => "\xc8\x86", - "\xc8\x89" => "\xc8\x88", - "\xc8\x8b" => "\xc8\x8a", - "\xc8\x8d" => "\xc8\x8c", - "\xc8\x8f" => "\xc8\x8e", - "\xc8\x91" => "\xc8\x90", - "\xc8\x93" => "\xc8\x92", - "\xc8\x95" => "\xc8\x94", - "\xc8\x97" => "\xc8\x96", - "\xc8\x99" => "\xc8\x98", - "\xc8\x9b" => "\xc8\x9a", - "\xc8\x9d" => "\xc8\x9c", - "\xc8\x9f" => "\xc8\x9e", - "\xc8\xa3" => "\xc8\xa2", - "\xc8\xa5" => "\xc8\xa4", - "\xc8\xa7" => "\xc8\xa6", - "\xc8\xa9" => "\xc8\xa8", - "\xc8\xab" => "\xc8\xaa", - "\xc8\xad" => "\xc8\xac", - "\xc8\xaf" => "\xc8\xae", - "\xc8\xb1" => "\xc8\xb0", - "\xc8\xb3" => "\xc8\xb2", - "\xc9\x93" => "\xc6\x81", - "\xc9\x94" => "\xc6\x86", - "\xc9\x96" => "\xc6\x89", - "\xc9\x97" => "\xc6\x8a", - "\xc9\x99" => "\xc6\x8f", - "\xc9\x9b" => "\xc6\x90", - "\xc9\xa0" => "\xc6\x93", - "\xc9\xa3" => "\xc6\x94", - "\xc9\xa8" => "\xc6\x97", - "\xc9\xa9" => "\xc6\x96", - "\xc9\xaf" => "\xc6\x9c", - "\xc9\xb2" => "\xc6\x9d", - "\xc9\xb5" => "\xc6\x9f", - "\xca\x80" => "\xc6\xa6", - "\xca\x83" => "\xc6\xa9", - "\xca\x88" => "\xc6\xae", - "\xca\x8a" => "\xc6\xb1", - "\xca\x8b" => "\xc6\xb2", - "\xca\x92" => "\xc6\xb7", - "\xcd\x85" => "\xce\x99", - "\xce\xac" => "\xce\x86", - "\xce\xad" => "\xce\x88", - "\xce\xae" => "\xce\x89", - "\xce\xaf" => "\xce\x8a", - "\xce\xb1" => "\xce\x91", - "\xce\xb2" => "\xce\x92", - "\xce\xb3" => "\xce\x93", - "\xce\xb4" => "\xce\x94", - "\xce\xb5" => "\xce\x95", - "\xce\xb6" => "\xce\x96", - "\xce\xb7" => "\xce\x97", - "\xce\xb8" => "\xce\x98", - "\xce\xb9" => "\xce\x99", - "\xce\xba" => "\xce\x9a", - "\xce\xbb" => "\xce\x9b", - "\xce\xbc" => "\xce\x9c", - "\xce\xbd" => "\xce\x9d", - "\xce\xbe" => "\xce\x9e", - "\xce\xbf" => "\xce\x9f", - "\xcf\x80" => "\xce\xa0", - "\xcf\x81" => "\xce\xa1", - "\xcf\x82" => "\xce\xa3", - "\xcf\x83" => "\xce\xa3", - "\xcf\x84" => "\xce\xa4", - "\xcf\x85" => "\xce\xa5", - "\xcf\x86" => "\xce\xa6", - "\xcf\x87" => "\xce\xa7", - "\xcf\x88" => "\xce\xa8", - "\xcf\x89" => "\xce\xa9", - "\xcf\x8a" => "\xce\xaa", - "\xcf\x8b" => "\xce\xab", - "\xcf\x8c" => "\xce\x8c", - "\xcf\x8d" => "\xce\x8e", - "\xcf\x8e" => "\xce\x8f", - "\xcf\x90" => "\xce\x92", - "\xcf\x91" => "\xce\x98", - "\xcf\x95" => "\xce\xa6", - "\xcf\x96" => "\xce\xa0", - "\xcf\x9b" => "\xcf\x9a", - "\xcf\x9d" => "\xcf\x9c", - "\xcf\x9f" => "\xcf\x9e", - "\xcf\xa1" => "\xcf\xa0", - "\xcf\xa3" => "\xcf\xa2", - "\xcf\xa5" => "\xcf\xa4", - "\xcf\xa7" => "\xcf\xa6", - "\xcf\xa9" => "\xcf\xa8", - "\xcf\xab" => "\xcf\xaa", - "\xcf\xad" => "\xcf\xac", - "\xcf\xaf" => "\xcf\xae", - "\xcf\xb0" => "\xce\x9a", - "\xcf\xb1" => "\xce\xa1", - "\xcf\xb2" => "\xce\xa3", - "\xcf\xb5" => "\xce\x95", - "\xd0\xb0" => "\xd0\x90", - "\xd0\xb1" => "\xd0\x91", - "\xd0\xb2" => "\xd0\x92", - "\xd0\xb3" => "\xd0\x93", - "\xd0\xb4" => "\xd0\x94", - "\xd0\xb5" => "\xd0\x95", - "\xd0\xb6" => "\xd0\x96", - "\xd0\xb7" => "\xd0\x97", - "\xd0\xb8" => "\xd0\x98", - "\xd0\xb9" => "\xd0\x99", - "\xd0\xba" => "\xd0\x9a", - "\xd0\xbb" => "\xd0\x9b", - "\xd0\xbc" => "\xd0\x9c", - "\xd0\xbd" => "\xd0\x9d", - "\xd0\xbe" => "\xd0\x9e", - "\xd0\xbf" => "\xd0\x9f", - "\xd1\x80" => "\xd0\xa0", - "\xd1\x81" => "\xd0\xa1", - "\xd1\x82" => "\xd0\xa2", - "\xd1\x83" => "\xd0\xa3", - "\xd1\x84" => "\xd0\xa4", - "\xd1\x85" => "\xd0\xa5", - "\xd1\x86" => "\xd0\xa6", - "\xd1\x87" => "\xd0\xa7", - "\xd1\x88" => "\xd0\xa8", - "\xd1\x89" => "\xd0\xa9", - "\xd1\x8a" => "\xd0\xaa", - "\xd1\x8b" => "\xd0\xab", - "\xd1\x8c" => "\xd0\xac", - "\xd1\x8d" => "\xd0\xad", - "\xd1\x8e" => "\xd0\xae", - "\xd1\x8f" => "\xd0\xaf", - "\xd1\x90" => "\xd0\x80", - "\xd1\x91" => "\xd0\x81", - "\xd1\x92" => "\xd0\x82", - "\xd1\x93" => "\xd0\x83", - "\xd1\x94" => "\xd0\x84", - "\xd1\x95" => "\xd0\x85", - "\xd1\x96" => "\xd0\x86", - "\xd1\x97" => "\xd0\x87", - "\xd1\x98" => "\xd0\x88", - "\xd1\x99" => "\xd0\x89", - "\xd1\x9a" => "\xd0\x8a", - "\xd1\x9b" => "\xd0\x8b", - "\xd1\x9c" => "\xd0\x8c", - "\xd1\x9d" => "\xd0\x8d", - "\xd1\x9e" => "\xd0\x8e", - "\xd1\x9f" => "\xd0\x8f", - "\xd1\xa1" => "\xd1\xa0", - "\xd1\xa3" => "\xd1\xa2", - "\xd1\xa5" => "\xd1\xa4", - "\xd1\xa7" => "\xd1\xa6", - "\xd1\xa9" => "\xd1\xa8", - "\xd1\xab" => "\xd1\xaa", - "\xd1\xad" => "\xd1\xac", - "\xd1\xaf" => "\xd1\xae", - "\xd1\xb1" => "\xd1\xb0", - "\xd1\xb3" => "\xd1\xb2", - "\xd1\xb5" => "\xd1\xb4", - "\xd1\xb7" => "\xd1\xb6", - "\xd1\xb9" => "\xd1\xb8", - "\xd1\xbb" => "\xd1\xba", - "\xd1\xbd" => "\xd1\xbc", - "\xd1\xbf" => "\xd1\xbe", - "\xd2\x81" => "\xd2\x80", - "\xd2\x8d" => "\xd2\x8c", - "\xd2\x8f" => "\xd2\x8e", - "\xd2\x91" => "\xd2\x90", - "\xd2\x93" => "\xd2\x92", - "\xd2\x95" => "\xd2\x94", - "\xd2\x97" => "\xd2\x96", - "\xd2\x99" => "\xd2\x98", - "\xd2\x9b" => "\xd2\x9a", - "\xd2\x9d" => "\xd2\x9c", - "\xd2\x9f" => "\xd2\x9e", - "\xd2\xa1" => "\xd2\xa0", - "\xd2\xa3" => "\xd2\xa2", - "\xd2\xa5" => "\xd2\xa4", - "\xd2\xa7" => "\xd2\xa6", - "\xd2\xa9" => "\xd2\xa8", - "\xd2\xab" => "\xd2\xaa", - "\xd2\xad" => "\xd2\xac", - "\xd2\xaf" => "\xd2\xae", - "\xd2\xb1" => "\xd2\xb0", - "\xd2\xb3" => "\xd2\xb2", - "\xd2\xb5" => "\xd2\xb4", - "\xd2\xb7" => "\xd2\xb6", - "\xd2\xb9" => "\xd2\xb8", - "\xd2\xbb" => "\xd2\xba", - "\xd2\xbd" => "\xd2\xbc", - "\xd2\xbf" => "\xd2\xbe", - "\xd3\x82" => "\xd3\x81", - "\xd3\x84" => "\xd3\x83", - "\xd3\x88" => "\xd3\x87", - "\xd3\x8c" => "\xd3\x8b", - "\xd3\x91" => "\xd3\x90", - "\xd3\x93" => "\xd3\x92", - "\xd3\x95" => "\xd3\x94", - "\xd3\x97" => "\xd3\x96", - "\xd3\x99" => "\xd3\x98", - "\xd3\x9b" => "\xd3\x9a", - "\xd3\x9d" => "\xd3\x9c", - "\xd3\x9f" => "\xd3\x9e", - "\xd3\xa1" => "\xd3\xa0", - "\xd3\xa3" => "\xd3\xa2", - "\xd3\xa5" => "\xd3\xa4", - "\xd3\xa7" => "\xd3\xa6", - "\xd3\xa9" => "\xd3\xa8", - "\xd3\xab" => "\xd3\xaa", - "\xd3\xad" => "\xd3\xac", - "\xd3\xaf" => "\xd3\xae", - "\xd3\xb1" => "\xd3\xb0", - "\xd3\xb3" => "\xd3\xb2", - "\xd3\xb5" => "\xd3\xb4", - "\xd3\xb9" => "\xd3\xb8", - "\xd5\xa1" => "\xd4\xb1", - "\xd5\xa2" => "\xd4\xb2", - "\xd5\xa3" => "\xd4\xb3", - "\xd5\xa4" => "\xd4\xb4", - "\xd5\xa5" => "\xd4\xb5", - "\xd5\xa6" => "\xd4\xb6", - "\xd5\xa7" => "\xd4\xb7", - "\xd5\xa8" => "\xd4\xb8", - "\xd5\xa9" => "\xd4\xb9", - "\xd5\xaa" => "\xd4\xba", - "\xd5\xab" => "\xd4\xbb", - "\xd5\xac" => "\xd4\xbc", - "\xd5\xad" => "\xd4\xbd", - "\xd5\xae" => "\xd4\xbe", - "\xd5\xaf" => "\xd4\xbf", - "\xd5\xb0" => "\xd5\x80", - "\xd5\xb1" => "\xd5\x81", - "\xd5\xb2" => "\xd5\x82", - "\xd5\xb3" => "\xd5\x83", - "\xd5\xb4" => "\xd5\x84", - "\xd5\xb5" => "\xd5\x85", - "\xd5\xb6" => "\xd5\x86", - "\xd5\xb7" => "\xd5\x87", - "\xd5\xb8" => "\xd5\x88", - "\xd5\xb9" => "\xd5\x89", - "\xd5\xba" => "\xd5\x8a", - "\xd5\xbb" => "\xd5\x8b", - "\xd5\xbc" => "\xd5\x8c", - "\xd5\xbd" => "\xd5\x8d", - "\xd5\xbe" => "\xd5\x8e", - "\xd5\xbf" => "\xd5\x8f", - "\xd6\x80" => "\xd5\x90", - "\xd6\x81" => "\xd5\x91", - "\xd6\x82" => "\xd5\x92", - "\xd6\x83" => "\xd5\x93", - "\xd6\x84" => "\xd5\x94", - "\xd6\x85" => "\xd5\x95", - "\xd6\x86" => "\xd5\x96", - "\xe1\xb8\x81" => "\xe1\xb8\x80", - "\xe1\xb8\x83" => "\xe1\xb8\x82", - "\xe1\xb8\x85" => "\xe1\xb8\x84", - "\xe1\xb8\x87" => "\xe1\xb8\x86", - "\xe1\xb8\x89" => "\xe1\xb8\x88", - "\xe1\xb8\x8b" => "\xe1\xb8\x8a", - "\xe1\xb8\x8d" => "\xe1\xb8\x8c", - "\xe1\xb8\x8f" => "\xe1\xb8\x8e", - "\xe1\xb8\x91" => "\xe1\xb8\x90", - "\xe1\xb8\x93" => "\xe1\xb8\x92", - "\xe1\xb8\x95" => "\xe1\xb8\x94", - "\xe1\xb8\x97" => "\xe1\xb8\x96", - "\xe1\xb8\x99" => "\xe1\xb8\x98", - "\xe1\xb8\x9b" => "\xe1\xb8\x9a", - "\xe1\xb8\x9d" => "\xe1\xb8\x9c", - "\xe1\xb8\x9f" => "\xe1\xb8\x9e", - "\xe1\xb8\xa1" => "\xe1\xb8\xa0", - "\xe1\xb8\xa3" => "\xe1\xb8\xa2", - "\xe1\xb8\xa5" => "\xe1\xb8\xa4", - "\xe1\xb8\xa7" => "\xe1\xb8\xa6", - "\xe1\xb8\xa9" => "\xe1\xb8\xa8", - "\xe1\xb8\xab" => "\xe1\xb8\xaa", - "\xe1\xb8\xad" => "\xe1\xb8\xac", - "\xe1\xb8\xaf" => "\xe1\xb8\xae", - "\xe1\xb8\xb1" => "\xe1\xb8\xb0", - "\xe1\xb8\xb3" => "\xe1\xb8\xb2", - "\xe1\xb8\xb5" => "\xe1\xb8\xb4", - "\xe1\xb8\xb7" => "\xe1\xb8\xb6", - "\xe1\xb8\xb9" => "\xe1\xb8\xb8", - "\xe1\xb8\xbb" => "\xe1\xb8\xba", - "\xe1\xb8\xbd" => "\xe1\xb8\xbc", - "\xe1\xb8\xbf" => "\xe1\xb8\xbe", - "\xe1\xb9\x81" => "\xe1\xb9\x80", - "\xe1\xb9\x83" => "\xe1\xb9\x82", - "\xe1\xb9\x85" => "\xe1\xb9\x84", - "\xe1\xb9\x87" => "\xe1\xb9\x86", - "\xe1\xb9\x89" => "\xe1\xb9\x88", - "\xe1\xb9\x8b" => "\xe1\xb9\x8a", - "\xe1\xb9\x8d" => "\xe1\xb9\x8c", - "\xe1\xb9\x8f" => "\xe1\xb9\x8e", - "\xe1\xb9\x91" => "\xe1\xb9\x90", - "\xe1\xb9\x93" => "\xe1\xb9\x92", - "\xe1\xb9\x95" => "\xe1\xb9\x94", - "\xe1\xb9\x97" => "\xe1\xb9\x96", - "\xe1\xb9\x99" => "\xe1\xb9\x98", - "\xe1\xb9\x9b" => "\xe1\xb9\x9a", - "\xe1\xb9\x9d" => "\xe1\xb9\x9c", - "\xe1\xb9\x9f" => "\xe1\xb9\x9e", - "\xe1\xb9\xa1" => "\xe1\xb9\xa0", - "\xe1\xb9\xa3" => "\xe1\xb9\xa2", - "\xe1\xb9\xa5" => "\xe1\xb9\xa4", - "\xe1\xb9\xa7" => "\xe1\xb9\xa6", - "\xe1\xb9\xa9" => "\xe1\xb9\xa8", - "\xe1\xb9\xab" => "\xe1\xb9\xaa", - "\xe1\xb9\xad" => "\xe1\xb9\xac", - "\xe1\xb9\xaf" => "\xe1\xb9\xae", - "\xe1\xb9\xb1" => "\xe1\xb9\xb0", - "\xe1\xb9\xb3" => "\xe1\xb9\xb2", - "\xe1\xb9\xb5" => "\xe1\xb9\xb4", - "\xe1\xb9\xb7" => "\xe1\xb9\xb6", - "\xe1\xb9\xb9" => "\xe1\xb9\xb8", - "\xe1\xb9\xbb" => "\xe1\xb9\xba", - "\xe1\xb9\xbd" => "\xe1\xb9\xbc", - "\xe1\xb9\xbf" => "\xe1\xb9\xbe", - "\xe1\xba\x81" => "\xe1\xba\x80", - "\xe1\xba\x83" => "\xe1\xba\x82", - "\xe1\xba\x85" => "\xe1\xba\x84", - "\xe1\xba\x87" => "\xe1\xba\x86", - "\xe1\xba\x89" => "\xe1\xba\x88", - "\xe1\xba\x8b" => "\xe1\xba\x8a", - "\xe1\xba\x8d" => "\xe1\xba\x8c", - "\xe1\xba\x8f" => "\xe1\xba\x8e", - "\xe1\xba\x91" => "\xe1\xba\x90", - "\xe1\xba\x93" => "\xe1\xba\x92", - "\xe1\xba\x95" => "\xe1\xba\x94", - "\xe1\xba\x9b" => "\xe1\xb9\xa0", - "\xe1\xba\xa1" => "\xe1\xba\xa0", - "\xe1\xba\xa3" => "\xe1\xba\xa2", - "\xe1\xba\xa5" => "\xe1\xba\xa4", - "\xe1\xba\xa7" => "\xe1\xba\xa6", - "\xe1\xba\xa9" => "\xe1\xba\xa8", - "\xe1\xba\xab" => "\xe1\xba\xaa", - "\xe1\xba\xad" => "\xe1\xba\xac", - "\xe1\xba\xaf" => "\xe1\xba\xae", - "\xe1\xba\xb1" => "\xe1\xba\xb0", - "\xe1\xba\xb3" => "\xe1\xba\xb2", - "\xe1\xba\xb5" => "\xe1\xba\xb4", - "\xe1\xba\xb7" => "\xe1\xba\xb6", - "\xe1\xba\xb9" => "\xe1\xba\xb8", - "\xe1\xba\xbb" => "\xe1\xba\xba", - "\xe1\xba\xbd" => "\xe1\xba\xbc", - "\xe1\xba\xbf" => "\xe1\xba\xbe", - "\xe1\xbb\x81" => "\xe1\xbb\x80", - "\xe1\xbb\x83" => "\xe1\xbb\x82", - "\xe1\xbb\x85" => "\xe1\xbb\x84", - "\xe1\xbb\x87" => "\xe1\xbb\x86", - "\xe1\xbb\x89" => "\xe1\xbb\x88", - "\xe1\xbb\x8b" => "\xe1\xbb\x8a", - "\xe1\xbb\x8d" => "\xe1\xbb\x8c", - "\xe1\xbb\x8f" => "\xe1\xbb\x8e", - "\xe1\xbb\x91" => "\xe1\xbb\x90", - "\xe1\xbb\x93" => "\xe1\xbb\x92", - "\xe1\xbb\x95" => "\xe1\xbb\x94", - "\xe1\xbb\x97" => "\xe1\xbb\x96", - "\xe1\xbb\x99" => "\xe1\xbb\x98", - "\xe1\xbb\x9b" => "\xe1\xbb\x9a", - "\xe1\xbb\x9d" => "\xe1\xbb\x9c", - "\xe1\xbb\x9f" => "\xe1\xbb\x9e", - "\xe1\xbb\xa1" => "\xe1\xbb\xa0", - "\xe1\xbb\xa3" => "\xe1\xbb\xa2", - "\xe1\xbb\xa5" => "\xe1\xbb\xa4", - "\xe1\xbb\xa7" => "\xe1\xbb\xa6", - "\xe1\xbb\xa9" => "\xe1\xbb\xa8", - "\xe1\xbb\xab" => "\xe1\xbb\xaa", - "\xe1\xbb\xad" => "\xe1\xbb\xac", - "\xe1\xbb\xaf" => "\xe1\xbb\xae", - "\xe1\xbb\xb1" => "\xe1\xbb\xb0", - "\xe1\xbb\xb3" => "\xe1\xbb\xb2", - "\xe1\xbb\xb5" => "\xe1\xbb\xb4", - "\xe1\xbb\xb7" => "\xe1\xbb\xb6", - "\xe1\xbb\xb9" => "\xe1\xbb\xb8", - "\xe1\xbc\x80" => "\xe1\xbc\x88", - "\xe1\xbc\x81" => "\xe1\xbc\x89", - "\xe1\xbc\x82" => "\xe1\xbc\x8a", - "\xe1\xbc\x83" => "\xe1\xbc\x8b", - "\xe1\xbc\x84" => "\xe1\xbc\x8c", - "\xe1\xbc\x85" => "\xe1\xbc\x8d", - "\xe1\xbc\x86" => "\xe1\xbc\x8e", - "\xe1\xbc\x87" => "\xe1\xbc\x8f", - "\xe1\xbc\x90" => "\xe1\xbc\x98", - "\xe1\xbc\x91" => "\xe1\xbc\x99", - "\xe1\xbc\x92" => "\xe1\xbc\x9a", - "\xe1\xbc\x93" => "\xe1\xbc\x9b", - "\xe1\xbc\x94" => "\xe1\xbc\x9c", - "\xe1\xbc\x95" => "\xe1\xbc\x9d", - "\xe1\xbc\xa0" => "\xe1\xbc\xa8", - "\xe1\xbc\xa1" => "\xe1\xbc\xa9", - "\xe1\xbc\xa2" => "\xe1\xbc\xaa", - "\xe1\xbc\xa3" => "\xe1\xbc\xab", - "\xe1\xbc\xa4" => "\xe1\xbc\xac", - "\xe1\xbc\xa5" => "\xe1\xbc\xad", - "\xe1\xbc\xa6" => "\xe1\xbc\xae", - "\xe1\xbc\xa7" => "\xe1\xbc\xaf", - "\xe1\xbc\xb0" => "\xe1\xbc\xb8", - "\xe1\xbc\xb1" => "\xe1\xbc\xb9", - "\xe1\xbc\xb2" => "\xe1\xbc\xba", - "\xe1\xbc\xb3" => "\xe1\xbc\xbb", - "\xe1\xbc\xb4" => "\xe1\xbc\xbc", - "\xe1\xbc\xb5" => "\xe1\xbc\xbd", - "\xe1\xbc\xb6" => "\xe1\xbc\xbe", - "\xe1\xbc\xb7" => "\xe1\xbc\xbf", - "\xe1\xbd\x80" => "\xe1\xbd\x88", - "\xe1\xbd\x81" => "\xe1\xbd\x89", - "\xe1\xbd\x82" => "\xe1\xbd\x8a", - "\xe1\xbd\x83" => "\xe1\xbd\x8b", - "\xe1\xbd\x84" => "\xe1\xbd\x8c", - "\xe1\xbd\x85" => "\xe1\xbd\x8d", - "\xe1\xbd\x91" => "\xe1\xbd\x99", - "\xe1\xbd\x93" => "\xe1\xbd\x9b", - "\xe1\xbd\x95" => "\xe1\xbd\x9d", - "\xe1\xbd\x97" => "\xe1\xbd\x9f", - "\xe1\xbd\xa0" => "\xe1\xbd\xa8", - "\xe1\xbd\xa1" => "\xe1\xbd\xa9", - "\xe1\xbd\xa2" => "\xe1\xbd\xaa", - "\xe1\xbd\xa3" => "\xe1\xbd\xab", - "\xe1\xbd\xa4" => "\xe1\xbd\xac", - "\xe1\xbd\xa5" => "\xe1\xbd\xad", - "\xe1\xbd\xa6" => "\xe1\xbd\xae", - "\xe1\xbd\xa7" => "\xe1\xbd\xaf", - "\xe1\xbd\xb0" => "\xe1\xbe\xba", - "\xe1\xbd\xb1" => "\xe1\xbe\xbb", - "\xe1\xbd\xb2" => "\xe1\xbf\x88", - "\xe1\xbd\xb3" => "\xe1\xbf\x89", - "\xe1\xbd\xb4" => "\xe1\xbf\x8a", - "\xe1\xbd\xb5" => "\xe1\xbf\x8b", - "\xe1\xbd\xb6" => "\xe1\xbf\x9a", - "\xe1\xbd\xb7" => "\xe1\xbf\x9b", - "\xe1\xbd\xb8" => "\xe1\xbf\xb8", - "\xe1\xbd\xb9" => "\xe1\xbf\xb9", - "\xe1\xbd\xba" => "\xe1\xbf\xaa", - "\xe1\xbd\xbb" => "\xe1\xbf\xab", - "\xe1\xbd\xbc" => "\xe1\xbf\xba", - "\xe1\xbd\xbd" => "\xe1\xbf\xbb", - "\xe1\xbe\x80" => "\xe1\xbe\x88", - "\xe1\xbe\x81" => "\xe1\xbe\x89", - "\xe1\xbe\x82" => "\xe1\xbe\x8a", - "\xe1\xbe\x83" => "\xe1\xbe\x8b", - "\xe1\xbe\x84" => "\xe1\xbe\x8c", - "\xe1\xbe\x85" => "\xe1\xbe\x8d", - "\xe1\xbe\x86" => "\xe1\xbe\x8e", - "\xe1\xbe\x87" => "\xe1\xbe\x8f", - "\xe1\xbe\x90" => "\xe1\xbe\x98", - "\xe1\xbe\x91" => "\xe1\xbe\x99", - "\xe1\xbe\x92" => "\xe1\xbe\x9a", - "\xe1\xbe\x93" => "\xe1\xbe\x9b", - "\xe1\xbe\x94" => "\xe1\xbe\x9c", - "\xe1\xbe\x95" => "\xe1\xbe\x9d", - "\xe1\xbe\x96" => "\xe1\xbe\x9e", - "\xe1\xbe\x97" => "\xe1\xbe\x9f", - "\xe1\xbe\xa0" => "\xe1\xbe\xa8", - "\xe1\xbe\xa1" => "\xe1\xbe\xa9", - "\xe1\xbe\xa2" => "\xe1\xbe\xaa", - "\xe1\xbe\xa3" => "\xe1\xbe\xab", - "\xe1\xbe\xa4" => "\xe1\xbe\xac", - "\xe1\xbe\xa5" => "\xe1\xbe\xad", - "\xe1\xbe\xa6" => "\xe1\xbe\xae", - "\xe1\xbe\xa7" => "\xe1\xbe\xaf", - "\xe1\xbe\xb0" => "\xe1\xbe\xb8", - "\xe1\xbe\xb1" => "\xe1\xbe\xb9", - "\xe1\xbe\xb3" => "\xe1\xbe\xbc", - "\xe1\xbe\xbe" => "\xce\x99", - "\xe1\xbf\x83" => "\xe1\xbf\x8c", - "\xe1\xbf\x90" => "\xe1\xbf\x98", - "\xe1\xbf\x91" => "\xe1\xbf\x99", - "\xe1\xbf\xa0" => "\xe1\xbf\xa8", - "\xe1\xbf\xa1" => "\xe1\xbf\xa9", - "\xe1\xbf\xa5" => "\xe1\xbf\xac", - "\xe1\xbf\xb3" => "\xe1\xbf\xbc", - "\xe2\x85\xb0" => "\xe2\x85\xa0", - "\xe2\x85\xb1" => "\xe2\x85\xa1", - "\xe2\x85\xb2" => "\xe2\x85\xa2", - "\xe2\x85\xb3" => "\xe2\x85\xa3", - "\xe2\x85\xb4" => "\xe2\x85\xa4", - "\xe2\x85\xb5" => "\xe2\x85\xa5", - "\xe2\x85\xb6" => "\xe2\x85\xa6", - "\xe2\x85\xb7" => "\xe2\x85\xa7", - "\xe2\x85\xb8" => "\xe2\x85\xa8", - "\xe2\x85\xb9" => "\xe2\x85\xa9", - "\xe2\x85\xba" => "\xe2\x85\xaa", - "\xe2\x85\xbb" => "\xe2\x85\xab", - "\xe2\x85\xbc" => "\xe2\x85\xac", - "\xe2\x85\xbd" => "\xe2\x85\xad", - "\xe2\x85\xbe" => "\xe2\x85\xae", - "\xe2\x85\xbf" => "\xe2\x85\xaf", - "\xe2\x93\x90" => "\xe2\x92\xb6", - "\xe2\x93\x91" => "\xe2\x92\xb7", - "\xe2\x93\x92" => "\xe2\x92\xb8", - "\xe2\x93\x93" => "\xe2\x92\xb9", - "\xe2\x93\x94" => "\xe2\x92\xba", - "\xe2\x93\x95" => "\xe2\x92\xbb", - "\xe2\x93\x96" => "\xe2\x92\xbc", - "\xe2\x93\x97" => "\xe2\x92\xbd", - "\xe2\x93\x98" => "\xe2\x92\xbe", - "\xe2\x93\x99" => "\xe2\x92\xbf", - "\xe2\x93\x9a" => "\xe2\x93\x80", - "\xe2\x93\x9b" => "\xe2\x93\x81", - "\xe2\x93\x9c" => "\xe2\x93\x82", - "\xe2\x93\x9d" => "\xe2\x93\x83", - "\xe2\x93\x9e" => "\xe2\x93\x84", - "\xe2\x93\x9f" => "\xe2\x93\x85", - "\xe2\x93\xa0" => "\xe2\x93\x86", - "\xe2\x93\xa1" => "\xe2\x93\x87", - "\xe2\x93\xa2" => "\xe2\x93\x88", - "\xe2\x93\xa3" => "\xe2\x93\x89", - "\xe2\x93\xa4" => "\xe2\x93\x8a", - "\xe2\x93\xa5" => "\xe2\x93\x8b", - "\xe2\x93\xa6" => "\xe2\x93\x8c", - "\xe2\x93\xa7" => "\xe2\x93\x8d", - "\xe2\x93\xa8" => "\xe2\x93\x8e", - "\xe2\x93\xa9" => "\xe2\x93\x8f", - "\xef\xbd\x81" => "\xef\xbc\xa1", - "\xef\xbd\x82" => "\xef\xbc\xa2", - "\xef\xbd\x83" => "\xef\xbc\xa3", - "\xef\xbd\x84" => "\xef\xbc\xa4", - "\xef\xbd\x85" => "\xef\xbc\xa5", - "\xef\xbd\x86" => "\xef\xbc\xa6", - "\xef\xbd\x87" => "\xef\xbc\xa7", - "\xef\xbd\x88" => "\xef\xbc\xa8", - "\xef\xbd\x89" => "\xef\xbc\xa9", - "\xef\xbd\x8a" => "\xef\xbc\xaa", - "\xef\xbd\x8b" => "\xef\xbc\xab", - "\xef\xbd\x8c" => "\xef\xbc\xac", - "\xef\xbd\x8d" => "\xef\xbc\xad", - "\xef\xbd\x8e" => "\xef\xbc\xae", - "\xef\xbd\x8f" => "\xef\xbc\xaf", - "\xef\xbd\x90" => "\xef\xbc\xb0", - "\xef\xbd\x91" => "\xef\xbc\xb1", - "\xef\xbd\x92" => "\xef\xbc\xb2", - "\xef\xbd\x93" => "\xef\xbc\xb3", - "\xef\xbd\x94" => "\xef\xbc\xb4", - "\xef\xbd\x95" => "\xef\xbc\xb5", - "\xef\xbd\x96" => "\xef\xbc\xb6", - "\xef\xbd\x97" => "\xef\xbc\xb7", - "\xef\xbd\x98" => "\xef\xbc\xb8", - "\xef\xbd\x99" => "\xef\xbc\xb9", - "\xef\xbd\x9a" => "\xef\xbc\xba", - "\xf0\x90\x90\xa8" => "\xf0\x90\x90\x80", - "\xf0\x90\x90\xa9" => "\xf0\x90\x90\x81", - "\xf0\x90\x90\xaa" => "\xf0\x90\x90\x82", - "\xf0\x90\x90\xab" => "\xf0\x90\x90\x83", - "\xf0\x90\x90\xac" => "\xf0\x90\x90\x84", - "\xf0\x90\x90\xad" => "\xf0\x90\x90\x85", - "\xf0\x90\x90\xae" => "\xf0\x90\x90\x86", - "\xf0\x90\x90\xaf" => "\xf0\x90\x90\x87", - "\xf0\x90\x90\xb0" => "\xf0\x90\x90\x88", - "\xf0\x90\x90\xb1" => "\xf0\x90\x90\x89", - "\xf0\x90\x90\xb2" => "\xf0\x90\x90\x8a", - "\xf0\x90\x90\xb3" => "\xf0\x90\x90\x8b", - "\xf0\x90\x90\xb4" => "\xf0\x90\x90\x8c", - "\xf0\x90\x90\xb5" => "\xf0\x90\x90\x8d", - "\xf0\x90\x90\xb6" => "\xf0\x90\x90\x8e", - "\xf0\x90\x90\xb7" => "\xf0\x90\x90\x8f", - "\xf0\x90\x90\xb8" => "\xf0\x90\x90\x90", - "\xf0\x90\x90\xb9" => "\xf0\x90\x90\x91", - "\xf0\x90\x90\xba" => "\xf0\x90\x90\x92", - "\xf0\x90\x90\xbb" => "\xf0\x90\x90\x93", - "\xf0\x90\x90\xbc" => "\xf0\x90\x90\x94", - "\xf0\x90\x90\xbd" => "\xf0\x90\x90\x95", - "\xf0\x90\x90\xbe" => "\xf0\x90\x90\x96", - "\xf0\x90\x90\xbf" => "\xf0\x90\x90\x97", - "\xf0\x90\x91\x80" => "\xf0\x90\x90\x98", - "\xf0\x90\x91\x81" => "\xf0\x90\x90\x99", - "\xf0\x90\x91\x82" => "\xf0\x90\x90\x9a", - "\xf0\x90\x91\x83" => "\xf0\x90\x90\x9b", - "\xf0\x90\x91\x84" => "\xf0\x90\x90\x9c", - "\xf0\x90\x91\x85" => "\xf0\x90\x90\x9d", - "\xf0\x90\x91\x86" => "\xf0\x90\x90\x9e", - "\xf0\x90\x91\x87" => "\xf0\x90\x90\x9f", - "\xf0\x90\x91\x88" => "\xf0\x90\x90\xa0", - "\xf0\x90\x91\x89" => "\xf0\x90\x90\xa1", - "\xf0\x90\x91\x8a" => "\xf0\x90\x90\xa2", - "\xf0\x90\x91\x8b" => "\xf0\x90\x90\xa3", - "\xf0\x90\x91\x8c" => "\xf0\x90\x90\xa4", - "\xf0\x90\x91\x8d" => "\xf0\x90\x90\xa5" + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'd' => 'D', + 'e' => 'E', + 'f' => 'F', + 'g' => 'G', + 'h' => 'H', + 'i' => 'I', + 'j' => 'J', + 'k' => 'K', + 'l' => 'L', + 'm' => 'M', + 'n' => 'N', + 'o' => 'O', + 'p' => 'P', + 'q' => 'Q', + 'r' => 'R', + 's' => 'S', + 't' => 'T', + 'u' => 'U', + 'v' => 'V', + 'w' => 'W', + 'x' => 'X', + 'y' => 'Y', + 'z' => 'Z', + '\xc2\xb5' => '\xce\x9c', + '\xc3\xa0' => '\xc3\x80', + '\xc3\xa1' => '\xc3\x81', + '\xc3\xa2' => '\xc3\x82', + '\xc3\xa3' => '\xc3\x83', + '\xc3\xa4' => '\xc3\x84', + '\xc3\xa5' => '\xc3\x85', + '\xc3\xa6' => '\xc3\x86', + '\xc3\xa7' => '\xc3\x87', + '\xc3\xa8' => '\xc3\x88', + '\xc3\xa9' => '\xc3\x89', + '\xc3\xaa' => '\xc3\x8a', + '\xc3\xab' => '\xc3\x8b', + '\xc3\xac' => '\xc3\x8c', + '\xc3\xad' => '\xc3\x8d', + '\xc3\xae' => '\xc3\x8e', + '\xc3\xaf' => '\xc3\x8f', + '\xc3\xb0' => '\xc3\x90', + '\xc3\xb1' => '\xc3\x91', + '\xc3\xb2' => '\xc3\x92', + '\xc3\xb3' => '\xc3\x93', + '\xc3\xb4' => '\xc3\x94', + '\xc3\xb5' => '\xc3\x95', + '\xc3\xb6' => '\xc3\x96', + '\xc3\xb8' => '\xc3\x98', + '\xc3\xb9' => '\xc3\x99', + '\xc3\xba' => '\xc3\x9a', + '\xc3\xbb' => '\xc3\x9b', + '\xc3\xbc' => '\xc3\x9c', + '\xc3\xbd' => '\xc3\x9d', + '\xc3\xbe' => '\xc3\x9e', + '\xc3\xbf' => '\xc5\xb8', + '\xc4\x81' => '\xc4\x80', + '\xc4\x83' => '\xc4\x82', + '\xc4\x85' => '\xc4\x84', + '\xc4\x87' => '\xc4\x86', + '\xc4\x89' => '\xc4\x88', + '\xc4\x8b' => '\xc4\x8a', + '\xc4\x8d' => '\xc4\x8c', + '\xc4\x8f' => '\xc4\x8e', + '\xc4\x91' => '\xc4\x90', + '\xc4\x93' => '\xc4\x92', + '\xc4\x95' => '\xc4\x94', + '\xc4\x97' => '\xc4\x96', + '\xc4\x99' => '\xc4\x98', + '\xc4\x9b' => '\xc4\x9a', + '\xc4\x9d' => '\xc4\x9c', + '\xc4\x9f' => '\xc4\x9e', + '\xc4\xa1' => '\xc4\xa0', + '\xc4\xa3' => '\xc4\xa2', + '\xc4\xa5' => '\xc4\xa4', + '\xc4\xa7' => '\xc4\xa6', + '\xc4\xa9' => '\xc4\xa8', + '\xc4\xab' => '\xc4\xaa', + '\xc4\xad' => '\xc4\xac', + '\xc4\xaf' => '\xc4\xae', + '\xc4\xb1' => 'I', + '\xc4\xb3' => '\xc4\xb2', + '\xc4\xb5' => '\xc4\xb4', + '\xc4\xb7' => '\xc4\xb6', + '\xc4\xba' => '\xc4\xb9', + '\xc4\xbc' => '\xc4\xbb', + '\xc4\xbe' => '\xc4\xbd', + '\xc5\x80' => '\xc4\xbf', + '\xc5\x82' => '\xc5\x81', + '\xc5\x84' => '\xc5\x83', + '\xc5\x86' => '\xc5\x85', + '\xc5\x88' => '\xc5\x87', + '\xc5\x8b' => '\xc5\x8a', + '\xc5\x8d' => '\xc5\x8c', + '\xc5\x8f' => '\xc5\x8e', + '\xc5\x91' => '\xc5\x90', + '\xc5\x93' => '\xc5\x92', + '\xc5\x95' => '\xc5\x94', + '\xc5\x97' => '\xc5\x96', + '\xc5\x99' => '\xc5\x98', + '\xc5\x9b' => '\xc5\x9a', + '\xc5\x9d' => '\xc5\x9c', + '\xc5\x9f' => '\xc5\x9e', + '\xc5\xa1' => '\xc5\xa0', + '\xc5\xa3' => '\xc5\xa2', + '\xc5\xa5' => '\xc5\xa4', + '\xc5\xa7' => '\xc5\xa6', + '\xc5\xa9' => '\xc5\xa8', + '\xc5\xab' => '\xc5\xaa', + '\xc5\xad' => '\xc5\xac', + '\xc5\xaf' => '\xc5\xae', + '\xc5\xb1' => '\xc5\xb0', + '\xc5\xb3' => '\xc5\xb2', + '\xc5\xb5' => '\xc5\xb4', + '\xc5\xb7' => '\xc5\xb6', + '\xc5\xba' => '\xc5\xb9', + '\xc5\xbc' => '\xc5\xbb', + '\xc5\xbe' => '\xc5\xbd', + '\xc5\xbf' => 'S', + '\xc6\x83' => '\xc6\x82', + '\xc6\x85' => '\xc6\x84', + '\xc6\x88' => '\xc6\x87', + '\xc6\x8c' => '\xc6\x8b', + '\xc6\x92' => '\xc6\x91', + '\xc6\x95' => '\xc7\xb6', + '\xc6\x99' => '\xc6\x98', + '\xc6\xa1' => '\xc6\xa0', + '\xc6\xa3' => '\xc6\xa2', + '\xc6\xa5' => '\xc6\xa4', + '\xc6\xa8' => '\xc6\xa7', + '\xc6\xad' => '\xc6\xac', + '\xc6\xb0' => '\xc6\xaf', + '\xc6\xb4' => '\xc6\xb3', + '\xc6\xb6' => '\xc6\xb5', + '\xc6\xb9' => '\xc6\xb8', + '\xc6\xbd' => '\xc6\xbc', + '\xc6\xbf' => '\xc7\xb7', + '\xc7\x85' => '\xc7\x84', + '\xc7\x86' => '\xc7\x84', + '\xc7\x88' => '\xc7\x87', + '\xc7\x89' => '\xc7\x87', + '\xc7\x8b' => '\xc7\x8a', + '\xc7\x8c' => '\xc7\x8a', + '\xc7\x8e' => '\xc7\x8d', + '\xc7\x90' => '\xc7\x8f', + '\xc7\x92' => '\xc7\x91', + '\xc7\x94' => '\xc7\x93', + '\xc7\x96' => '\xc7\x95', + '\xc7\x98' => '\xc7\x97', + '\xc7\x9a' => '\xc7\x99', + '\xc7\x9c' => '\xc7\x9b', + '\xc7\x9d' => '\xc6\x8e', + '\xc7\x9f' => '\xc7\x9e', + '\xc7\xa1' => '\xc7\xa0', + '\xc7\xa3' => '\xc7\xa2', + '\xc7\xa5' => '\xc7\xa4', + '\xc7\xa7' => '\xc7\xa6', + '\xc7\xa9' => '\xc7\xa8', + '\xc7\xab' => '\xc7\xaa', + '\xc7\xad' => '\xc7\xac', + '\xc7\xaf' => '\xc7\xae', + '\xc7\xb2' => '\xc7\xb1', + '\xc7\xb3' => '\xc7\xb1', + '\xc7\xb5' => '\xc7\xb4', + '\xc7\xb9' => '\xc7\xb8', + '\xc7\xbb' => '\xc7\xba', + '\xc7\xbd' => '\xc7\xbc', + '\xc7\xbf' => '\xc7\xbe', + '\xc8\x81' => '\xc8\x80', + '\xc8\x83' => '\xc8\x82', + '\xc8\x85' => '\xc8\x84', + '\xc8\x87' => '\xc8\x86', + '\xc8\x89' => '\xc8\x88', + '\xc8\x8b' => '\xc8\x8a', + '\xc8\x8d' => '\xc8\x8c', + '\xc8\x8f' => '\xc8\x8e', + '\xc8\x91' => '\xc8\x90', + '\xc8\x93' => '\xc8\x92', + '\xc8\x95' => '\xc8\x94', + '\xc8\x97' => '\xc8\x96', + '\xc8\x99' => '\xc8\x98', + '\xc8\x9b' => '\xc8\x9a', + '\xc8\x9d' => '\xc8\x9c', + '\xc8\x9f' => '\xc8\x9e', + '\xc8\xa3' => '\xc8\xa2', + '\xc8\xa5' => '\xc8\xa4', + '\xc8\xa7' => '\xc8\xa6', + '\xc8\xa9' => '\xc8\xa8', + '\xc8\xab' => '\xc8\xaa', + '\xc8\xad' => '\xc8\xac', + '\xc8\xaf' => '\xc8\xae', + '\xc8\xb1' => '\xc8\xb0', + '\xc8\xb3' => '\xc8\xb2', + '\xc9\x93' => '\xc6\x81', + '\xc9\x94' => '\xc6\x86', + '\xc9\x96' => '\xc6\x89', + '\xc9\x97' => '\xc6\x8a', + '\xc9\x99' => '\xc6\x8f', + '\xc9\x9b' => '\xc6\x90', + '\xc9\xa0' => '\xc6\x93', + '\xc9\xa3' => '\xc6\x94', + '\xc9\xa8' => '\xc6\x97', + '\xc9\xa9' => '\xc6\x96', + '\xc9\xaf' => '\xc6\x9c', + '\xc9\xb2' => '\xc6\x9d', + '\xc9\xb5' => '\xc6\x9f', + '\xca\x80' => '\xc6\xa6', + '\xca\x83' => '\xc6\xa9', + '\xca\x88' => '\xc6\xae', + '\xca\x8a' => '\xc6\xb1', + '\xca\x8b' => '\xc6\xb2', + '\xca\x92' => '\xc6\xb7', + '\xcd\x85' => '\xce\x99', + '\xce\xac' => '\xce\x86', + '\xce\xad' => '\xce\x88', + '\xce\xae' => '\xce\x89', + '\xce\xaf' => '\xce\x8a', + '\xce\xb1' => '\xce\x91', + '\xce\xb2' => '\xce\x92', + '\xce\xb3' => '\xce\x93', + '\xce\xb4' => '\xce\x94', + '\xce\xb5' => '\xce\x95', + '\xce\xb6' => '\xce\x96', + '\xce\xb7' => '\xce\x97', + '\xce\xb8' => '\xce\x98', + '\xce\xb9' => '\xce\x99', + '\xce\xba' => '\xce\x9a', + '\xce\xbb' => '\xce\x9b', + '\xce\xbc' => '\xce\x9c', + '\xce\xbd' => '\xce\x9d', + '\xce\xbe' => '\xce\x9e', + '\xce\xbf' => '\xce\x9f', + '\xcf\x80' => '\xce\xa0', + '\xcf\x81' => '\xce\xa1', + '\xcf\x82' => '\xce\xa3', + '\xcf\x83' => '\xce\xa3', + '\xcf\x84' => '\xce\xa4', + '\xcf\x85' => '\xce\xa5', + '\xcf\x86' => '\xce\xa6', + '\xcf\x87' => '\xce\xa7', + '\xcf\x88' => '\xce\xa8', + '\xcf\x89' => '\xce\xa9', + '\xcf\x8a' => '\xce\xaa', + '\xcf\x8b' => '\xce\xab', + '\xcf\x8c' => '\xce\x8c', + '\xcf\x8d' => '\xce\x8e', + '\xcf\x8e' => '\xce\x8f', + '\xcf\x90' => '\xce\x92', + '\xcf\x91' => '\xce\x98', + '\xcf\x95' => '\xce\xa6', + '\xcf\x96' => '\xce\xa0', + '\xcf\x9b' => '\xcf\x9a', + '\xcf\x9d' => '\xcf\x9c', + '\xcf\x9f' => '\xcf\x9e', + '\xcf\xa1' => '\xcf\xa0', + '\xcf\xa3' => '\xcf\xa2', + '\xcf\xa5' => '\xcf\xa4', + '\xcf\xa7' => '\xcf\xa6', + '\xcf\xa9' => '\xcf\xa8', + '\xcf\xab' => '\xcf\xaa', + '\xcf\xad' => '\xcf\xac', + '\xcf\xaf' => '\xcf\xae', + '\xcf\xb0' => '\xce\x9a', + '\xcf\xb1' => '\xce\xa1', + '\xcf\xb2' => '\xce\xa3', + '\xcf\xb5' => '\xce\x95', + '\xd0\xb0' => '\xd0\x90', + '\xd0\xb1' => '\xd0\x91', + '\xd0\xb2' => '\xd0\x92', + '\xd0\xb3' => '\xd0\x93', + '\xd0\xb4' => '\xd0\x94', + '\xd0\xb5' => '\xd0\x95', + '\xd0\xb6' => '\xd0\x96', + '\xd0\xb7' => '\xd0\x97', + '\xd0\xb8' => '\xd0\x98', + '\xd0\xb9' => '\xd0\x99', + '\xd0\xba' => '\xd0\x9a', + '\xd0\xbb' => '\xd0\x9b', + '\xd0\xbc' => '\xd0\x9c', + '\xd0\xbd' => '\xd0\x9d', + '\xd0\xbe' => '\xd0\x9e', + '\xd0\xbf' => '\xd0\x9f', + '\xd1\x80' => '\xd0\xa0', + '\xd1\x81' => '\xd0\xa1', + '\xd1\x82' => '\xd0\xa2', + '\xd1\x83' => '\xd0\xa3', + '\xd1\x84' => '\xd0\xa4', + '\xd1\x85' => '\xd0\xa5', + '\xd1\x86' => '\xd0\xa6', + '\xd1\x87' => '\xd0\xa7', + '\xd1\x88' => '\xd0\xa8', + '\xd1\x89' => '\xd0\xa9', + '\xd1\x8a' => '\xd0\xaa', + '\xd1\x8b' => '\xd0\xab', + '\xd1\x8c' => '\xd0\xac', + '\xd1\x8d' => '\xd0\xad', + '\xd1\x8e' => '\xd0\xae', + '\xd1\x8f' => '\xd0\xaf', + '\xd1\x90' => '\xd0\x80', + '\xd1\x91' => '\xd0\x81', + '\xd1\x92' => '\xd0\x82', + '\xd1\x93' => '\xd0\x83', + '\xd1\x94' => '\xd0\x84', + '\xd1\x95' => '\xd0\x85', + '\xd1\x96' => '\xd0\x86', + '\xd1\x97' => '\xd0\x87', + '\xd1\x98' => '\xd0\x88', + '\xd1\x99' => '\xd0\x89', + '\xd1\x9a' => '\xd0\x8a', + '\xd1\x9b' => '\xd0\x8b', + '\xd1\x9c' => '\xd0\x8c', + '\xd1\x9d' => '\xd0\x8d', + '\xd1\x9e' => '\xd0\x8e', + '\xd1\x9f' => '\xd0\x8f', + '\xd1\xa1' => '\xd1\xa0', + '\xd1\xa3' => '\xd1\xa2', + '\xd1\xa5' => '\xd1\xa4', + '\xd1\xa7' => '\xd1\xa6', + '\xd1\xa9' => '\xd1\xa8', + '\xd1\xab' => '\xd1\xaa', + '\xd1\xad' => '\xd1\xac', + '\xd1\xaf' => '\xd1\xae', + '\xd1\xb1' => '\xd1\xb0', + '\xd1\xb3' => '\xd1\xb2', + '\xd1\xb5' => '\xd1\xb4', + '\xd1\xb7' => '\xd1\xb6', + '\xd1\xb9' => '\xd1\xb8', + '\xd1\xbb' => '\xd1\xba', + '\xd1\xbd' => '\xd1\xbc', + '\xd1\xbf' => '\xd1\xbe', + '\xd2\x81' => '\xd2\x80', + '\xd2\x8d' => '\xd2\x8c', + '\xd2\x8f' => '\xd2\x8e', + '\xd2\x91' => '\xd2\x90', + '\xd2\x93' => '\xd2\x92', + '\xd2\x95' => '\xd2\x94', + '\xd2\x97' => '\xd2\x96', + '\xd2\x99' => '\xd2\x98', + '\xd2\x9b' => '\xd2\x9a', + '\xd2\x9d' => '\xd2\x9c', + '\xd2\x9f' => '\xd2\x9e', + '\xd2\xa1' => '\xd2\xa0', + '\xd2\xa3' => '\xd2\xa2', + '\xd2\xa5' => '\xd2\xa4', + '\xd2\xa7' => '\xd2\xa6', + '\xd2\xa9' => '\xd2\xa8', + '\xd2\xab' => '\xd2\xaa', + '\xd2\xad' => '\xd2\xac', + '\xd2\xaf' => '\xd2\xae', + '\xd2\xb1' => '\xd2\xb0', + '\xd2\xb3' => '\xd2\xb2', + '\xd2\xb5' => '\xd2\xb4', + '\xd2\xb7' => '\xd2\xb6', + '\xd2\xb9' => '\xd2\xb8', + '\xd2\xbb' => '\xd2\xba', + '\xd2\xbd' => '\xd2\xbc', + '\xd2\xbf' => '\xd2\xbe', + '\xd3\x82' => '\xd3\x81', + '\xd3\x84' => '\xd3\x83', + '\xd3\x88' => '\xd3\x87', + '\xd3\x8c' => '\xd3\x8b', + '\xd3\x91' => '\xd3\x90', + '\xd3\x93' => '\xd3\x92', + '\xd3\x95' => '\xd3\x94', + '\xd3\x97' => '\xd3\x96', + '\xd3\x99' => '\xd3\x98', + '\xd3\x9b' => '\xd3\x9a', + '\xd3\x9d' => '\xd3\x9c', + '\xd3\x9f' => '\xd3\x9e', + '\xd3\xa1' => '\xd3\xa0', + '\xd3\xa3' => '\xd3\xa2', + '\xd3\xa5' => '\xd3\xa4', + '\xd3\xa7' => '\xd3\xa6', + '\xd3\xa9' => '\xd3\xa8', + '\xd3\xab' => '\xd3\xaa', + '\xd3\xad' => '\xd3\xac', + '\xd3\xaf' => '\xd3\xae', + '\xd3\xb1' => '\xd3\xb0', + '\xd3\xb3' => '\xd3\xb2', + '\xd3\xb5' => '\xd3\xb4', + '\xd3\xb9' => '\xd3\xb8', + '\xd5\xa1' => '\xd4\xb1', + '\xd5\xa2' => '\xd4\xb2', + '\xd5\xa3' => '\xd4\xb3', + '\xd5\xa4' => '\xd4\xb4', + '\xd5\xa5' => '\xd4\xb5', + '\xd5\xa6' => '\xd4\xb6', + '\xd5\xa7' => '\xd4\xb7', + '\xd5\xa8' => '\xd4\xb8', + '\xd5\xa9' => '\xd4\xb9', + '\xd5\xaa' => '\xd4\xba', + '\xd5\xab' => '\xd4\xbb', + '\xd5\xac' => '\xd4\xbc', + '\xd5\xad' => '\xd4\xbd', + '\xd5\xae' => '\xd4\xbe', + '\xd5\xaf' => '\xd4\xbf', + '\xd5\xb0' => '\xd5\x80', + '\xd5\xb1' => '\xd5\x81', + '\xd5\xb2' => '\xd5\x82', + '\xd5\xb3' => '\xd5\x83', + '\xd5\xb4' => '\xd5\x84', + '\xd5\xb5' => '\xd5\x85', + '\xd5\xb6' => '\xd5\x86', + '\xd5\xb7' => '\xd5\x87', + '\xd5\xb8' => '\xd5\x88', + '\xd5\xb9' => '\xd5\x89', + '\xd5\xba' => '\xd5\x8a', + '\xd5\xbb' => '\xd5\x8b', + '\xd5\xbc' => '\xd5\x8c', + '\xd5\xbd' => '\xd5\x8d', + '\xd5\xbe' => '\xd5\x8e', + '\xd5\xbf' => '\xd5\x8f', + '\xd6\x80' => '\xd5\x90', + '\xd6\x81' => '\xd5\x91', + '\xd6\x82' => '\xd5\x92', + '\xd6\x83' => '\xd5\x93', + '\xd6\x84' => '\xd5\x94', + '\xd6\x85' => '\xd5\x95', + '\xd6\x86' => '\xd5\x96', + '\xe1\xb8\x81' => '\xe1\xb8\x80', + '\xe1\xb8\x83' => '\xe1\xb8\x82', + '\xe1\xb8\x85' => '\xe1\xb8\x84', + '\xe1\xb8\x87' => '\xe1\xb8\x86', + '\xe1\xb8\x89' => '\xe1\xb8\x88', + '\xe1\xb8\x8b' => '\xe1\xb8\x8a', + '\xe1\xb8\x8d' => '\xe1\xb8\x8c', + '\xe1\xb8\x8f' => '\xe1\xb8\x8e', + '\xe1\xb8\x91' => '\xe1\xb8\x90', + '\xe1\xb8\x93' => '\xe1\xb8\x92', + '\xe1\xb8\x95' => '\xe1\xb8\x94', + '\xe1\xb8\x97' => '\xe1\xb8\x96', + '\xe1\xb8\x99' => '\xe1\xb8\x98', + '\xe1\xb8\x9b' => '\xe1\xb8\x9a', + '\xe1\xb8\x9d' => '\xe1\xb8\x9c', + '\xe1\xb8\x9f' => '\xe1\xb8\x9e', + '\xe1\xb8\xa1' => '\xe1\xb8\xa0', + '\xe1\xb8\xa3' => '\xe1\xb8\xa2', + '\xe1\xb8\xa5' => '\xe1\xb8\xa4', + '\xe1\xb8\xa7' => '\xe1\xb8\xa6', + '\xe1\xb8\xa9' => '\xe1\xb8\xa8', + '\xe1\xb8\xab' => '\xe1\xb8\xaa', + '\xe1\xb8\xad' => '\xe1\xb8\xac', + '\xe1\xb8\xaf' => '\xe1\xb8\xae', + '\xe1\xb8\xb1' => '\xe1\xb8\xb0', + '\xe1\xb8\xb3' => '\xe1\xb8\xb2', + '\xe1\xb8\xb5' => '\xe1\xb8\xb4', + '\xe1\xb8\xb7' => '\xe1\xb8\xb6', + '\xe1\xb8\xb9' => '\xe1\xb8\xb8', + '\xe1\xb8\xbb' => '\xe1\xb8\xba', + '\xe1\xb8\xbd' => '\xe1\xb8\xbc', + '\xe1\xb8\xbf' => '\xe1\xb8\xbe', + '\xe1\xb9\x81' => '\xe1\xb9\x80', + '\xe1\xb9\x83' => '\xe1\xb9\x82', + '\xe1\xb9\x85' => '\xe1\xb9\x84', + '\xe1\xb9\x87' => '\xe1\xb9\x86', + '\xe1\xb9\x89' => '\xe1\xb9\x88', + '\xe1\xb9\x8b' => '\xe1\xb9\x8a', + '\xe1\xb9\x8d' => '\xe1\xb9\x8c', + '\xe1\xb9\x8f' => '\xe1\xb9\x8e', + '\xe1\xb9\x91' => '\xe1\xb9\x90', + '\xe1\xb9\x93' => '\xe1\xb9\x92', + '\xe1\xb9\x95' => '\xe1\xb9\x94', + '\xe1\xb9\x97' => '\xe1\xb9\x96', + '\xe1\xb9\x99' => '\xe1\xb9\x98', + '\xe1\xb9\x9b' => '\xe1\xb9\x9a', + '\xe1\xb9\x9d' => '\xe1\xb9\x9c', + '\xe1\xb9\x9f' => '\xe1\xb9\x9e', + '\xe1\xb9\xa1' => '\xe1\xb9\xa0', + '\xe1\xb9\xa3' => '\xe1\xb9\xa2', + '\xe1\xb9\xa5' => '\xe1\xb9\xa4', + '\xe1\xb9\xa7' => '\xe1\xb9\xa6', + '\xe1\xb9\xa9' => '\xe1\xb9\xa8', + '\xe1\xb9\xab' => '\xe1\xb9\xaa', + '\xe1\xb9\xad' => '\xe1\xb9\xac', + '\xe1\xb9\xaf' => '\xe1\xb9\xae', + '\xe1\xb9\xb1' => '\xe1\xb9\xb0', + '\xe1\xb9\xb3' => '\xe1\xb9\xb2', + '\xe1\xb9\xb5' => '\xe1\xb9\xb4', + '\xe1\xb9\xb7' => '\xe1\xb9\xb6', + '\xe1\xb9\xb9' => '\xe1\xb9\xb8', + '\xe1\xb9\xbb' => '\xe1\xb9\xba', + '\xe1\xb9\xbd' => '\xe1\xb9\xbc', + '\xe1\xb9\xbf' => '\xe1\xb9\xbe', + '\xe1\xba\x81' => '\xe1\xba\x80', + '\xe1\xba\x83' => '\xe1\xba\x82', + '\xe1\xba\x85' => '\xe1\xba\x84', + '\xe1\xba\x87' => '\xe1\xba\x86', + '\xe1\xba\x89' => '\xe1\xba\x88', + '\xe1\xba\x8b' => '\xe1\xba\x8a', + '\xe1\xba\x8d' => '\xe1\xba\x8c', + '\xe1\xba\x8f' => '\xe1\xba\x8e', + '\xe1\xba\x91' => '\xe1\xba\x90', + '\xe1\xba\x93' => '\xe1\xba\x92', + '\xe1\xba\x95' => '\xe1\xba\x94', + '\xe1\xba\x9b' => '\xe1\xb9\xa0', + '\xe1\xba\xa1' => '\xe1\xba\xa0', + '\xe1\xba\xa3' => '\xe1\xba\xa2', + '\xe1\xba\xa5' => '\xe1\xba\xa4', + '\xe1\xba\xa7' => '\xe1\xba\xa6', + '\xe1\xba\xa9' => '\xe1\xba\xa8', + '\xe1\xba\xab' => '\xe1\xba\xaa', + '\xe1\xba\xad' => '\xe1\xba\xac', + '\xe1\xba\xaf' => '\xe1\xba\xae', + '\xe1\xba\xb1' => '\xe1\xba\xb0', + '\xe1\xba\xb3' => '\xe1\xba\xb2', + '\xe1\xba\xb5' => '\xe1\xba\xb4', + '\xe1\xba\xb7' => '\xe1\xba\xb6', + '\xe1\xba\xb9' => '\xe1\xba\xb8', + '\xe1\xba\xbb' => '\xe1\xba\xba', + '\xe1\xba\xbd' => '\xe1\xba\xbc', + '\xe1\xba\xbf' => '\xe1\xba\xbe', + '\xe1\xbb\x81' => '\xe1\xbb\x80', + '\xe1\xbb\x83' => '\xe1\xbb\x82', + '\xe1\xbb\x85' => '\xe1\xbb\x84', + '\xe1\xbb\x87' => '\xe1\xbb\x86', + '\xe1\xbb\x89' => '\xe1\xbb\x88', + '\xe1\xbb\x8b' => '\xe1\xbb\x8a', + '\xe1\xbb\x8d' => '\xe1\xbb\x8c', + '\xe1\xbb\x8f' => '\xe1\xbb\x8e', + '\xe1\xbb\x91' => '\xe1\xbb\x90', + '\xe1\xbb\x93' => '\xe1\xbb\x92', + '\xe1\xbb\x95' => '\xe1\xbb\x94', + '\xe1\xbb\x97' => '\xe1\xbb\x96', + '\xe1\xbb\x99' => '\xe1\xbb\x98', + '\xe1\xbb\x9b' => '\xe1\xbb\x9a', + '\xe1\xbb\x9d' => '\xe1\xbb\x9c', + '\xe1\xbb\x9f' => '\xe1\xbb\x9e', + '\xe1\xbb\xa1' => '\xe1\xbb\xa0', + '\xe1\xbb\xa3' => '\xe1\xbb\xa2', + '\xe1\xbb\xa5' => '\xe1\xbb\xa4', + '\xe1\xbb\xa7' => '\xe1\xbb\xa6', + '\xe1\xbb\xa9' => '\xe1\xbb\xa8', + '\xe1\xbb\xab' => '\xe1\xbb\xaa', + '\xe1\xbb\xad' => '\xe1\xbb\xac', + '\xe1\xbb\xaf' => '\xe1\xbb\xae', + '\xe1\xbb\xb1' => '\xe1\xbb\xb0', + '\xe1\xbb\xb3' => '\xe1\xbb\xb2', + '\xe1\xbb\xb5' => '\xe1\xbb\xb4', + '\xe1\xbb\xb7' => '\xe1\xbb\xb6', + '\xe1\xbb\xb9' => '\xe1\xbb\xb8', + '\xe1\xbc\x80' => '\xe1\xbc\x88', + '\xe1\xbc\x81' => '\xe1\xbc\x89', + '\xe1\xbc\x82' => '\xe1\xbc\x8a', + '\xe1\xbc\x83' => '\xe1\xbc\x8b', + '\xe1\xbc\x84' => '\xe1\xbc\x8c', + '\xe1\xbc\x85' => '\xe1\xbc\x8d', + '\xe1\xbc\x86' => '\xe1\xbc\x8e', + '\xe1\xbc\x87' => '\xe1\xbc\x8f', + '\xe1\xbc\x90' => '\xe1\xbc\x98', + '\xe1\xbc\x91' => '\xe1\xbc\x99', + '\xe1\xbc\x92' => '\xe1\xbc\x9a', + '\xe1\xbc\x93' => '\xe1\xbc\x9b', + '\xe1\xbc\x94' => '\xe1\xbc\x9c', + '\xe1\xbc\x95' => '\xe1\xbc\x9d', + '\xe1\xbc\xa0' => '\xe1\xbc\xa8', + '\xe1\xbc\xa1' => '\xe1\xbc\xa9', + '\xe1\xbc\xa2' => '\xe1\xbc\xaa', + '\xe1\xbc\xa3' => '\xe1\xbc\xab', + '\xe1\xbc\xa4' => '\xe1\xbc\xac', + '\xe1\xbc\xa5' => '\xe1\xbc\xad', + '\xe1\xbc\xa6' => '\xe1\xbc\xae', + '\xe1\xbc\xa7' => '\xe1\xbc\xaf', + '\xe1\xbc\xb0' => '\xe1\xbc\xb8', + '\xe1\xbc\xb1' => '\xe1\xbc\xb9', + '\xe1\xbc\xb2' => '\xe1\xbc\xba', + '\xe1\xbc\xb3' => '\xe1\xbc\xbb', + '\xe1\xbc\xb4' => '\xe1\xbc\xbc', + '\xe1\xbc\xb5' => '\xe1\xbc\xbd', + '\xe1\xbc\xb6' => '\xe1\xbc\xbe', + '\xe1\xbc\xb7' => '\xe1\xbc\xbf', + '\xe1\xbd\x80' => '\xe1\xbd\x88', + '\xe1\xbd\x81' => '\xe1\xbd\x89', + '\xe1\xbd\x82' => '\xe1\xbd\x8a', + '\xe1\xbd\x83' => '\xe1\xbd\x8b', + '\xe1\xbd\x84' => '\xe1\xbd\x8c', + '\xe1\xbd\x85' => '\xe1\xbd\x8d', + '\xe1\xbd\x91' => '\xe1\xbd\x99', + '\xe1\xbd\x93' => '\xe1\xbd\x9b', + '\xe1\xbd\x95' => '\xe1\xbd\x9d', + '\xe1\xbd\x97' => '\xe1\xbd\x9f', + '\xe1\xbd\xa0' => '\xe1\xbd\xa8', + '\xe1\xbd\xa1' => '\xe1\xbd\xa9', + '\xe1\xbd\xa2' => '\xe1\xbd\xaa', + '\xe1\xbd\xa3' => '\xe1\xbd\xab', + '\xe1\xbd\xa4' => '\xe1\xbd\xac', + '\xe1\xbd\xa5' => '\xe1\xbd\xad', + '\xe1\xbd\xa6' => '\xe1\xbd\xae', + '\xe1\xbd\xa7' => '\xe1\xbd\xaf', + '\xe1\xbd\xb0' => '\xe1\xbe\xba', + '\xe1\xbd\xb1' => '\xe1\xbe\xbb', + '\xe1\xbd\xb2' => '\xe1\xbf\x88', + '\xe1\xbd\xb3' => '\xe1\xbf\x89', + '\xe1\xbd\xb4' => '\xe1\xbf\x8a', + '\xe1\xbd\xb5' => '\xe1\xbf\x8b', + '\xe1\xbd\xb6' => '\xe1\xbf\x9a', + '\xe1\xbd\xb7' => '\xe1\xbf\x9b', + '\xe1\xbd\xb8' => '\xe1\xbf\xb8', + '\xe1\xbd\xb9' => '\xe1\xbf\xb9', + '\xe1\xbd\xba' => '\xe1\xbf\xaa', + '\xe1\xbd\xbb' => '\xe1\xbf\xab', + '\xe1\xbd\xbc' => '\xe1\xbf\xba', + '\xe1\xbd\xbd' => '\xe1\xbf\xbb', + '\xe1\xbe\x80' => '\xe1\xbe\x88', + '\xe1\xbe\x81' => '\xe1\xbe\x89', + '\xe1\xbe\x82' => '\xe1\xbe\x8a', + '\xe1\xbe\x83' => '\xe1\xbe\x8b', + '\xe1\xbe\x84' => '\xe1\xbe\x8c', + '\xe1\xbe\x85' => '\xe1\xbe\x8d', + '\xe1\xbe\x86' => '\xe1\xbe\x8e', + '\xe1\xbe\x87' => '\xe1\xbe\x8f', + '\xe1\xbe\x90' => '\xe1\xbe\x98', + '\xe1\xbe\x91' => '\xe1\xbe\x99', + '\xe1\xbe\x92' => '\xe1\xbe\x9a', + '\xe1\xbe\x93' => '\xe1\xbe\x9b', + '\xe1\xbe\x94' => '\xe1\xbe\x9c', + '\xe1\xbe\x95' => '\xe1\xbe\x9d', + '\xe1\xbe\x96' => '\xe1\xbe\x9e', + '\xe1\xbe\x97' => '\xe1\xbe\x9f', + '\xe1\xbe\xa0' => '\xe1\xbe\xa8', + '\xe1\xbe\xa1' => '\xe1\xbe\xa9', + '\xe1\xbe\xa2' => '\xe1\xbe\xaa', + '\xe1\xbe\xa3' => '\xe1\xbe\xab', + '\xe1\xbe\xa4' => '\xe1\xbe\xac', + '\xe1\xbe\xa5' => '\xe1\xbe\xad', + '\xe1\xbe\xa6' => '\xe1\xbe\xae', + '\xe1\xbe\xa7' => '\xe1\xbe\xaf', + '\xe1\xbe\xb0' => '\xe1\xbe\xb8', + '\xe1\xbe\xb1' => '\xe1\xbe\xb9', + '\xe1\xbe\xb3' => '\xe1\xbe\xbc', + '\xe1\xbe\xbe' => '\xce\x99', + '\xe1\xbf\x83' => '\xe1\xbf\x8c', + '\xe1\xbf\x90' => '\xe1\xbf\x98', + '\xe1\xbf\x91' => '\xe1\xbf\x99', + '\xe1\xbf\xa0' => '\xe1\xbf\xa8', + '\xe1\xbf\xa1' => '\xe1\xbf\xa9', + '\xe1\xbf\xa5' => '\xe1\xbf\xac', + '\xe1\xbf\xb3' => '\xe1\xbf\xbc', + '\xe2\x85\xb0' => '\xe2\x85\xa0', + '\xe2\x85\xb1' => '\xe2\x85\xa1', + '\xe2\x85\xb2' => '\xe2\x85\xa2', + '\xe2\x85\xb3' => '\xe2\x85\xa3', + '\xe2\x85\xb4' => '\xe2\x85\xa4', + '\xe2\x85\xb5' => '\xe2\x85\xa5', + '\xe2\x85\xb6' => '\xe2\x85\xa6', + '\xe2\x85\xb7' => '\xe2\x85\xa7', + '\xe2\x85\xb8' => '\xe2\x85\xa8', + '\xe2\x85\xb9' => '\xe2\x85\xa9', + '\xe2\x85\xba' => '\xe2\x85\xaa', + '\xe2\x85\xbb' => '\xe2\x85\xab', + '\xe2\x85\xbc' => '\xe2\x85\xac', + '\xe2\x85\xbd' => '\xe2\x85\xad', + '\xe2\x85\xbe' => '\xe2\x85\xae', + '\xe2\x85\xbf' => '\xe2\x85\xaf', + '\xe2\x93\x90' => '\xe2\x92\xb6', + '\xe2\x93\x91' => '\xe2\x92\xb7', + '\xe2\x93\x92' => '\xe2\x92\xb8', + '\xe2\x93\x93' => '\xe2\x92\xb9', + '\xe2\x93\x94' => '\xe2\x92\xba', + '\xe2\x93\x95' => '\xe2\x92\xbb', + '\xe2\x93\x96' => '\xe2\x92\xbc', + '\xe2\x93\x97' => '\xe2\x92\xbd', + '\xe2\x93\x98' => '\xe2\x92\xbe', + '\xe2\x93\x99' => '\xe2\x92\xbf', + '\xe2\x93\x9a' => '\xe2\x93\x80', + '\xe2\x93\x9b' => '\xe2\x93\x81', + '\xe2\x93\x9c' => '\xe2\x93\x82', + '\xe2\x93\x9d' => '\xe2\x93\x83', + '\xe2\x93\x9e' => '\xe2\x93\x84', + '\xe2\x93\x9f' => '\xe2\x93\x85', + '\xe2\x93\xa0' => '\xe2\x93\x86', + '\xe2\x93\xa1' => '\xe2\x93\x87', + '\xe2\x93\xa2' => '\xe2\x93\x88', + '\xe2\x93\xa3' => '\xe2\x93\x89', + '\xe2\x93\xa4' => '\xe2\x93\x8a', + '\xe2\x93\xa5' => '\xe2\x93\x8b', + '\xe2\x93\xa6' => '\xe2\x93\x8c', + '\xe2\x93\xa7' => '\xe2\x93\x8d', + '\xe2\x93\xa8' => '\xe2\x93\x8e', + '\xe2\x93\xa9' => '\xe2\x93\x8f', + '\xef\xbd\x81' => '\xef\xbc\xa1', + '\xef\xbd\x82' => '\xef\xbc\xa2', + '\xef\xbd\x83' => '\xef\xbc\xa3', + '\xef\xbd\x84' => '\xef\xbc\xa4', + '\xef\xbd\x85' => '\xef\xbc\xa5', + '\xef\xbd\x86' => '\xef\xbc\xa6', + '\xef\xbd\x87' => '\xef\xbc\xa7', + '\xef\xbd\x88' => '\xef\xbc\xa8', + '\xef\xbd\x89' => '\xef\xbc\xa9', + '\xef\xbd\x8a' => '\xef\xbc\xaa', + '\xef\xbd\x8b' => '\xef\xbc\xab', + '\xef\xbd\x8c' => '\xef\xbc\xac', + '\xef\xbd\x8d' => '\xef\xbc\xad', + '\xef\xbd\x8e' => '\xef\xbc\xae', + '\xef\xbd\x8f' => '\xef\xbc\xaf', + '\xef\xbd\x90' => '\xef\xbc\xb0', + '\xef\xbd\x91' => '\xef\xbc\xb1', + '\xef\xbd\x92' => '\xef\xbc\xb2', + '\xef\xbd\x93' => '\xef\xbc\xb3', + '\xef\xbd\x94' => '\xef\xbc\xb4', + '\xef\xbd\x95' => '\xef\xbc\xb5', + '\xef\xbd\x96' => '\xef\xbc\xb6', + '\xef\xbd\x97' => '\xef\xbc\xb7', + '\xef\xbd\x98' => '\xef\xbc\xb8', + '\xef\xbd\x99' => '\xef\xbc\xb9', + '\xef\xbd\x9a' => '\xef\xbc\xba', + '\xf0\x90\x90\xa8' => '\xf0\x90\x90\x80', + '\xf0\x90\x90\xa9' => '\xf0\x90\x90\x81', + '\xf0\x90\x90\xaa' => '\xf0\x90\x90\x82', + '\xf0\x90\x90\xab' => '\xf0\x90\x90\x83', + '\xf0\x90\x90\xac' => '\xf0\x90\x90\x84', + '\xf0\x90\x90\xad' => '\xf0\x90\x90\x85', + '\xf0\x90\x90\xae' => '\xf0\x90\x90\x86', + '\xf0\x90\x90\xaf' => '\xf0\x90\x90\x87', + '\xf0\x90\x90\xb0' => '\xf0\x90\x90\x88', + '\xf0\x90\x90\xb1' => '\xf0\x90\x90\x89', + '\xf0\x90\x90\xb2' => '\xf0\x90\x90\x8a', + '\xf0\x90\x90\xb3' => '\xf0\x90\x90\x8b', + '\xf0\x90\x90\xb4' => '\xf0\x90\x90\x8c', + '\xf0\x90\x90\xb5' => '\xf0\x90\x90\x8d', + '\xf0\x90\x90\xb6' => '\xf0\x90\x90\x8e', + '\xf0\x90\x90\xb7' => '\xf0\x90\x90\x8f', + '\xf0\x90\x90\xb8' => '\xf0\x90\x90\x90', + '\xf0\x90\x90\xb9' => '\xf0\x90\x90\x91', + '\xf0\x90\x90\xba' => '\xf0\x90\x90\x92', + '\xf0\x90\x90\xbb' => '\xf0\x90\x90\x93', + '\xf0\x90\x90\xbc' => '\xf0\x90\x90\x94', + '\xf0\x90\x90\xbd' => '\xf0\x90\x90\x95', + '\xf0\x90\x90\xbe' => '\xf0\x90\x90\x96', + '\xf0\x90\x90\xbf' => '\xf0\x90\x90\x97', + '\xf0\x90\x91\x80' => '\xf0\x90\x90\x98', + '\xf0\x90\x91\x81' => '\xf0\x90\x90\x99', + '\xf0\x90\x91\x82' => '\xf0\x90\x90\x9a', + '\xf0\x90\x91\x83' => '\xf0\x90\x90\x9b', + '\xf0\x90\x91\x84' => '\xf0\x90\x90\x9c', + '\xf0\x90\x91\x85' => '\xf0\x90\x90\x9d', + '\xf0\x90\x91\x86' => '\xf0\x90\x90\x9e', + '\xf0\x90\x91\x87' => '\xf0\x90\x90\x9f', + '\xf0\x90\x91\x88' => '\xf0\x90\x90\xa0', + '\xf0\x90\x91\x89' => '\xf0\x90\x90\xa1', + '\xf0\x90\x91\x8a' => '\xf0\x90\x90\xa2', + '\xf0\x90\x91\x8b' => '\xf0\x90\x90\xa3', + '\xf0\x90\x91\x8c' => '\xf0\x90\x90\xa4', + '\xf0\x90\x91\x8d' => '\xf0\x90\x90\xa5' ); $wikiLowerChars = array ( - "A" => "a", - "B" => "b", - "C" => "c", - "D" => "d", - "E" => "e", - "F" => "f", - "G" => "g", - "H" => "h", - "I" => "i", - "J" => "j", - "K" => "k", - "L" => "l", - "M" => "m", - "N" => "n", - "O" => "o", - "P" => "p", - "Q" => "q", - "R" => "r", - "S" => "s", - "T" => "t", - "U" => "u", - "V" => "v", - "W" => "w", - "X" => "x", - "Y" => "y", - "Z" => "z", - "\xc3\x80" => "\xc3\xa0", - "\xc3\x81" => "\xc3\xa1", - "\xc3\x82" => "\xc3\xa2", - "\xc3\x83" => "\xc3\xa3", - "\xc3\x84" => "\xc3\xa4", - "\xc3\x85" => "\xc3\xa5", - "\xc3\x86" => "\xc3\xa6", - "\xc3\x87" => "\xc3\xa7", - "\xc3\x88" => "\xc3\xa8", - "\xc3\x89" => "\xc3\xa9", - "\xc3\x8a" => "\xc3\xaa", - "\xc3\x8b" => "\xc3\xab", - "\xc3\x8c" => "\xc3\xac", - "\xc3\x8d" => "\xc3\xad", - "\xc3\x8e" => "\xc3\xae", - "\xc3\x8f" => "\xc3\xaf", - "\xc3\x90" => "\xc3\xb0", - "\xc3\x91" => "\xc3\xb1", - "\xc3\x92" => "\xc3\xb2", - "\xc3\x93" => "\xc3\xb3", - "\xc3\x94" => "\xc3\xb4", - "\xc3\x95" => "\xc3\xb5", - "\xc3\x96" => "\xc3\xb6", - "\xc3\x98" => "\xc3\xb8", - "\xc3\x99" => "\xc3\xb9", - "\xc3\x9a" => "\xc3\xba", - "\xc3\x9b" => "\xc3\xbb", - "\xc3\x9c" => "\xc3\xbc", - "\xc3\x9d" => "\xc3\xbd", - "\xc3\x9e" => "\xc3\xbe", - "\xc4\x80" => "\xc4\x81", - "\xc4\x82" => "\xc4\x83", - "\xc4\x84" => "\xc4\x85", - "\xc4\x86" => "\xc4\x87", - "\xc4\x88" => "\xc4\x89", - "\xc4\x8a" => "\xc4\x8b", - "\xc4\x8c" => "\xc4\x8d", - "\xc4\x8e" => "\xc4\x8f", - "\xc4\x90" => "\xc4\x91", - "\xc4\x92" => "\xc4\x93", - "\xc4\x94" => "\xc4\x95", - "\xc4\x96" => "\xc4\x97", - "\xc4\x98" => "\xc4\x99", - "\xc4\x9a" => "\xc4\x9b", - "\xc4\x9c" => "\xc4\x9d", - "\xc4\x9e" => "\xc4\x9f", - "\xc4\xa0" => "\xc4\xa1", - "\xc4\xa2" => "\xc4\xa3", - "\xc4\xa4" => "\xc4\xa5", - "\xc4\xa6" => "\xc4\xa7", - "\xc4\xa8" => "\xc4\xa9", - "\xc4\xaa" => "\xc4\xab", - "\xc4\xac" => "\xc4\xad", - "\xc4\xae" => "\xc4\xaf", - "\xc4\xb0" => "i", - "\xc4\xb2" => "\xc4\xb3", - "\xc4\xb4" => "\xc4\xb5", - "\xc4\xb6" => "\xc4\xb7", - "\xc4\xb9" => "\xc4\xba", - "\xc4\xbb" => "\xc4\xbc", - "\xc4\xbd" => "\xc4\xbe", - "\xc4\xbf" => "\xc5\x80", - "\xc5\x81" => "\xc5\x82", - "\xc5\x83" => "\xc5\x84", - "\xc5\x85" => "\xc5\x86", - "\xc5\x87" => "\xc5\x88", - "\xc5\x8a" => "\xc5\x8b", - "\xc5\x8c" => "\xc5\x8d", - "\xc5\x8e" => "\xc5\x8f", - "\xc5\x90" => "\xc5\x91", - "\xc5\x92" => "\xc5\x93", - "\xc5\x94" => "\xc5\x95", - "\xc5\x96" => "\xc5\x97", - "\xc5\x98" => "\xc5\x99", - "\xc5\x9a" => "\xc5\x9b", - "\xc5\x9c" => "\xc5\x9d", - "\xc5\x9e" => "\xc5\x9f", - "\xc5\xa0" => "\xc5\xa1", - "\xc5\xa2" => "\xc5\xa3", - "\xc5\xa4" => "\xc5\xa5", - "\xc5\xa6" => "\xc5\xa7", - "\xc5\xa8" => "\xc5\xa9", - "\xc5\xaa" => "\xc5\xab", - "\xc5\xac" => "\xc5\xad", - "\xc5\xae" => "\xc5\xaf", - "\xc5\xb0" => "\xc5\xb1", - "\xc5\xb2" => "\xc5\xb3", - "\xc5\xb4" => "\xc5\xb5", - "\xc5\xb6" => "\xc5\xb7", - "\xc5\xb8" => "\xc3\xbf", - "\xc5\xb9" => "\xc5\xba", - "\xc5\xbb" => "\xc5\xbc", - "\xc5\xbd" => "\xc5\xbe", - "\xc6\x81" => "\xc9\x93", - "\xc6\x82" => "\xc6\x83", - "\xc6\x84" => "\xc6\x85", - "\xc6\x86" => "\xc9\x94", - "\xc6\x87" => "\xc6\x88", - "\xc6\x89" => "\xc9\x96", - "\xc6\x8a" => "\xc9\x97", - "\xc6\x8b" => "\xc6\x8c", - "\xc6\x8e" => "\xc7\x9d", - "\xc6\x8f" => "\xc9\x99", - "\xc6\x90" => "\xc9\x9b", - "\xc6\x91" => "\xc6\x92", - "\xc6\x93" => "\xc9\xa0", - "\xc6\x94" => "\xc9\xa3", - "\xc6\x96" => "\xc9\xa9", - "\xc6\x97" => "\xc9\xa8", - "\xc6\x98" => "\xc6\x99", - "\xc6\x9c" => "\xc9\xaf", - "\xc6\x9d" => "\xc9\xb2", - "\xc6\x9f" => "\xc9\xb5", - "\xc6\xa0" => "\xc6\xa1", - "\xc6\xa2" => "\xc6\xa3", - "\xc6\xa4" => "\xc6\xa5", - "\xc6\xa6" => "\xca\x80", - "\xc6\xa7" => "\xc6\xa8", - "\xc6\xa9" => "\xca\x83", - "\xc6\xac" => "\xc6\xad", - "\xc6\xae" => "\xca\x88", - "\xc6\xaf" => "\xc6\xb0", - "\xc6\xb1" => "\xca\x8a", - "\xc6\xb2" => "\xca\x8b", - "\xc6\xb3" => "\xc6\xb4", - "\xc6\xb5" => "\xc6\xb6", - "\xc6\xb7" => "\xca\x92", - "\xc6\xb8" => "\xc6\xb9", - "\xc6\xbc" => "\xc6\xbd", - "\xc7\x84" => "\xc7\x86", - "\xc7\x85" => "\xc7\x86", - "\xc7\x87" => "\xc7\x89", - "\xc7\x88" => "\xc7\x89", - "\xc7\x8a" => "\xc7\x8c", - "\xc7\x8b" => "\xc7\x8c", - "\xc7\x8d" => "\xc7\x8e", - "\xc7\x8f" => "\xc7\x90", - "\xc7\x91" => "\xc7\x92", - "\xc7\x93" => "\xc7\x94", - "\xc7\x95" => "\xc7\x96", - "\xc7\x97" => "\xc7\x98", - "\xc7\x99" => "\xc7\x9a", - "\xc7\x9b" => "\xc7\x9c", - "\xc7\x9e" => "\xc7\x9f", - "\xc7\xa0" => "\xc7\xa1", - "\xc7\xa2" => "\xc7\xa3", - "\xc7\xa4" => "\xc7\xa5", - "\xc7\xa6" => "\xc7\xa7", - "\xc7\xa8" => "\xc7\xa9", - "\xc7\xaa" => "\xc7\xab", - "\xc7\xac" => "\xc7\xad", - "\xc7\xae" => "\xc7\xaf", - "\xc7\xb1" => "\xc7\xb3", - "\xc7\xb2" => "\xc7\xb3", - "\xc7\xb4" => "\xc7\xb5", - "\xc7\xb6" => "\xc6\x95", - "\xc7\xb7" => "\xc6\xbf", - "\xc7\xb8" => "\xc7\xb9", - "\xc7\xba" => "\xc7\xbb", - "\xc7\xbc" => "\xc7\xbd", - "\xc7\xbe" => "\xc7\xbf", - "\xc8\x80" => "\xc8\x81", - "\xc8\x82" => "\xc8\x83", - "\xc8\x84" => "\xc8\x85", - "\xc8\x86" => "\xc8\x87", - "\xc8\x88" => "\xc8\x89", - "\xc8\x8a" => "\xc8\x8b", - "\xc8\x8c" => "\xc8\x8d", - "\xc8\x8e" => "\xc8\x8f", - "\xc8\x90" => "\xc8\x91", - "\xc8\x92" => "\xc8\x93", - "\xc8\x94" => "\xc8\x95", - "\xc8\x96" => "\xc8\x97", - "\xc8\x98" => "\xc8\x99", - "\xc8\x9a" => "\xc8\x9b", - "\xc8\x9c" => "\xc8\x9d", - "\xc8\x9e" => "\xc8\x9f", - "\xc8\xa2" => "\xc8\xa3", - "\xc8\xa4" => "\xc8\xa5", - "\xc8\xa6" => "\xc8\xa7", - "\xc8\xa8" => "\xc8\xa9", - "\xc8\xaa" => "\xc8\xab", - "\xc8\xac" => "\xc8\xad", - "\xc8\xae" => "\xc8\xaf", - "\xc8\xb0" => "\xc8\xb1", - "\xc8\xb2" => "\xc8\xb3", - "\xce\x86" => "\xce\xac", - "\xce\x88" => "\xce\xad", - "\xce\x89" => "\xce\xae", - "\xce\x8a" => "\xce\xaf", - "\xce\x8c" => "\xcf\x8c", - "\xce\x8e" => "\xcf\x8d", - "\xce\x8f" => "\xcf\x8e", - "\xce\x91" => "\xce\xb1", - "\xce\x92" => "\xce\xb2", - "\xce\x93" => "\xce\xb3", - "\xce\x94" => "\xce\xb4", - "\xce\x95" => "\xce\xb5", - "\xce\x96" => "\xce\xb6", - "\xce\x97" => "\xce\xb7", - "\xce\x98" => "\xce\xb8", - "\xce\x99" => "\xce\xb9", - "\xce\x9a" => "\xce\xba", - "\xce\x9b" => "\xce\xbb", - "\xce\x9c" => "\xce\xbc", - "\xce\x9d" => "\xce\xbd", - "\xce\x9e" => "\xce\xbe", - "\xce\x9f" => "\xce\xbf", - "\xce\xa0" => "\xcf\x80", - "\xce\xa1" => "\xcf\x81", - "\xce\xa3" => "\xcf\x83", - "\xce\xa4" => "\xcf\x84", - "\xce\xa5" => "\xcf\x85", - "\xce\xa6" => "\xcf\x86", - "\xce\xa7" => "\xcf\x87", - "\xce\xa8" => "\xcf\x88", - "\xce\xa9" => "\xcf\x89", - "\xce\xaa" => "\xcf\x8a", - "\xce\xab" => "\xcf\x8b", - "\xcf\x9a" => "\xcf\x9b", - "\xcf\x9c" => "\xcf\x9d", - "\xcf\x9e" => "\xcf\x9f", - "\xcf\xa0" => "\xcf\xa1", - "\xcf\xa2" => "\xcf\xa3", - "\xcf\xa4" => "\xcf\xa5", - "\xcf\xa6" => "\xcf\xa7", - "\xcf\xa8" => "\xcf\xa9", - "\xcf\xaa" => "\xcf\xab", - "\xcf\xac" => "\xcf\xad", - "\xcf\xae" => "\xcf\xaf", - "\xcf\xb4" => "\xce\xb8", - "\xd0\x80" => "\xd1\x90", - "\xd0\x81" => "\xd1\x91", - "\xd0\x82" => "\xd1\x92", - "\xd0\x83" => "\xd1\x93", - "\xd0\x84" => "\xd1\x94", - "\xd0\x85" => "\xd1\x95", - "\xd0\x86" => "\xd1\x96", - "\xd0\x87" => "\xd1\x97", - "\xd0\x88" => "\xd1\x98", - "\xd0\x89" => "\xd1\x99", - "\xd0\x8a" => "\xd1\x9a", - "\xd0\x8b" => "\xd1\x9b", - "\xd0\x8c" => "\xd1\x9c", - "\xd0\x8d" => "\xd1\x9d", - "\xd0\x8e" => "\xd1\x9e", - "\xd0\x8f" => "\xd1\x9f", - "\xd0\x90" => "\xd0\xb0", - "\xd0\x91" => "\xd0\xb1", - "\xd0\x92" => "\xd0\xb2", - "\xd0\x93" => "\xd0\xb3", - "\xd0\x94" => "\xd0\xb4", - "\xd0\x95" => "\xd0\xb5", - "\xd0\x96" => "\xd0\xb6", - "\xd0\x97" => "\xd0\xb7", - "\xd0\x98" => "\xd0\xb8", - "\xd0\x99" => "\xd0\xb9", - "\xd0\x9a" => "\xd0\xba", - "\xd0\x9b" => "\xd0\xbb", - "\xd0\x9c" => "\xd0\xbc", - "\xd0\x9d" => "\xd0\xbd", - "\xd0\x9e" => "\xd0\xbe", - "\xd0\x9f" => "\xd0\xbf", - "\xd0\xa0" => "\xd1\x80", - "\xd0\xa1" => "\xd1\x81", - "\xd0\xa2" => "\xd1\x82", - "\xd0\xa3" => "\xd1\x83", - "\xd0\xa4" => "\xd1\x84", - "\xd0\xa5" => "\xd1\x85", - "\xd0\xa6" => "\xd1\x86", - "\xd0\xa7" => "\xd1\x87", - "\xd0\xa8" => "\xd1\x88", - "\xd0\xa9" => "\xd1\x89", - "\xd0\xaa" => "\xd1\x8a", - "\xd0\xab" => "\xd1\x8b", - "\xd0\xac" => "\xd1\x8c", - "\xd0\xad" => "\xd1\x8d", - "\xd0\xae" => "\xd1\x8e", - "\xd0\xaf" => "\xd1\x8f", - "\xd1\xa0" => "\xd1\xa1", - "\xd1\xa2" => "\xd1\xa3", - "\xd1\xa4" => "\xd1\xa5", - "\xd1\xa6" => "\xd1\xa7", - "\xd1\xa8" => "\xd1\xa9", - "\xd1\xaa" => "\xd1\xab", - "\xd1\xac" => "\xd1\xad", - "\xd1\xae" => "\xd1\xaf", - "\xd1\xb0" => "\xd1\xb1", - "\xd1\xb2" => "\xd1\xb3", - "\xd1\xb4" => "\xd1\xb5", - "\xd1\xb6" => "\xd1\xb7", - "\xd1\xb8" => "\xd1\xb9", - "\xd1\xba" => "\xd1\xbb", - "\xd1\xbc" => "\xd1\xbd", - "\xd1\xbe" => "\xd1\xbf", - "\xd2\x80" => "\xd2\x81", - "\xd2\x8c" => "\xd2\x8d", - "\xd2\x8e" => "\xd2\x8f", - "\xd2\x90" => "\xd2\x91", - "\xd2\x92" => "\xd2\x93", - "\xd2\x94" => "\xd2\x95", - "\xd2\x96" => "\xd2\x97", - "\xd2\x98" => "\xd2\x99", - "\xd2\x9a" => "\xd2\x9b", - "\xd2\x9c" => "\xd2\x9d", - "\xd2\x9e" => "\xd2\x9f", - "\xd2\xa0" => "\xd2\xa1", - "\xd2\xa2" => "\xd2\xa3", - "\xd2\xa4" => "\xd2\xa5", - "\xd2\xa6" => "\xd2\xa7", - "\xd2\xa8" => "\xd2\xa9", - "\xd2\xaa" => "\xd2\xab", - "\xd2\xac" => "\xd2\xad", - "\xd2\xae" => "\xd2\xaf", - "\xd2\xb0" => "\xd2\xb1", - "\xd2\xb2" => "\xd2\xb3", - "\xd2\xb4" => "\xd2\xb5", - "\xd2\xb6" => "\xd2\xb7", - "\xd2\xb8" => "\xd2\xb9", - "\xd2\xba" => "\xd2\xbb", - "\xd2\xbc" => "\xd2\xbd", - "\xd2\xbe" => "\xd2\xbf", - "\xd3\x81" => "\xd3\x82", - "\xd3\x83" => "\xd3\x84", - "\xd3\x87" => "\xd3\x88", - "\xd3\x8b" => "\xd3\x8c", - "\xd3\x90" => "\xd3\x91", - "\xd3\x92" => "\xd3\x93", - "\xd3\x94" => "\xd3\x95", - "\xd3\x96" => "\xd3\x97", - "\xd3\x98" => "\xd3\x99", - "\xd3\x9a" => "\xd3\x9b", - "\xd3\x9c" => "\xd3\x9d", - "\xd3\x9e" => "\xd3\x9f", - "\xd3\xa0" => "\xd3\xa1", - "\xd3\xa2" => "\xd3\xa3", - "\xd3\xa4" => "\xd3\xa5", - "\xd3\xa6" => "\xd3\xa7", - "\xd3\xa8" => "\xd3\xa9", - "\xd3\xaa" => "\xd3\xab", - "\xd3\xac" => "\xd3\xad", - "\xd3\xae" => "\xd3\xaf", - "\xd3\xb0" => "\xd3\xb1", - "\xd3\xb2" => "\xd3\xb3", - "\xd3\xb4" => "\xd3\xb5", - "\xd3\xb8" => "\xd3\xb9", - "\xd4\xb1" => "\xd5\xa1", - "\xd4\xb2" => "\xd5\xa2", - "\xd4\xb3" => "\xd5\xa3", - "\xd4\xb4" => "\xd5\xa4", - "\xd4\xb5" => "\xd5\xa5", - "\xd4\xb6" => "\xd5\xa6", - "\xd4\xb7" => "\xd5\xa7", - "\xd4\xb8" => "\xd5\xa8", - "\xd4\xb9" => "\xd5\xa9", - "\xd4\xba" => "\xd5\xaa", - "\xd4\xbb" => "\xd5\xab", - "\xd4\xbc" => "\xd5\xac", - "\xd4\xbd" => "\xd5\xad", - "\xd4\xbe" => "\xd5\xae", - "\xd4\xbf" => "\xd5\xaf", - "\xd5\x80" => "\xd5\xb0", - "\xd5\x81" => "\xd5\xb1", - "\xd5\x82" => "\xd5\xb2", - "\xd5\x83" => "\xd5\xb3", - "\xd5\x84" => "\xd5\xb4", - "\xd5\x85" => "\xd5\xb5", - "\xd5\x86" => "\xd5\xb6", - "\xd5\x87" => "\xd5\xb7", - "\xd5\x88" => "\xd5\xb8", - "\xd5\x89" => "\xd5\xb9", - "\xd5\x8a" => "\xd5\xba", - "\xd5\x8b" => "\xd5\xbb", - "\xd5\x8c" => "\xd5\xbc", - "\xd5\x8d" => "\xd5\xbd", - "\xd5\x8e" => "\xd5\xbe", - "\xd5\x8f" => "\xd5\xbf", - "\xd5\x90" => "\xd6\x80", - "\xd5\x91" => "\xd6\x81", - "\xd5\x92" => "\xd6\x82", - "\xd5\x93" => "\xd6\x83", - "\xd5\x94" => "\xd6\x84", - "\xd5\x95" => "\xd6\x85", - "\xd5\x96" => "\xd6\x86", - "\xe1\xb8\x80" => "\xe1\xb8\x81", - "\xe1\xb8\x82" => "\xe1\xb8\x83", - "\xe1\xb8\x84" => "\xe1\xb8\x85", - "\xe1\xb8\x86" => "\xe1\xb8\x87", - "\xe1\xb8\x88" => "\xe1\xb8\x89", - "\xe1\xb8\x8a" => "\xe1\xb8\x8b", - "\xe1\xb8\x8c" => "\xe1\xb8\x8d", - "\xe1\xb8\x8e" => "\xe1\xb8\x8f", - "\xe1\xb8\x90" => "\xe1\xb8\x91", - "\xe1\xb8\x92" => "\xe1\xb8\x93", - "\xe1\xb8\x94" => "\xe1\xb8\x95", - "\xe1\xb8\x96" => "\xe1\xb8\x97", - "\xe1\xb8\x98" => "\xe1\xb8\x99", - "\xe1\xb8\x9a" => "\xe1\xb8\x9b", - "\xe1\xb8\x9c" => "\xe1\xb8\x9d", - "\xe1\xb8\x9e" => "\xe1\xb8\x9f", - "\xe1\xb8\xa0" => "\xe1\xb8\xa1", - "\xe1\xb8\xa2" => "\xe1\xb8\xa3", - "\xe1\xb8\xa4" => "\xe1\xb8\xa5", - "\xe1\xb8\xa6" => "\xe1\xb8\xa7", - "\xe1\xb8\xa8" => "\xe1\xb8\xa9", - "\xe1\xb8\xaa" => "\xe1\xb8\xab", - "\xe1\xb8\xac" => "\xe1\xb8\xad", - "\xe1\xb8\xae" => "\xe1\xb8\xaf", - "\xe1\xb8\xb0" => "\xe1\xb8\xb1", - "\xe1\xb8\xb2" => "\xe1\xb8\xb3", - "\xe1\xb8\xb4" => "\xe1\xb8\xb5", - "\xe1\xb8\xb6" => "\xe1\xb8\xb7", - "\xe1\xb8\xb8" => "\xe1\xb8\xb9", - "\xe1\xb8\xba" => "\xe1\xb8\xbb", - "\xe1\xb8\xbc" => "\xe1\xb8\xbd", - "\xe1\xb8\xbe" => "\xe1\xb8\xbf", - "\xe1\xb9\x80" => "\xe1\xb9\x81", - "\xe1\xb9\x82" => "\xe1\xb9\x83", - "\xe1\xb9\x84" => "\xe1\xb9\x85", - "\xe1\xb9\x86" => "\xe1\xb9\x87", - "\xe1\xb9\x88" => "\xe1\xb9\x89", - "\xe1\xb9\x8a" => "\xe1\xb9\x8b", - "\xe1\xb9\x8c" => "\xe1\xb9\x8d", - "\xe1\xb9\x8e" => "\xe1\xb9\x8f", - "\xe1\xb9\x90" => "\xe1\xb9\x91", - "\xe1\xb9\x92" => "\xe1\xb9\x93", - "\xe1\xb9\x94" => "\xe1\xb9\x95", - "\xe1\xb9\x96" => "\xe1\xb9\x97", - "\xe1\xb9\x98" => "\xe1\xb9\x99", - "\xe1\xb9\x9a" => "\xe1\xb9\x9b", - "\xe1\xb9\x9c" => "\xe1\xb9\x9d", - "\xe1\xb9\x9e" => "\xe1\xb9\x9f", - "\xe1\xb9\xa0" => "\xe1\xb9\xa1", - "\xe1\xb9\xa2" => "\xe1\xb9\xa3", - "\xe1\xb9\xa4" => "\xe1\xb9\xa5", - "\xe1\xb9\xa6" => "\xe1\xb9\xa7", - "\xe1\xb9\xa8" => "\xe1\xb9\xa9", - "\xe1\xb9\xaa" => "\xe1\xb9\xab", - "\xe1\xb9\xac" => "\xe1\xb9\xad", - "\xe1\xb9\xae" => "\xe1\xb9\xaf", - "\xe1\xb9\xb0" => "\xe1\xb9\xb1", - "\xe1\xb9\xb2" => "\xe1\xb9\xb3", - "\xe1\xb9\xb4" => "\xe1\xb9\xb5", - "\xe1\xb9\xb6" => "\xe1\xb9\xb7", - "\xe1\xb9\xb8" => "\xe1\xb9\xb9", - "\xe1\xb9\xba" => "\xe1\xb9\xbb", - "\xe1\xb9\xbc" => "\xe1\xb9\xbd", - "\xe1\xb9\xbe" => "\xe1\xb9\xbf", - "\xe1\xba\x80" => "\xe1\xba\x81", - "\xe1\xba\x82" => "\xe1\xba\x83", - "\xe1\xba\x84" => "\xe1\xba\x85", - "\xe1\xba\x86" => "\xe1\xba\x87", - "\xe1\xba\x88" => "\xe1\xba\x89", - "\xe1\xba\x8a" => "\xe1\xba\x8b", - "\xe1\xba\x8c" => "\xe1\xba\x8d", - "\xe1\xba\x8e" => "\xe1\xba\x8f", - "\xe1\xba\x90" => "\xe1\xba\x91", - "\xe1\xba\x92" => "\xe1\xba\x93", - "\xe1\xba\x94" => "\xe1\xba\x95", - "\xe1\xba\xa0" => "\xe1\xba\xa1", - "\xe1\xba\xa2" => "\xe1\xba\xa3", - "\xe1\xba\xa4" => "\xe1\xba\xa5", - "\xe1\xba\xa6" => "\xe1\xba\xa7", - "\xe1\xba\xa8" => "\xe1\xba\xa9", - "\xe1\xba\xaa" => "\xe1\xba\xab", - "\xe1\xba\xac" => "\xe1\xba\xad", - "\xe1\xba\xae" => "\xe1\xba\xaf", - "\xe1\xba\xb0" => "\xe1\xba\xb1", - "\xe1\xba\xb2" => "\xe1\xba\xb3", - "\xe1\xba\xb4" => "\xe1\xba\xb5", - "\xe1\xba\xb6" => "\xe1\xba\xb7", - "\xe1\xba\xb8" => "\xe1\xba\xb9", - "\xe1\xba\xba" => "\xe1\xba\xbb", - "\xe1\xba\xbc" => "\xe1\xba\xbd", - "\xe1\xba\xbe" => "\xe1\xba\xbf", - "\xe1\xbb\x80" => "\xe1\xbb\x81", - "\xe1\xbb\x82" => "\xe1\xbb\x83", - "\xe1\xbb\x84" => "\xe1\xbb\x85", - "\xe1\xbb\x86" => "\xe1\xbb\x87", - "\xe1\xbb\x88" => "\xe1\xbb\x89", - "\xe1\xbb\x8a" => "\xe1\xbb\x8b", - "\xe1\xbb\x8c" => "\xe1\xbb\x8d", - "\xe1\xbb\x8e" => "\xe1\xbb\x8f", - "\xe1\xbb\x90" => "\xe1\xbb\x91", - "\xe1\xbb\x92" => "\xe1\xbb\x93", - "\xe1\xbb\x94" => "\xe1\xbb\x95", - "\xe1\xbb\x96" => "\xe1\xbb\x97", - "\xe1\xbb\x98" => "\xe1\xbb\x99", - "\xe1\xbb\x9a" => "\xe1\xbb\x9b", - "\xe1\xbb\x9c" => "\xe1\xbb\x9d", - "\xe1\xbb\x9e" => "\xe1\xbb\x9f", - "\xe1\xbb\xa0" => "\xe1\xbb\xa1", - "\xe1\xbb\xa2" => "\xe1\xbb\xa3", - "\xe1\xbb\xa4" => "\xe1\xbb\xa5", - "\xe1\xbb\xa6" => "\xe1\xbb\xa7", - "\xe1\xbb\xa8" => "\xe1\xbb\xa9", - "\xe1\xbb\xaa" => "\xe1\xbb\xab", - "\xe1\xbb\xac" => "\xe1\xbb\xad", - "\xe1\xbb\xae" => "\xe1\xbb\xaf", - "\xe1\xbb\xb0" => "\xe1\xbb\xb1", - "\xe1\xbb\xb2" => "\xe1\xbb\xb3", - "\xe1\xbb\xb4" => "\xe1\xbb\xb5", - "\xe1\xbb\xb6" => "\xe1\xbb\xb7", - "\xe1\xbb\xb8" => "\xe1\xbb\xb9", - "\xe1\xbc\x88" => "\xe1\xbc\x80", - "\xe1\xbc\x89" => "\xe1\xbc\x81", - "\xe1\xbc\x8a" => "\xe1\xbc\x82", - "\xe1\xbc\x8b" => "\xe1\xbc\x83", - "\xe1\xbc\x8c" => "\xe1\xbc\x84", - "\xe1\xbc\x8d" => "\xe1\xbc\x85", - "\xe1\xbc\x8e" => "\xe1\xbc\x86", - "\xe1\xbc\x8f" => "\xe1\xbc\x87", - "\xe1\xbc\x98" => "\xe1\xbc\x90", - "\xe1\xbc\x99" => "\xe1\xbc\x91", - "\xe1\xbc\x9a" => "\xe1\xbc\x92", - "\xe1\xbc\x9b" => "\xe1\xbc\x93", - "\xe1\xbc\x9c" => "\xe1\xbc\x94", - "\xe1\xbc\x9d" => "\xe1\xbc\x95", - "\xe1\xbc\xa8" => "\xe1\xbc\xa0", - "\xe1\xbc\xa9" => "\xe1\xbc\xa1", - "\xe1\xbc\xaa" => "\xe1\xbc\xa2", - "\xe1\xbc\xab" => "\xe1\xbc\xa3", - "\xe1\xbc\xac" => "\xe1\xbc\xa4", - "\xe1\xbc\xad" => "\xe1\xbc\xa5", - "\xe1\xbc\xae" => "\xe1\xbc\xa6", - "\xe1\xbc\xaf" => "\xe1\xbc\xa7", - "\xe1\xbc\xb8" => "\xe1\xbc\xb0", - "\xe1\xbc\xb9" => "\xe1\xbc\xb1", - "\xe1\xbc\xba" => "\xe1\xbc\xb2", - "\xe1\xbc\xbb" => "\xe1\xbc\xb3", - "\xe1\xbc\xbc" => "\xe1\xbc\xb4", - "\xe1\xbc\xbd" => "\xe1\xbc\xb5", - "\xe1\xbc\xbe" => "\xe1\xbc\xb6", - "\xe1\xbc\xbf" => "\xe1\xbc\xb7", - "\xe1\xbd\x88" => "\xe1\xbd\x80", - "\xe1\xbd\x89" => "\xe1\xbd\x81", - "\xe1\xbd\x8a" => "\xe1\xbd\x82", - "\xe1\xbd\x8b" => "\xe1\xbd\x83", - "\xe1\xbd\x8c" => "\xe1\xbd\x84", - "\xe1\xbd\x8d" => "\xe1\xbd\x85", - "\xe1\xbd\x99" => "\xe1\xbd\x91", - "\xe1\xbd\x9b" => "\xe1\xbd\x93", - "\xe1\xbd\x9d" => "\xe1\xbd\x95", - "\xe1\xbd\x9f" => "\xe1\xbd\x97", - "\xe1\xbd\xa8" => "\xe1\xbd\xa0", - "\xe1\xbd\xa9" => "\xe1\xbd\xa1", - "\xe1\xbd\xaa" => "\xe1\xbd\xa2", - "\xe1\xbd\xab" => "\xe1\xbd\xa3", - "\xe1\xbd\xac" => "\xe1\xbd\xa4", - "\xe1\xbd\xad" => "\xe1\xbd\xa5", - "\xe1\xbd\xae" => "\xe1\xbd\xa6", - "\xe1\xbd\xaf" => "\xe1\xbd\xa7", - "\xe1\xbe\x88" => "\xe1\xbe\x80", - "\xe1\xbe\x89" => "\xe1\xbe\x81", - "\xe1\xbe\x8a" => "\xe1\xbe\x82", - "\xe1\xbe\x8b" => "\xe1\xbe\x83", - "\xe1\xbe\x8c" => "\xe1\xbe\x84", - "\xe1\xbe\x8d" => "\xe1\xbe\x85", - "\xe1\xbe\x8e" => "\xe1\xbe\x86", - "\xe1\xbe\x8f" => "\xe1\xbe\x87", - "\xe1\xbe\x98" => "\xe1\xbe\x90", - "\xe1\xbe\x99" => "\xe1\xbe\x91", - "\xe1\xbe\x9a" => "\xe1\xbe\x92", - "\xe1\xbe\x9b" => "\xe1\xbe\x93", - "\xe1\xbe\x9c" => "\xe1\xbe\x94", - "\xe1\xbe\x9d" => "\xe1\xbe\x95", - "\xe1\xbe\x9e" => "\xe1\xbe\x96", - "\xe1\xbe\x9f" => "\xe1\xbe\x97", - "\xe1\xbe\xa8" => "\xe1\xbe\xa0", - "\xe1\xbe\xa9" => "\xe1\xbe\xa1", - "\xe1\xbe\xaa" => "\xe1\xbe\xa2", - "\xe1\xbe\xab" => "\xe1\xbe\xa3", - "\xe1\xbe\xac" => "\xe1\xbe\xa4", - "\xe1\xbe\xad" => "\xe1\xbe\xa5", - "\xe1\xbe\xae" => "\xe1\xbe\xa6", - "\xe1\xbe\xaf" => "\xe1\xbe\xa7", - "\xe1\xbe\xb8" => "\xe1\xbe\xb0", - "\xe1\xbe\xb9" => "\xe1\xbe\xb1", - "\xe1\xbe\xba" => "\xe1\xbd\xb0", - "\xe1\xbe\xbb" => "\xe1\xbd\xb1", - "\xe1\xbe\xbc" => "\xe1\xbe\xb3", - "\xe1\xbf\x88" => "\xe1\xbd\xb2", - "\xe1\xbf\x89" => "\xe1\xbd\xb3", - "\xe1\xbf\x8a" => "\xe1\xbd\xb4", - "\xe1\xbf\x8b" => "\xe1\xbd\xb5", - "\xe1\xbf\x8c" => "\xe1\xbf\x83", - "\xe1\xbf\x98" => "\xe1\xbf\x90", - "\xe1\xbf\x99" => "\xe1\xbf\x91", - "\xe1\xbf\x9a" => "\xe1\xbd\xb6", - "\xe1\xbf\x9b" => "\xe1\xbd\xb7", - "\xe1\xbf\xa8" => "\xe1\xbf\xa0", - "\xe1\xbf\xa9" => "\xe1\xbf\xa1", - "\xe1\xbf\xaa" => "\xe1\xbd\xba", - "\xe1\xbf\xab" => "\xe1\xbd\xbb", - "\xe1\xbf\xac" => "\xe1\xbf\xa5", - "\xe1\xbf\xb8" => "\xe1\xbd\xb8", - "\xe1\xbf\xb9" => "\xe1\xbd\xb9", - "\xe1\xbf\xba" => "\xe1\xbd\xbc", - "\xe1\xbf\xbb" => "\xe1\xbd\xbd", - "\xe1\xbf\xbc" => "\xe1\xbf\xb3", - "\xe2\x84\xa6" => "\xcf\x89", - "\xe2\x84\xaa" => "k", - "\xe2\x84\xab" => "\xc3\xa5", - "\xe2\x85\xa0" => "\xe2\x85\xb0", - "\xe2\x85\xa1" => "\xe2\x85\xb1", - "\xe2\x85\xa2" => "\xe2\x85\xb2", - "\xe2\x85\xa3" => "\xe2\x85\xb3", - "\xe2\x85\xa4" => "\xe2\x85\xb4", - "\xe2\x85\xa5" => "\xe2\x85\xb5", - "\xe2\x85\xa6" => "\xe2\x85\xb6", - "\xe2\x85\xa7" => "\xe2\x85\xb7", - "\xe2\x85\xa8" => "\xe2\x85\xb8", - "\xe2\x85\xa9" => "\xe2\x85\xb9", - "\xe2\x85\xaa" => "\xe2\x85\xba", - "\xe2\x85\xab" => "\xe2\x85\xbb", - "\xe2\x85\xac" => "\xe2\x85\xbc", - "\xe2\x85\xad" => "\xe2\x85\xbd", - "\xe2\x85\xae" => "\xe2\x85\xbe", - "\xe2\x85\xaf" => "\xe2\x85\xbf", - "\xe2\x92\xb6" => "\xe2\x93\x90", - "\xe2\x92\xb7" => "\xe2\x93\x91", - "\xe2\x92\xb8" => "\xe2\x93\x92", - "\xe2\x92\xb9" => "\xe2\x93\x93", - "\xe2\x92\xba" => "\xe2\x93\x94", - "\xe2\x92\xbb" => "\xe2\x93\x95", - "\xe2\x92\xbc" => "\xe2\x93\x96", - "\xe2\x92\xbd" => "\xe2\x93\x97", - "\xe2\x92\xbe" => "\xe2\x93\x98", - "\xe2\x92\xbf" => "\xe2\x93\x99", - "\xe2\x93\x80" => "\xe2\x93\x9a", - "\xe2\x93\x81" => "\xe2\x93\x9b", - "\xe2\x93\x82" => "\xe2\x93\x9c", - "\xe2\x93\x83" => "\xe2\x93\x9d", - "\xe2\x93\x84" => "\xe2\x93\x9e", - "\xe2\x93\x85" => "\xe2\x93\x9f", - "\xe2\x93\x86" => "\xe2\x93\xa0", - "\xe2\x93\x87" => "\xe2\x93\xa1", - "\xe2\x93\x88" => "\xe2\x93\xa2", - "\xe2\x93\x89" => "\xe2\x93\xa3", - "\xe2\x93\x8a" => "\xe2\x93\xa4", - "\xe2\x93\x8b" => "\xe2\x93\xa5", - "\xe2\x93\x8c" => "\xe2\x93\xa6", - "\xe2\x93\x8d" => "\xe2\x93\xa7", - "\xe2\x93\x8e" => "\xe2\x93\xa8", - "\xe2\x93\x8f" => "\xe2\x93\xa9", - "\xef\xbc\xa1" => "\xef\xbd\x81", - "\xef\xbc\xa2" => "\xef\xbd\x82", - "\xef\xbc\xa3" => "\xef\xbd\x83", - "\xef\xbc\xa4" => "\xef\xbd\x84", - "\xef\xbc\xa5" => "\xef\xbd\x85", - "\xef\xbc\xa6" => "\xef\xbd\x86", - "\xef\xbc\xa7" => "\xef\xbd\x87", - "\xef\xbc\xa8" => "\xef\xbd\x88", - "\xef\xbc\xa9" => "\xef\xbd\x89", - "\xef\xbc\xaa" => "\xef\xbd\x8a", - "\xef\xbc\xab" => "\xef\xbd\x8b", - "\xef\xbc\xac" => "\xef\xbd\x8c", - "\xef\xbc\xad" => "\xef\xbd\x8d", - "\xef\xbc\xae" => "\xef\xbd\x8e", - "\xef\xbc\xaf" => "\xef\xbd\x8f", - "\xef\xbc\xb0" => "\xef\xbd\x90", - "\xef\xbc\xb1" => "\xef\xbd\x91", - "\xef\xbc\xb2" => "\xef\xbd\x92", - "\xef\xbc\xb3" => "\xef\xbd\x93", - "\xef\xbc\xb4" => "\xef\xbd\x94", - "\xef\xbc\xb5" => "\xef\xbd\x95", - "\xef\xbc\xb6" => "\xef\xbd\x96", - "\xef\xbc\xb7" => "\xef\xbd\x97", - "\xef\xbc\xb8" => "\xef\xbd\x98", - "\xef\xbc\xb9" => "\xef\xbd\x99", - "\xef\xbc\xba" => "\xef\xbd\x9a", - "\xf0\x90\x90\x80" => "\xf0\x90\x90\xa8", - "\xf0\x90\x90\x81" => "\xf0\x90\x90\xa9", - "\xf0\x90\x90\x82" => "\xf0\x90\x90\xaa", - "\xf0\x90\x90\x83" => "\xf0\x90\x90\xab", - "\xf0\x90\x90\x84" => "\xf0\x90\x90\xac", - "\xf0\x90\x90\x85" => "\xf0\x90\x90\xad", - "\xf0\x90\x90\x86" => "\xf0\x90\x90\xae", - "\xf0\x90\x90\x87" => "\xf0\x90\x90\xaf", - "\xf0\x90\x90\x88" => "\xf0\x90\x90\xb0", - "\xf0\x90\x90\x89" => "\xf0\x90\x90\xb1", - "\xf0\x90\x90\x8a" => "\xf0\x90\x90\xb2", - "\xf0\x90\x90\x8b" => "\xf0\x90\x90\xb3", - "\xf0\x90\x90\x8c" => "\xf0\x90\x90\xb4", - "\xf0\x90\x90\x8d" => "\xf0\x90\x90\xb5", - "\xf0\x90\x90\x8e" => "\xf0\x90\x90\xb6", - "\xf0\x90\x90\x8f" => "\xf0\x90\x90\xb7", - "\xf0\x90\x90\x90" => "\xf0\x90\x90\xb8", - "\xf0\x90\x90\x91" => "\xf0\x90\x90\xb9", - "\xf0\x90\x90\x92" => "\xf0\x90\x90\xba", - "\xf0\x90\x90\x93" => "\xf0\x90\x90\xbb", - "\xf0\x90\x90\x94" => "\xf0\x90\x90\xbc", - "\xf0\x90\x90\x95" => "\xf0\x90\x90\xbd", - "\xf0\x90\x90\x96" => "\xf0\x90\x90\xbe", - "\xf0\x90\x90\x97" => "\xf0\x90\x90\xbf", - "\xf0\x90\x90\x98" => "\xf0\x90\x91\x80", - "\xf0\x90\x90\x99" => "\xf0\x90\x91\x81", - "\xf0\x90\x90\x9a" => "\xf0\x90\x91\x82", - "\xf0\x90\x90\x9b" => "\xf0\x90\x91\x83", - "\xf0\x90\x90\x9c" => "\xf0\x90\x91\x84", - "\xf0\x90\x90\x9d" => "\xf0\x90\x91\x85", - "\xf0\x90\x90\x9e" => "\xf0\x90\x91\x86", - "\xf0\x90\x90\x9f" => "\xf0\x90\x91\x87", - "\xf0\x90\x90\xa0" => "\xf0\x90\x91\x88", - "\xf0\x90\x90\xa1" => "\xf0\x90\x91\x89", - "\xf0\x90\x90\xa2" => "\xf0\x90\x91\x8a", - "\xf0\x90\x90\xa3" => "\xf0\x90\x91\x8b", - "\xf0\x90\x90\xa4" => "\xf0\x90\x91\x8c", - "\xf0\x90\x90\xa5" => "\xf0\x90\x91\x8d" + 'A' => 'a', + 'B' => 'b', + 'C' => 'c', + 'D' => 'd', + 'E' => 'e', + 'F' => 'f', + 'G' => 'g', + 'H' => 'h', + 'I' => 'i', + 'J' => 'j', + 'K' => 'k', + 'L' => 'l', + 'M' => 'm', + 'N' => 'n', + 'O' => 'o', + 'P' => 'p', + 'Q' => 'q', + 'R' => 'r', + 'S' => 's', + 'T' => 't', + 'U' => 'u', + 'V' => 'v', + 'W' => 'w', + 'X' => 'x', + 'Y' => 'y', + 'Z' => 'z', + '\xc3\x80' => '\xc3\xa0', + '\xc3\x81' => '\xc3\xa1', + '\xc3\x82' => '\xc3\xa2', + '\xc3\x83' => '\xc3\xa3', + '\xc3\x84' => '\xc3\xa4', + '\xc3\x85' => '\xc3\xa5', + '\xc3\x86' => '\xc3\xa6', + '\xc3\x87' => '\xc3\xa7', + '\xc3\x88' => '\xc3\xa8', + '\xc3\x89' => '\xc3\xa9', + '\xc3\x8a' => '\xc3\xaa', + '\xc3\x8b' => '\xc3\xab', + '\xc3\x8c' => '\xc3\xac', + '\xc3\x8d' => '\xc3\xad', + '\xc3\x8e' => '\xc3\xae', + '\xc3\x8f' => '\xc3\xaf', + '\xc3\x90' => '\xc3\xb0', + '\xc3\x91' => '\xc3\xb1', + '\xc3\x92' => '\xc3\xb2', + '\xc3\x93' => '\xc3\xb3', + '\xc3\x94' => '\xc3\xb4', + '\xc3\x95' => '\xc3\xb5', + '\xc3\x96' => '\xc3\xb6', + '\xc3\x98' => '\xc3\xb8', + '\xc3\x99' => '\xc3\xb9', + '\xc3\x9a' => '\xc3\xba', + '\xc3\x9b' => '\xc3\xbb', + '\xc3\x9c' => '\xc3\xbc', + '\xc3\x9d' => '\xc3\xbd', + '\xc3\x9e' => '\xc3\xbe', + '\xc4\x80' => '\xc4\x81', + '\xc4\x82' => '\xc4\x83', + '\xc4\x84' => '\xc4\x85', + '\xc4\x86' => '\xc4\x87', + '\xc4\x88' => '\xc4\x89', + '\xc4\x8a' => '\xc4\x8b', + '\xc4\x8c' => '\xc4\x8d', + '\xc4\x8e' => '\xc4\x8f', + '\xc4\x90' => '\xc4\x91', + '\xc4\x92' => '\xc4\x93', + '\xc4\x94' => '\xc4\x95', + '\xc4\x96' => '\xc4\x97', + '\xc4\x98' => '\xc4\x99', + '\xc4\x9a' => '\xc4\x9b', + '\xc4\x9c' => '\xc4\x9d', + '\xc4\x9e' => '\xc4\x9f', + '\xc4\xa0' => '\xc4\xa1', + '\xc4\xa2' => '\xc4\xa3', + '\xc4\xa4' => '\xc4\xa5', + '\xc4\xa6' => '\xc4\xa7', + '\xc4\xa8' => '\xc4\xa9', + '\xc4\xaa' => '\xc4\xab', + '\xc4\xac' => '\xc4\xad', + '\xc4\xae' => '\xc4\xaf', + '\xc4\xb0' => 'i', + '\xc4\xb2' => '\xc4\xb3', + '\xc4\xb4' => '\xc4\xb5', + '\xc4\xb6' => '\xc4\xb7', + '\xc4\xb9' => '\xc4\xba', + '\xc4\xbb' => '\xc4\xbc', + '\xc4\xbd' => '\xc4\xbe', + '\xc4\xbf' => '\xc5\x80', + '\xc5\x81' => '\xc5\x82', + '\xc5\x83' => '\xc5\x84', + '\xc5\x85' => '\xc5\x86', + '\xc5\x87' => '\xc5\x88', + '\xc5\x8a' => '\xc5\x8b', + '\xc5\x8c' => '\xc5\x8d', + '\xc5\x8e' => '\xc5\x8f', + '\xc5\x90' => '\xc5\x91', + '\xc5\x92' => '\xc5\x93', + '\xc5\x94' => '\xc5\x95', + '\xc5\x96' => '\xc5\x97', + '\xc5\x98' => '\xc5\x99', + '\xc5\x9a' => '\xc5\x9b', + '\xc5\x9c' => '\xc5\x9d', + '\xc5\x9e' => '\xc5\x9f', + '\xc5\xa0' => '\xc5\xa1', + '\xc5\xa2' => '\xc5\xa3', + '\xc5\xa4' => '\xc5\xa5', + '\xc5\xa6' => '\xc5\xa7', + '\xc5\xa8' => '\xc5\xa9', + '\xc5\xaa' => '\xc5\xab', + '\xc5\xac' => '\xc5\xad', + '\xc5\xae' => '\xc5\xaf', + '\xc5\xb0' => '\xc5\xb1', + '\xc5\xb2' => '\xc5\xb3', + '\xc5\xb4' => '\xc5\xb5', + '\xc5\xb6' => '\xc5\xb7', + '\xc5\xb8' => '\xc3\xbf', + '\xc5\xb9' => '\xc5\xba', + '\xc5\xbb' => '\xc5\xbc', + '\xc5\xbd' => '\xc5\xbe', + '\xc6\x81' => '\xc9\x93', + '\xc6\x82' => '\xc6\x83', + '\xc6\x84' => '\xc6\x85', + '\xc6\x86' => '\xc9\x94', + '\xc6\x87' => '\xc6\x88', + '\xc6\x89' => '\xc9\x96', + '\xc6\x8a' => '\xc9\x97', + '\xc6\x8b' => '\xc6\x8c', + '\xc6\x8e' => '\xc7\x9d', + '\xc6\x8f' => '\xc9\x99', + '\xc6\x90' => '\xc9\x9b', + '\xc6\x91' => '\xc6\x92', + '\xc6\x93' => '\xc9\xa0', + '\xc6\x94' => '\xc9\xa3', + '\xc6\x96' => '\xc9\xa9', + '\xc6\x97' => '\xc9\xa8', + '\xc6\x98' => '\xc6\x99', + '\xc6\x9c' => '\xc9\xaf', + '\xc6\x9d' => '\xc9\xb2', + '\xc6\x9f' => '\xc9\xb5', + '\xc6\xa0' => '\xc6\xa1', + '\xc6\xa2' => '\xc6\xa3', + '\xc6\xa4' => '\xc6\xa5', + '\xc6\xa6' => '\xca\x80', + '\xc6\xa7' => '\xc6\xa8', + '\xc6\xa9' => '\xca\x83', + '\xc6\xac' => '\xc6\xad', + '\xc6\xae' => '\xca\x88', + '\xc6\xaf' => '\xc6\xb0', + '\xc6\xb1' => '\xca\x8a', + '\xc6\xb2' => '\xca\x8b', + '\xc6\xb3' => '\xc6\xb4', + '\xc6\xb5' => '\xc6\xb6', + '\xc6\xb7' => '\xca\x92', + '\xc6\xb8' => '\xc6\xb9', + '\xc6\xbc' => '\xc6\xbd', + '\xc7\x84' => '\xc7\x86', + '\xc7\x85' => '\xc7\x86', + '\xc7\x87' => '\xc7\x89', + '\xc7\x88' => '\xc7\x89', + '\xc7\x8a' => '\xc7\x8c', + '\xc7\x8b' => '\xc7\x8c', + '\xc7\x8d' => '\xc7\x8e', + '\xc7\x8f' => '\xc7\x90', + '\xc7\x91' => '\xc7\x92', + '\xc7\x93' => '\xc7\x94', + '\xc7\x95' => '\xc7\x96', + '\xc7\x97' => '\xc7\x98', + '\xc7\x99' => '\xc7\x9a', + '\xc7\x9b' => '\xc7\x9c', + '\xc7\x9e' => '\xc7\x9f', + '\xc7\xa0' => '\xc7\xa1', + '\xc7\xa2' => '\xc7\xa3', + '\xc7\xa4' => '\xc7\xa5', + '\xc7\xa6' => '\xc7\xa7', + '\xc7\xa8' => '\xc7\xa9', + '\xc7\xaa' => '\xc7\xab', + '\xc7\xac' => '\xc7\xad', + '\xc7\xae' => '\xc7\xaf', + '\xc7\xb1' => '\xc7\xb3', + '\xc7\xb2' => '\xc7\xb3', + '\xc7\xb4' => '\xc7\xb5', + '\xc7\xb6' => '\xc6\x95', + '\xc7\xb7' => '\xc6\xbf', + '\xc7\xb8' => '\xc7\xb9', + '\xc7\xba' => '\xc7\xbb', + '\xc7\xbc' => '\xc7\xbd', + '\xc7\xbe' => '\xc7\xbf', + '\xc8\x80' => '\xc8\x81', + '\xc8\x82' => '\xc8\x83', + '\xc8\x84' => '\xc8\x85', + '\xc8\x86' => '\xc8\x87', + '\xc8\x88' => '\xc8\x89', + '\xc8\x8a' => '\xc8\x8b', + '\xc8\x8c' => '\xc8\x8d', + '\xc8\x8e' => '\xc8\x8f', + '\xc8\x90' => '\xc8\x91', + '\xc8\x92' => '\xc8\x93', + '\xc8\x94' => '\xc8\x95', + '\xc8\x96' => '\xc8\x97', + '\xc8\x98' => '\xc8\x99', + '\xc8\x9a' => '\xc8\x9b', + '\xc8\x9c' => '\xc8\x9d', + '\xc8\x9e' => '\xc8\x9f', + '\xc8\xa2' => '\xc8\xa3', + '\xc8\xa4' => '\xc8\xa5', + '\xc8\xa6' => '\xc8\xa7', + '\xc8\xa8' => '\xc8\xa9', + '\xc8\xaa' => '\xc8\xab', + '\xc8\xac' => '\xc8\xad', + '\xc8\xae' => '\xc8\xaf', + '\xc8\xb0' => '\xc8\xb1', + '\xc8\xb2' => '\xc8\xb3', + '\xce\x86' => '\xce\xac', + '\xce\x88' => '\xce\xad', + '\xce\x89' => '\xce\xae', + '\xce\x8a' => '\xce\xaf', + '\xce\x8c' => '\xcf\x8c', + '\xce\x8e' => '\xcf\x8d', + '\xce\x8f' => '\xcf\x8e', + '\xce\x91' => '\xce\xb1', + '\xce\x92' => '\xce\xb2', + '\xce\x93' => '\xce\xb3', + '\xce\x94' => '\xce\xb4', + '\xce\x95' => '\xce\xb5', + '\xce\x96' => '\xce\xb6', + '\xce\x97' => '\xce\xb7', + '\xce\x98' => '\xce\xb8', + '\xce\x99' => '\xce\xb9', + '\xce\x9a' => '\xce\xba', + '\xce\x9b' => '\xce\xbb', + '\xce\x9c' => '\xce\xbc', + '\xce\x9d' => '\xce\xbd', + '\xce\x9e' => '\xce\xbe', + '\xce\x9f' => '\xce\xbf', + '\xce\xa0' => '\xcf\x80', + '\xce\xa1' => '\xcf\x81', + '\xce\xa3' => '\xcf\x83', + '\xce\xa4' => '\xcf\x84', + '\xce\xa5' => '\xcf\x85', + '\xce\xa6' => '\xcf\x86', + '\xce\xa7' => '\xcf\x87', + '\xce\xa8' => '\xcf\x88', + '\xce\xa9' => '\xcf\x89', + '\xce\xaa' => '\xcf\x8a', + '\xce\xab' => '\xcf\x8b', + '\xcf\x9a' => '\xcf\x9b', + '\xcf\x9c' => '\xcf\x9d', + '\xcf\x9e' => '\xcf\x9f', + '\xcf\xa0' => '\xcf\xa1', + '\xcf\xa2' => '\xcf\xa3', + '\xcf\xa4' => '\xcf\xa5', + '\xcf\xa6' => '\xcf\xa7', + '\xcf\xa8' => '\xcf\xa9', + '\xcf\xaa' => '\xcf\xab', + '\xcf\xac' => '\xcf\xad', + '\xcf\xae' => '\xcf\xaf', + '\xcf\xb4' => '\xce\xb8', + '\xd0\x80' => '\xd1\x90', + '\xd0\x81' => '\xd1\x91', + '\xd0\x82' => '\xd1\x92', + '\xd0\x83' => '\xd1\x93', + '\xd0\x84' => '\xd1\x94', + '\xd0\x85' => '\xd1\x95', + '\xd0\x86' => '\xd1\x96', + '\xd0\x87' => '\xd1\x97', + '\xd0\x88' => '\xd1\x98', + '\xd0\x89' => '\xd1\x99', + '\xd0\x8a' => '\xd1\x9a', + '\xd0\x8b' => '\xd1\x9b', + '\xd0\x8c' => '\xd1\x9c', + '\xd0\x8d' => '\xd1\x9d', + '\xd0\x8e' => '\xd1\x9e', + '\xd0\x8f' => '\xd1\x9f', + '\xd0\x90' => '\xd0\xb0', + '\xd0\x91' => '\xd0\xb1', + '\xd0\x92' => '\xd0\xb2', + '\xd0\x93' => '\xd0\xb3', + '\xd0\x94' => '\xd0\xb4', + '\xd0\x95' => '\xd0\xb5', + '\xd0\x96' => '\xd0\xb6', + '\xd0\x97' => '\xd0\xb7', + '\xd0\x98' => '\xd0\xb8', + '\xd0\x99' => '\xd0\xb9', + '\xd0\x9a' => '\xd0\xba', + '\xd0\x9b' => '\xd0\xbb', + '\xd0\x9c' => '\xd0\xbc', + '\xd0\x9d' => '\xd0\xbd', + '\xd0\x9e' => '\xd0\xbe', + '\xd0\x9f' => '\xd0\xbf', + '\xd0\xa0' => '\xd1\x80', + '\xd0\xa1' => '\xd1\x81', + '\xd0\xa2' => '\xd1\x82', + '\xd0\xa3' => '\xd1\x83', + '\xd0\xa4' => '\xd1\x84', + '\xd0\xa5' => '\xd1\x85', + '\xd0\xa6' => '\xd1\x86', + '\xd0\xa7' => '\xd1\x87', + '\xd0\xa8' => '\xd1\x88', + '\xd0\xa9' => '\xd1\x89', + '\xd0\xaa' => '\xd1\x8a', + '\xd0\xab' => '\xd1\x8b', + '\xd0\xac' => '\xd1\x8c', + '\xd0\xad' => '\xd1\x8d', + '\xd0\xae' => '\xd1\x8e', + '\xd0\xaf' => '\xd1\x8f', + '\xd1\xa0' => '\xd1\xa1', + '\xd1\xa2' => '\xd1\xa3', + '\xd1\xa4' => '\xd1\xa5', + '\xd1\xa6' => '\xd1\xa7', + '\xd1\xa8' => '\xd1\xa9', + '\xd1\xaa' => '\xd1\xab', + '\xd1\xac' => '\xd1\xad', + '\xd1\xae' => '\xd1\xaf', + '\xd1\xb0' => '\xd1\xb1', + '\xd1\xb2' => '\xd1\xb3', + '\xd1\xb4' => '\xd1\xb5', + '\xd1\xb6' => '\xd1\xb7', + '\xd1\xb8' => '\xd1\xb9', + '\xd1\xba' => '\xd1\xbb', + '\xd1\xbc' => '\xd1\xbd', + '\xd1\xbe' => '\xd1\xbf', + '\xd2\x80' => '\xd2\x81', + '\xd2\x8c' => '\xd2\x8d', + '\xd2\x8e' => '\xd2\x8f', + '\xd2\x90' => '\xd2\x91', + '\xd2\x92' => '\xd2\x93', + '\xd2\x94' => '\xd2\x95', + '\xd2\x96' => '\xd2\x97', + '\xd2\x98' => '\xd2\x99', + '\xd2\x9a' => '\xd2\x9b', + '\xd2\x9c' => '\xd2\x9d', + '\xd2\x9e' => '\xd2\x9f', + '\xd2\xa0' => '\xd2\xa1', + '\xd2\xa2' => '\xd2\xa3', + '\xd2\xa4' => '\xd2\xa5', + '\xd2\xa6' => '\xd2\xa7', + '\xd2\xa8' => '\xd2\xa9', + '\xd2\xaa' => '\xd2\xab', + '\xd2\xac' => '\xd2\xad', + '\xd2\xae' => '\xd2\xaf', + '\xd2\xb0' => '\xd2\xb1', + '\xd2\xb2' => '\xd2\xb3', + '\xd2\xb4' => '\xd2\xb5', + '\xd2\xb6' => '\xd2\xb7', + '\xd2\xb8' => '\xd2\xb9', + '\xd2\xba' => '\xd2\xbb', + '\xd2\xbc' => '\xd2\xbd', + '\xd2\xbe' => '\xd2\xbf', + '\xd3\x81' => '\xd3\x82', + '\xd3\x83' => '\xd3\x84', + '\xd3\x87' => '\xd3\x88', + '\xd3\x8b' => '\xd3\x8c', + '\xd3\x90' => '\xd3\x91', + '\xd3\x92' => '\xd3\x93', + '\xd3\x94' => '\xd3\x95', + '\xd3\x96' => '\xd3\x97', + '\xd3\x98' => '\xd3\x99', + '\xd3\x9a' => '\xd3\x9b', + '\xd3\x9c' => '\xd3\x9d', + '\xd3\x9e' => '\xd3\x9f', + '\xd3\xa0' => '\xd3\xa1', + '\xd3\xa2' => '\xd3\xa3', + '\xd3\xa4' => '\xd3\xa5', + '\xd3\xa6' => '\xd3\xa7', + '\xd3\xa8' => '\xd3\xa9', + '\xd3\xaa' => '\xd3\xab', + '\xd3\xac' => '\xd3\xad', + '\xd3\xae' => '\xd3\xaf', + '\xd3\xb0' => '\xd3\xb1', + '\xd3\xb2' => '\xd3\xb3', + '\xd3\xb4' => '\xd3\xb5', + '\xd3\xb8' => '\xd3\xb9', + '\xd4\xb1' => '\xd5\xa1', + '\xd4\xb2' => '\xd5\xa2', + '\xd4\xb3' => '\xd5\xa3', + '\xd4\xb4' => '\xd5\xa4', + '\xd4\xb5' => '\xd5\xa5', + '\xd4\xb6' => '\xd5\xa6', + '\xd4\xb7' => '\xd5\xa7', + '\xd4\xb8' => '\xd5\xa8', + '\xd4\xb9' => '\xd5\xa9', + '\xd4\xba' => '\xd5\xaa', + '\xd4\xbb' => '\xd5\xab', + '\xd4\xbc' => '\xd5\xac', + '\xd4\xbd' => '\xd5\xad', + '\xd4\xbe' => '\xd5\xae', + '\xd4\xbf' => '\xd5\xaf', + '\xd5\x80' => '\xd5\xb0', + '\xd5\x81' => '\xd5\xb1', + '\xd5\x82' => '\xd5\xb2', + '\xd5\x83' => '\xd5\xb3', + '\xd5\x84' => '\xd5\xb4', + '\xd5\x85' => '\xd5\xb5', + '\xd5\x86' => '\xd5\xb6', + '\xd5\x87' => '\xd5\xb7', + '\xd5\x88' => '\xd5\xb8', + '\xd5\x89' => '\xd5\xb9', + '\xd5\x8a' => '\xd5\xba', + '\xd5\x8b' => '\xd5\xbb', + '\xd5\x8c' => '\xd5\xbc', + '\xd5\x8d' => '\xd5\xbd', + '\xd5\x8e' => '\xd5\xbe', + '\xd5\x8f' => '\xd5\xbf', + '\xd5\x90' => '\xd6\x80', + '\xd5\x91' => '\xd6\x81', + '\xd5\x92' => '\xd6\x82', + '\xd5\x93' => '\xd6\x83', + '\xd5\x94' => '\xd6\x84', + '\xd5\x95' => '\xd6\x85', + '\xd5\x96' => '\xd6\x86', + '\xe1\xb8\x80' => '\xe1\xb8\x81', + '\xe1\xb8\x82' => '\xe1\xb8\x83', + '\xe1\xb8\x84' => '\xe1\xb8\x85', + '\xe1\xb8\x86' => '\xe1\xb8\x87', + '\xe1\xb8\x88' => '\xe1\xb8\x89', + '\xe1\xb8\x8a' => '\xe1\xb8\x8b', + '\xe1\xb8\x8c' => '\xe1\xb8\x8d', + '\xe1\xb8\x8e' => '\xe1\xb8\x8f', + '\xe1\xb8\x90' => '\xe1\xb8\x91', + '\xe1\xb8\x92' => '\xe1\xb8\x93', + '\xe1\xb8\x94' => '\xe1\xb8\x95', + '\xe1\xb8\x96' => '\xe1\xb8\x97', + '\xe1\xb8\x98' => '\xe1\xb8\x99', + '\xe1\xb8\x9a' => '\xe1\xb8\x9b', + '\xe1\xb8\x9c' => '\xe1\xb8\x9d', + '\xe1\xb8\x9e' => '\xe1\xb8\x9f', + '\xe1\xb8\xa0' => '\xe1\xb8\xa1', + '\xe1\xb8\xa2' => '\xe1\xb8\xa3', + '\xe1\xb8\xa4' => '\xe1\xb8\xa5', + '\xe1\xb8\xa6' => '\xe1\xb8\xa7', + '\xe1\xb8\xa8' => '\xe1\xb8\xa9', + '\xe1\xb8\xaa' => '\xe1\xb8\xab', + '\xe1\xb8\xac' => '\xe1\xb8\xad', + '\xe1\xb8\xae' => '\xe1\xb8\xaf', + '\xe1\xb8\xb0' => '\xe1\xb8\xb1', + '\xe1\xb8\xb2' => '\xe1\xb8\xb3', + '\xe1\xb8\xb4' => '\xe1\xb8\xb5', + '\xe1\xb8\xb6' => '\xe1\xb8\xb7', + '\xe1\xb8\xb8' => '\xe1\xb8\xb9', + '\xe1\xb8\xba' => '\xe1\xb8\xbb', + '\xe1\xb8\xbc' => '\xe1\xb8\xbd', + '\xe1\xb8\xbe' => '\xe1\xb8\xbf', + '\xe1\xb9\x80' => '\xe1\xb9\x81', + '\xe1\xb9\x82' => '\xe1\xb9\x83', + '\xe1\xb9\x84' => '\xe1\xb9\x85', + '\xe1\xb9\x86' => '\xe1\xb9\x87', + '\xe1\xb9\x88' => '\xe1\xb9\x89', + '\xe1\xb9\x8a' => '\xe1\xb9\x8b', + '\xe1\xb9\x8c' => '\xe1\xb9\x8d', + '\xe1\xb9\x8e' => '\xe1\xb9\x8f', + '\xe1\xb9\x90' => '\xe1\xb9\x91', + '\xe1\xb9\x92' => '\xe1\xb9\x93', + '\xe1\xb9\x94' => '\xe1\xb9\x95', + '\xe1\xb9\x96' => '\xe1\xb9\x97', + '\xe1\xb9\x98' => '\xe1\xb9\x99', + '\xe1\xb9\x9a' => '\xe1\xb9\x9b', + '\xe1\xb9\x9c' => '\xe1\xb9\x9d', + '\xe1\xb9\x9e' => '\xe1\xb9\x9f', + '\xe1\xb9\xa0' => '\xe1\xb9\xa1', + '\xe1\xb9\xa2' => '\xe1\xb9\xa3', + '\xe1\xb9\xa4' => '\xe1\xb9\xa5', + '\xe1\xb9\xa6' => '\xe1\xb9\xa7', + '\xe1\xb9\xa8' => '\xe1\xb9\xa9', + '\xe1\xb9\xaa' => '\xe1\xb9\xab', + '\xe1\xb9\xac' => '\xe1\xb9\xad', + '\xe1\xb9\xae' => '\xe1\xb9\xaf', + '\xe1\xb9\xb0' => '\xe1\xb9\xb1', + '\xe1\xb9\xb2' => '\xe1\xb9\xb3', + '\xe1\xb9\xb4' => '\xe1\xb9\xb5', + '\xe1\xb9\xb6' => '\xe1\xb9\xb7', + '\xe1\xb9\xb8' => '\xe1\xb9\xb9', + '\xe1\xb9\xba' => '\xe1\xb9\xbb', + '\xe1\xb9\xbc' => '\xe1\xb9\xbd', + '\xe1\xb9\xbe' => '\xe1\xb9\xbf', + '\xe1\xba\x80' => '\xe1\xba\x81', + '\xe1\xba\x82' => '\xe1\xba\x83', + '\xe1\xba\x84' => '\xe1\xba\x85', + '\xe1\xba\x86' => '\xe1\xba\x87', + '\xe1\xba\x88' => '\xe1\xba\x89', + '\xe1\xba\x8a' => '\xe1\xba\x8b', + '\xe1\xba\x8c' => '\xe1\xba\x8d', + '\xe1\xba\x8e' => '\xe1\xba\x8f', + '\xe1\xba\x90' => '\xe1\xba\x91', + '\xe1\xba\x92' => '\xe1\xba\x93', + '\xe1\xba\x94' => '\xe1\xba\x95', + '\xe1\xba\xa0' => '\xe1\xba\xa1', + '\xe1\xba\xa2' => '\xe1\xba\xa3', + '\xe1\xba\xa4' => '\xe1\xba\xa5', + '\xe1\xba\xa6' => '\xe1\xba\xa7', + '\xe1\xba\xa8' => '\xe1\xba\xa9', + '\xe1\xba\xaa' => '\xe1\xba\xab', + '\xe1\xba\xac' => '\xe1\xba\xad', + '\xe1\xba\xae' => '\xe1\xba\xaf', + '\xe1\xba\xb0' => '\xe1\xba\xb1', + '\xe1\xba\xb2' => '\xe1\xba\xb3', + '\xe1\xba\xb4' => '\xe1\xba\xb5', + '\xe1\xba\xb6' => '\xe1\xba\xb7', + '\xe1\xba\xb8' => '\xe1\xba\xb9', + '\xe1\xba\xba' => '\xe1\xba\xbb', + '\xe1\xba\xbc' => '\xe1\xba\xbd', + '\xe1\xba\xbe' => '\xe1\xba\xbf', + '\xe1\xbb\x80' => '\xe1\xbb\x81', + '\xe1\xbb\x82' => '\xe1\xbb\x83', + '\xe1\xbb\x84' => '\xe1\xbb\x85', + '\xe1\xbb\x86' => '\xe1\xbb\x87', + '\xe1\xbb\x88' => '\xe1\xbb\x89', + '\xe1\xbb\x8a' => '\xe1\xbb\x8b', + '\xe1\xbb\x8c' => '\xe1\xbb\x8d', + '\xe1\xbb\x8e' => '\xe1\xbb\x8f', + '\xe1\xbb\x90' => '\xe1\xbb\x91', + '\xe1\xbb\x92' => '\xe1\xbb\x93', + '\xe1\xbb\x94' => '\xe1\xbb\x95', + '\xe1\xbb\x96' => '\xe1\xbb\x97', + '\xe1\xbb\x98' => '\xe1\xbb\x99', + '\xe1\xbb\x9a' => '\xe1\xbb\x9b', + '\xe1\xbb\x9c' => '\xe1\xbb\x9d', + '\xe1\xbb\x9e' => '\xe1\xbb\x9f', + '\xe1\xbb\xa0' => '\xe1\xbb\xa1', + '\xe1\xbb\xa2' => '\xe1\xbb\xa3', + '\xe1\xbb\xa4' => '\xe1\xbb\xa5', + '\xe1\xbb\xa6' => '\xe1\xbb\xa7', + '\xe1\xbb\xa8' => '\xe1\xbb\xa9', + '\xe1\xbb\xaa' => '\xe1\xbb\xab', + '\xe1\xbb\xac' => '\xe1\xbb\xad', + '\xe1\xbb\xae' => '\xe1\xbb\xaf', + '\xe1\xbb\xb0' => '\xe1\xbb\xb1', + '\xe1\xbb\xb2' => '\xe1\xbb\xb3', + '\xe1\xbb\xb4' => '\xe1\xbb\xb5', + '\xe1\xbb\xb6' => '\xe1\xbb\xb7', + '\xe1\xbb\xb8' => '\xe1\xbb\xb9', + '\xe1\xbc\x88' => '\xe1\xbc\x80', + '\xe1\xbc\x89' => '\xe1\xbc\x81', + '\xe1\xbc\x8a' => '\xe1\xbc\x82', + '\xe1\xbc\x8b' => '\xe1\xbc\x83', + '\xe1\xbc\x8c' => '\xe1\xbc\x84', + '\xe1\xbc\x8d' => '\xe1\xbc\x85', + '\xe1\xbc\x8e' => '\xe1\xbc\x86', + '\xe1\xbc\x8f' => '\xe1\xbc\x87', + '\xe1\xbc\x98' => '\xe1\xbc\x90', + '\xe1\xbc\x99' => '\xe1\xbc\x91', + '\xe1\xbc\x9a' => '\xe1\xbc\x92', + '\xe1\xbc\x9b' => '\xe1\xbc\x93', + '\xe1\xbc\x9c' => '\xe1\xbc\x94', + '\xe1\xbc\x9d' => '\xe1\xbc\x95', + '\xe1\xbc\xa8' => '\xe1\xbc\xa0', + '\xe1\xbc\xa9' => '\xe1\xbc\xa1', + '\xe1\xbc\xaa' => '\xe1\xbc\xa2', + '\xe1\xbc\xab' => '\xe1\xbc\xa3', + '\xe1\xbc\xac' => '\xe1\xbc\xa4', + '\xe1\xbc\xad' => '\xe1\xbc\xa5', + '\xe1\xbc\xae' => '\xe1\xbc\xa6', + '\xe1\xbc\xaf' => '\xe1\xbc\xa7', + '\xe1\xbc\xb8' => '\xe1\xbc\xb0', + '\xe1\xbc\xb9' => '\xe1\xbc\xb1', + '\xe1\xbc\xba' => '\xe1\xbc\xb2', + '\xe1\xbc\xbb' => '\xe1\xbc\xb3', + '\xe1\xbc\xbc' => '\xe1\xbc\xb4', + '\xe1\xbc\xbd' => '\xe1\xbc\xb5', + '\xe1\xbc\xbe' => '\xe1\xbc\xb6', + '\xe1\xbc\xbf' => '\xe1\xbc\xb7', + '\xe1\xbd\x88' => '\xe1\xbd\x80', + '\xe1\xbd\x89' => '\xe1\xbd\x81', + '\xe1\xbd\x8a' => '\xe1\xbd\x82', + '\xe1\xbd\x8b' => '\xe1\xbd\x83', + '\xe1\xbd\x8c' => '\xe1\xbd\x84', + '\xe1\xbd\x8d' => '\xe1\xbd\x85', + '\xe1\xbd\x99' => '\xe1\xbd\x91', + '\xe1\xbd\x9b' => '\xe1\xbd\x93', + '\xe1\xbd\x9d' => '\xe1\xbd\x95', + '\xe1\xbd\x9f' => '\xe1\xbd\x97', + '\xe1\xbd\xa8' => '\xe1\xbd\xa0', + '\xe1\xbd\xa9' => '\xe1\xbd\xa1', + '\xe1\xbd\xaa' => '\xe1\xbd\xa2', + '\xe1\xbd\xab' => '\xe1\xbd\xa3', + '\xe1\xbd\xac' => '\xe1\xbd\xa4', + '\xe1\xbd\xad' => '\xe1\xbd\xa5', + '\xe1\xbd\xae' => '\xe1\xbd\xa6', + '\xe1\xbd\xaf' => '\xe1\xbd\xa7', + '\xe1\xbe\x88' => '\xe1\xbe\x80', + '\xe1\xbe\x89' => '\xe1\xbe\x81', + '\xe1\xbe\x8a' => '\xe1\xbe\x82', + '\xe1\xbe\x8b' => '\xe1\xbe\x83', + '\xe1\xbe\x8c' => '\xe1\xbe\x84', + '\xe1\xbe\x8d' => '\xe1\xbe\x85', + '\xe1\xbe\x8e' => '\xe1\xbe\x86', + '\xe1\xbe\x8f' => '\xe1\xbe\x87', + '\xe1\xbe\x98' => '\xe1\xbe\x90', + '\xe1\xbe\x99' => '\xe1\xbe\x91', + '\xe1\xbe\x9a' => '\xe1\xbe\x92', + '\xe1\xbe\x9b' => '\xe1\xbe\x93', + '\xe1\xbe\x9c' => '\xe1\xbe\x94', + '\xe1\xbe\x9d' => '\xe1\xbe\x95', + '\xe1\xbe\x9e' => '\xe1\xbe\x96', + '\xe1\xbe\x9f' => '\xe1\xbe\x97', + '\xe1\xbe\xa8' => '\xe1\xbe\xa0', + '\xe1\xbe\xa9' => '\xe1\xbe\xa1', + '\xe1\xbe\xaa' => '\xe1\xbe\xa2', + '\xe1\xbe\xab' => '\xe1\xbe\xa3', + '\xe1\xbe\xac' => '\xe1\xbe\xa4', + '\xe1\xbe\xad' => '\xe1\xbe\xa5', + '\xe1\xbe\xae' => '\xe1\xbe\xa6', + '\xe1\xbe\xaf' => '\xe1\xbe\xa7', + '\xe1\xbe\xb8' => '\xe1\xbe\xb0', + '\xe1\xbe\xb9' => '\xe1\xbe\xb1', + '\xe1\xbe\xba' => '\xe1\xbd\xb0', + '\xe1\xbe\xbb' => '\xe1\xbd\xb1', + '\xe1\xbe\xbc' => '\xe1\xbe\xb3', + '\xe1\xbf\x88' => '\xe1\xbd\xb2', + '\xe1\xbf\x89' => '\xe1\xbd\xb3', + '\xe1\xbf\x8a' => '\xe1\xbd\xb4', + '\xe1\xbf\x8b' => '\xe1\xbd\xb5', + '\xe1\xbf\x8c' => '\xe1\xbf\x83', + '\xe1\xbf\x98' => '\xe1\xbf\x90', + '\xe1\xbf\x99' => '\xe1\xbf\x91', + '\xe1\xbf\x9a' => '\xe1\xbd\xb6', + '\xe1\xbf\x9b' => '\xe1\xbd\xb7', + '\xe1\xbf\xa8' => '\xe1\xbf\xa0', + '\xe1\xbf\xa9' => '\xe1\xbf\xa1', + '\xe1\xbf\xaa' => '\xe1\xbd\xba', + '\xe1\xbf\xab' => '\xe1\xbd\xbb', + '\xe1\xbf\xac' => '\xe1\xbf\xa5', + '\xe1\xbf\xb8' => '\xe1\xbd\xb8', + '\xe1\xbf\xb9' => '\xe1\xbd\xb9', + '\xe1\xbf\xba' => '\xe1\xbd\xbc', + '\xe1\xbf\xbb' => '\xe1\xbd\xbd', + '\xe1\xbf\xbc' => '\xe1\xbf\xb3', + '\xe2\x84\xa6' => '\xcf\x89', + '\xe2\x84\xaa' => 'k', + '\xe2\x84\xab' => '\xc3\xa5', + '\xe2\x85\xa0' => '\xe2\x85\xb0', + '\xe2\x85\xa1' => '\xe2\x85\xb1', + '\xe2\x85\xa2' => '\xe2\x85\xb2', + '\xe2\x85\xa3' => '\xe2\x85\xb3', + '\xe2\x85\xa4' => '\xe2\x85\xb4', + '\xe2\x85\xa5' => '\xe2\x85\xb5', + '\xe2\x85\xa6' => '\xe2\x85\xb6', + '\xe2\x85\xa7' => '\xe2\x85\xb7', + '\xe2\x85\xa8' => '\xe2\x85\xb8', + '\xe2\x85\xa9' => '\xe2\x85\xb9', + '\xe2\x85\xaa' => '\xe2\x85\xba', + '\xe2\x85\xab' => '\xe2\x85\xbb', + '\xe2\x85\xac' => '\xe2\x85\xbc', + '\xe2\x85\xad' => '\xe2\x85\xbd', + '\xe2\x85\xae' => '\xe2\x85\xbe', + '\xe2\x85\xaf' => '\xe2\x85\xbf', + '\xe2\x92\xb6' => '\xe2\x93\x90', + '\xe2\x92\xb7' => '\xe2\x93\x91', + '\xe2\x92\xb8' => '\xe2\x93\x92', + '\xe2\x92\xb9' => '\xe2\x93\x93', + '\xe2\x92\xba' => '\xe2\x93\x94', + '\xe2\x92\xbb' => '\xe2\x93\x95', + '\xe2\x92\xbc' => '\xe2\x93\x96', + '\xe2\x92\xbd' => '\xe2\x93\x97', + '\xe2\x92\xbe' => '\xe2\x93\x98', + '\xe2\x92\xbf' => '\xe2\x93\x99', + '\xe2\x93\x80' => '\xe2\x93\x9a', + '\xe2\x93\x81' => '\xe2\x93\x9b', + '\xe2\x93\x82' => '\xe2\x93\x9c', + '\xe2\x93\x83' => '\xe2\x93\x9d', + '\xe2\x93\x84' => '\xe2\x93\x9e', + '\xe2\x93\x85' => '\xe2\x93\x9f', + '\xe2\x93\x86' => '\xe2\x93\xa0', + '\xe2\x93\x87' => '\xe2\x93\xa1', + '\xe2\x93\x88' => '\xe2\x93\xa2', + '\xe2\x93\x89' => '\xe2\x93\xa3', + '\xe2\x93\x8a' => '\xe2\x93\xa4', + '\xe2\x93\x8b' => '\xe2\x93\xa5', + '\xe2\x93\x8c' => '\xe2\x93\xa6', + '\xe2\x93\x8d' => '\xe2\x93\xa7', + '\xe2\x93\x8e' => '\xe2\x93\xa8', + '\xe2\x93\x8f' => '\xe2\x93\xa9', + '\xef\xbc\xa1' => '\xef\xbd\x81', + '\xef\xbc\xa2' => '\xef\xbd\x82', + '\xef\xbc\xa3' => '\xef\xbd\x83', + '\xef\xbc\xa4' => '\xef\xbd\x84', + '\xef\xbc\xa5' => '\xef\xbd\x85', + '\xef\xbc\xa6' => '\xef\xbd\x86', + '\xef\xbc\xa7' => '\xef\xbd\x87', + '\xef\xbc\xa8' => '\xef\xbd\x88', + '\xef\xbc\xa9' => '\xef\xbd\x89', + '\xef\xbc\xaa' => '\xef\xbd\x8a', + '\xef\xbc\xab' => '\xef\xbd\x8b', + '\xef\xbc\xac' => '\xef\xbd\x8c', + '\xef\xbc\xad' => '\xef\xbd\x8d', + '\xef\xbc\xae' => '\xef\xbd\x8e', + '\xef\xbc\xaf' => '\xef\xbd\x8f', + '\xef\xbc\xb0' => '\xef\xbd\x90', + '\xef\xbc\xb1' => '\xef\xbd\x91', + '\xef\xbc\xb2' => '\xef\xbd\x92', + '\xef\xbc\xb3' => '\xef\xbd\x93', + '\xef\xbc\xb4' => '\xef\xbd\x94', + '\xef\xbc\xb5' => '\xef\xbd\x95', + '\xef\xbc\xb6' => '\xef\xbd\x96', + '\xef\xbc\xb7' => '\xef\xbd\x97', + '\xef\xbc\xb8' => '\xef\xbd\x98', + '\xef\xbc\xb9' => '\xef\xbd\x99', + '\xef\xbc\xba' => '\xef\xbd\x9a', + '\xf0\x90\x90\x80' => '\xf0\x90\x90\xa8', + '\xf0\x90\x90\x81' => '\xf0\x90\x90\xa9', + '\xf0\x90\x90\x82' => '\xf0\x90\x90\xaa', + '\xf0\x90\x90\x83' => '\xf0\x90\x90\xab', + '\xf0\x90\x90\x84' => '\xf0\x90\x90\xac', + '\xf0\x90\x90\x85' => '\xf0\x90\x90\xad', + '\xf0\x90\x90\x86' => '\xf0\x90\x90\xae', + '\xf0\x90\x90\x87' => '\xf0\x90\x90\xaf', + '\xf0\x90\x90\x88' => '\xf0\x90\x90\xb0', + '\xf0\x90\x90\x89' => '\xf0\x90\x90\xb1', + '\xf0\x90\x90\x8a' => '\xf0\x90\x90\xb2', + '\xf0\x90\x90\x8b' => '\xf0\x90\x90\xb3', + '\xf0\x90\x90\x8c' => '\xf0\x90\x90\xb4', + '\xf0\x90\x90\x8d' => '\xf0\x90\x90\xb5', + '\xf0\x90\x90\x8e' => '\xf0\x90\x90\xb6', + '\xf0\x90\x90\x8f' => '\xf0\x90\x90\xb7', + '\xf0\x90\x90\x90' => '\xf0\x90\x90\xb8', + '\xf0\x90\x90\x91' => '\xf0\x90\x90\xb9', + '\xf0\x90\x90\x92' => '\xf0\x90\x90\xba', + '\xf0\x90\x90\x93' => '\xf0\x90\x90\xbb', + '\xf0\x90\x90\x94' => '\xf0\x90\x90\xbc', + '\xf0\x90\x90\x95' => '\xf0\x90\x90\xbd', + '\xf0\x90\x90\x96' => '\xf0\x90\x90\xbe', + '\xf0\x90\x90\x97' => '\xf0\x90\x90\xbf', + '\xf0\x90\x90\x98' => '\xf0\x90\x91\x80', + '\xf0\x90\x90\x99' => '\xf0\x90\x91\x81', + '\xf0\x90\x90\x9a' => '\xf0\x90\x91\x82', + '\xf0\x90\x90\x9b' => '\xf0\x90\x91\x83', + '\xf0\x90\x90\x9c' => '\xf0\x90\x91\x84', + '\xf0\x90\x90\x9d' => '\xf0\x90\x91\x85', + '\xf0\x90\x90\x9e' => '\xf0\x90\x91\x86', + '\xf0\x90\x90\x9f' => '\xf0\x90\x91\x87', + '\xf0\x90\x90\xa0' => '\xf0\x90\x91\x88', + '\xf0\x90\x90\xa1' => '\xf0\x90\x91\x89', + '\xf0\x90\x90\xa2' => '\xf0\x90\x91\x8a', + '\xf0\x90\x90\xa3' => '\xf0\x90\x91\x8b', + '\xf0\x90\x90\xa4' => '\xf0\x90\x91\x8c', + '\xf0\x90\x90\xa5' => '\xf0\x90\x91\x8d' ); -?> \ No newline at end of file +?> diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 6aa970088e..a069ee7541 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -89,7 +89,7 @@ class WebRequest { return isset( $val ); } - function getText( $name, $default = "" ) { + function getText( $name, $default = '' ) { return $this->getGPCText( $_REQUEST, $name, $default ); } @@ -114,7 +114,7 @@ class WebRequest { } function checkSessionCookie() { - return isset( $_COOKIE[ini_get("session.name")] ); + return isset( $_COOKIE[ini_get('session.name')] ); } function getRequestURL() { @@ -129,12 +129,12 @@ class WebRequest { # Take an arbitrary query and rewrite the present URL to include it function appendQuery( $query ) { global $wgTitle; - $basequery = ""; + $basequery = ''; foreach( $_GET as $var => $val ) { - if( $var == "title" ) continue; - $basequery .= "&" . urlencode( $var ) . "=" . urlencode( $val ); + if( $var == 'title' ) continue; + $basequery .= '&' . urlencode( $var ) . '=' . urlencode( $val ); } - $basequery .= "&" . $query; + $basequery .= '&' . $query; # Trim the extra & $basequery = substr( $basequery, 1 ); diff --git a/includes/killthread.php b/includes/killthread.php index 2598c6f755..625bad7a8c 100644 --- a/includes/killthread.php +++ b/includes/killthread.php @@ -5,16 +5,16 @@ $wgCommandLineMode = true; unset( $IP ); -ini_set( "allow_url_fopen", 0 ); # For security... -require_once( "./LocalSettings.php" ); +ini_set( 'allow_url_fopen', 0 ); # For security... +require_once( './LocalSettings.php' ); # Windows requires ';' as separator, ':' for Unix -$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":"; -ini_set( "include_path", "$IP$sep$include_path" ); +$sep = strchr( $include_path = ini_get( 'include_path' ), ';' ) ? ';' : ':'; +ini_set( 'include_path', "$IP$sep$include_path" ); -require_once( "Setup.php" ); +require_once( 'Setup.php' ); -$wgTitle = Title::newFromText( wfMsg( "badtitle" ) ); +$wgTitle = Title::newFromText( wfMsg( 'badtitle' ) ); $wgArticle = new Article($wgTitle); if ( !$argv[1] || !$argv[2] ) { @@ -31,6 +31,6 @@ sleep( $s ); # Kill DB thread $conn = Database::newFromParams( $wgDBserver, $wgDBsqluser, $wgDBsqlpassword, $wgDBname ); -$conn->query( "KILL $tid" ); +$conn->query( 'KILL '.$tid ); ?> diff --git a/includes/proxy_check.php b/includes/proxy_check.php index 3660519928..1ed54c8b81 100644 --- a/includes/proxy_check.php +++ b/includes/proxy_check.php @@ -4,8 +4,8 @@ # Exit if there are not enough parameters, or if it's not command line mode -$output = ""; -if ( ( isset( $_REQUEST ) && array_key_exists( "argv", $_REQUEST ) ) || count( $argv ) < 4 ) { +$output = ''; +if ( ( isset( $_REQUEST ) && array_key_exists( 'argv', $_REQUEST ) ) || count( $argv ) < 4 ) { $output .= "Incorrect parameters\n"; } else { -- 2.20.1