From 1f2e9c1b54eee54348f4d5841e357ab40c5e5f70 Mon Sep 17 00:00:00 2001 From: Zoranzoki21 Date: Fri, 31 Aug 2018 21:08:08 +0000 Subject: [PATCH] Fix common typos in code Bug: T201491 Change-Id: Id962b79f2590c51380cb977e727b7548abc11d33 --- includes/EditPage.php | 2 +- includes/libs/rdbms/exception/DBQueryError.php | 2 +- includes/search/SearchResultSet.php | 2 +- languages/i18n/en.json | 8 ++++---- languages/i18n/qqq.json | 2 +- tests/phpunit/includes/user/UserTest.php | 4 ++-- tests/qunit/suites/resources/mediawiki/mediawiki.test.js | 2 +- thumb.php | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 6b4dcc21c8..ef111c46cc 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3786,7 +3786,7 @@ ERROR; /** * Get the last log record of this page being deleted, if ever. This is - * used to detect whether a delete occured during editing. + * used to detect whether a delete occurred during editing. * @return bool|stdClass */ protected function getLastDelete() { diff --git a/includes/libs/rdbms/exception/DBQueryError.php b/includes/libs/rdbms/exception/DBQueryError.php index 4bdd8f6154..b1353b793e 100644 --- a/includes/libs/rdbms/exception/DBQueryError.php +++ b/includes/libs/rdbms/exception/DBQueryError.php @@ -45,7 +45,7 @@ class DBQueryError extends DBExpectedError { public function __construct( IDatabase $db, $error, $errno, $sql, $fname, $message = null ) { if ( $message === null ) { if ( $db instanceof Database && $db->wasConnectionError( $errno ) ) { - $message = "A connection error occured. \n" . + $message = "A connection error occurred. \n" . "Query: $sql\n" . "Function: $fname\n" . "Error: $errno $error\n"; diff --git a/includes/search/SearchResultSet.php b/includes/search/SearchResultSet.php index 14d5c4bb6d..2f1a5c2457 100644 --- a/includes/search/SearchResultSet.php +++ b/includes/search/SearchResultSet.php @@ -127,7 +127,7 @@ class SearchResultSet implements Countable, IteratorAggregate { /** * Some search modes will run an alternative query that it thinks gives * a better result than the provided search. Returns true if this has - * occured. + * occurred. * * @return bool */ diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 57b0cdedb2..18dc51aab4 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -365,9 +365,9 @@ "customcssprotected": "You do not have permission to edit this CSS page because it contains another user's personal settings.", "customjsonprotected": "You do not have permission to edit this JSON page because it contains another user's personal settings.", "customjsprotected": "You do not have permission to edit this JavaScript page because it contains another user's personal settings.", - "sitecssprotected": "You do not have permission to edit this CSS page because it may affect all visitors", - "sitejsonprotected": "You do not have permission to edit this JSON page because it may affect all visitors", - "sitejsprotected": "You do not have permission to edit this JavaScript page because it may affect all visitors", + "sitecssprotected": "You do not have permission to edit this CSS page because it may affect all visitors.", + "sitejsonprotected": "You do not have permission to edit this JSON page because it may affect all visitors.", + "sitejsprotected": "You do not have permission to edit this JavaScript page because it may affect all visitors.", "mycustomcssprotected": "You do not have permission to edit this CSS page.", "mycustomjsonprotected": "You do not have permission to edit this JSON page.", "mycustomjsprotected": "You do not have permission to edit this JavaScript page.", @@ -1024,7 +1024,7 @@ "searchdisabled": "{{SITENAME}} search is disabled.\nYou can search via Google in the meantime.\nNote that their indexes of {{SITENAME}} content may be out of date.", "googlesearch": "
\n\t\n\t\n\t\n\t\n\n\t\n\t\n
\n\t\n\t\n
\n
", "search-error": "An error has occurred while searching: $1", - "search-warning": "A warning has occured while searching: $1", + "search-warning": "A warning has occurred while searching: $1", "opensearch-desc": "{{SITENAME}} ({{CONTENTLANGUAGE}})", "preferences": "Preferences", "preferences-summary": "", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 1a0e8c8b42..8330801b58 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1225,7 +1225,7 @@ "searchdisabled": "{{doc-singularthey}}\nIn this sentence, \"their indexes\" refers to \"Google's indexes\".\n\nShown on [[Special:Search]] when the internal search is disabled.", "googlesearch": "{{notranslate}}\nShown when [[mw:Manual:$wgDisableTextSearch|$wgDisableTextSearch]] is set to true and no [[mw:Manual:$wgSearchForwardUrl|$wgSearchForwardUrl]] is set.\n\nParameters:\n* $1 - the search term\n* $2 - \"UTF-8\" (hard-coded)\n* $3 - the message {{msg-mw|Searchbutton}}", "search-error": "Shown when an error has occurred when performing a search. Parameters:\n* $1 - the localized error that was returned", - "search-warning": "Shown when a warning has occured when performing a search. Parameters:\n* $1 - the localized warning that was returned.", + "search-warning": "Shown when a warning has occurred when performing a search. Parameters:\n* $1 - the localized warning that was returned.", "opensearch-desc": "{{ignored}}Link description of the [www.opensearch.org/ OpenSearch] link in the HTML head of pages.", "preferences": "Title of the [[Special:Preferences]] page.\n{{Identical|Preferences}}", "preferences-summary": "{{doc-specialpagesummary|preferences}}", diff --git a/tests/phpunit/includes/user/UserTest.php b/tests/phpunit/includes/user/UserTest.php index 3b8e71015d..f86987a56f 100644 --- a/tests/phpunit/includes/user/UserTest.php +++ b/tests/phpunit/includes/user/UserTest.php @@ -524,13 +524,13 @@ class UserTest extends MediaWikiTestCase { $touched = $user->getDBTouched(); $this->assertTrue( - $user->checkAndSetTouched(), "checkAndSetTouched() succeded" ); + $user->checkAndSetTouched(), "checkAndSetTouched() succedeed" ); $this->assertGreaterThan( $touched, $user->getDBTouched(), "user_touched increased with casOnTouched()" ); $touched = $user->getDBTouched(); $this->assertTrue( - $user->checkAndSetTouched(), "checkAndSetTouched() succeded #2" ); + $user->checkAndSetTouched(), "checkAndSetTouched() succedeed #2" ); $this->assertGreaterThan( $touched, $user->getDBTouched(), "user_touched increased with casOnTouched() #2" ); } diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js index 83e695fcd9..37b6c8808f 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js @@ -108,7 +108,7 @@ assert.strictEqual( conf.set( 'undef' ), false, 'Map.set requires explicit value (no undefined default)' ); assert.strictEqual( conf.set( 'undef', undefined ), true, 'Map.set allows setting value to `undefined`' ); - assert.strictEqual( conf.get( 'undef', 'fallback' ), undefined, 'Map.get supports retreiving value of `undefined`' ); + assert.strictEqual( conf.get( 'undef', 'fallback' ), undefined, 'Map.get supports retrieving value of `undefined`' ); assert.strictEqual( conf.set( funky, 'Funky' ), false, 'Map.set returns boolean false if key was invalid (Function)' ); assert.strictEqual( conf.set( arry, 'Arry' ), false, 'Map.set returns boolean false if key was invalid (Array)' ); diff --git a/thumb.php b/thumb.php index cc74c897ae..70329093c6 100644 --- a/thumb.php +++ b/thumb.php @@ -500,7 +500,7 @@ function wfGenerateThumbnail( File $file, array $params, $thumbName, $thumbPath } /** @noinspection PhpUnusedLocalVariableInspection */ - $done = true; // no PHP fatal occured + $done = true; // no PHP fatal occurred if ( !$thumb || $thumb->isError() ) { // Randomize TTL to reduce stampedes -- 2.20.1