From 9506e3d8121fb1c12b9cc72ca53561c592fdf6cf Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 13 Mar 2013 03:42:41 -0400 Subject: [PATCH] Spellchecked /includes directory * Ran spell-checker over code comments in /includes/ * A few spellchecking fixes for wfDebug() calls Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?" Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf --- includes/Action.php | 2 +- includes/AjaxResponse.php | 2 +- includes/Article.php | 2 +- includes/Autopromote.php | 7 ++--- includes/Block.php | 14 ++++----- includes/Category.php | 2 +- includes/CategoryViewer.php | 6 ++-- includes/Categoryfinder.php | 2 +- includes/ChangeTags.php | 4 +-- includes/ChangesList.php | 4 +-- includes/CryptRand.php | 4 +-- includes/DataUpdate.php | 4 +-- includes/DefaultSettings.php | 2 +- includes/DeferredUpdates.php | 2 +- includes/Defines.php | 2 +- includes/EditPage.php | 28 ++++++++--------- includes/Exception.php | 2 +- includes/Export.php | 6 ++-- includes/Feed.php | 8 ++--- includes/FeedUtils.php | 4 +-- includes/GlobalFunctions.php | 24 +++++++------- includes/HTMLForm.php | 6 ++-- includes/Html.php | 8 ++--- includes/HttpFunctions.php | 4 +-- includes/IP.php | 4 +-- includes/ImageGallery.php | 2 +- includes/ImagePage.php | 14 ++++----- includes/Import.php | 2 +- includes/Init.php | 2 +- includes/LinkFilter.php | 4 +-- includes/Linker.php | 31 +++++++++---------- includes/Message.php | 10 +++--- includes/MessageBlobStore.php | 2 +- includes/MimeMagic.php | 12 +++---- includes/Namespace.php | 4 +-- includes/OutputHandler.php | 2 +- includes/OutputPage.php | 16 +++++----- includes/PHPVersionError.php | 2 +- includes/Pager.php | 10 +++--- includes/Preferences.php | 2 +- includes/PrefixSearch.php | 2 +- includes/ProxyTools.php | 4 +-- includes/QueryPage.php | 4 +-- includes/RecentChange.php | 2 +- includes/Revision.php | 2 +- includes/RevisionList.php | 4 +-- includes/Sanitizer.php | 12 +++---- includes/SeleniumWebSettings.php | 4 +-- includes/Skin.php | 8 ++--- includes/SkinTemplate.php | 12 +++---- includes/SpecialPage.php | 12 +++---- includes/SpecialPageFactory.php | 2 +- includes/StringUtils.php | 4 +-- includes/StubObject.php | 6 ++-- includes/Title.php | 20 ++++++------ includes/TitleArray.php | 4 +-- includes/UIDGenerator.php | 4 +-- includes/User.php | 11 +++---- includes/UserMailer.php | 4 +-- includes/WebRequest.php | 4 +-- includes/WebStart.php | 2 +- includes/WikiPage.php | 6 ++-- includes/Xml.php | 2 +- includes/ZhClient.php | 2 +- includes/ZipDirectoryReader.php | 2 +- includes/api/ApiMove.php | 2 +- includes/api/ApiQueryExternalLinks.php | 2 +- includes/db/DatabaseUtility.php | 2 +- includes/diff/WikiDiff3.php | 2 +- includes/externalstore/ExternalStore.php | 4 +-- includes/installer/InstallDocFormatter.php | 2 +- includes/job/README | 2 +- includes/json/FormatJson.php | 2 +- includes/json/Services_JSON.php | 10 +++--- includes/libs/jsminplus.php | 6 ++-- includes/media/FormatMetadata.php | 2 +- includes/media/JpegMetadataExtractor.php | 2 +- includes/normal/Makefile | 2 +- includes/normal/UtfNormal.php | 2 +- .../objectcache/MemcachedPeclBagOStuff.php | 2 +- includes/parser/DateFormatter.php | 2 +- .../resourceloader/ResourceLoaderModule.php | 2 +- .../specials/SpecialRecentchangeslinked.php | 2 +- includes/upload/UploadBase.php | 22 ++++++------- 84 files changed, 238 insertions(+), 241 deletions(-) diff --git a/includes/Action.php b/includes/Action.php index 7c3a3ba2c7..2e0c88ba9a 100644 --- a/includes/Action.php +++ b/includes/Action.php @@ -32,7 +32,7 @@ * * Actions generally fall into two groups: the show-a-form-then-do-something-with-the-input * format (protect, delete, move, etc), and the just-do-something format (watch, rollback, - * patrol, etc). The FormAction and FormlessAction classes respresent these two groups. + * patrol, etc). The FormAction and FormlessAction classes represent these two groups. */ abstract class Action { diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php index 23c31bf9da..138f808a03 100644 --- a/includes/AjaxResponse.php +++ b/includes/AjaxResponse.php @@ -172,7 +172,7 @@ class AjaxResponse { # tell the client to use a cached copy, without a way to purge it. if ( $wgUseSquid ) { - # Expect explicite purge of the proxy cache, but require end user agents + # Expect explicit purge of the proxy cache, but require end user agents # to revalidate against the proxy on each visit. # Surrogate-Control controls our Squid, Cache-Control downstream caches diff --git a/includes/Article.php b/includes/Article.php index e5919cfe79..9b4afe44fc 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1727,7 +1727,7 @@ class Article implements Page { * * @param $oldid mixed integer Revision ID or null * @param $user User The relevant user - * @return ParserOutput or false if the given revsion ID is not found + * @return ParserOutput or false if the given revision ID is not found */ public function getParserOutput( $oldid = null, User $user = null ) { //XXX: bypasses mParserOptions and thus setParserOptions() diff --git a/includes/Autopromote.php b/includes/Autopromote.php index 781f4fccad..604b9248c3 100644 --- a/includes/Autopromote.php +++ b/includes/Autopromote.php @@ -140,8 +140,8 @@ class Autopromote { return true; } } - # If we got here, the array presumably does not contain other condi- - # tions; it's not recursive. Pass it off to self::checkCondition. + // If we got here, the array presumably does not contain other conditions; + // it's not recursive. Pass it off to self::checkCondition. if ( !is_array( $cond ) ) { $cond = array( $cond ); } @@ -152,8 +152,7 @@ class Autopromote { /** * As recCheckCondition, but *not* recursive. The only valid conditions * are those whose first element is APCOND_EMAILCONFIRMED/APCOND_EDITCOUNT/ - * APCOND_AGE. Other types will throw an exception if no extension evalu- - * ates them. + * APCOND_AGE. Other types will throw an exception if no extension evaluates them. * * @param array $cond A condition, which must not contain other conditions * @param $user User The user to check the condition against diff --git a/includes/Block.php b/includes/Block.php index 3843631ad2..7ee36ce95b 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -227,7 +227,7 @@ class Block { /** * Load a block from the database which affects the already-set $this->target: * 1) A block directly on the given user or IP - * 2) A rangeblock encompasing the given IP (smallest first) + * 2) A rangeblock encompassing the given IP (smallest first) * 3) An autoblock on the given IP * @param $vagueTarget User|String also search for blocks affecting this target. Doesn't * make any sense to use TYPE_AUTO / TYPE_ID here. Leave blank to skip IP lookups. @@ -251,7 +251,7 @@ class Block { list( $target, $type ) = self::parseTarget( $vagueTarget ); switch( $type ) { case self::TYPE_USER: - # Slightly wierd, but who are we to argue? + # Slightly weird, but who are we to argue? $conds['ipb_address'][] = (string)$target; break; @@ -330,9 +330,9 @@ class Block { } /** - * Get a set of SQL conditions which will select rangeblocks encompasing a given range + * Get a set of SQL conditions which will select rangeblocks encompassing a given range * @param string $start Hexadecimal IP representation - * @param string $end Hexadecimal IP represenation, or null to use $start = $end + * @param string $end Hexadecimal IP representation, or null to use $start = $end * @return String */ public static function getRangeCond( $start, $end = null ) { @@ -488,7 +488,7 @@ class Block { * Update a block in the DB with new parameters. * The ID field needs to be loaded first. * - * @return Int number of affected rows, which should probably be 1 or something's + * @return Int number of affected rows, which should probably be 1 or something has * gone slightly awry */ public function update() { @@ -982,7 +982,7 @@ class Block { } /** - * Gets rid of uneeded numbers in quad-dotted/octet IP strings + * Gets rid of unneeded numbers in quad-dotted/octet IP strings * For example, 127.111.113.151/24 -> 127.111.113.0/24 * @param string $range IP address to normalize * @return string @@ -1193,7 +1193,7 @@ class Block { /** * Set the user who implemented (or will implement) this block - * @param $user User|string Local User object or username string for foriegn users + * @param $user User|string Local User object or username string for foreign users */ public function setBlocker( $user ) { $this->blocker = $user; diff --git a/includes/Category.php b/includes/Category.php index c8397f74d4..868d6c4628 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -167,7 +167,7 @@ class Category { # NOTE: the row often results from a LEFT JOIN on categorylinks. This may result in # all the cat_xxx fields being null, if the category page exists, but nothing - # was ever added to the category. This case should be treated linke an empty + # was ever added to the category. This case should be treated link an empty # category, if possible. if ( $row->cat_title === null ) { diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index f9020b751c..970adb5371 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -249,7 +249,7 @@ class CategoryViewer extends ContextSource { $link = Linker::link( $title ); if ( $isRedirect ) { // This seems kind of pointless given 'mw-redirect' class, - // but keeping for back-compatiability with user css. + // but keeping for back-compatibility with user css. $link = '' . $link . ''; } $this->articles[] = $link; @@ -392,7 +392,7 @@ class CategoryViewer extends ContextSource { $r = ''; # @todo FIXME: Here and in the other two sections: we don't need to bother - # with this rigamarole if the entire category contents fit on one page + # with this rigmarole if the entire category contents fit on one page # and have already been retrieved. We can just use $rescnt in that # case and save a query and some logic. $dbcnt = $this->cat->getPageCount() - $this->cat->getSubcatCount() @@ -574,7 +574,7 @@ class CategoryViewer extends ContextSource { * Create paging links, as a helper method to getSectionPagingLinks(). * * @param string $first The 'until' parameter for the generated URL - * @param string $last The 'from' parameter for the genererated URL + * @param string $last The 'from' parameter for the generated URL * @param string $type A prefix for parameters, 'page' or 'subcat' or * 'file' * @return String HTML diff --git a/includes/Categoryfinder.php b/includes/Categoryfinder.php index 59e6593108..6ef224b607 100644 --- a/includes/Categoryfinder.php +++ b/includes/Categoryfinder.php @@ -124,7 +124,7 @@ class Categoryfinder { $path[] = $id; - # Shortcut (runtime paranoia): No contitions=all matched + # Shortcut (runtime paranoia): No conditions=all matched if ( count( $conds ) == 0 ) { return true; } diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 88f7d44060..3adf58f8d2 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -79,7 +79,7 @@ class ChangeTags { * @param $rc_id int: rc_id of the change to add the tags to * @param $rev_id int: rev_id of the change to add the tags to * @param $log_id int: log_id of the change to add the tags to - * @param string $params params to put in the ct_params field of tabel 'change_tag' + * @param string $params params to put in the ct_params field of table 'change_tag' * * @throws MWException * @return bool: false if no changes are made, otherwise true @@ -160,7 +160,7 @@ class ChangeTags { * Handles selecting tags, and filtering. * Needs $tables to be set up properly, so we can figure out which join conditions to use. * - * @param string|array $tables Tabel names, see DatabaseBase::select + * @param string|array $tables Table names, see DatabaseBase::select * @param string|array $fields Fields used in query, see DatabaseBase::select * @param string|array $conds conditions used in query, see DatabaseBase::select * @param $join_conds Array: join conditions, see DatabaseBase::select diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 451f2da594..8461001e9b 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -60,7 +60,7 @@ class ChangesList extends ContextSource { protected $message; /** - * Changeslist contructor + * Changeslist constructor * * @param $obj Skin or IContextSource */ @@ -563,7 +563,7 @@ class ChangesList extends ContextSource { } public function insertExtra( &$s, &$rc, &$classes ) { - ## Empty, used for subclassers to add anything special. + // Empty, used for subclasses to add anything special. } protected function showAsUnpatrolled( RecentChange $rc ) { diff --git a/includes/CryptRand.php b/includes/CryptRand.php index 01bbc44b3d..d0305d8b7c 100644 --- a/includes/CryptRand.php +++ b/includes/CryptRand.php @@ -79,7 +79,7 @@ class MWCryptRand { // Include some information about the filesystem's current state in the random state $files = array(); - // We know this file is here so grab some info about ourself + // We know this file is here so grab some info about ourselves $files[] = __FILE__; // We must also have a parent folder, and with the usual file structure, a grandparent @@ -162,7 +162,7 @@ class MWCryptRand { $buffer = str_repeat( ' ', $bufLength ); $bufPos = 0; - // Iterate for $duration seconds or at least $minIerations number of iterations + // Iterate for $duration seconds or at least $minIterations number of iterations $iterations = 0; $startTime = microtime( true ); $currentTime = $startTime; diff --git a/includes/DataUpdate.php b/includes/DataUpdate.php index 419d7e5f02..114ae14495 100644 --- a/includes/DataUpdate.php +++ b/includes/DataUpdate.php @@ -67,8 +67,8 @@ abstract class DataUpdate implements DeferrableUpdate { * * This methods supports transactions logic by first calling beginTransaction() * on all updates in the array, then calling doUpdate() on each, and, if all goes well, - * then calling commitTransaction() on each update. If an error occurrs, - * rollbackTransaction() will be called on any update object that had beginTranscation() + * then calling commitTransaction() on each update. If an error occurs, + * rollbackTransaction() will be called on any update object that had beginTransaction() * called but not yet commitTransaction(). * * This allows for limited transactional logic across multiple backends for storing diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index cbad548daf..4d971db25a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3204,7 +3204,7 @@ $wgInterwikiFallbackSite = 'wiki'; /** @} */ # end of Interwiki caching settings. /** - * If local interwikies are set up which allow redirects, + * If local interwikis are set up which allow redirects, * set this regexp to restrict URLs which will be displayed * as 'redirected from' links. * diff --git a/includes/DeferredUpdates.php b/includes/DeferredUpdates.php index 2ca646b254..89c4df68f8 100644 --- a/includes/DeferredUpdates.php +++ b/includes/DeferredUpdates.php @@ -34,7 +34,7 @@ interface DeferrableUpdate { } /** - * Class for mananging the deferred updates. + * Class for managing the deferred updates. * * @since 1.19 */ diff --git a/includes/Defines.php b/includes/Defines.php index 31235488d7..c4a8633515 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -137,7 +137,7 @@ define( 'MEDIATYPE_ARCHIVE', 'ARCHIVE' ); // archive file (zip, tar, etc) */ define( 'AV_NO_VIRUS', 0 ); #scan ok, no virus found define( 'AV_VIRUS_FOUND', 1 ); #virus found! -define( 'AV_SCAN_ABORTED', -1 ); #scan aborted, the file is probably imune +define( 'AV_SCAN_ABORTED', -1 ); #scan aborted, the file is probably immune define( 'AV_SCAN_FAILED', false ); #scan failed (scanner not found or error in scanner) /**@}*/ diff --git a/includes/EditPage.php b/includes/EditPage.php index a0b6c93cf9..8b2dbb5f9a 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -58,7 +58,7 @@ class EditPage { const AS_HOOK_ERROR_EXPECTED = 212; /** - * Status: User is blocked from editting this page + * Status: User is blocked from editing this page */ const AS_BLOCKED_PAGE_FOR_USER = 215; @@ -93,7 +93,7 @@ class EditPage { const AS_RATE_LIMITED = 221; /** - * Status: article was deleted while editting and param wpRecreate == false or form + * Status: article was deleted while editing and param wpRecreate == false or form * was not posted */ const AS_ARTICLE_WAS_DELETED = 222; @@ -116,7 +116,7 @@ class EditPage { /** * Status: no edit summary given and the user has forceeditsummary set and the user is not - * editting in his own userspace or talkspace and wpIgnoreBlankSummary == false + * editing in his own userspace or talkspace and wpIgnoreBlankSummary == false */ const AS_SUMMARY_NEEDED = 226; @@ -136,7 +136,7 @@ class EditPage { const AS_OK = 230; /** - * Status: WikiPage::doEdit() was unsuccessfull + * Status: WikiPage::doEdit() was unsuccessful */ const AS_END = 231; @@ -253,7 +253,7 @@ class EditPage { public $previewTextAfterContent = ''; public $mPreloadContent = null; - /* $didSave should be set to true whenever an article was succesfully altered. */ + /* $didSave should be set to true whenever an article was successfully altered. */ public $didSave = false; public $undidRev = 0; @@ -742,7 +742,7 @@ class EditPage { $this->save = false; $this->diff = false; $this->minoredit = false; - $this->watchthis = $request->getBool( 'watchthis', false ); // Watch may be overriden by request parameters + $this->watchthis = $request->getBool( 'watchthis', false ); // Watch may be overridden by request parameters $this->recreate = false; // When creating a new section, we can preload a section title by passing it as the @@ -790,7 +790,7 @@ class EditPage { /** * Subpage overridable method for extracting the page content data from the * posted form to be placed in $this->textbox1, if using customized input - * this method should be overrided and return the page text that will be used + * this method should be overridden and return the page text that will be used * for saving, preview parsing and so on... * * @param $request WebRequest @@ -972,7 +972,7 @@ class EditPage { * section replaced in its context (using WikiPage::replaceSection()) * to the original text of the edit. * - * This difers from Article::getContent() that when a missing revision is + * This differs from Article::getContent() that when a missing revision is * encountered the result will be null and not the * 'missing-revision' message. * @@ -2181,7 +2181,7 @@ class EditPage { } if ( $this->hasPresetSummary ) { - // If a summary has been preset using &summary= we dont want to prompt for + // If a summary has been preset using &summary= we don't want to prompt for // a different summary. Only prompt for a summary if the summary is blanked. // (Bug 17416) $this->autoSumm = md5( '' ); @@ -2207,7 +2207,7 @@ class EditPage { } if ( $this->isConflict ) { - // In an edit conflict bypass the overrideable content form method + // In an edit conflict bypass the overridable content form method // and fallback to the raw wpTextbox1 since editconflicts can't be // resolved between page source edits and custom ui edits using the // custom edit ui. @@ -2441,7 +2441,7 @@ class EditPage { * @return array An array in the format array( $label, $input ) */ function getSummaryInput( $summary = "", $labelText = null, $inputAttrs = null, $spanLabelAttrs = null ) { - // Note: the maxlength is overriden in JS to 255 and to make it use UTF-8 bytes, not characters. + // Note: the maxlength is overridden in JS to 255 and to make it use UTF-8 bytes, not characters. $inputAttrs = ( is_array( $inputAttrs ) ? $inputAttrs : array() ) + array( 'id' => 'wpSummary', 'maxlength' => '200', @@ -3620,7 +3620,7 @@ HTML * @private */ function makesafe( $invalue ) { - // Armor existing references for reversability. + // Armor existing references for reversibility. $invalue = strtr( $invalue, array( "&#x" => "�" ) ); $bytesleft = 0; @@ -3672,7 +3672,7 @@ HTML $i++; } while ( ctype_xdigit( $invalue[$i] ) && ( $i < strlen( $invalue ) ) ); - // Do some sanity checks. These aren't needed for reversability, + // Do some sanity checks. These aren't needed for reversibility, // but should help keep the breakage down if the editor // breaks one of the entities whilst editing. if ( ( substr( $invalue, $i, 1 ) == ";" ) and ( strlen( $hexstring ) <= 6 ) ) { @@ -3685,7 +3685,7 @@ HTML $result .= substr( $invalue, $i, 1 ); } } - // reverse the transform that we made for reversability reasons. + // reverse the transform that we made for reversibility reasons. return strtr( $result, array( "�" => "&#x" ) ); } } diff --git a/includes/Exception.php b/includes/Exception.php index 530afd0480..0bd7a2a733 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -171,7 +171,7 @@ class MWException extends Exception { /** * Get a random ID for this error. - * This allows to link the exception to its correspoding log entry when + * This allows to link the exception to its corresponding log entry when * $wgShowExceptionDetails is set to false. * * @return string diff --git a/includes/Export.php b/includes/Export.php index bfd561e7c8..d8cc024224 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -348,7 +348,7 @@ class WikiExporter { $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' ); $opts['ORDER BY'] = array( 'rev_page ASC', 'rev_id ASC' ); } else { - # Uknown history specification parameter? + # Unknown history specification parameter? wfProfileOut( __METHOD__ ); throw new MWException( __METHOD__ . " given invalid history dump type." ); } @@ -872,7 +872,7 @@ class XmlDumpWriter { } /** - * Base class for output stream; prints to stdout or buffer or whereever. + * Base class for output stream; prints to stdout or buffer or wherever. * @ingroup Dump */ class DumpOutput { @@ -1442,7 +1442,7 @@ class DumpLatestFilter extends DumpFilter { } /** - * Base class for output stream; prints to stdout or buffer or whereever. + * Base class for output stream; prints to stdout or buffer or wherever. * @ingroup Dump */ class DumpMultiWriter { diff --git a/includes/Feed.php b/includes/Feed.php index a30ba5cecb..caf2e5716a 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -282,7 +282,7 @@ class RSSFeed extends ChannelFeed { } /** - * Ouput an RSS 2.0 header + * Output an RSS 2.0 header */ function outHeader() { global $wgVersion; @@ -318,7 +318,7 @@ class RSSFeed extends ChannelFeed { } /** - * Ouput an RSS 2.0 footer + * Output an RSS 2.0 footer */ function outFooter() { ?> @@ -362,7 +362,7 @@ class AtomFeed extends ChannelFeed { } /** - * Atom 1.0 requires a unique, opaque IRI as a unique indentifier + * Atom 1.0 requires a unique, opaque IRI as a unique identifier * for every feed we create. For now just use the URL, but who * can tell if that's right? If we put options on the feed, do we * have to change the id? Maybe? Maybe not. @@ -409,7 +409,7 @@ class AtomFeed extends ChannelFeed { } /** - * Outputs the footer for Atom 1.0 feed (basicly '\'). + * Outputs the footer for Atom 1.0 feed (basically '\'). */ function outFooter() {?> ' . implode( ' ', array_filter( array( @@ -115,7 +115,7 @@ class FeedUtils { // NOTE: Check permissions for anonymous users, not current user. // No "privileged" version should end up in the cache. - // Most feed readers will not log in anway. + // Most feed readers will not log in anyway. $anon = new User(); $accErrors = $title->getUserPermissionsErrors( 'read', $anon, true ); diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 54e546e74c..0feddd2ca3 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -311,7 +311,7 @@ function wfRandom() { } /** - * Get a random string containing a number of pesudo-random hex + * Get a random string containing a number of pseudo-random hex * characters. * @note This is not secure, if you are trying to generate some sort * of token please use MWCryptRand instead. @@ -422,8 +422,8 @@ function wfArrayToCgi( $array1, $array2 = null, $prefix = '' ) { /** * This is the logical opposite of wfArrayToCgi(): it accepts a query string as - * its argument and returns the same string in array form. This allows compa- - * tibility with legacy functions that accept raw query strings instead of nice + * its argument and returns the same string in array form. This allows compatibility + * with legacy functions that accept raw query strings instead of nice * arrays. Of course, keys and values are urldecode()d. * * @param string $query query string @@ -1081,7 +1081,7 @@ function wfLogDBError( $text ) { * @param $function String * @param string|bool $version Version of MediaWiki that the function was deprecated in (Added in 1.19). * @param string|bool $component Added in 1.19. - * @param $callerOffset integer: How far up the callstack is the original + * @param $callerOffset integer: How far up the call stack is the original * caller. 2 = function that called the function that called * wfDeprecated (Added in 1.20) * @@ -1662,7 +1662,7 @@ function wfMsgWikiHtml( $key ) { * content: fetch message for content language instead of interface * Also can accept a single associative argument, of the form 'language' => 'xx': * language: Language object or language code to fetch message for - * (overriden by content). + * (overridden by content). * Behavior for conflicting options (e.g., parse+parseinline) is undefined. * * @return String @@ -1742,7 +1742,7 @@ function wfMsgExt( $key, $options ) { /** * Since wfMsg() and co suck, they don't return false if the message key they * looked up didn't exist but a XHTML string, this function checks for the - * nonexistance of messages by checking the MessageCache::get() result directly. + * nonexistence of messages by checking the MessageCache::get() result directly. * * @deprecated since 1.18. Use Message::isDisabled(). * @@ -1825,7 +1825,7 @@ function wfReportTime() { * * With Zend Optimizer 3.2.0 loaded, this causes segfaults under somewhat * murky circumstances, which may be triggered in part by stub objects - * or other fancy talkin'. + * or other fancy talking'. * * Will return an empty array if Zend Optimizer is detected or if * debug_backtrace is disabled, otherwise the output from @@ -2090,7 +2090,7 @@ function wfEscapeWikiText( $text ) { } /** - * Get the current unix timetstamp with microseconds. Useful for profiling + * Get the current unix timestamp with microseconds. Useful for profiling * @return Float */ function wfTime() { @@ -3321,7 +3321,7 @@ function wfHttpOnlySafe() { } /** - * Check if there is sufficent entropy in php's built-in session generation + * Check if there is sufficient entropy in php's built-in session generation * @return bool true = there is sufficient entropy */ function wfCheckEntropy() { @@ -3702,8 +3702,8 @@ function wfCountDown( $n ) { * characters before hashing. * @return string * @codeCoverageIgnore - * @deprecated since 1.20; Please use MWCryptRand for security purposes and wfRandomString for pesudo-random strings - * @warning This method is NOT secure. Additionally it has many callers that use it for pesudo-random purposes. + * @deprecated since 1.20; Please use MWCryptRand for security purposes and wfRandomString for pseudo-random strings + * @warning This method is NOT secure. Additionally it has many callers that use it for pseudo-random purposes. */ function wfGenerateToken( $salt = '' ) { wfDeprecated( __METHOD__, '1.20' ); @@ -3888,7 +3888,7 @@ function wfRunHooks( $event, $args = array() ) { * * @param string $format The format string (See php's docs) * @param $data: A binary string of binary data - * @param $length integer or false: The minimun length of $data. This is to + * @param $length integer or false: The minimum length of $data. This is to * prevent reading beyond the end of $data. false to disable the check. * * Also be careful when using this function to read unsigned 32 bit integer diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 23c5ca7780..686397390f 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -378,7 +378,7 @@ class HTMLForm extends ContextSource { } /** - * Validate all the fields, and call the submision callback + * Validate all the fields, and call the submission callback * function if everything is kosher. * @throws MWException * @return Mixed Bool true == Successful submission, Bool false @@ -886,7 +886,7 @@ class HTMLForm extends ContextSource { /** * Set the prefix for various default messages * @todo currently only used for the "
" legend on forms - * with multiple sections; should be used elsewhre? + * with multiple sections; should be used elsewhere? * @param $p String * @return HTMLForm $this for chaining calls (since 1.20) */ @@ -1109,7 +1109,7 @@ abstract class HTMLFormField { /** * Get a translated interface message * - * This is a wrapper arround $this->mParent->msg() if $this->mParent is set + * This is a wrapper around $this->mParent->msg() if $this->mParent is set * and wfMessage() otherwise. * * Parameters are the same as wfMessage(). diff --git a/includes/Html.php b/includes/Html.php index 27579972a0..af4b4bbf4d 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -500,7 +500,7 @@ class Html { if ( in_array( $key, $spaceSeparatedListAttributes ) ) { // Apply some normalization and remove duplicates - // Convert into correct array. Array can contain space-seperated + // Convert into correct array. Array can contain space-separated // values. Implode/explode to get those into the main array as well. if ( is_array( $value ) ) { // If input wasn't an array, we can skip this step @@ -512,7 +512,7 @@ class Html { if ( !isset( $value[$v] ) ) { // As a special case don't set 'foo' if a // separate 'foo' => true/false exists in the array - // keys should be authoritive + // keys should be authoritative $newValue[] = $v; } } elseif ( $v ) { @@ -796,7 +796,7 @@ class Html { // Value is provided by user, the name shown is localized for the user. $options[$params['all']] = wfMessage( 'namespacesall' )->text(); } - // Add all namespaces as options (in the content langauge) + // Add all namespaces as options (in the content language) $options += $wgContLang->getFormattedNamespaces(); // Convert $options to HTML and filter out namespaces below 0 @@ -807,7 +807,7 @@ class Html { } if ( $nsId === NS_MAIN ) { // For other namespaces use use the namespace prefix as label, but for - // main we don't use "" but the user message descripting it (e.g. "(Main)" or "(Article)") + // main we don't use "" but the user message describing it (e.g. "(Main)" or "(Article)") $nsName = wfMessage( 'blanknamespace' )->text(); } elseif ( is_int( $nsId ) ) { $nsName = $wgContLang->convertNamespace( $nsId ); diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 27b17494c7..dc65c67ecd 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -335,7 +335,7 @@ class MWHttpRequest { } /** - * Set the refererer header + * Set the referrer header */ public function setReferer( $url ) { $this->setHeader( 'Referer', $url ); @@ -450,7 +450,7 @@ class MWHttpRequest { /** * Parses the headers, including the HTTP status code and any - * Set-Cookie headers. This function expectes the headers to be + * Set-Cookie headers. This function expects the headers to be * found in an array in the member variable headerList. */ protected function parseHeader() { diff --git a/includes/IP.php b/includes/IP.php index 955ee8bd3c..72b9a52c81 100644 --- a/includes/IP.php +++ b/includes/IP.php @@ -180,7 +180,7 @@ class IP { $ip ); } - // Remove leading zereos from each bloc as needed + // Remove leading zeros from each bloc as needed $ip = preg_replace( '/(^|:)0+(' . RE_IPV6_WORD . ')/', '$1$2', $ip ); return $ip; } @@ -746,7 +746,7 @@ class IP { } /** - * Gets rid of uneeded numbers in quad-dotted/octet IP strings + * Gets rid of unneeded numbers in quad-dotted/octet IP strings * For example, 127.111.113.151/24 -> 127.111.113.0/24 * @param string $range IP address to normalize * @return string diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 9660c07da3..1556ad9442 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -360,7 +360,7 @@ class ImageGallery { # http://bugzilla.wikimedia.org/show_bug.cgi?id=1765 -Ævar # Weird double wrapping (the extra div inside the li) needed due to FF2 bug - # Can be safely removed if FF2 falls completely out of existance + # Can be safely removed if FF2 falls completely out of existence $output .= "\n\t\t" . '
  • ' . '
    ' diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 11e876f1f2..b3a485aac1 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -262,7 +262,7 @@ class ImagePage extends Article { # @todo FIXME: Why is this using escapeId for a class?! $class = Sanitizer::escapeId( $v['id'] ); if ( $type == 'collapsed' ) { - $class .= ' collapsable'; + $class .= ' collapsable'; // sic } $r .= "\n"; $r .= "{$v['name']}\n"; @@ -330,13 +330,13 @@ class ImagePage extends Article { if ( $width > $maxWidth || $height > $maxHeight ) { # Calculate the thumbnail size. # First case, the limiting factor is the width, not the height. - if ( $width / $height >= $maxWidth / $maxHeight ) { // FIXME: Possible divison by 0. bug 36911 - $height = round( $height * $maxWidth / $width ); // FIXME: Possible divison by 0. bug 36911 + if ( $width / $height >= $maxWidth / $maxHeight ) { // FIXME: Possible division by 0. bug 36911 + $height = round( $height * $maxWidth / $width ); // FIXME: Possible division by 0. bug 36911 $width = $maxWidth; # Note that $height <= $maxHeight now. } else { - $newwidth = floor( $width * $maxHeight / $height ); // FIXME: Possible divison by 0. bug 36911 - $height = round( $height * $newwidth / $width ); // FIXME: Possible divison by 0. bug 36911 + $newwidth = floor( $width * $maxHeight / $height ); // FIXME: Possible division by 0. bug 36911 + $height = round( $height * $newwidth / $width ); // FIXME: Possible division by 0. bug 36911 $width = $newwidth; # Note that $height <= $maxHeight now, but might not be identical # because of rounding. @@ -550,7 +550,7 @@ EOT $nofile = 'filepage-nofile'; } // Note, if there is an image description page, but - // no image, then this setRobotPolicy is overriden + // no image, then this setRobotPolicy is overridden // by Article::View(). $out->setRobotPolicy( 'noindex,nofollow' ); $out->wrapWikiMsg( "", $nofile ); @@ -906,7 +906,7 @@ EOT } /** - * Returns the corrosponding $wgImageLimits entry for the selected user option + * Returns the corresponding $wgImageLimits entry for the selected user option * * @param $user User * @param string $optionName Name of a option to check, typically imagesize or thumbsize diff --git a/includes/Import.php b/includes/Import.php index b0ca4fa08f..fee636f54d 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -1531,7 +1531,7 @@ class WikiRevision { } if ( $status->isGood() ) { - wfDebug( __METHOD__ . ": Succesful\n" ); + wfDebug( __METHOD__ . ": Successful\n" ); return true; } else { wfDebug( __METHOD__ . ': failed: ' . $status->getXml() . "\n" ); diff --git a/includes/Init.php b/includes/Init.php index ae21011cef..66f9544d47 100644 --- a/includes/Init.php +++ b/includes/Init.php @@ -173,7 +173,7 @@ class MWInit { } /** - * Determine wether a method exists within a class, using a method which works + * Determine whether a method exists within a class, using a method which works * under HipHop. * * Note that under HipHop when method_exists is given a string for it's class diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php index 26928bf45f..11b655956e 100644 --- a/includes/LinkFilter.php +++ b/includes/LinkFilter.php @@ -118,13 +118,13 @@ class LinkFilter { // Reverse the labels in the hostname, convert to lower case // For emails reverse domainpart only if ( $prot == 'mailto:' && strpos( $host, '@' ) ) { - // complete email adress + // complete email address $mailparts = explode( '@', $host ); $domainpart = strtolower( implode( '.', array_reverse( explode( '.', $mailparts[1] ) ) ) ); $host = $domainpart . '@' . $mailparts[0]; $like = array( "$prot$host", $db->anyString() ); } elseif ( $prot == 'mailto:' ) { - // domainpart of email adress only. do not add '.' + // domainpart of email address only. do not add '.' $host = strtolower( implode( '.', array_reverse( explode( '.', $host ) ) ) ); $like = array( "$prot$host", $db->anyString() ); } else { diff --git a/includes/Linker.php b/includes/Linker.php index 8003ca3faa..972adfceab 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -36,8 +36,8 @@ class Linker { const TOOL_LINKS_EMAIL = 2; /** - * Get the appropriate HTML attributes to add to the "a" element of an ex- - * ternal link, as created by [wikisyntax]. + * Get the appropriate HTML attributes to add to the "a" element of an + * external link, as created by [wikisyntax]. * * @param string $class the contents of the class attribute; if an empty * string is passed, which is the default value, defaults to 'external'. @@ -50,8 +50,7 @@ class Linker { } /** - * Get the appropriate HTML attributes to add to the "a" element of an in- - * terwiki link. + * Get the appropriate HTML attributes to add to the "a" element of an interwiki link. * * @param string $title the title text for the link, URL-encoded (???) but * not HTML-escaped @@ -73,8 +72,7 @@ class Linker { } /** - * Get the appropriate HTML attributes to add to the "a" element of an in- - * ternal link. + * Get the appropriate HTML attributes to add to the "a" element of an internal link. * * @param string $title the title text for the link, URL-encoded (???) but * not HTML-escaped @@ -89,8 +87,8 @@ class Linker { } /** - * Get the appropriate HTML attributes to add to the "a" element of an in- - * ternal link, given the Title object for the page we want to link to. + * Get the appropriate HTML attributes to add to the "a" element of an internal + * link, given the Title object for the page we want to link to. * * @param $nt Title * @param string $unused unused @@ -171,8 +169,8 @@ class Linker { * the link text. This is raw HTML and will not be escaped. If null, * defaults to the prefixed text of the Title; or if the Title is just a * fragment, the contents of the fragment. - * @param array $customAttribs A key => value array of extra HTML attri- - * butes, such as title and class. (href is ignored.) Classes will be + * @param array $customAttribs A key => value array of extra HTML attributes, + * such as title and class. (href is ignored.) Classes will be * merged with the default classes, while other attributes will replace * default attributes. All passed attribute values will be HTML-escaped. * A false attribute value means to suppress that attribute. @@ -382,13 +380,13 @@ class Linker { * @return string */ private static function linkText( $target ) { - # We might be passed a non-Title by make*LinkObj(). Fail gracefully. + // We might be passed a non-Title by make*LinkObj(). Fail gracefully. if ( !$target instanceof Title ) { return ''; } - # If the target is just a fragment, with no title, we return the frag- - # ment text. Otherwise, we return the title text itself. + // If the target is just a fragment, with no title, we return the fragment + // text. Otherwise, we return the title text itself. if ( $target->getPrefixedText() === '' && $target->getFragment() !== '' ) { return htmlspecialchars( $target->getFragment() ); } @@ -552,7 +550,7 @@ class Linker { * caption HTML for image caption. * link-url URL to link to * link-title Title object to link to - * link-target Value for the target attribue, only with link-url + * link-target Value for the target attribute, only with link-url * no-link Boolean, suppress description link * * @param array $handlerParams associative array of media handler parameters, to be passed @@ -683,6 +681,7 @@ class Linker { 'valign' => isset( $fp['valign'] ) ? $fp['valign'] : false, 'img-class' => $fp['class'] ); if ( isset( $fp['border'] ) ) { + // TODO: BUG? Both values are identical $params['img-class'] .= ( $params['img-class'] !== '' ) ? ' thumbborder' : 'thumbborder'; } $params = self::getImageLinkMTOParams( $fp, $query, $parser ) + $params; @@ -1565,7 +1564,7 @@ class Linker { public static function commentBlock( $comment, $title = null, $local = false ) { // '*' used to be the comment inserted by the software way back // in antiquity in case none was provided, here for backwards - // compatability, acc. to brion -ævar + // compatibility, acc. to brion -ævar if ( $comment == '' || $comment == '*' ) { return ''; } else { @@ -1808,7 +1807,7 @@ class Linker { * is set and the user is the only contributor of the page. * * @param $rev Revision object - * @param bool $verify Try to verfiy that this revision can really be rolled back + * @param bool $verify Try to verify that this revision can really be rolled back * @return integer|bool|null */ public static function getRollbackEditCount( $rev, $verify ) { diff --git a/includes/Message.php b/includes/Message.php index 3bfaf4c554..5719f83090 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -22,11 +22,11 @@ */ /** - * The Message class provides methods which fullfil two basic services: + * The Message class provides methods which fulfil two basic services: * - fetching interface messages * - processing messages into a variety of formats * - * First implemented with MediaWiki 1.17, the Message class is intented to + * First implemented with MediaWiki 1.17, the Message class is intended to * replace the old wfMsg* functions that over time grew unusable. * @see https://www.mediawiki.org/wiki/Manual:Messages_API for equivalences * between old and new functions. @@ -261,7 +261,7 @@ class Message { /** * Factory function that is just wrapper for the real constructor. It is - * intented to be used instead of the real constructor, because it allows + * intended to be used instead of the real constructor, because it allows * chaining method calls, while new objects don't. * @since 1.17 * @param string $key message key @@ -554,7 +554,7 @@ class Message { } /** - * Returns the message text as-is, only parameters are subsituted. + * Returns the message text as-is, only parameters are substituted. * @since 1.17 * @return String: Unescaped untransformed message text. */ @@ -633,7 +633,7 @@ class Message { } /** - * Substitutes any paramaters into the message text. + * Substitutes any parameters into the message text. * @since 1.17 * @param string $message the message text * @param string $type either before or after diff --git a/includes/MessageBlobStore.php b/includes/MessageBlobStore.php index bcccf1dc54..8a8142b7e3 100644 --- a/includes/MessageBlobStore.php +++ b/includes/MessageBlobStore.php @@ -29,7 +29,7 @@ * A message blob is a JSON object containing the interface messages for a * certain resource in a certain language. These message blobs are cached * in the msg_resource table and automatically invalidated when one of their - * consistuent messages or the resource itself is changed. + * constituent messages or the resource itself is changed. */ class MessageBlobStore { diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php index 68b6f6a011..edabd54c20 100644 --- a/includes/MimeMagic.php +++ b/includes/MimeMagic.php @@ -153,11 +153,11 @@ class MimeMagic { */ var $mMimeTypeAliases = null; - /** map of mime types to file extensions (as a space seprarated list) + /** map of mime types to file extensions (as a space separated list) */ var $mMimeToExt = null; - /** map of file extensions types to mime types (as a space seprarated list) + /** map of file extensions types to mime types (as a space separated list) */ var $mExtToMime = null; @@ -541,7 +541,7 @@ class MimeMagic { /** * Mime type detection. This uses detectMimeType to detect the mime type * of the file, but applies additional checks to determine some well known - * file formats that may be missed or misinterpreter by the default mime + * file formats that may be missed or misinterpreted by the default mime * detection (namely XML based formats like XHTML or SVG, as well as ZIP * based formats like OPC/ODF files). * @@ -853,7 +853,7 @@ class MimeMagic { * Internal mime type detection. Detection is done using an external * program, if $wgMimeDetectorCommand is set. Otherwise, the fileinfo * extension and mime_content_type are tried (in this order), if they - * are available. If the dections fails and $ext is not false, the mime + * are available. If the detections fails and $ext is not false, the mime * type is guessed from the file extension, using guessTypesForExtension. * * If the mime type is still unknown, getimagesize is used to detect the @@ -904,7 +904,7 @@ class MimeMagic { # NOTE: this function is available since PHP 4.3.0, but only if # PHP was compiled with --with-mime-magic or, before 4.3.2, with --enable-mime-magic. # - # On Windows, you must set mime_magic.magicfile in php.ini to point to the mime.magic file bundeled with PHP; + # On Windows, you must set mime_magic.magicfile in php.ini to point to the mime.magic file bundled with PHP; # sometimes, this may even be needed under linus/unix. # # Also note that this has been DEPRECATED in favor of the fileinfo extension by PECL, see above. @@ -1041,7 +1041,7 @@ class MimeMagic { * File extensions are represented by a string starting with a dot (.) to * distinguish them from mime types. * - * This funktion relies on the mapping defined by $this->mMediaTypes + * This function relies on the mapping defined by $this->mMediaTypes * @access private * @return int|string */ diff --git a/includes/Namespace.php b/includes/Namespace.php index 71d737e220..fccfbedb4e 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -182,7 +182,7 @@ class MWNamespace { * sure that code will not potentially break. * * @param int $ns1 The first namespace index - * @param int $ns2 The second namespae index + * @param int $ns2 The second namespace index * * @return bool * @since 1.19 @@ -197,7 +197,7 @@ class MWNamespace { * NS_USER and NS_USER_TALK will return true. * * @param int $ns1 The first namespace index - * @param int $ns2 The second namespae index + * @param int $ns2 The second namespace index * * @return bool * @since 1.19 diff --git a/includes/OutputHandler.php b/includes/OutputHandler.php index abf091e296..6b40c3076e 100644 --- a/includes/OutputHandler.php +++ b/includes/OutputHandler.php @@ -92,7 +92,7 @@ function wfRequestExtension() { */ function wfGzipHandler( $s ) { if( !function_exists( 'gzencode' ) ) { - wfDebug( __FUNCTION__ . "() skipping compression (gzencode unavaible)\n" ); + wfDebug( __FUNCTION__ . "() skipping compression (gzencode unavailable)\n" ); return $s; } if( headers_sent() ) { diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 6349de87d9..1e0c396a27 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -123,7 +123,7 @@ class OutputPage extends ContextSource { var $mScripts = ''; /** - * Inline CSS styles. Use addInlineStyle() sparsingly + * Inline CSS styles. Use addInlineStyle() sparingly */ var $mInlineStyles = ''; @@ -897,7 +897,7 @@ class OutputPage extends ContextSource { } /** - * Replace the subtile with $str + * Replace the subtitle with $str * * @param string|Message $str new value of the subtitle. String should be safe HTML. */ @@ -1303,7 +1303,7 @@ class OutputPage extends ContextSource { } /** - * As for setAllowedModules(), but don't inadvertantly make the page more accessible + * As for setAllowedModules(), but don't inadvertently make the page more accessible * @param $type String * @param $level Int ResourceLoaderModule class constant */ @@ -1467,7 +1467,7 @@ class OutputPage extends ContextSource { * @param $interface Boolean: is this text in the user interface language? */ public function addWikiText( $text, $linestart = true, $interface = true ) { - $title = $this->getTitle(); // Work arround E_STRICT + $title = $this->getTitle(); // Work around E_STRICT if ( !$title ) { throw new MWException( 'Title is null' ); } @@ -1939,7 +1939,7 @@ class OutputPage extends ContextSource { } /** - * Get the message associed with the HTTP response code $code + * Get the message associated with the HTTP response code $code * * @param $code Integer: status code * @return String or null: message or null if $code is not in the list of @@ -2331,7 +2331,7 @@ $templates } /** - * Turn off regular page output and return an error reponse + * Turn off regular page output and return an error response * for when rate limiting has triggered. */ public function rateLimited() { @@ -2695,7 +2695,7 @@ $templates } // Special handling for the user group; because users might change their stuff // on-wiki like user pages, or user preferences; we need to find the highest - // timestamp of these user-changable modules so we can ensure cache misses on change + // timestamp of these user-changeable modules so we can ensure cache misses on change // This should NOT be done for the site group (bug 27564) because anons get that too // and we shouldn't be putting timestamps in Squid-cached HTML $version = null; @@ -3576,7 +3576,7 @@ $templates // Example supported values for $media: 'screen', 'only screen', 'screen and (min-width: 982px)' ), // Example NOT supported value for $media: '3d-glasses, screen, print and resolution > 90dpi' // - // If it's a print request, we never want any kind of screen styesheets + // If it's a print request, we never want any kind of screen stylesheets // If it's a handheld request (currently the only other choice with a switch), // we don't want simple 'screen' but we might want screen queries that // have a max-width or something, so we'll pass all others on and let the diff --git a/includes/PHPVersionError.php b/includes/PHPVersionError.php index cba77ee4d5..36a503a057 100644 --- a/includes/PHPVersionError.php +++ b/includes/PHPVersionError.php @@ -22,7 +22,7 @@ /** * Display something vaguely comprehensible in the event of a totally unrecoverable error. - * Does not assume access to *anything*; no globals, no autloader, no database, no localisation. + * Does not assume access to *anything*; no globals, no autoloader, no database, no localisation. * Safe for PHP4 (and putting this here means that WebStart.php and GlobalSettings.php * no longer need to be). * diff --git a/includes/Pager.php b/includes/Pager.php index 29ff89495d..d2ac9046b0 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -432,7 +432,7 @@ abstract class IndexPager extends ContextSource implements Pager { * Make a self-link * * @param string $text text displayed on the link - * @param array $query associative array of paramter to be in the query string + * @param array $query associative array of parameter to be in the query string * @param string $type value of the "rel" attribute * * @return String: HTML fragment @@ -688,8 +688,8 @@ abstract class IndexPager extends ContextSource implements Pager { protected function getExtraSortFields() { return array(); } /** - * Return the default sorting direction: false for ascending, true for de- - * scending. You can also have an associative array of ordertype => dir, + * Return the default sorting direction: false for ascending, true for + * descending. You can also have an associative array of ordertype => dir, * if multiple order types are supported. In this case getIndexField() * must return an array, and the keys of that must exactly match the keys * of this. @@ -784,8 +784,8 @@ abstract class AlphabeticPager extends IndexPager { /** * If this supports multiple order type messages, give the message key for - * enabling each one in getNavigationBar. The return type is an associa- - * tive array whose keys must exactly match the keys of the array returned + * enabling each one in getNavigationBar. The return type is an associative + * array whose keys must exactly match the keys of the array returned * by getIndexField(), and whose values are message keys. * * @return Array diff --git a/includes/Preferences.php b/includes/Preferences.php index c3b5bec2b8..56dba05ee8 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1,6 +1,6 @@ '; } elseif ( isset( $htmlsingle[$t] ) ) { # Hack to not close $htmlsingle tags @@ -676,7 +676,7 @@ class Sanitizer { * * - Discards attributes not on a whitelist for the given element * - Unsafe style attributes are discarded - * - Invalid id attributes are reencoded + * - Invalid id attributes are re-encoded * * @param $attribs Array * @param $element String @@ -696,7 +696,7 @@ class Sanitizer { * * - Discards attributes not the given whitelist * - Unsafe style attributes are discarded - * - Invalid id attributes are reencoded + * - Invalid id attributes are re-encoded * * @param $attribs Array * @param array $whitelist list of allowed attribute names @@ -1077,7 +1077,7 @@ class Sanitizer { } /** - * Given HTML input, escape with htmlspecialchars but un-escape entites. + * Given HTML input, escape with htmlspecialchars but un-escape entities. * This allows (generally harmless) entities like   to survive. * * @param string $html to escape @@ -1448,7 +1448,7 @@ class Sanitizer { } if ( $wgHtml5 && $wgAllowMicrodataAttributes ) { - # add HTML5 microdata tages as pecified by http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#the-microdata-model + # add HTML5 microdata tags as specified by http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#the-microdata-model $common = array_merge( $common, array( 'itemid', 'itemprop', 'itemref', 'itemscope', 'itemtype' ) ); diff --git a/includes/SeleniumWebSettings.php b/includes/SeleniumWebSettings.php index 0e4decfbe2..7715484eb5 100644 --- a/includes/SeleniumWebSettings.php +++ b/includes/SeleniumWebSettings.php @@ -64,7 +64,7 @@ if ( isset( $_GET['setupTestSuite'] ) ) { } $testIncludes = array(); // array containing all the includes needed for this test - $testGlobalConfigs = array(); // an array containg all the global configs needed for this test + $testGlobalConfigs = array(); // an array containing all the global configs needed for this test $testResourceFiles = array(); // an array containing all the resource files needed for this test $callback = $wgSeleniumTestConfigs[$setupTestSuiteName]; call_user_func_array( $callback, array( &$testIncludes, &$testGlobalConfigs, &$testResourceFiles)); @@ -109,7 +109,7 @@ if ( isset( $_COOKIE[$cookieName] ) ) { } $testIncludes = array(); // array containing all the includes needed for this test - $testGlobalConfigs = array(); // an array containg all the global configs needed for this test + $testGlobalConfigs = array(); // an array containing all the global configs needed for this test $testResourceFiles = array(); // an array containing all the resource files needed for this test $callback = $wgSeleniumTestConfigs[$testSuiteName]; call_user_func_array( $callback, array( &$testIncludes, &$testGlobalConfigs, &$testResourceFiles)); diff --git a/includes/Skin.php b/includes/Skin.php index 9023492278..0cc1086c7a 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -167,7 +167,7 @@ abstract class Skin extends ContextSource { require_once( "{$wgStyleDirectory}/{$skinName}.php" ); } - # Check if we got if not failback to default skin + # Check if we got if not fallback to default skin if ( !MWInit::classExists( $className ) ) { # DO NOT die if the class isn't found. This breaks maintenance # scripts and can cause a user account to be unrecoverable @@ -481,7 +481,7 @@ abstract class Skin extends ContextSource { } /** - * Render the array as a serie of links. + * Render the array as a series of links. * @param array $tree categories tree returned by Title::getParentCategoryTree * @return String separated by >, terminate with "\n" */ @@ -850,7 +850,7 @@ abstract class Skin extends ContextSource { } /** - * Renders a $wgFooterIcons icon acording to the method's arguments + * Renders a $wgFooterIcons icon according to the method's arguments * @param array $icon The icon to build the html for, see $wgFooterIcons for the format of this array * @param bool|String $withImage Whether to use the icon's image or output a text-only footericon * @return String HTML @@ -977,7 +977,7 @@ abstract class Skin extends ContextSource { } /** - * Return a fully resolved style path url to images or styles stored in the curent skins's folder. + * Return a fully resolved style path url to images or styles stored in the current skins's folder. * This method returns a url resolved using the configured skin style path * and includes the style version inside of the url. * @param string $name The name or path of a skin resource file diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 2c5933a011..59e1ccff1d 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -526,7 +526,7 @@ class SkinTemplate extends Skin { } /** - * Output a boolean indiciating if buildPersonalUrls should output separate + * Output a boolean indicating if buildPersonalUrls should output separate * login and create account links or output a combined link * By default we simply return a global config setting that affects most skins * This is setup as a method so that like with $wgLogo and getLogo() a skin @@ -779,7 +779,7 @@ class SkinTemplate extends Skin { * variants: Used to list the language variants for the page * * Each section's value is a key/value array of links for that section. - * The links themseves have these common keys: + * The links themselves have these common keys: * - class: The css classes to apply to the tab * - text: The text to display on the tab * - href: The href for the tab to point to @@ -1073,8 +1073,8 @@ class SkinTemplate extends Skin { # We don't want to give the watch tab an accesskey if the # page is being edited, because that conflicts with the # accesskey on the watch checkbox. We also don't want to - # give the edit tab an accesskey, because that's fairly su- - # perfluous and conflicts with an accesskey (Ctrl-E) often + # give the edit tab an accesskey, because that's fairly + # superfluous and conflicts with an accesskey (Ctrl-E) often # used for editing in Safari. if ( in_array( $action, array( 'edit', 'submit' ) ) ) { if ( isset( $content_navigation['views']['edit'] ) ) { @@ -1419,7 +1419,7 @@ abstract class BaseTemplate extends QuickTemplate { /** * Create an array of common toolbox items from the data in the quicktemplate * stored by SkinTemplate. - * The resulting array is built acording to a format intended to be passed + * The resulting array is built according to a format intended to be passed * through makeListItem to generate the html. * @return array */ @@ -1483,7 +1483,7 @@ abstract class BaseTemplate extends QuickTemplate { /** * Create an array of personal tools items from the data in the quicktemplate * stored by SkinTemplate. - * The resulting array is built acording to a format intended to be passed + * The resulting array is built according to a format intended to be passed * through makeListItem to generate the html. * This is in reality the same list as already stored in personal_urls * however it is reformatted so that you can just pass the individual items diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 5354da6d70..c32738f8b6 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -670,7 +670,7 @@ class SpecialPage { /** * Outputs a summary message on top of special pages * Per default the message key is the canonical name of the special page - * May be overriden, i.e. by extensions to stick with the naming conventions + * May be overridden, i.e. by extensions to stick with the naming conventions * for message keys: 'extensionname-xxx' * * @param string $summaryMessageKey message key of the summary @@ -827,7 +827,7 @@ class SpecialPage { // RequestContext passes context to wfMessage, and the language is set from // the context, but setting the language for Message class removes the // interface message status, which breaks for example usernameless gender - // invokations. Restore the flag when not including special page in content. + // invocations. Restore the flag when not including special page in content. if ( $this->including() ) { $message->setInterfaceMessageFlag( false ); } @@ -864,7 +864,7 @@ class SpecialPage { $name = $this->getName(); $group = '-'; - // Allow overridding the group from the wiki side + // Allow overbidding the group from the wiki side $msg = $this->msg( 'specialpages-specialpagegroup-' . strtolower( $name ) )->inContentLanguage(); if ( !$msg->isBlank() ) { $group = $msg->text(); @@ -873,7 +873,7 @@ class SpecialPage { $group = $this->getGroupName(); // Group '-' is used as default to have the chance to determine, - // if the special pages overriddes this method, + // if the special pages overrides this method, // if not overridden, $wgSpecialPageGroups is checked for b/c if ( $group === '-' && isset( $wgSpecialPageGroups[$name] ) ) { $group = $wgSpecialPageGroups[$name]; @@ -1082,7 +1082,7 @@ abstract class RedirectSpecialPage extends UnlistedSpecialPage { // Query parameters that can be passed through redirects protected $mAllowedRedirectParams = array(); - // Query parameteres added by redirects + // Query parameters added by redirects protected $mAddedRedirectParams = array(); public function execute( $par ) { @@ -1191,7 +1191,7 @@ class SpecialCreateAccount extends SpecialRedirectToSpecial { } /** * SpecialMypage, SpecialMytalk and SpecialMycontributions special pages - * are used to get user independant links pointing to the user page, talk + * are used to get user independent links pointing to the user page, talk * page and list of contributions. * This can let us cache a single copy of any generated content for all * users. diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php index 719763c1aa..7368ab77c0 100644 --- a/includes/SpecialPageFactory.php +++ b/includes/SpecialPageFactory.php @@ -222,7 +222,7 @@ class SpecialPageFactory { /** * Initialise and return the list of special page aliases. Returns an object with * properties which can be accessed $obj->pagename - each property is an array of - * aliases; the first in the array is the cannonical alias. All registered special + * aliases; the first in the array is the canonical alias. All registered special * pages are guaranteed to have a property entry, and for that property array to * contain at least one entry (English fallbacks will be added if necessary). * @return Object diff --git a/includes/StringUtils.php b/includes/StringUtils.php index 8203b40a05..f4c98f1d54 100644 --- a/includes/StringUtils.php +++ b/includes/StringUtils.php @@ -49,7 +49,7 @@ class StringUtils { static function isUtf8( $value, $disableMbstring = false ) { if ( preg_match( '/[\x80-\xff]/', $value ) === 0 ) { - # no high bit set, this is pure ASCII which is defacto + # no high bit set, this is pure ASCII which is de facto # valid UTF-8 return true; } @@ -405,7 +405,7 @@ class ReplacementArray { /** * Set an element of the replacement array * @param $from string - * @param $to stromg + * @param $to string */ function setPair( $from, $to ) { $this->data[$from] = $to; diff --git a/includes/StubObject.php b/includes/StubObject.php index 77c242f8ba..f0a3574009 100644 --- a/includes/StubObject.php +++ b/includes/StubObject.php @@ -43,7 +43,7 @@ class StubObject { * * @param string $global name of the global variable. * @param string $class name of the class of the real object. - * @param array $params parameters to pass to contructor of the real + * @param array $params parameters to pass to constructor of the real * object. */ function __construct( $global = null, $class = null, $params = array() ) { @@ -53,7 +53,7 @@ class StubObject { } /** - * Returns a bool value whetever $obj is a stub object. Can be used to break + * Returns a bool value whenever $obj is a stub object. Can be used to break * a infinite loop when unstubbing an object. * * @param $obj Object to check. @@ -106,7 +106,7 @@ class StubObject { * properties, e.g. eval.php * * @param string $name name of the method called in this object. - * @param $level Integer: level to go in the stact trace to get the function + * @param $level Integer: level to go in the stack trace to get the function * who called this function. * @throws MWException */ diff --git a/includes/Title.php b/includes/Title.php index 595136a4ad..e81023acbe 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -117,8 +117,8 @@ class Title { * * @param string $text the link text; spaces, prefixes, and an * initial ':' indicating the main namespace are accepted. - * @param int $defaultNamespace the namespace to use if none is speci- - * fied by a prefix. If you want to force a specific namespace even if + * @param int $defaultNamespace the namespace to use if none is specified + * by a prefix. If you want to force a specific namespace even if * $text might begin with a namespace prefix, use makeTitle() or * makeTitleSafe(). * @throws MWException @@ -869,7 +869,7 @@ class Title { * is either NS_USER or NS_USER_TALK since both of them have NS_USER * as their subject namespace. * - * This is MUCH simpler than individually testing for equivilance + * This is MUCH simpler than individually testing for equivalence * against both NS_USER and NS_USER_TALK, and is also forward compatible. * @since 1.19 * @param $ns int @@ -911,7 +911,7 @@ class Title { * Is this the mainpage? * @note Title::newFromText seems to be sufficiently optimized by the title * cache that we don't need to over-optimize by doing direct comparisons and - * acidentally creating new bugs where $title->equals( Title::newFromText() ) + * accidentally creating new bugs where $title->equals( Title::newFromText() ) * ends up reporting something differently than $title->isMainPage(); * * @since 1.18 @@ -970,7 +970,7 @@ class Title { || $this->hasContentModel( CONTENT_MODEL_JAVASCRIPT ) ); #NOTE: this hook is also called in ContentHandler::getDefaultModel. It's called here again to make sure - # hook funktions can force this method to return true even outside the mediawiki namespace. + # hook functions can force this method to return true even outside the mediawiki namespace. wfRunHooks( 'TitleIsCssOrJsPage', array( $this, &$isCssOrJsPage ) ); @@ -1331,7 +1331,7 @@ class Title { * second argument named variant. This was deprecated in favor * of passing an array of option with a "variant" key * Once $query2 is removed for good, this helper can be dropped - * andthe wfArrayToCgi moved to getLocalURL(); + * and the wfArrayToCgi moved to getLocalURL(); * * @since 1.19 (r105919) * @param $query @@ -2020,7 +2020,7 @@ class Title { } /** - * Check that the user isn't blocked from editting. + * Check that the user isn't blocked from editing. * * @param string $action the action to check * @param $user User to check @@ -4497,7 +4497,7 @@ class Title { /** * Updates page_touched for this page; called from LinksUpdate.php * - * @return Bool true if the update succeded + * @return Bool true if the update succeeded */ public function invalidateCache() { global $wgMemc; @@ -4598,7 +4598,7 @@ class Title { global $wgContLang; // Gets the subject namespace if this title $namespace = MWNamespace::getSubject( $this->getNamespace() ); - // Checks if cononical namespace name exists for namespace + // Checks if canonical namespace name exists for namespace if ( MWNamespace::exists( $this->getNamespace() ) ) { // Uses canonical namespace name $namespaceKey = MWNamespace::getCanonicalName( $namespace ); @@ -4664,7 +4664,7 @@ class Title { public function isValidRedirectTarget() { global $wgInvalidRedirectTargets; - // invalid redirect targets are stored in a global array, but explicity disallow Userlogout here + // invalid redirect targets are stored in a global array, but explicitly disallow Userlogout here if ( $this->isSpecial( 'Userlogout' ) ) { return false; } diff --git a/includes/TitleArray.php b/includes/TitleArray.php index 5cdec16d34..90fb861a94 100644 --- a/includes/TitleArray.php +++ b/includes/TitleArray.php @@ -3,8 +3,8 @@ * Classes to walk into a list of Title objects. * * Note: this entire file is a byte-for-byte copy of UserArray.php with - * s/User/Title/. If anyone can figure out how to do this nicely with inheri- - * tance or something, please do so. + * s/User/Title/. If anyone can figure out how to do this nicely with + * inheritance or something, please do so. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/includes/UIDGenerator.php b/includes/UIDGenerator.php index 816c3b8974..b042d8c718 100644 --- a/includes/UIDGenerator.php +++ b/includes/UIDGenerator.php @@ -39,7 +39,7 @@ class UIDGenerator { /** @var Array */ protected $fileHandles = array(); // cache file handles - const QUICK_RAND = 1; // get randomness from fast and unsecure sources + const QUICK_RAND = 1; // get randomness from fast and insecure sources protected function __construct() { $idFile = wfTempDir() . '/mw-' . __CLASS__ . '-UID-nodeid'; @@ -152,7 +152,7 @@ class UIDGenerator { } /** - * @param array $info (UIDGenerator::milltime(), counter, clock sequence) + * @param array $info (UIDGenerator::millitime(), counter, clock sequence) * @return string 128 bits */ protected function getTimestampedID128( array $info ) { diff --git a/includes/User.php b/includes/User.php index 047ba25b3b..6b7348a8fb 100644 --- a/includes/User.php +++ b/includes/User.php @@ -437,8 +437,7 @@ class User { * Create a new user object using data from session or cookies. If the * login credentials are invalid, the result is an anonymous user. * - * @param $request WebRequest object to use; $wgRequest will be used if - * ommited. + * @param $request WebRequest object to use; $wgRequest will be used if omitted. * @return User object */ public static function newFromSession( WebRequest $request = null ) { @@ -554,7 +553,7 @@ class User { * Is the input a valid username? * * Checks if the input is a valid username, we don't want an empty string, - * an IP address, anything that containins slashes (would mess up subpages), + * an IP address, anything that contains slashes (would mess up subpages), * is longer than the maximum allowed username size or doesn't begin with * a capital letter. * @@ -1631,7 +1630,7 @@ class User { /** * Check if user is blocked on all wikis. * Do not use for actual edit permission checks! - * This is intented for quick UI checks. + * This is intended for quick UI checks. * * @param string $ip IP address, uses current client if none given * @return Bool True if blocked, false otherwise @@ -1737,7 +1736,7 @@ class User { * address for an anonymous user to something other than the current * remote IP. * - * @note User::newFromName() has rougly the same function, when the named user + * @note User::newFromName() has roughly the same function, when the named user * does not exist. * @param string $str New user name to set */ @@ -3511,7 +3510,7 @@ class User { * Generate a looking random token for various uses. * * @return String The new random token - * @deprecated since 1.20; Use MWCryptRand for secure purposes or wfRandomString for pesudo-randomness + * @deprecated since 1.20; Use MWCryptRand for secure purposes or wfRandomString for pseudo-randomness */ public static function generateToken() { return MWCryptRand::generateHex( 32 ); diff --git a/includes/UserMailer.php b/includes/UserMailer.php index d302e89a77..6eb9917262 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -255,7 +255,7 @@ class UserMailer { if ( is_array( $body ) ) { // we are sending a multipart message - wfDebug( "Assembling mulitpart mime email\n" ); + wfDebug( "Assembling multipart mime email\n" ); if ( !stream_resolve_include_path( 'Mail/mime.php' ) ) { wfDebug( "PEAR Mail_Mime package is not installed. Falling back to text email.\n" ); } @@ -489,7 +489,7 @@ class EmailNotification { return; } - // Build a list of users to notfiy + // Build a list of users to notify $watchers = array(); if ( $wgEnotifWatchlist || $wgShowUpdatedMarker ) { $dbw = wfGetDB( DB_MASTER ); diff --git a/includes/WebRequest.php b/includes/WebRequest.php index ae465e671d..9b6d9ce52f 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -1,6 +1,6 @@ * http://www.mediawiki.org/ @@ -503,7 +503,7 @@ class WebRequest { */ public function getCheck( $name ) { # Checkboxes and buttons are only present when clicked - # Presence connotes truth, abscense false + # Presence connotes truth, absence false return $this->getVal( $name, null ) !== null; } diff --git a/includes/WebStart.php b/includes/WebStart.php index 48767d00c7..e6f31355d7 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -57,7 +57,7 @@ if ( ini_get( 'register_globals' ) ) { } } -# bug 15461: Make IE8 turn off content sniffing. Everbody else should ignore this +# bug 15461: Make IE8 turn off content sniffing. Everybody else should ignore this # We're adding it here so that it's *always* set, even for alternate entry # points and when $wgOut gets disabled or overridden. header( 'X-Content-Type-Options: nosniff' ); diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 893954fcbd..6e24527328 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -345,7 +345,7 @@ class WikiPage implements Page, IDBAccessObject { $data = $this->pageDataFromTitle( wfGetDB( DB_MASTER ), $this->mTitle ); } elseif ( $from === self::READ_NORMAL ) { $data = $this->pageDataFromTitle( wfGetDB( DB_SLAVE ), $this->mTitle ); - // Use a "last rev inserted" timestamp key to dimish the issue of slave lag. + // Use a "last rev inserted" timestamp key to diminish the issue of slave lag. // Note that DB also stores the master position in the session and checks it. $touched = $this->getCachedLastEditTime(); if ( $touched ) { // key set @@ -2273,7 +2273,7 @@ class WikiPage implements Page, IDBAccessObject { $changed = true; } - // If nothing's changed, do nothing + // If nothing has changed, do nothing if ( !$changed ) { return Status::newGood(); } @@ -2663,7 +2663,7 @@ class WikiPage implements Page, IDBAccessObject { * performs permissions checks on $user, then calls commitRollback() * to do the dirty work * - * @todo: seperate the business/permission stuff out from backend code + * @todo: separate the business/permission stuff out from backend code * * @param string $fromP Name of the user whose edits to rollback. * @param string $summary Custom summary. Set to default summary if empty. diff --git a/includes/Xml.php b/includes/Xml.php index 032493d38e..57a4fcf619 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -359,7 +359,7 @@ class Xml { * Convenience function to build an HTML form label * @param string $label text of the label * @param $id - * @param array $attribs an attribute array. This will usuall be + * @param array $attribs an attribute array. This will usually be * the same array as is passed to the corresponding input element, * so this function will cherry-pick appropriate attributes to * apply to the label as well; only class and title are applied. diff --git a/includes/ZhClient.php b/includes/ZhClient.php index b9c3d6bff1..fd03ec4573 100644 --- a/includes/ZhClient.php +++ b/includes/ZhClient.php @@ -50,7 +50,7 @@ class ZhClient { } /** - * Establish conncetion + * Establish connection * * @access private * diff --git a/includes/ZipDirectoryReader.php b/includes/ZipDirectoryReader.php index a24c01be33..646180d2f1 100644 --- a/includes/ZipDirectoryReader.php +++ b/includes/ZipDirectoryReader.php @@ -538,7 +538,7 @@ class ZipDirectoryReader { * of length self::SEGSIZE. The result is cached. This is a helper function * for getBlock(). * - * If there are not enough bytes in the file to satsify the request, the + * If there are not enough bytes in the file to satisfy the request, the * return value will be truncated. If a request is made for a segment beyond * the end of the file, an empty string will be returned. * @return string diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php index ba1d6c9a71..3e846e3be3 100644 --- a/includes/api/ApiMove.php +++ b/includes/api/ApiMove.php @@ -291,7 +291,7 @@ class ApiMove extends ApiBase { public function getExamples() { return array( - 'api.php?action=move&from=Exampel&to=Example&token=123ABC&reason=Misspelled%20title&movetalk=&noredirect=' + 'api.php?action=move&from=Badtitle&to=Goodtitle&token=123ABC&reason=Misspelled%20title&movetalk=&noredirect=' ); } diff --git a/includes/api/ApiQueryExternalLinks.php b/includes/api/ApiQueryExternalLinks.php index c4a39d66a4..761b49ea98 100644 --- a/includes/api/ApiQueryExternalLinks.php +++ b/includes/api/ApiQueryExternalLinks.php @@ -148,7 +148,7 @@ class ApiQueryExternalLinks extends ApiQueryBase { } public function getDescription() { - return 'Returns all external urls (not interwikies) from the given page(s)'; + return 'Returns all external urls (not interwikis) from the given page(s)'; } public function getPossibleErrors() { diff --git a/includes/db/DatabaseUtility.php b/includes/db/DatabaseUtility.php index b41c1e884b..9a1c8bdeb0 100644 --- a/includes/db/DatabaseUtility.php +++ b/includes/db/DatabaseUtility.php @@ -1,6 +1,6 @@ :///". The protocal is used + * the form ":///". The protocol is used * to determine what ExternalStoreMedium class is used. The location identifies * particular storage instances or database clusters for store class to use. * * When an object is inserted into a store, the calling code uses a partial URL of - * the form "://" and receives the full object URL on success. + * the form "://" and receives the full object URL on success. * This is useful since object names can be sequential IDs, UUIDs, or hashes. * Callers are not responsible for unique name generation. * diff --git a/includes/installer/InstallDocFormatter.php b/includes/installer/InstallDocFormatter.php index e2fb73588d..a508e24cfa 100644 --- a/includes/installer/InstallDocFormatter.php +++ b/includes/installer/InstallDocFormatter.php @@ -1,6 +1,6 @@ encode($value); * @@ -155,7 +155,7 @@ class Services_JSON * * Normally should be handled by mb_convert_encoding, but * provides a slower PHP-only method for installations - * that lack the multibye string extension. + * that lack the multibyte string extension. * * @param string $utf16 UTF-16 character * @return String: UTF-8 character @@ -210,7 +210,7 @@ class Services_JSON * * Normally should be handled by mb_convert_encoding, but * provides a slower PHP-only method for installations - * that lack the multibye string extension. + * that lack the multibyte string extension. * * @param string $utf8 UTF-8 character * @return String: UTF-16 character @@ -268,7 +268,7 @@ class Services_JSON * * @param $var Mixed: any number, boolean, string, array, or object to be encoded. * see argument 1 to Services_JSON() above for array-parsing behavior. - * if var is a strng, note that encode() always expects it + * if var is a string, note that encode() always expects it * to be in ASCII or UTF-8 format! * @param $pretty Boolean: pretty-print output with indents and newlines * @@ -288,7 +288,7 @@ class Services_JSON * * @param $var Mixed: any number, boolean, string, array, or object to be encoded. * see argument 1 to Services_JSON() above for array-parsing behavior. - * if var is a strng, note that encode() always expects it + * if var is a string, note that encode() always expects it * to be in ASCII or UTF-8 format! * * @return mixed JSON string representation of input var or an error if a problem occurs diff --git a/includes/libs/jsminplus.php b/includes/libs/jsminplus.php index 7c4e32bd20..f250217f00 100644 --- a/includes/libs/jsminplus.php +++ b/includes/libs/jsminplus.php @@ -256,7 +256,7 @@ class JSMinPlus } elseif ($type == KEYWORD_VAR && $type == $lastType) { - // mutiple var-statements can go into one + // multiple var-statements can go into one $t = ',' . substr($t, 4); } else @@ -298,7 +298,7 @@ class JSMinPlus if ($elsePart) { - // be carefull and always make a block out of the thenPart; could be more optimized but is a lot of trouble + // be careful and always make a block out of the thenPart; could be more optimized but is a lot of trouble if ($thenPart != ';' && $thenPart[0] != '{') $thenPart = '{' . $thenPart . '}'; @@ -521,7 +521,7 @@ class JSMinPlus break; case TOKEN_STRING: - //combine concatted strings with same quotestyle + //combine concatenated strings with same quote style if ($n->type == OP_PLUS && substr($left, -1) == $right[0]) { $s = substr($left, 0, -1) . substr($right, 1); diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index f22a5a0466..1a7d7723ba 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -1,6 +1,6 @@ client = new Memcached( md5( serialize( $params ) ) ); if ( count( $this->client->getServerList() ) ) { wfDebug( __METHOD__ . ": persistent Memcached object already loaded.\n" ); diff --git a/includes/parser/DateFormatter.php b/includes/parser/DateFormatter.php index 167424a9c1..a2da30740a 100644 --- a/includes/parser/DateFormatter.php +++ b/includes/parser/DateFormatter.php @@ -22,7 +22,7 @@ */ /** - * Date formatter, recognises dates in plain text and formats them accoding to user preferences. + * Date formatter, recognises dates in plain text and formats them according to user preferences. * @todo preferences, OutputPage * @ingroup Parser */ diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index 7d04927e2d..03f3cc3740 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -99,7 +99,7 @@ abstract class ResourceLoaderModule { } /** - * Set this module's origin. This is called by ResourceLodaer::register() + * Set this module's origin. This is called by ResourceLoader::register() * when registering the module. Other code should not call this. * * @param int $origin origin diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 6d7173b320..391c4a7fe4 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -128,7 +128,7 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges { if( $ns == NS_CATEGORY && !$showlinkedto ) { // special handling for categories - // XXX: should try to make this less klugy + // XXX: should try to make this less kludgy $link_tables = array( 'categorylinks' ); $showlinkedto = true; } else { diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index f4b98b0b23..8381b4cae8 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -108,7 +108,7 @@ abstract class UploadBase { /** * Returns true if the user can use this upload module or else a string * identifying the missing permission. - * Can be overriden by subclasses. + * Can be overridden by subclasses. * * @param $user User * @return bool @@ -252,7 +252,7 @@ abstract class UploadBase { $repo = RepoGroup::singleton()->getLocalRepo(); if ( $repo->isVirtualUrl( $srcPath ) ) { // @TODO: just make uploads work with storage paths - // UploadFromStash loads files via virtuals URLs + // UploadFromStash loads files via virtual URLs $tmpFile = $repo->getLocalCopy( $srcPath ); $tmpFile->bind( $this ); // keep alive with $this wfProfileOut( __METHOD__ ); @@ -967,7 +967,7 @@ abstract class UploadBase { $chunk = trim( $chunk ); - # @todo FIXME: Convert from UTF-16 if necessarry! + # @todo FIXME: Convert from UTF-16 if necessary! wfDebug( __METHOD__ . ": checking for embedded scripts and HTML stuff\n" ); # check for HTML doctype @@ -1100,13 +1100,13 @@ abstract class UploadBase { return true; } - # href with embeded svg as target + # href with embedded svg as target if( $stripped == 'href' && preg_match( '!data:[^,]*image/svg[^,]*,!sim', $value ) ) { wfDebug( __METHOD__ . ": Found href to embedded svg \"<$strippedElement '$attrib'='$value'...\" in uploaded file.\n" ); return true; } - # href with embeded (text/xml) svg as target + # href with embedded (text/xml) svg as target if( $stripped == 'href' && preg_match( '!data:[^,]*text/xml[^,]*,!sim', $value ) ) { wfDebug( __METHOD__ . ": Found href to embedded svg \"<$strippedElement '$attrib'='$value'...\" in uploaded file.\n" ); return true; @@ -1120,13 +1120,13 @@ abstract class UploadBase { # use set to add href attribute to parent element if( $strippedElement == 'set' && $stripped == 'attributename' && strpos( $value, 'href' ) !== false ) { - wfDebug( __METHOD__ . ": Found svg setting href attibute '$value' in uploaded file.\n" ); + wfDebug( __METHOD__ . ": Found svg setting href attribute '$value' in uploaded file.\n" ); return true; } # use set to add a remote / data / script target to an element if( $strippedElement == 'set' && $stripped == 'to' && preg_match( '!(http|https|data|script):!sim', $value ) ) { - wfDebug( __METHOD__ . ": Found svg setting attibute to '$value' in uploaded file.\n" ); + wfDebug( __METHOD__ . ": Found svg setting attribute to '$value' in uploaded file.\n" ); return true; } @@ -1377,10 +1377,10 @@ abstract class UploadBase { $similarFiles = RepoGroup::singleton()->getLocalRepo()->findFilesByPrefix( "{$partname}.", 1 ); if ( count( $similarFiles ) ) { - return array( - 'warning' => 'exists-normalized', - 'file' => $file, - 'normalizedFile' => $similarFiles[0], + return array( + 'warning' => 'exists-normalized', + 'file' => $file, + 'normalizedFile' => $similarFiles[0], ); } -- 2.20.1