From: jenkins-bot Date: Tue, 12 Mar 2013 12:44:34 +0000 (+0000) Subject: Merge "jquery.makeCollapsible: Move functions out of the var statement" X-Git-Tag: 1.31.0-rc.0~20378 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=c389f06e678fee49bd73b76fd8f0297339683c76;hp=d48157860e7db5ed884cf165b8b8416c3e93ffdd;p=lhc%2Fweb%2Fwiklou.git Merge "jquery.makeCollapsible: Move functions out of the var statement" --- diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index 883fb8ba58..514b969ed2 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -20,12 +20,12 @@ production. disabled. === New features in 1.21 === -* (bug 38110) Schema changes (adding or dropping tables, indicies and +* (bug 38110) Schema changes (adding or dropping tables, indices and fields) can be now be done separately from from other changes that update.php makes. This is useful in environments that use database permissions to restrict schema changes but allow the DB user that MediaWiki normally runs as to perform other changes that update.php - makes. Schema changes can be run seperately. See the file UPGRADE + makes. Schema changes can be run separately. See the file UPGRADE for more information. * (bug 34876) jquery.makeCollapsible has been improved in performance. * Added ContentHandler facility to allow extensions to support other content @@ -96,7 +96,7 @@ production. * (bug 5346) Categories that are redirects will be displayed italic in the category links section at the bottom of a page. * (bug 43915) New maintenance script deleteEqualMessages.php. -* You can now create checkbox option matrixes through the HTMLCheckMatrix +* You can now create checkbox option matrices through the HTMLCheckMatrix subclass in HTMLForm. * WikiText now permits the use of WAI-ARIA's role="presentation" inside of html elements and tables. This allows presentational markup, especially @@ -115,6 +115,7 @@ production. uz, vi. * Added 'CategoryAfterPageAdded' and 'CategoryAfterPageRemoved' hooks. * (bug 33186) Add image rotation api "imagerotate" +* (bug 34040) Add "User rights management" link on user page toolbox. === Bug fixes in 1.21 === * (bug 40353) SpecialDoubleRedirect should support interwiki redirects. @@ -194,6 +195,7 @@ production. * (bug 42184) $wgUploadSizeWarning missing second variable * (bug 40326) Check if files exist with a different extension during uploading * (bug 34798) Updated CSS for Atom/RSS recent changes feeds to match on-wiki diffs. +* (bug 42430) Calling numRows on MySQL no longer propagates unrelated errors. === API changes in 1.21 === * prop=revisions can now report the contentmodel and contentformat. @@ -230,7 +232,7 @@ production. * (bug 43849) ApiQueryImageInfo no longer throws exceptions with ForeignDBRepo redirects. * On error, any warnings generated before that error will be shown in the result. -* action=help suports generalized submodules (modules=query+value), querymodules obsolete +* action=help supports generalized submodules (modules=query+value), querymodules obsolete * ApiQueryImageInfo continuation is more reliable. The only major change is that the imagerepository property will no longer be set on page objects not processed in the current query (i.e. non-images or those skipped due to @@ -241,7 +243,7 @@ production. * ApiQueryImageInfo will now limit the number of calls to File::transform made in any one query. If there are too many, iicontinue will be returned. * action=query&meta=siteinfo&siprop=general will now return the regexes used for - link trails and link prefices. Added for Parsoid support. + link trails and link prefixes. Added for Parsoid support. * Added an API query module list=pageswithprop, which lists pages using a particular page property. * Added an API query module list=pagepropnames, which lists all page prop names diff --git a/api.php b/api.php index abf601fb48..bc9022979e 100644 --- a/api.php +++ b/api.php @@ -8,7 +8,7 @@ * as an argument in the URL ('?action=') and with write-enabled set to the * value of $wgEnableWriteAPI as specified in LocalSettings.php. * It then invokes "execute()" on the ApiMain object instance, which - * produces output in the format sepecified in the URL. + * produces output in the format specified in the URL. * * Copyright © 2006 Yuri Astrakhan @gmail.com * diff --git a/api.php5 b/api.php5 index bb515c5c15..1828b7b4d1 100644 --- a/api.php5 +++ b/api.php5 @@ -1,7 +1,7 @@ ; view current revision * \<- Previous version | Next Version -\> * - * @param $oldid int: revision ID of this article revision + * @param int $oldid revision ID of this article revision */ public function setOldSubtitle( $oldid = 0 ) { if ( !wfRunHooks( 'DisplayOldSubtitle', array( &$this, &$oldid ) ) ) { @@ -1519,7 +1519,7 @@ class Article implements Page { /** * Output deletion confirmation dialog * @todo FIXME: Move to another file? - * @param $reason String: prefilled reason + * @param string $reason prefilled reason */ public function confirmDelete( $reason ) { wfDebug( "Article::confirmDelete\n" ); @@ -1887,8 +1887,8 @@ class Article implements Page { * * @deprecated in 1.18; call OutputPage::redirect() directly * @param $noRedir Boolean: add redirect=no - * @param $sectionAnchor String: section to redirect to, including "#" - * @param $extraQuery String: extra query params + * @param string $sectionAnchor section to redirect to, including "#" + * @param string $extraQuery extra query params */ public function doRedirect( $noRedir = false, $sectionAnchor = '', $extraQuery = '' ) { wfDeprecated( __METHOD__, '1.18' ); @@ -1908,7 +1908,7 @@ class Article implements Page { * Use PHP's magic __get handler to handle accessing of * raw WikiPage fields for backwards compatibility. * - * @param $fname String Field name + * @param string $fname Field name */ public function __get( $fname ) { if ( property_exists( $this->mPage, $fname ) ) { @@ -1922,7 +1922,7 @@ class Article implements Page { * Use PHP's magic __set handler to handle setting of * raw WikiPage fields for backwards compatibility. * - * @param $fname String Field name + * @param string $fname Field name * @param $fvalue mixed New value */ public function __set( $fname, $fvalue ) { @@ -1941,8 +1941,8 @@ class Article implements Page { * Use PHP's magic __call handler to transform instance calls to * WikiPage functions for backwards compatibility. * - * @param $fname String Name of called method - * @param $args Array Arguments to the method + * @param string $fname Name of called method + * @param array $args Arguments to the method * @return mixed */ public function __call( $fname, $args ) { diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php index 2e42439c9f..a46581764a 100644 --- a/includes/AuthPlugin.php +++ b/includes/AuthPlugin.php @@ -46,7 +46,7 @@ class AuthPlugin { * you might need to munge it (for instance, for lowercase initial * letters). * - * @param $username String: username. + * @param string $username username. * @return bool */ public function userExists( $username ) { @@ -60,8 +60,8 @@ class AuthPlugin { * you might need to munge it (for instance, for lowercase initial * letters). * - * @param $username String: username. - * @param $password String: user password. + * @param string $username username. + * @param string $password user password. * @return bool */ public function authenticate( $username, $password ) { @@ -73,7 +73,7 @@ class AuthPlugin { * Modify options in the login template. * * @param $template UserLoginTemplate object. - * @param $type String 'signup' or 'login'. Added in 1.16. + * @param string $type 'signup' or 'login'. Added in 1.16. */ public function modifyUITemplate( &$template, &$type ) { # Override this! @@ -83,7 +83,7 @@ class AuthPlugin { /** * Set the domain this plugin is supposed to use when authenticating. * - * @param $domain String: authentication domain. + * @param string $domain authentication domain. */ public function setDomain( $domain ) { $this->domain = $domain; @@ -105,7 +105,7 @@ class AuthPlugin { /** * Check to see if the specific domain is a valid domain. * - * @param $domain String: authentication domain. + * @param string $domain authentication domain. * @return bool */ public function validDomain( $domain ) { @@ -194,7 +194,7 @@ class AuthPlugin { * Return true if successful. * * @param $user User object. - * @param $password String: password. + * @param string $password password. * @return bool */ public function setPassword( $user, $password ) { @@ -251,7 +251,7 @@ class AuthPlugin { * Check if a user should authenticate locally if the global authentication fails. * If either this or strict() returns true, local authentication is not used. * - * @param $username String: username. + * @param string $username username. * @return Boolean */ public function strictUserAuth( $username ) { diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 3b5fbac7a3..713623223c 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -1109,7 +1109,7 @@ class AutoLoader { /** * autoload - take a class name and attempt to load it * - * @param $className String: name of class we're looking for. + * @param string $className name of class we're looking for. * @return bool Returning false is important on failure as * it allows Zend to try and look in other registered autoloaders * as well. diff --git a/includes/Autopromote.php b/includes/Autopromote.php index d7ed2f904b..781f4fccad 100644 --- a/includes/Autopromote.php +++ b/includes/Autopromote.php @@ -54,7 +54,7 @@ class Autopromote { * Does not return groups the user already belongs to or has once belonged. * * @param $user User The user to get the groups for - * @param $event String key in $wgAutopromoteOnce (each one has groups/criteria) + * @param string $event key in $wgAutopromoteOnce (each one has groups/criteria) * * @return array Groups the user should be promoted to. * @@ -155,7 +155,7 @@ class Autopromote { * APCOND_AGE. Other types will throw an exception if no extension evalu- * ates them. * - * @param $cond Array: A condition, which must not contain other conditions + * @param array $cond A condition, which must not contain other conditions * @param $user User The user to check the condition against * @throws MWException * @return bool Whether the condition is true for the user diff --git a/includes/Block.php b/includes/Block.php index e20b5fdb41..3843631ad2 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -106,7 +106,7 @@ class Block { * user ID. Tries the user ID first, and if that doesn't work, tries * the address. * - * @param $address String: IP address of user/anon + * @param string $address IP address of user/anon * @param $user Integer: user id of user * @return Block Object * @deprecated since 1.18 @@ -199,8 +199,8 @@ class Block { /** * Get a block from the DB, with either the given address or the given username * - * @param $address string The IP address of the user, or blank to skip IP blocks - * @param $user int The user ID, or zero for anonymous users + * @param string $address The IP address of the user, or blank to skip IP blocks + * @param int $user The user ID, or zero for anonymous users * @return Boolean: the user is blocked from editing * @deprecated since 1.18 */ @@ -331,8 +331,8 @@ class Block { /** * Get a set of SQL conditions which will select rangeblocks encompasing a given range - * @param $start String Hexadecimal IP representation - * @param $end String Hexadecimal IP represenation, or null to use $start = $end + * @param string $start Hexadecimal IP representation + * @param string $end Hexadecimal IP represenation, or null to use $start = $end * @return String */ public static function getRangeCond( $start, $end = null ) { @@ -572,7 +572,7 @@ class Block { * blocked by this Block. This will use the recentchanges table. * * @param Block $block - * @param Array &$blockIds + * @param array &$blockIds * @return Array: block IDs of retroactive autoblocks made */ protected static function defaultRetroactiveAutoblock( Block $block, array &$blockIds ) { @@ -611,7 +611,7 @@ class Block { * Checks whether a given IP is on the autoblock whitelist. * TODO: this probably belongs somewhere else, but not sure where... * - * @param $ip String: The IP to check + * @param string $ip The IP to check * @return Boolean */ public static function isWhitelistedFromAutoblocks( $ip ) { @@ -654,7 +654,7 @@ class Block { /** * Autoblocks the given IP, referring to this Block. * - * @param $autoblockIP String: the IP to autoblock. + * @param string $autoblockIP the IP to autoblock. * @return mixed: block ID if an autoblock was inserted, false if not. */ public function doAutoblock( $autoblockIP ) { @@ -945,7 +945,7 @@ class Block { /** * Encode expiry for DB * - * @param $expiry String: timestamp for expiry, or + * @param string $expiry timestamp for expiry, or * @param $db DatabaseBase object * @return String * @deprecated since 1.18; use $dbw->encodeExpiry() instead @@ -958,8 +958,8 @@ class Block { /** * Decode expiry which has come from the DB * - * @param $expiry String: Database expiry format - * @param $timestampType Int Requested timestamp format + * @param string $expiry Database expiry format + * @param int $timestampType Requested timestamp format * @return String * @deprecated since 1.18; use $wgLang->formatExpiry() instead */ @@ -984,7 +984,7 @@ class Block { /** * Gets rid of uneeded numbers in quad-dotted/octet IP strings * For example, 127.111.113.151/24 -> 127.111.113.0/24 - * @param $range String: IP address to normalize + * @param string $range IP address to normalize * @return string * @deprecated since 1.18, call IP::sanitizeRange() directly */ @@ -1018,7 +1018,7 @@ class Block { /** * Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute * ("24 May 2034"), into an absolute timestamp we can put into the database. - * @param $expiry String: whatever was typed into the form + * @param string $expiry whatever was typed into the form * @return String: timestamp or "infinity" string for th DB implementation * @deprecated since 1.18 moved to SpecialBlock::parseExpiryInput() */ @@ -1042,7 +1042,7 @@ class Block { * @param $vagueTarget String|User|Int as above, but we will search for *any* block which * affects that target (so for an IP address, get ranges containing that IP; and also * get any relevant autoblocks). Leave empty or blank to skip IP-based lookups. - * @param $fromMaster Bool whether to use the DB_MASTER database + * @param bool $fromMaster whether to use the DB_MASTER database * @return Block|null (null if no relevant block could be found). The target and type * of the returned Block will refer to the actual block which was found, which might * not be the same as the target you gave if you used $vagueTarget! diff --git a/includes/Category.php b/includes/Category.php index 53e44d710c..c8397f74d4 100644 --- a/includes/Category.php +++ b/includes/Category.php @@ -106,7 +106,7 @@ class Category { /** * Factory function. * - * @param $name Array: A category name (no "Category:" prefix). It need + * @param array $name A category name (no "Category:" prefix). It need * not be normalized, with spaces replaced by underscores. * @return mixed Category, or false on a totally invalid name */ diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 3e69dd4f84..43ab4dbd69 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -40,7 +40,7 @@ class CategoryPage extends Article { /** * Constructor from a page id - * @param $id Int article ID to load + * @param int $id article ID to load * @return CategoryPage|null */ public static function newFromID( $id ) { diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 878c37184a..f9020b751c 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -71,9 +71,9 @@ class CategoryViewer extends ContextSource { * @since 1.19 $context is a second, required parameter * @param $title Title * @param $context IContextSource - * @param $from Array An array with keys page, subcat, + * @param array $from An array with keys page, subcat, * and file for offset of results of each section (since 1.17) - * @param $until Array An array with 3 keys for until of each section (since 1.17) + * @param array $until An array with 3 keys for until of each section (since 1.17) * @param $query Array */ function __construct( $title, IContextSource $context, $from = array(), $until = array(), $query = array() ) { @@ -441,7 +441,7 @@ class CategoryViewer extends ContextSource { * Get the paging links for a section (subcats/pages/files), to go at the top and bottom * of the output. * - * @param $type String: 'page', 'subcat', or 'file' + * @param string $type 'page', 'subcat', or 'file' * @return String: HTML output, possibly empty if there are no other pages */ private function getSectionPagingLinks( $type ) { @@ -573,9 +573,9 @@ class CategoryViewer extends ContextSource { /** * Create paging links, as a helper method to getSectionPagingLinks(). * - * @param $first String The 'until' parameter for the generated URL - * @param $last String The 'from' parameter for the genererated URL - * @param $type String A prefix for parameters, 'page' or 'subcat' or + * @param string $first The 'until' parameter for the generated URL + * @param string $last The 'from' parameter for the genererated URL + * @param string $type A prefix for parameters, 'page' or 'subcat' or * 'file' * @return String HTML */ @@ -616,7 +616,7 @@ class CategoryViewer extends ContextSource { * corresponds to the correct segment of the category. * * @param Title $title: The title (usually $this->title) - * @param String $section: Which section + * @param string $section: Which section * @throws MWException * @return Title */ @@ -650,9 +650,9 @@ class CategoryViewer extends ContextSource { * category-subcat-count-limited, category-file-count, * category-file-count-limited. * - * @param $rescnt Int: The number of items returned by our database query. - * @param $dbcnt Int: The number of items according to the category table. - * @param $type String: 'subcat', 'article', or 'file' + * @param int $rescnt The number of items returned by our database query. + * @param int $dbcnt The number of items according to the category table. + * @param string $type 'subcat', 'article', or 'file' * @return String: A message giving the number of items, to output to HTML. */ private function getCountMessage( $rescnt, $dbcnt, $type ) { diff --git a/includes/Categoryfinder.php b/includes/Categoryfinder.php index cb67aa82b7..59e6593108 100644 --- a/includes/Categoryfinder.php +++ b/includes/Categoryfinder.php @@ -66,7 +66,7 @@ class Categoryfinder { * Initializes the instance. Do this prior to calling run(). * @param $article_ids Array of article IDs * @param $categories FIXME - * @param $mode String: FIXME, default 'AND'. + * @param string $mode FIXME, default 'AND'. * @todo FIXME: $categories/$mode */ function seed( $article_ids, $categories, $mode = 'AND' ) { @@ -111,9 +111,9 @@ class Categoryfinder { /** * This functions recurses through the parent representation, trying to match the conditions - * @param $id int The article/category to check - * @param $conds array The array of categories to match - * @param $path array used to check for recursion loops + * @param int $id The article/category to check + * @param array $conds The array of categories to match + * @param array $path used to check for recursion loops * @return bool Does this match the conditions? */ function check( $id, &$conds, $path = array() ) { diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 1dd9b595bb..88f7d44060 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -25,8 +25,8 @@ class ChangeTags { /** * Creates HTML for the given tags * - * @param $tags String: Comma-separated list of tags - * @param $page String: A label for the type of action which is being displayed, + * @param string $tags Comma-separated list of tags + * @param string $page A label for the type of action which is being displayed, * for example: 'history', 'contributions' or 'newpages' * * @return Array with two items: (html, classes) @@ -62,7 +62,7 @@ class ChangeTags { /** * Get a short description for a tag * - * @param $tag String: tag + * @param string $tag tag * * @return String: Short description of the tag from "mediawiki:tag-$tag" if this message exists, * html-escaped version of $tag otherwise @@ -75,11 +75,11 @@ class ChangeTags { /** * Add tags to a change given its rc_id, rev_id and/or log_id * - * @param $tags String|Array: Tags to add to the change + * @param string|array $tags Tags to add to the change * @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 $params String: params to put in the ct_params field of tabel 'change_tag' + * @param string $params params to put in the ct_params field of tabel 'change_tag' * * @throws MWException * @return bool: false if no changes are made, otherwise true @@ -160,11 +160,11 @@ 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 $tables String|Array: Tabel names, see DatabaseBase::select - * @param $fields String|Array: Fields used in query, see DatabaseBase::select - * @param $conds String|Array: conditions used in query, see DatabaseBase::select + * @param string|array $tables Tabel 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 - * @param $options Array: options, see Database::select + * @param array $options options, see Database::select * @param bool|string $filter_tag Tag to select on * * @throws MWException When unable to determine appropriate JOIN condition for tagging @@ -211,7 +211,7 @@ class ChangeTags { /** * Build a text box to select a change tag * - * @param $selected String: tag to select by default + * @param string $selected tag to select by default * @param $fullForm Boolean: * - if false, then it returns an array of (label, form). * - if true, it returns an entire form around the selector. diff --git a/includes/ChangesFeed.php b/includes/ChangesFeed.php index ae30272110..476de5bd9d 100644 --- a/includes/ChangesFeed.php +++ b/includes/ChangesFeed.php @@ -31,8 +31,8 @@ class ChangesFeed { /** * Constructor * - * @param $format String: feed's format (either 'rss' or 'atom') - * @param $type String: type of feed (for cache keys) + * @param string $format feed's format (either 'rss' or 'atom') + * @param string $type type of feed (for cache keys) */ public function __construct( $format, $type ) { $this->format = $format; @@ -42,9 +42,9 @@ class ChangesFeed { /** * Get a ChannelFeed subclass object to use * - * @param $title String: feed's title - * @param $description String: feed's description - * @param $url String: url of origin page + * @param string $title feed's title + * @param string $description feed's description + * @param string $url url of origin page * @return ChannelFeed subclass or false on failure */ public function getFeedObject( $title, $description, $url ) { @@ -110,9 +110,9 @@ class ChangesFeed { /** * Save to feed result to $messageMemc * - * @param $feed String: feed's content - * @param $timekey String: memcached key of the last modification - * @param $key String: memcached key of the content + * @param string $feed feed's content + * @param string $timekey memcached key of the last modification + * @param string $key memcached key of the content */ public function saveToCache( $feed, $timekey, $key ) { global $messageMemc; @@ -125,8 +125,8 @@ class ChangesFeed { * Try to load the feed result from $messageMemc * * @param $lastmod Integer: timestamp of the last item in the recentchanges table - * @param $timekey String: memcached key of the last modification - * @param $key String: memcached key of the content + * @param string $timekey memcached key of the last modification + * @param string $key memcached key of the content * @return string|bool feed's content on cache hit or false on cache miss */ public function loadFromCache( $lastmod, $timekey, $key ) { diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 2f715bfdbf..451f2da594 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -80,7 +80,7 @@ class ChangesList extends ContextSource { * This first argument used to be an User object. * * @deprecated in 1.18; use newFromContext() instead - * @param $unused string|User Unused + * @param string|User $unused Unused * @return ChangesList|EnhancedChangesList|OldChangesList derivative */ public static function newFromUser( $unused ) { @@ -130,8 +130,8 @@ class ChangesList extends ContextSource { /** * Returns the appropriate flags for new page, minor change and patrolling - * @param $flags Array Associative array of 'flag' => Bool - * @param $nothing String to use for empty space + * @param array $flags Associative array of 'flag' => Bool + * @param string $nothing to use for empty space * @return String */ protected function recentChangesFlags( $flags, $nothing = ' ' ) { @@ -150,7 +150,7 @@ class ChangesList extends ContextSource { * unpatrolled edit. By default in English it will contain "N", "m", "b", * "!" respectively, plus it will have an appropriate title and class. * - * @param $flag String: 'newpage', 'unpatrolled', 'minor', or 'bot' + * @param string $flag 'newpage', 'unpatrolled', 'minor', or 'bot' * @return String: Raw HTML */ public static function flag( $flag ) { @@ -287,7 +287,7 @@ class ChangesList extends ContextSource { } /** - * @param $s string HTML to update + * @param string $s HTML to update * @param $rc_timestamp mixed */ public function insertDateHeader( &$s, $rc_timestamp ) { @@ -304,7 +304,7 @@ class ChangesList extends ContextSource { } /** - * @param $s string HTML to update + * @param string $s HTML to update * @param $title Title * @param $logtype string */ @@ -315,7 +315,7 @@ class ChangesList extends ContextSource { } /** - * @param $s string HTML to update + * @param string $s HTML to update * @param $rc RecentChange * @param $unpatrolled */ @@ -358,7 +358,7 @@ class ChangesList extends ContextSource { } /** - * @param $s string HTML to update + * @param string $s HTML to update * @param $rc RecentChange * @param $unpatrolled * @param $watched @@ -407,7 +407,7 @@ class ChangesList extends ContextSource { /** * Insert time timestamp string from $rc into $s * - * @param $s string HTML to update + * @param string $s HTML to update * @param $rc RecentChange */ public function insertTimestamp( &$s, $rc ) { @@ -587,8 +587,8 @@ class OldChangesList extends ChangesList { * Format a line using the old system (aka without any javascript). * * @param $rc RecentChange, passed by reference - * @param $watched Bool (default false) - * @param $linenumber Int (default null) + * @param bool $watched (default false) + * @param int $linenumber (default null) * * @return string|bool */ @@ -1137,9 +1137,9 @@ class EnhancedChangesList extends ChangesList { /** * Generate HTML for an arrow or placeholder graphic - * @param $dir String: one of '', 'd', 'l', 'r' - * @param $alt String: text - * @param $title String: text + * @param string $dir one of '', 'd', 'l', 'r' + * @param string $alt text + * @param string $title text * @return String: HTML "" tag */ protected function arrow( $dir, $alt = '', $title = '' ) { diff --git a/includes/Collation.php b/includes/Collation.php index 13084b84a7..2734871f3d 100644 --- a/includes/Collation.php +++ b/includes/Collation.php @@ -181,7 +181,10 @@ class IcuCollation extends Collation { /** * Additional characters (or character groups) to be considered separate - * letters for given languages, compared to the data stored in the + * letters for given languages, or to be removed from the list of such + * letters (denoted by keys starting with '-'). + * + * These are additions to (or subtractions from) the data stored in the * first-letters-root.ser file (which among others includes full basic latin, * cyrillic and greek alphabets). * @@ -201,25 +204,29 @@ class IcuCollation extends Collation { // Verified by native speakers 'be' => array( "Ё" ), 'be-tarask' => array( "Ё" ), + 'en' => array(), 'fi' => array( "Å", "Ä", "Ö" ), + 'hu' => array( "Cs", "Dz", "Dzs", "Gy", "Ly", "Ny", "Ö", "Sz", "Ty", "Ü", "Zs" ), + 'it' => array(), 'pl' => array( "Ą", "Ć", "Ę", "Ł", "Ń", "Ó", "Ś", "Ź", "Å»" ), + 'pt' => array(), 'ru' => array(), + 'uk' => array( "Ґ", "Ь" ), // Not verified, but likely correct 'af' => array(), - 'ast' => array( "CH", "LL", "Ñ" ), + 'ast' => array( "Ch", "Ll", "Ñ" ), 'az' => array( "Ç", "Ə", "Ğ", "Ä°", "Ö", "Ş", "Ü" ), 'bg' => array(), - 'br' => array( "CH", "C'H" ), - 'bs' => array( "Č", "Ć", "DŽ", "Đ", "LJ", "NJ", "Å ", "Ž" ), + 'br' => array( "Ch", "C'h" ), + 'bs' => array( "Č", "Ć", "Dž", "Đ", "Lj", "Nj", "Å ", "Ž" ), 'ca' => array(), 'co' => array(), - 'cs' => array( "Č", "CH", "Ř", "Å ", "Ž" ), - 'cy' => array( "CH", "DD", "FF", "NG", "LL", "PH", "RH", "TH" ), + 'cs' => array( "Č", "Ch", "Ř", "Å ", "Ž" ), + 'cy' => array( "Ch", "Dd", "Ff", "Ng", "Ll", "Ph", "Rh", "Th" ), 'da' => array( "Æ", "Ø", "Å" ), 'de' => array(), - 'dsb' => array( "Č", "Ć", "DŹ", "Ě", "CH", "Ł", "Ń", "Ŕ", "Å ", "Ś", "Ž", "Ź" ), + 'dsb' => array( "Č", "Ć", "Dź", "Ě", "Ch", "Ł", "Ń", "Ŕ", "Å ", "Ś", "Ž", "Ź" ), 'el' => array(), - 'en' => array(), 'eo' => array( "Ĉ", "Ĝ", "Ĥ", "Ä´", "Ŝ", "Ŭ" ), 'es' => array( "Ñ" ), 'et' => array( "Å ", "Ž", "Õ", "Ä", "Ö", "Ü" ), @@ -230,12 +237,10 @@ class IcuCollation extends Collation { 'fy' => array(), 'ga' => array(), 'gd' => array(), - 'gl' => array( "CH", "LL", "Ñ" ), - 'hr' => array( "Č", "Ć", "DŽ", "Đ", "LJ", "NJ", "Å ", "Ž" ), - 'hsb' => array( "Č", "DŹ", "Ě", "CH", "Ł", "Ń", "Ř", "Å ", "Ć", "Ž" ), - 'hu' => array( "CS", "DZ", "DZS", "GY", "LY", "NY", "Ö", "SZ", "TY", "Ü", "ZS" ), + 'gl' => array( "Ch", "Ll", "Ñ" ), + 'hr' => array( "Č", "Ć", "Dž", "Đ", "Lj", "Nj", "Å ", "Ž" ), + 'hsb' => array( "Č", "Dź", "Ě", "Ch", "Ł", "Ń", "Ř", "Å ", "Ć", "Ž" ), 'is' => array( "Á", "Ð", "É", "Í", "Ó", "Ú", "Ý", "Þ", "Æ", "Ö", "Å" ), - 'it' => array(), 'kk' => array( "Ò®", "І" ), 'kl' => array( "Æ", "Ø", "Å" ), 'ku' => array( "Ç", "Ê", "Î", "Ş", "Û" ), @@ -246,27 +251,26 @@ class IcuCollation extends Collation { 'lv' => array( "Č", "Ä¢", "Ķ", "Ä»", "Ņ", "Å ", "Ž" ), 'mk' => array(), 'mo' => array( "Ă", "Â", "Î", "Ş", "Å¢" ), - 'mt' => array( "Ċ", "Ä ", "GĦ", "Ħ", "Å»" ), + 'mt' => array( "Ċ", "Ä ", "Għ", "Ħ", "Å»" ), 'nl' => array(), 'no' => array( "Æ", "Ø", "Å" ), 'oc' => array(), - 'pt' => array(), 'rm' => array(), 'ro' => array( "Ă", "Â", "Î", "Ş", "Å¢" ), 'rup' => array( "Ă", "Â", "Î", "Ľ", "Ń", "Ş", "Å¢" ), 'sco' => array(), - 'sk' => array( "Ä", "Č", "CH", "Ô", "Å ", "Ž" ), + 'sk' => array( "Ä", "Č", "Ch", "Ô", "Å ", "Ž" ), 'sl' => array( "Č", "Å ", "Ž" ), 'smn' => array( "Á", "Č", "Đ", "Ŋ", "Å ", "Ŧ", "Ž", "Æ", "Ø", "Å", "Ä", "Ö" ), - 'sq' => array( "Ç", "DH", "Ë", "GJ", "LL", "NJ", "RR", "SH", "TH", "XH", "ZH" ), + 'sq' => array( "Ç", "Dh", "Ë", "Gj", "Ll", "Nj", "Rr", "Sh", "Th", "Xh", "Zh" ), 'sr' => array(), 'sv' => array( "Å", "Ä", "Ö" ), + '-sv' => array( "Þ" ), // sorted as "th" in Swedish, causing unexpected output - bug 45446 'tk' => array( "Ç", "Ä", "Ž", "Ň", "Ö", "Ş", "Ü", "Ý" ), - 'tl' => array( "Ñ", "NG" ), + 'tl' => array( "Ñ", "Ng" ), 'tr' => array( "Ç", "Ğ", "Ä°", "Ö", "Ş", "Ü" ), 'tt' => array( "Ә", "Ó¨", "Ò®", "Җ", "Ò¢", "Òº" ), - 'uk' => array( "Ґ", "Ь" ), - 'uz' => array( "CH", "G'", "NG", "O'", "SH" ), + 'uz' => array( "Ch", "G'", "Ng", "O'", "Sh" ), 'vi' => array( "Ă", "Â", "Đ", "Ê", "Ô", "Æ ", "Ư" ), ); @@ -352,7 +356,12 @@ class IcuCollation extends Collation { if ( isset ( self::$tailoringFirstLetters[$this->locale] ) ) { $letters = wfGetPrecompiledData( "first-letters-root.ser" ); + // Append additional characters $letters = array_merge( $letters, self::$tailoringFirstLetters[$this->locale] ); + // Remove unnecessary ones, if any + if ( isset( self::$tailoringFirstLetters[ '-' . $this->locale ] ) ) { + $letters = array_diff( $letters, self::$tailoringFirstLetters[ '-' . $this->locale ] ); + } } else { $letters = wfGetPrecompiledData( "first-letters-{$this->locale}.ser" ); if ( $letters === false ) { @@ -422,13 +431,13 @@ class IcuCollation extends Collation { * Do a binary search, and return the index of the largest item that sorts * less than or equal to the target value. * - * @param $valueCallback array A function to call to get the value with + * @param array $valueCallback A function to call to get the value with * a given array index. - * @param $valueCount int The number of items accessible via $valueCallback, + * @param int $valueCount The number of items accessible via $valueCallback, * indexed from 0 to $valueCount - 1 - * @param $comparisonCallback array A callback to compare two values, returning + * @param array $comparisonCallback A callback to compare two values, returning * -1, 0 or 1 in the style of strcmp(). - * @param $target string The target value to find. + * @param string $target The target value to find. * * @return int|bool The item index of the lower bound, or false if the target value * sorts before all items. diff --git a/includes/ConfEditor.php b/includes/ConfEditor.php index e5c2e5c810..1d9ca92120 100644 --- a/includes/ConfEditor.php +++ b/includes/ConfEditor.php @@ -127,7 +127,7 @@ class ConfEditor { /** * Edit the text. Returns the edited text. - * @param $ops Array of operations. + * @param array $ops of operations. * * Operations are given as an associative array, with members: * type: One of delete, set, append or insert (required) @@ -306,7 +306,7 @@ class ConfEditor { * setVar( $arr, 'foo/bar', 'baz', 3 ); will set * $arr['foo']['bar']['baz'] = 3; * @param $array array - * @param $path string slash-delimited path + * @param string $path slash-delimited path * @param $key mixed Key * @param $value mixed Value */ diff --git a/includes/Cookie.php b/includes/Cookie.php index a6eb79a5a5..27a8507258 100644 --- a/includes/Cookie.php +++ b/includes/Cookie.php @@ -43,8 +43,8 @@ class Cookie { * cookies. Used internally after a request to parse the * Set-Cookie headers. * - * @param $value String: the value of the cookie - * @param $attr Array: possible key/values: + * @param string $value the value of the cookie + * @param array $attr possible key/values: * expires A date string * path The path this cookie is used on * domain Domain this cookie is used on @@ -84,8 +84,8 @@ class Cookie { * @todo fixme fails to detect 3-letter top-level domains * @todo fixme fails to detect 2-letter top-level domains for single-domain use (probably not a big problem in practice, but there are test cases) * - * @param $domain String: the domain to validate - * @param $originDomain String: (optional) the domain the cookie originates from + * @param string $domain the domain to validate + * @param string $originDomain (optional) the domain the cookie originates from * @return Boolean */ public static function validateCookieDomain( $domain, $originDomain = null ) { @@ -142,8 +142,8 @@ class Cookie { /** * Serialize the cookie jar into a format useful for HTTP Request headers. * - * @param $path String: the path that will be used. Required. - * @param $domain String: the domain that will be used. Required. + * @param string $path the path that will be used. Required. + * @param string $domain the domain that will be used. Required. * @return String */ public function serializeToHttpRequest( $path, $domain ) { @@ -232,7 +232,7 @@ class CookieJar { * Parse the content of an Set-Cookie HTTP Response header. * * @param $cookie String - * @param $domain String: cookie's domain + * @param string $domain cookie's domain * @return null */ public function parseCookieResponseHeader ( $cookie, $domain ) { diff --git a/includes/CryptRand.php b/includes/CryptRand.php index 4255d56f33..01bbc44b3d 100644 --- a/includes/CryptRand.php +++ b/includes/CryptRand.php @@ -148,7 +148,7 @@ class MWCryptRand { /** * Randomly hash data while mixing in clock drift data for randomness * - * @param $data string The data to randomly hash. + * @param string $data The data to randomly hash. * @return String The hashed bytes * @author Tim Starling */ @@ -468,8 +468,8 @@ class MWCryptRand { * You can use MWCryptRand::wasStrong() if you wish to know if the source used * was cryptographically strong. * - * @param $bytes int the number of bytes of random data to generate - * @param $forceStrong bool Pass true if you want generate to prefer cryptographically + * @param int $bytes the number of bytes of random data to generate + * @param bool $forceStrong Pass true if you want generate to prefer cryptographically * strong sources of entropy even if reading from them may steal * more entropy from the system than optimal. * @return String Raw binary random data @@ -484,8 +484,8 @@ class MWCryptRand { * You can use MWCryptRand::wasStrong() if you wish to know if the source used * was cryptographically strong. * - * @param $chars int the number of hex chars of random data to generate - * @param $forceStrong bool Pass true if you want generate to prefer cryptographically + * @param int $chars the number of hex chars of random data to generate + * @param bool $forceStrong Pass true if you want generate to prefer cryptographically * strong sources of entropy even if reading from them may steal * more entropy from the system than optimal. * @return String Hexadecimal random data diff --git a/includes/DataUpdate.php b/includes/DataUpdate.php index 04029db3da..419d7e5f02 100644 --- a/includes/DataUpdate.php +++ b/includes/DataUpdate.php @@ -74,7 +74,7 @@ abstract class DataUpdate implements DeferrableUpdate { * This allows for limited transactional logic across multiple backends for storing * secondary data. * - * @param $updates array a list of DataUpdate instances + * @param array $updates a list of DataUpdate instances * @throws Exception|null */ public static function runUpdates( $updates ) { diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 8ca5fa901f..a03214b428 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -358,7 +358,7 @@ $wgImgAuthPublicTest = true; * FSRepo is also supported for backwards compatibility. * * - name A unique name for the repository (but $wgLocalFileRepo should be 'local'). - * The name should consist of alpha-numberic characters. + * The name should consist of alpha-numeric characters. * - backend A file backend name (see $wgFileBackends). * * For most core repos: @@ -412,7 +412,7 @@ $wgImgAuthPublicTest = true; * * ForeignDBRepo: * - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags - * equivalent to the corresponding member of $wgDBservers + * equivalent to the corresponding member of $wgDBservers * - tablePrefix Table prefix, the foreign wiki's $wgDBprefix * - hasSharedCache True if the wiki's shared cache is accessible via the local $wgMemc * @@ -423,7 +423,7 @@ $wgImgAuthPublicTest = true; * If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values. * Otherwise, set $wgLocalFileRepo to a repository structure as described above. * If you set $wgUseInstantCommons to true, it will add an entry for Commons. - * If you set $wgForeignFileRepos to an array of repostory structures, those will + * If you set $wgForeignFileRepos to an array of repository structures, those will * be searched after the local file repo. * Otherwise, you will only have access to local media files. * @@ -991,7 +991,7 @@ $wgAntivirus = null; * "command" is the full command to call the virus scanner - %f will be * replaced with the name of the file to scan. If not present, the filename * will be appended to the command. Note that this must be overwritten if the - * scanner is not in the system path; in that case, plase set + * scanner is not in the system path; in that case, please set * $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full * path. * @@ -1001,8 +1001,8 @@ $wgAntivirus = null; * the scan to be failed. This will pass the file if $wgAntivirusRequired * is not set. * - An exit code mapped to AV_SCAN_ABORTED causes the function to consider - * the file to have an usupported format, which is probably imune to - * virusses. This causes the file to pass. + * the file to have an unsupported format, which is probably immune to + * viruses. This causes the file to pass. * - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning * no virus was found. * - All other codes (like AV_VIRUS_FOUND) will cause the function to report @@ -1021,7 +1021,7 @@ $wgAntivirusSetup = array( 'codemap' => array( "0" => AV_NO_VIRUS, # no virus "1" => AV_VIRUS_FOUND, # virus found - "52" => AV_SCAN_ABORTED, # unsupported file format (probably imune) + "52" => AV_SCAN_ABORTED, # unsupported file format (probably immune) "*" => AV_SCAN_FAILED, # else scan failed ), 'messagepattern' => '/.*?:(.*)/sim', @@ -1250,7 +1250,7 @@ $wgEnableUserEmail = true; * instead of From. ($wgEmergencyContact will be used as From.) * * Some mailers (eg sSMTP) set the SMTP envelope sender to the From value, - * which can cause problems with SPF validation and leak recipient addressses + * which can cause problems with SPF validation and leak recipient addresses * when bounces are sent to the sender. */ $wgUserEmailUseReplyTo = false; @@ -1449,7 +1449,7 @@ $wgAllDBsAreLocalhost = false; * preferences shared (preferences were stored in the user table prior to 1.16) * * $wgSharedTables may be customized with a list of tables to share in the shared - * datbase. However it is advised to limit what tables you do share as many of + * database. However it is advised to limit what tables you do share as many of * MediaWiki's tables may have side effects if you try to share them. * * $wgSharedPrefix is the table prefix for the shared database. It defaults to @@ -1537,7 +1537,7 @@ $wgDBerrorLog = false; * Timezone to use in the error log. * Defaults to the wiki timezone ($wgLocaltimezone). * - * A list of useable timezones can found at: + * A list of usable timezones can found at: * http://php.net/manual/en/timezones.php * * @par Examples: @@ -2211,14 +2211,14 @@ $wgUsePrivateIPs = false; * change it in their preferences. * * This also defines the language of pages in the wiki. The content is wrapped - * in a html element with lang=XX attribute. This behavior can be overriden + * in a html element with lang=XX attribute. This behavior can be overridden * via hooks, see Title::getPageLanguage. */ $wgLanguageCode = 'en'; /** * Language cache size, or really how many languages can we handle - * simultanously without degrading to crawl speed. + * simultaneously without degrading to crawl speed. */ $wgLangObjCacheSize = 10; @@ -2244,7 +2244,7 @@ $wgExtraLanguageNames = array(); /** * List of language codes that don't correspond to an actual language. - * These codes are mostly leftoffs from renames, or other legacy things. + * These codes are mostly left-offs from renames, or other legacy things. * This array makes them not appear as a selectable language on the installer, * and excludes them when running the transstat.php script. */ @@ -2484,7 +2484,7 @@ $wgForceUIMsgAsContentMsg = array(); * Timezones can be translated by editing MediaWiki messages of type * timezone-nameinlowercase like timezone-utc. * - * A list of useable timezones can found at: + * A list of usable timezones can found at: * http://php.net/manual/en/timezones.php * * @par Examples: @@ -2503,7 +2503,7 @@ $wgLocaltimezone = null; * for anonymous users and new user accounts. * * This setting is used for most date/time displays in the software, and is - * overrideable in user preferences. It is *not* used for signature timestamps. + * overridable in user preferences. It is *not* used for signature timestamps. * * By default, this will be set to match $wgLocaltimezone. */ @@ -2602,7 +2602,7 @@ $wgWellFormedXml = true; * @par Example: * @code * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg'; - * @endCode + * @endcode * Normally we wouldn't have to define this in the root "" * element, but IE needs it there in some circumstances. * @@ -2787,7 +2787,7 @@ $wgExperimentalHtmlIds = false; * for the icon, the following keys are used: * - src: An absolute url to the image to use for the icon, this is recommended * but not required, however some skins will ignore icons without an image - * - url: The url to use in the a element arround the text or icon, if not set an a element will not be outputted + * - url: The url to use in the a element around the text or icon, if not set an a element will not be outputted * - alt: This is the text form of the icon, it will be displayed without an image in * skins like Modern or if src is not set, and will otherwise be used as * the alt="" for the image. This key is required. @@ -2859,7 +2859,7 @@ $wgSend404Code = true; /** * The $wgShowRollbackEditCount variable is used to show how many edits will be - * rollback. The numeric value of the varible are the limit up to are counted. + * rollback. The numeric value of the variable are the limit up to are counted. * If the value is false or 0, the edits are not counted. Disabling this will * furthermore prevent MediaWiki from hiding some useless rollback links. * @@ -3207,7 +3207,7 @@ $wgInterwikiFallbackSite = 'wiki'; /** @} */ # end of Interwiki caching settings. /** - * If local interwikis are set up which allow redirects, + * If local interwikies are set up which allow redirects, * set this regexp to restrict URLs which will be displayed * as 'redirected from' links. * @@ -3307,7 +3307,7 @@ $wgInvalidRedirectTargets = array( 'Filepath', 'Mypage', 'Mytalk' ); * class The class name * * preprocessorClass The preprocessor class. Two classes are currently available: - * Preprocessor_Hash, which uses plain PHP arrays for tempoarary + * Preprocessor_Hash, which uses plain PHP arrays for temporary * storage, and Preprocessor_DOM, which uses the DOM module for * temporary storage. Preprocessor_DOM generally uses less memory; * the speed of the two is roughly the same. @@ -4106,7 +4106,7 @@ $wgNamespaceProtection = array(); * namespaces constants (NS_USER, NS_MAIN...). * * Among other things, this may be useful to enforce read-restrictions - * which may otherwise be bypassed by using the template machanism. + * which may otherwise be bypassed by using the template mechanism. */ $wgNonincludableNamespaces = array(); @@ -4815,7 +4815,7 @@ $wgDebugToolbar = false; $wgDisableTextSearch = false; /** - * Set to true to have nicer highligted text in search results, + * Set to true to have nicer highlighted text in search results, * by default off due to execution overhead */ $wgAdvancedSearchHighlighting = false; @@ -4841,7 +4841,7 @@ $wgCountTotalSearchHits = false; /** * Template for OpenSearch suggestions, defaults to API action=opensearch * - * Sites with heavy load would tipically have these point to a custom + * Sites with heavy load would typically have these point to a custom * PHP wrapper to avoid firing up mediawiki for every keystroke * * Placeholders: {searchTerms} @@ -4933,14 +4933,14 @@ $wgUseTwoButtonsSearchForm = true; /** * Array of namespaces to generate a Google sitemap for when the - * maintenance/generateSitemap.php script is run, or false if one is to be ge- - * nerated for all namespaces. + * maintenance/generateSitemap.php script is run, or false if one is to be + * generated for all namespaces. */ $wgSitemapNamespaces = false; /** * Custom namespace priorities for sitemaps. Setting this will allow you to - * set custom priorities to namsepaces when sitemaps are generated using the + * set custom priorities to namespaces when sitemaps are generated using the * maintenance/generateSitemap.php script. * * This should be a map of namespace IDs to priority @@ -4981,7 +4981,7 @@ $wgDiff = '/usr/bin/diff'; /** * Which namespaces have special treatment where they should be preview-on-open - * Internaly only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki) + * Internally only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki) * can specify namespaces of pages they have special treatment for */ $wgPreviewOnOpenNamespaces = array( @@ -5461,7 +5461,7 @@ $wgAutoloadClasses = array(); * 'version' => 1.9, * 'path' => __FILE__, * 'author' => 'Foo Barstein', - * 'url' => 'http://wwww.example.com/Example%20Extension/', + * 'url' => 'http://www.example.com/Example%20Extension/', * 'description' => 'An example extension', * 'descriptionmsg' => 'exampleextension-desc', * ); @@ -5918,8 +5918,8 @@ $wgNamespaceRobotPolicies = array(); /** * Robot policies per article. These override the per-namespace robot policies. - * Must be in the form of an array where the key part is a properly canonical- - * ised text form title and the value is a robot policy. + * Must be in the form of an array where the key part is a properly canonicalised + * text form title and the value is a robot policy. * * @par Example: * @code diff --git a/includes/DeferredUpdates.php b/includes/DeferredUpdates.php index 716e65c8c3..2ca646b254 100644 --- a/includes/DeferredUpdates.php +++ b/includes/DeferredUpdates.php @@ -66,7 +66,7 @@ class DeferredUpdates { /** * Do any deferred updates and clear the list * - * @param $commit String: set to 'commit' to commit after every update to + * @param string $commit set to 'commit' to commit after every update to * prevent lock contention */ public static function doUpdates( $commit = '' ) { diff --git a/includes/EditPage.php b/includes/EditPage.php index 1bb165f1db..a0b6c93cf9 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -476,7 +476,7 @@ class EditPage { * "View source for ..." page displaying the source code after the error message. * * @since 1.19 - * @param $permErrors Array of permissions errors, as returned by + * @param array $permErrors of permissions errors, as returned by * Title::getUserPermissionsErrors(). * @throws PermissionsError */ @@ -1049,7 +1049,7 @@ class EditPage { * Get the contents to be preloaded into the box, either set by * an earlier setPreloadText() or by loading the given page. * - * @param $preload String: representing the title to preload from. + * @param string $preload representing the title to preload from. * * @return String * @@ -1068,7 +1068,7 @@ class EditPage { * Get the contents to be preloaded into the box, either set by * an earlier setPreloadText() or by loading the given page. * - * @param $preload String: representing the title to preload from. + * @param string $preload representing the title to preload from. * * @return Content * @@ -2055,7 +2055,7 @@ class EditPage { * an exception will be raised. Set $this->allowNonTextContent to true to allow editing of non-textual * content. * - * @param String|null|bool $text Text to unserialize + * @param string|null|bool $text Text to unserialize * @return Content The content object created from $text. If $text was false or null, false resp. null will be * returned instead. * @@ -2433,10 +2433,10 @@ class EditPage { * inferred by the id given to the input. You can remove them both by * passing array( 'id' => false ) to $userInputAttrs. * - * @param $summary string The value of the summary input - * @param $labelText string The html to place inside the label - * @param $inputAttrs array of attrs to use on the input - * @param $spanLabelAttrs array of attrs to use on the span inside the label + * @param string $summary The value of the summary input + * @param string $labelText The html to place inside the label + * @param array $inputAttrs of attrs to use on the input + * @param array $spanLabelAttrs of attrs to use on the span inside the label * * @return array An array in the format array( $label, $input ) */ @@ -2470,7 +2470,7 @@ class EditPage { * @param $isSubjectPreview Boolean: true if this is the section subject/title * up top, or false if this is the comment summary * down below the textarea - * @param $summary String: The text of the summary to display + * @param string $summary The text of the summary to display * @return String */ protected function showSummaryInput( $isSubjectPreview, $summary = "" ) { @@ -2496,7 +2496,7 @@ class EditPage { * @param $isSubjectPreview Boolean: true if this is the section subject/title * up top, or false if this is the comment summary * down below the textarea - * @param $summary String: the text of the summary to display + * @param string $summary the text of the summary to display * @return String */ protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) { @@ -2569,8 +2569,8 @@ HTML * The $textoverride method can be used by subclasses overriding showContentForm * to pass back to this method. * - * @param $customAttribs array of html attributes to use in the textarea - * @param $textoverride String: optional text to override $this->textarea1 with + * @param array $customAttribs of html attributes to use in the textarea + * @param string $textoverride optional text to override $this->textarea1 with */ protected function showTextbox1( $customAttribs = null, $textoverride = null ) { if ( $this->wasDeletedSinceLastEdit() && $this->formtype == 'save' ) { @@ -2674,7 +2674,7 @@ HTML * Append preview output to $wgOut. * Includes category rendering if this is a category page. * - * @param $text String: the HTML to be output for the preview. + * @param string $text the HTML to be output for the preview. */ protected function showPreview( $text ) { global $wgOut; @@ -3297,8 +3297,8 @@ HTML * Returns an array of html code of the following checkboxes: * minor and watch * - * @param $tabindex int Current tabindex - * @param $checked Array of checkbox => bool, where bool indicates the checked + * @param int $tabindex Current tabindex + * @param array $checked of checkbox => bool, where bool indicates the checked * status of the checkbox * * @return array @@ -3348,7 +3348,7 @@ HTML * Returns an array of html code of the following buttons: * save, diff, preview and live * - * @param $tabindex int Current tabindex + * @param int $tabindex Current tabindex * * @return array */ @@ -3477,7 +3477,7 @@ HTML /** * Produce the stock "your edit contains spam" page * - * @param $match string|bool Text which triggered one or more filters + * @param string|bool $match Text which triggered one or more filters * @deprecated since 1.17 Use method spamPageWithContent() instead */ static function spamPage( $match = false ) { diff --git a/includes/Exception.php b/includes/Exception.php index 2764ea9da7..530afd0480 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -64,8 +64,8 @@ class MWException extends Exception { /** * Run hook to allow extensions to modify the text of the exception * - * @param $name string: class name of the exception - * @param $args array: arguments to pass to the callback functions + * @param string $name class name of the exception + * @param array $args arguments to pass to the callback functions * @return string|null string to output or null if any hook has been called */ function runHooks( $name, $args = array() ) { @@ -99,8 +99,8 @@ class MWException extends Exception { /** * Get a message from i18n * - * @param $key string: message name - * @param $fallback string: default message if the message cache can't be + * @param string $key message name + * @param string $fallback default message if the message cache can't be * called by the exception * The function also has other parameters that are arguments for the message * @return string message with arguments replaced @@ -320,9 +320,9 @@ class ErrorPageError extends MWException { /** * Note: these arguments are keys into wfMessage(), not text! * - * @param $title string|Message Message key (string) for page title, or a Message object - * @param $msg string|Message Message key (string) for error text, or a Message object - * @param $params array with parameters to wfMessage() + * @param string|Message $title Message key (string) for page title, or a Message object + * @param string|Message $msg Message key (string) for error text, or a Message object + * @param array $params with parameters to wfMessage() */ function __construct( $title, $msg, $params = null ) { $this->title = $title; @@ -354,8 +354,8 @@ class ErrorPageError extends MWException { */ class BadTitleError extends ErrorPageError { /** - * @param $msg string|Message A message key (default: 'badtitletext') - * @param $params Array parameter to wfMessage() + * @param string|Message $msg A message key (default: 'badtitletext') + * @param array $params parameter to wfMessage() */ function __construct( $msg = 'badtitletext', $params = null ) { parent::__construct( 'badtitle', $msg, $params ); @@ -557,8 +557,8 @@ class HttpError extends MWException { * Constructor * * @param $httpCode Integer: HTTP status code to send to the client - * @param $content String|Message: content of the message - * @param $header String|Message: content of the header (\ and \) + * @param string|Message $content content of the message + * @param string|Message $header content of the header (\ and \) */ public function __construct( $httpCode, $content, $header = null ) { parent::__construct( $content ); @@ -684,7 +684,7 @@ class MWExceptionHandler { * Print a message, if possible to STDERR. * Use this in command line mode only (see isCommandLine) * - * @param $message string Failure text + * @param string $message Failure text */ public static function printError( $message ) { # NOTE: STDERR may not be available, especially if php-cgi is used from the command line (bug #15602). diff --git a/includes/Export.php b/includes/Export.php index 85f2368247..bfd561e7c8 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -80,8 +80,8 @@ class WikiExporter { * offset: non-inclusive offset at which to start the query * limit: maximum number of rows to return * dir: "asc" or "desc" timestamp order - * @param $buffer Int: one of WikiExporter::BUFFER or WikiExporter::STREAM - * @param $text Int: one of WikiExporter::TEXT or WikiExporter::STUB + * @param int $buffer one of WikiExporter::BUFFER or WikiExporter::STREAM + * @param int $text one of WikiExporter::TEXT or WikiExporter::STUB */ function __construct( $db, $history = WikiExporter::CURRENT, $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) { @@ -126,7 +126,7 @@ class WikiExporter { /** * Dumps a series of page and revision records for those pages * in the database falling within the page_id range given. - * @param $start Int: inclusive lower limit (this id is included) + * @param int $start inclusive lower limit (this id is included) * @param $end Int: Exclusive upper limit (this id is not included) * If 0, no upper limit. */ @@ -141,7 +141,7 @@ class WikiExporter { /** * Dumps a series of page and revision records for those pages * in the database with revisions falling within the rev_id range given. - * @param $start Int: inclusive lower limit (this id is included) + * @param int $start inclusive lower limit (this id is included) * @param $end Int: Exclusive upper limit (this id is not included) * If 0, no upper limit. */ @@ -758,7 +758,7 @@ class XmlDumpWriter { /** * @param $timestamp string - * @param $indent string Default to six spaces + * @param string $indent Default to six spaces * @return string */ function writeTimestamp( $timestamp, $indent = " " ) { @@ -769,7 +769,7 @@ class XmlDumpWriter { /** * @param $id * @param $text string - * @param $indent string Default to six spaces + * @param string $indent Default to six spaces * @return string */ function writeContributor( $id, $text, $indent = " " ) { @@ -946,7 +946,7 @@ class DumpOutput { * Use this for the last piece of a file written out * at specified checkpoints (e.g. every n hours). * @param $newname mixed File name. May be a string or an array with one element - * @param $open bool If true, a new file with the old filename will be opened again for writing (default: false) + * @param bool $open If true, a new file with the old filename will be opened again for writing (default: false) */ function closeAndRename( $newname, $open = false ) { } diff --git a/includes/ExternalEdit.php b/includes/ExternalEdit.php index 3f73376479..11e942308c 100644 --- a/includes/ExternalEdit.php +++ b/includes/ExternalEdit.php @@ -40,7 +40,7 @@ class ExternalEdit extends ContextSource { * Check whether external edit or diff should be used. * * @param $context IContextSource context to use - * @param $type String can be either 'edit' or 'diff' + * @param string $type can be either 'edit' or 'diff' * @return Bool */ public static function useExternalEngine( IContextSource $context, $type ) { diff --git a/includes/ExternalUser.php b/includes/ExternalUser.php index 8cf9c84fa3..580b98966a 100644 --- a/includes/ExternalUser.php +++ b/includes/ExternalUser.php @@ -278,7 +278,7 @@ abstract class ExternalUser { * This is part of the core code and is not overridable by specific * plugins. It's in this class only for convenience. * - * @param $id int user_id + * @param int $id user_id */ final public function linkToLocal( $id ) { $dbw = wfGetDB( DB_MASTER ); diff --git a/includes/Fallback.php b/includes/Fallback.php index a26410a510..2e19a095d4 100644 --- a/includes/Fallback.php +++ b/includes/Fallback.php @@ -153,8 +153,8 @@ class Fallback { * Fallback implementation of mb_strpos, hardcoded to UTF-8. * @param $haystack String * @param $needle String - * @param $offset String: optional start position - * @param $encoding String: optional encoding; ignored + * @param string $offset optional start position + * @param string $encoding optional encoding; ignored * @return int */ public static function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) { @@ -174,8 +174,8 @@ class Fallback { * Fallback implementation of mb_strrpos, hardcoded to UTF-8. * @param $haystack String * @param $needle String - * @param $offset String: optional start position - * @param $encoding String: optional encoding; ignored + * @param string $offset optional start position + * @param string $encoding optional encoding; ignored * @return int */ public static function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) { diff --git a/includes/Feed.php b/includes/Feed.php index 8e000ae61e..a30ba5cecb 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -52,11 +52,11 @@ class FeedItem { /** * Constructor * - * @param $title String|Title Item's title + * @param string|Title $title Item's title * @param $description String - * @param $url String: URL uniquely designating the item. - * @param $date String: Item's date - * @param $author String: Author's user name + * @param string $url URL uniquely designating the item. + * @param string $date Item's date + * @param string $author Author's user name * @param $comments String */ function __construct( $title, $description, $url, $date = '', $author = '', $comments = '' ) { @@ -72,7 +72,7 @@ class FeedItem { /** * Encode $string so that it can be safely embedded in a XML document * - * @param $string String: string to encode + * @param string $string string to encode * @return String */ public function xmlEncode( $string ) { @@ -95,7 +95,7 @@ class FeedItem { /** * set the unique id of an item * - * @param $uniqueId String: unique id for the item + * @param string $uniqueId unique id for the item * @param $rssIsPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only) */ public function setUniqueId( $uniqueId, $rssIsPermalink = false ) { @@ -170,7 +170,7 @@ class FeedItem { /** * Quickie hack... strip out wikilinks to more legible form from the comment. * - * @param $text String: wikitext + * @param string $text wikitext * @return String */ public static function stripComment( $text ) { diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index 8cbc66374d..5e4b24e36e 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -33,8 +33,8 @@ class FeedUtils { * If the feed should be purged; $timekey and $key will be removed from * $messageMemc * - * @param $timekey String: cache key of the timestamp of the last item - * @param $key String: cache key of feed's content + * @param string $timekey cache key of the timestamp of the last item + * @param string $key cache key of feed's content */ public static function checkPurge( $timekey, $key ) { global $wgRequest, $wgUser, $messageMemc; @@ -48,7 +48,7 @@ class FeedUtils { /** * Check whether feeds can be used and that $type is a valid feed type * - * @param $type String: feed type, as requested by the user + * @param string $type feed type, as requested by the user * @return Boolean */ public static function checkFeedOutput( $type ) { @@ -98,8 +98,8 @@ class FeedUtils { * @param $oldid Integer: old revision's id * @param $newid Integer: new revision's id * @param $timestamp Integer: new revision's timestamp - * @param $comment String: new revision's comment - * @param $actiontext String: text of the action; in case of log event + * @param string $comment new revision's comment + * @param string $actiontext text of the action; in case of log event * @return String */ public static function formatDiffRow( $title, $oldid, $newid, $timestamp, $comment, $actiontext = '' ) { @@ -236,7 +236,7 @@ class FeedUtils { * Might be 'cleaner' to use DOM or XSLT or something, * but *gack* it's a pain in the ass. * - * @param $text String: diff's HTML output + * @param string $text diff's HTML output * @return String: modified HTML */ public static function applyDiffStyle( $text ) { diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 48073f72c8..28403ccacc 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -140,8 +140,8 @@ class FileDeleteForm { * * @param $title Title object * @param File $file: file object - * @param $oldimage String: archive name - * @param $reason String: reason of the deletion + * @param string $oldimage archive name + * @param string $reason reason of the deletion * @param $suppress Boolean: whether to mark all deleted versions as restricted * @param $user User object performing the request * @throws MWException @@ -309,7 +309,7 @@ class FileDeleteForm { * showing an appropriate message depending upon whether * it's a current file or an old version * - * @param $message String: message base + * @param string $message message base * @return String */ private function prepareMessage( $message ) { diff --git a/includes/FormOptions.php b/includes/FormOptions.php index 598be0552f..8477ed9830 100644 --- a/includes/FormOptions.php +++ b/includes/FormOptions.php @@ -104,7 +104,7 @@ class FormOptions implements ArrayAccess { /** * Verify the given option name exist. * - * @param $name String: option name + * @param string $name option name * @param $strict Boolean: throw an exception when the option does not exist (default false) * @throws MWException * @return Boolean: true if option exist, false otherwise @@ -123,7 +123,7 @@ class FormOptions implements ArrayAccess { /** * Use to set the value of an option. * - * @param $name String: option name + * @param string $name option name * @param $value Mixed: value for the option * @param $force Boolean: whether to set the value when it is equivalent to the default value for this option (default false). * @return null @@ -143,7 +143,7 @@ class FormOptions implements ArrayAccess { * Get the value for the given option name. * Internally use getValueReal() * - * @param $name String: option name + * @param string $name option name * @return Mixed */ public function getValue( $name ) { @@ -154,7 +154,7 @@ class FormOptions implements ArrayAccess { /** * @todo Document - * @param $option Array: array structure describing the option + * @param array $option array structure describing the option * @return Mixed. Value or the default value if it is null */ protected function getValueReal( $option ) { @@ -168,7 +168,7 @@ class FormOptions implements ArrayAccess { /** * Delete the option value. * This will make future calls to getValue() return the default value. - * @param $name String: option name + * @param string $name option name * @return null */ public function reset( $name ) { @@ -191,7 +191,7 @@ class FormOptions implements ArrayAccess { /** * @todo Document - * @param $names Array: array of option names + * @param array $names array of option names * @return null */ public function consumeValues( /*Array*/ $names ) { @@ -210,9 +210,9 @@ class FormOptions implements ArrayAccess { * Validate and set an option integer value * The value will be altered to fit in the range. * - * @param $name String: option name - * @param $min Int: minimum value - * @param $max Int: maximum value + * @param string $name option name + * @param int $min minimum value + * @param int $max maximum value * @throws MWException * @exception MWException Option is not of type int * @return null diff --git a/includes/GitInfo.php b/includes/GitInfo.php index 0867cd92bc..6f7f80200b 100644 --- a/includes/GitInfo.php +++ b/includes/GitInfo.php @@ -41,7 +41,7 @@ class GitInfo { private static $viewers = false; /** - * @param $dir string The root directory of the repo where the .git dir can be found + * @param string $dir The root directory of the repo where the .git dir can be found */ public function __construct( $dir ) { $this->basedir = "{$dir}/.git"; @@ -70,7 +70,7 @@ class GitInfo { /** * Check if a string looks like a hex encoded SHA1 hash * - * @param $str string The string to check + * @param string $str The string to check * @return bool Whether or not the string looks like a SHA1 */ public static function isSHA1( $str ) { diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 99f5eb5a8f..54e546e74c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -167,7 +167,7 @@ function wfArrayLookup( $a, $b ) { * @param $key String|Int * @param $value Mixed * @param $default Mixed - * @param $changed Array to alter + * @param array $changed to alter * @throws MWException */ function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) { @@ -232,8 +232,8 @@ function wfMergeErrorArrays( /*...*/ ) { /** * Insert array into another array after the specified *KEY* * - * @param $array Array: The array. - * @param $insert Array: The array to insert. + * @param array $array The array. + * @param array $insert The array to insert. * @param $after Mixed: The key to insert after * @return Array */ @@ -316,7 +316,7 @@ function wfRandom() { * @note This is not secure, if you are trying to generate some sort * of token please use MWCryptRand instead. * - * @param $length int The length of the string to generate + * @param int $length The length of the string to generate * @return String * @since 1.20 */ @@ -379,8 +379,8 @@ function wfUrlencode( $s ) { * "days=7&limit=100". Options in the first array override options in the second. * Options set to null or false will not be output. * - * @param $array1 Array ( String|Array ) - * @param $array2 Array ( String|Array ) + * @param array $array1 ( String|Array ) + * @param array $array2 ( String|Array ) * @param $prefix String * @return String */ @@ -426,7 +426,7 @@ function wfArrayToCgi( $array1, $array2 = null, $prefix = '' ) { * tibility with legacy functions that accept raw query strings instead of nice * arrays. Of course, keys and values are urldecode()d. * - * @param $query String: query string + * @param string $query query string * @return array Array version of input */ function wfCgiToArray( $query ) { @@ -506,7 +506,7 @@ function wfAppendQuery( $url, $query ) { * @todo this won't work with current-path-relative URLs * like "subdir/foo.html", etc. * - * @param $url String: either fully-qualified or a local path + query + * @param string $url either fully-qualified or a local path + query * @param $defaultProto Mixed: one of the PROTO_* constants. Determines the * protocol to use if $url or $wgServer is * protocol-relative @@ -576,7 +576,7 @@ function wfExpandUrl( $url, $defaultProto = PROTO_CURRENT ) { * @todo Need to integrate this into wfExpandUrl (bug 32168) * * @since 1.19 - * @param $urlParts Array URL parts, as output from wfParseUrl + * @param array $urlParts URL parts, as output from wfParseUrl * @return string URL assembled from its component parts */ function wfAssembleUrl( $urlParts ) { @@ -628,7 +628,7 @@ function wfAssembleUrl( $urlParts ) { * * @todo Need to integrate this into wfExpandUrl (bug 32168) * - * @param $urlPath String URL path, potentially containing dot-segments + * @param string $urlPath URL path, potentially containing dot-segments * @return string URL path with all dot-segments removed */ function wfRemoveDotSegments( $urlPath ) { @@ -705,7 +705,7 @@ function wfRemoveDotSegments( $urlPath ) { /** * Returns a regular expression of url protocols * - * @param $includeProtocolRelative bool If false, remove '//' from the returned protocol list. + * @param bool $includeProtocolRelative If false, remove '//' from the returned protocol list. * DO NOT USE this directly, use wfUrlProtocolsWithoutProtRel() instead * @return String */ @@ -765,7 +765,7 @@ function wfUrlProtocolsWithoutProtRel() { * 2) Handles protocols that don't use :// (e.g., mailto: and news: , as well as protocol-relative URLs) correctly * 3) Adds a "delimiter" element to the array, either '://', ':' or '//' (see (2)) * - * @param $url String: a URL to parse + * @param string $url a URL to parse * @return Array: bits of the URL in an associative array, per PHP docs */ function wfParseUrl( $url ) { @@ -906,8 +906,8 @@ function wfMakeUrlIndexes( $url ) { /** * Check whether a given URL has a domain that occurs in a given set of domains - * @param $url string URL - * @param $domains array Array of domains (strings) + * @param string $url URL + * @param array $domains Array of domains (strings) * @return bool True if the host part of $url ends in one of the strings in $domains */ function wfMatchesDomainList( $url, $domains ) { @@ -935,7 +935,7 @@ function wfMatchesDomainList( $url, $domains ) { * $wgDebugComments - if on, some debug items may appear in comments in the HTML output. * * @param $text String - * @param $logonly Bool: set true to avoid appearing in HTML when $wgDebugComments is set + * @param bool $logonly set true to avoid appearing in HTML when $wgDebugComments is set */ function wfDebug( $text, $logonly = false ) { global $wgDebugLogFile, $wgProfileOnly, $wgDebugRawPage, $wgDebugLogPrefix; @@ -1007,7 +1007,7 @@ function wfDebugTimer() { /** * Send a line giving PHP memory usage. * - * @param $exact Bool: print exact values instead of kilobytes (default: false) + * @param bool $exact print exact values instead of kilobytes (default: false) */ function wfDebugMem( $exact = false ) { $mem = memory_get_usage(); @@ -1025,7 +1025,7 @@ function wfDebugMem( $exact = false ) { * * @param $logGroup String * @param $text String - * @param $public Bool: whether to log the event in the public log if no private + * @param bool $public whether to log the event in the public log if no private * log file is specified, (default true) */ function wfDebugLog( $logGroup, $text, $public = true ) { @@ -1046,7 +1046,7 @@ function wfDebugLog( $logGroup, $text, $public = true ) { /** * Log for database errors * - * @param $text String: database error message. + * @param string $text database error message. */ function wfLogDBError( $text ) { global $wgDBerrorLog, $wgDBerrorLogTZ; @@ -1079,8 +1079,8 @@ function wfLogDBError( $text ) { * Throws a warning that $function is deprecated * * @param $function String - * @param $version String|bool: Version of MediaWiki that the function was deprecated in (Added in 1.19). - * @param $component String|bool: Added in 1.19. + * @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 * caller. 2 = function that called the function that called * wfDeprecated (Added in 1.20) @@ -1095,7 +1095,7 @@ function wfDeprecated( $function, $version = false, $component = false, $callerO * Send a warning either to the debug log or in a PHP error depending on * $wgDevelopmentWarnings * - * @param $msg String: message to send + * @param string $msg message to send * @param $callerOffset Integer: number of items to go back in the backtrace to * find the correct caller (1 = function calling wfWarn, ...) * @param $level Integer: PHP error level; only used when $wgDevelopmentWarnings @@ -1112,7 +1112,7 @@ function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) { * send lines to the specified port, prefixed by the specified prefix and a space. * * @param $text String - * @param $file String filename + * @param string $file filename * @throws MWException */ function wfErrorLog( $text, $file ) { @@ -1425,7 +1425,7 @@ function wfMessageFallback( /*...*/ ) { * * @deprecated since 1.18 * - * @param $key String: lookup key for the message, usually + * @param string $key lookup key for the message, usually * defined in languages/Language.php * * Parameters to the message, which can be used to insert variable text into @@ -1481,7 +1481,7 @@ function wfMsgNoTrans( $key ) { * * @deprecated since 1.18 * - * @param $key String: lookup key for the message, usually + * @param string $key lookup key for the message, usually * defined in languages/Language.php * @return String */ @@ -1528,7 +1528,7 @@ function wfMsgForContentNoTrans( $key ) { * * @deprecated since 1.18 * - * @param $key String: key to get. + * @param string $key key to get. * @param $args * @param $useDB Boolean * @param $forContent Mixed: Language code, or false for user lang, true for content lang. @@ -1552,7 +1552,7 @@ function wfMsgReal( $key, $args, $useDB = true, $forContent = false, $transform * * @param $key String * @param $useDB Bool - * @param $langCode String: Code of the language to get the message for, or + * @param string $langCode Code of the language to get the message for, or * behaves as a content language switch if it is a boolean. * @param $transform Boolean: whether to parse magic words, etc. * @return string @@ -1650,8 +1650,8 @@ function wfMsgWikiHtml( $key ) { * * @deprecated since 1.18 * - * @param $key String: key of the message - * @param $options Array: processing rules. Can take the following options: + * @param string $key key of the message + * @param array $options processing rules. Can take the following options: * parse: parses wikitext to HTML * parseinline: parses wikitext to HTML and removes the surrounding * p's added by parser or tidy @@ -1759,7 +1759,7 @@ function wfEmptyMsg( $key ) { * Throw a debugging exception. This function previously once exited the process, * but now throws an exception instead, with similar results. * - * @param $msg String: message shown when dying. + * @param string $msg message shown when dying. * @throws MWException */ function wfDebugDieBacktrace( $msg = '' ) { @@ -1831,7 +1831,7 @@ function wfReportTime() { * debug_backtrace is disabled, otherwise the output from * debug_backtrace() (trimmed). * - * @param $limit int This parameter can be used to limit the number of stack frames returned + * @param int $limit This parameter can be used to limit the number of stack frames returned * * @return array of backtrace information */ @@ -1937,7 +1937,7 @@ function wfGetCaller( $level = 2 ) { * Return a string consisting of callers in the stack. Useful sometimes * for profiling specific points. * - * @param $limit int The maximum depth of the stack frame to return, or false for + * @param int $limit The maximum depth of the stack frame to return, or false for * the entire stack. * @return String */ @@ -1981,8 +1981,8 @@ function wfShowingResults( $offset, $limit ) { * @param $offset String * @param $limit Integer * @param $link String - * @param $query String: optional URL query parameter string - * @param $atend Bool: optional param for specified if this is the last page + * @param string $query optional URL query parameter string + * @param bool $atend optional param for specified if this is the last page * @return String * @deprecated in 1.19; use Language::viewPrevNext() instead */ @@ -2008,8 +2008,8 @@ function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) { /** * Make a list item, used by various special pages * - * @param $page String Page link - * @param $details String Text between brackets + * @param string $page Page link + * @param string $details Text between brackets * @param $oppositedm Boolean Add the direction mark opposite to your * language, to display text properly * @return String @@ -2058,8 +2058,8 @@ function wfClientAcceptsGzip( $force = false ) { * Obtain the offset and limit values from the request string; * used in special pages * - * @param $deflimit Int default limit if none supplied - * @param $optionname String Name of a user preference to check against + * @param int $deflimit default limit if none supplied + * @param string $optionname Name of a user preference to check against * @return array * */ @@ -2074,7 +2074,7 @@ function wfCheckLimits( $deflimit = 50, $optionname = 'rclimit' ) { * is achieved by substituting certain characters with HTML entities. * As required by the callers, "" is not used. * - * @param $text String: text to be escaped + * @param string $text text to be escaped * @return String */ function wfEscapeWikiText( $text ) { @@ -2247,7 +2247,7 @@ function wfClearOutputBuffers() { * factors * * @param $accept String - * @param $def String default + * @param string $def default * @return Array */ function wfAcceptToPrefs( $accept, $def = '*/*' ) { @@ -2307,8 +2307,8 @@ function mimeTypeMatch( $type, $avail ) { * array of type to preference (preference is a float between 0.0 and 1.0). * Wildcards in the types are acceptable. * - * @param $cprefs Array: client's acceptable type list - * @param $sprefs Array: server's offered types + * @param array $cprefs client's acceptable type list + * @param array $sprefs server's offered types * @return string * * @todo FIXME: Doesn't handle params like 'text/plain; charset=UTF-8' @@ -2544,9 +2544,9 @@ function wfTempDir() { /** * Make directory, and make all parent directories if they don't exist * - * @param $dir String: full path to directory to create + * @param string $dir full path to directory to create * @param $mode Integer: chmod value to use, default is $wgDirectoryMode - * @param $caller String: optional caller param for debugging. + * @param string $caller optional caller param for debugging. * @throws MWException * @return bool */ @@ -2671,9 +2671,9 @@ function wfIniGetBool( $setting ) { * Wrapper function for PHP's dl(). This doesn't work in most situations from * PHP 5.3 onward, and is usually disabled in shared environments anyway. * - * @param $extension String A PHP extension. The file suffix (.so or .dll) + * @param string $extension A PHP extension. The file suffix (.so or .dll) * should be omitted - * @param $fileName String Name of the library, if not $extension.suffix + * @param string $fileName Name of the library, if not $extension.suffix * @return Bool - Whether or not the extension is loaded */ function wfDl( $extension, $fileName = null ) { @@ -2766,12 +2766,12 @@ function wfEscapeShellArg( ) { /** * Execute a shell command, with time and memory limits mirrored from the PHP * configuration if supported. - * @param $cmd String Command line, properly escaped for shell. + * @param string $cmd Command line, properly escaped for shell. * @param &$retval null|Mixed optional, will receive the program's exit code. * (non-zero is usually failure) - * @param $environ Array optional environment variables which should be + * @param array $environ optional environment variables which should be * added to the executed command environment. - * @param $limits Array optional array with limits(filesize, memory, time, walltime) + * @param array $limits optional array with limits(filesize, memory, time, walltime) * this overwrites the global wgShellMax* limits. * @return string collected stdout as a string (trailing newlines stripped) */ @@ -2890,9 +2890,9 @@ function wfShellMaintenanceCmd( $script, array $parameters = array(), array $opt * Generate a shell-escaped command line string to run a MediaWiki cli script. * Note that $parameters should be a flat array and an option with an argument * should consist of two consecutive items in the array (do not use "--option value"). - * @param $script string MediaWiki cli script path - * @param $parameters Array Arguments and options to the script - * @param $options Array Associative array of options: + * @param string $script MediaWiki cli script path + * @param array $parameters Arguments and options to the script + * @param array $options Associative array of options: * 'php': The path to the php executable * 'wrapper': Path to a PHP wrapper to handle the maintenance script * @return Array @@ -2994,9 +2994,9 @@ function wfMerge( $old, $mine, $yours, &$result ) { * Returns unified plain-text diff of two texts. * Useful for machine processing of diffs. * - * @param $before String: the text before the changes. - * @param $after String: the text after the changes. - * @param $params String: command-line options for the diff command. + * @param string $before the text before the changes. + * @param string $after the text after the changes. + * @param string $params command-line options for the diff command. * @return String: unified diff of $before and $after */ function wfDiff( $before, $after, $params = '-u' ) { @@ -3117,7 +3117,7 @@ function wfUseMW( $req_ver ) { * We'll consider it so always, as we don't want '\s' in our Unix paths either. * * @param $path String - * @param $suffix String: to remove if present + * @param string $suffix to remove if present * @return String */ function wfBaseName( $path, $suffix = '' ) { @@ -3137,8 +3137,8 @@ function wfBaseName( $path, $suffix = '' ) { * May explode on non-matching case-insensitive paths, * funky symlinks, etc. * - * @param $path String: absolute destination path including target filename - * @param $from String: Absolute source path, directory only + * @param string $path absolute destination path including target filename + * @param string $from Absolute source path, directory only * @return String */ function wfRelativePath( $path, $from ) { @@ -3294,7 +3294,7 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, $lowercase = t * Create an object with a given name and an array of construct parameters * * @param $name String - * @param $p Array: parameters + * @param array $p parameters * @return object * @deprecated since 1.18, warnings in 1.18, removal in 1.20 */ @@ -3484,7 +3484,7 @@ function wfSplitWikiID( $wiki ) { * belongs to. May contain a single string if the query is only * in one group. * - * @param $wiki String: the wiki ID, or false for the current wiki + * @param string $wiki the wiki ID, or false for the current wiki * * Note: multiple calls to wfGetDB(DB_SLAVE) during the course of one request * will always return the same object, unless the underlying connection or load @@ -3502,7 +3502,7 @@ function &wfGetDB( $db, $groups = array(), $wiki = false ) { /** * Get a load balancer object. * - * @param $wiki String: wiki ID, or false for the current wiki + * @param string $wiki wiki ID, or false for the current wiki * @return LoadBalancer */ function wfGetLB( $wiki = false ) { @@ -3522,8 +3522,8 @@ function &wfGetLBFactory() { * Find a file. * Shortcut for RepoGroup::singleton()->findFile() * - * @param $title String or Title object - * @param $options array Associative array of options: + * @param string $title or Title object + * @param array $options Associative array of options: * time: requested time for an archived image, or false for the * current version. An image object will be returned which was * created at the specified time. @@ -3581,7 +3581,7 @@ function wfQueriesMustScale() { * extensions; this is a wrapper around $wgScriptExtension etc. * except for 'index' and 'load' which use $wgScript/$wgLoadScript * - * @param $script String: script filename, sans extension + * @param string $script script filename, sans extension * @return String */ function wfScript( $script = 'index' ) { @@ -3792,7 +3792,7 @@ function wfShorthandToInteger( $string = '' ) { * Get the normalised IETF language tag * See unit test for examples. * - * @param $code String: The language code. + * @param string $code The language code. * @return String: The language code which complying with BCP 47 standards. */ function wfBCP47( $code ) { @@ -3875,8 +3875,8 @@ function wfGetLangConverterCacheStorage() { /** * Call hook functions defined in $wgHooks * - * @param $event String: event name - * @param $args Array: parameters passed to hook functions + * @param string $event event name + * @param array $args parameters passed to hook functions * @return Boolean True if no handler aborted the hook */ function wfRunHooks( $event, $args = array() ) { @@ -3886,7 +3886,7 @@ function wfRunHooks( $event, $args = array() ) { /** * Wrapper around php's unpack. * - * @param $format String: The format string (See php's docs) + * @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 * prevent reading beyond the end of $data. false to disable the check. @@ -3928,9 +3928,9 @@ function wfUnpack( $format, $data, $length=false ) { * * Any subsequent links on the same line are considered to be exceptions, * i.e. articles where the image may occur inline. * - * @param $name string the image name to check + * @param string $name the image name to check * @param $contextTitle Title|bool the page on which the image occurs, if known - * @param $blacklist string wikitext of a file blacklist + * @param string $blacklist wikitext of a file blacklist * @return bool */ function wfIsBadImage( $name, $contextTitle = false, $blacklist = null ) { diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 06e7ee46cd..23c5ca7780 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -190,10 +190,10 @@ class HTMLForm extends ContextSource { /** * Build a new HTMLForm from an array of field attributes - * @param $descriptor Array of Field constructs, as described above + * @param array $descriptor of Field constructs, as described above * @param $context IContextSource available since 1.18, will become compulsory in 1.18. * Obviates the need to call $form->setTitle() - * @param $messagePrefix String a prefix to go in front of default messages + * @param string $messagePrefix a prefix to go in front of default messages */ public function __construct( $descriptor, /*IContextSource*/ $context = null, $messagePrefix = '' ) { if ( $context instanceof IContextSource ) { @@ -248,7 +248,7 @@ class HTMLForm extends ContextSource { /** * Set format in which to display the form - * @param $format String the name of the format to use, must be one of + * @param string $format the name of the format to use, must be one of * $this->availableDisplayFormats * @throws MWException * @since 1.20 @@ -281,7 +281,7 @@ class HTMLForm extends ContextSource { /** * Initialise a new Object for the field * @param $fieldname string - * @param $descriptor string input Descriptor, as described above + * @param string $descriptor input Descriptor, as described above * @throws MWException * @return HTMLFormField subclass */ @@ -417,7 +417,7 @@ class HTMLForm extends ContextSource { /** * Set a callback to a function to do something with the form * once it's been successfully validated. - * @param $cb String function name. The function will be passed + * @param string $cb function name. The function will be passed * the output from HTMLForm::filterDataForSubmit, and must * return Bool true on success, Bool false if no submission * was attempted, or String HTML output to display on error. @@ -441,7 +441,7 @@ class HTMLForm extends ContextSource { /** * Set the introductory message, overwriting any existing message. - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function setIntro( $msg ) { @@ -452,7 +452,7 @@ class HTMLForm extends ContextSource { /** * Set the introductory message, overwriting any existing message. * @since 1.19 - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function setPreText( $msg ) { @@ -462,7 +462,7 @@ class HTMLForm extends ContextSource { /** * Add introductory text. - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function addPreText( $msg ) { @@ -472,8 +472,8 @@ class HTMLForm extends ContextSource { /** * Add header text, inside the form. - * @param $msg String complete text of message to display - * @param $section string The section to add the header to + * @param string $msg complete text of message to display + * @param string $section The section to add the header to * @return HTMLForm $this for chaining calls (since 1.20) */ function addHeaderText( $msg, $section = null ) { @@ -491,7 +491,7 @@ class HTMLForm extends ContextSource { /** * Set header text, inside the form. * @since 1.19 - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @param $section The section to add the header to * @return HTMLForm $this for chaining calls (since 1.20) */ @@ -506,8 +506,8 @@ class HTMLForm extends ContextSource { /** * Add footer text, inside the form. - * @param $msg String complete text of message to display - * @param $section string The section to add the footer text to + * @param string $msg complete text of message to display + * @param string $section The section to add the footer text to * @return HTMLForm $this for chaining calls (since 1.20) */ function addFooterText( $msg, $section = null ) { @@ -525,8 +525,8 @@ class HTMLForm extends ContextSource { /** * Set footer text, inside the form. * @since 1.19 - * @param $msg String complete text of message to display - * @param $section string The section to add the footer text to + * @param string $msg complete text of message to display + * @param string $section The section to add the footer text to * @return HTMLForm $this for chaining calls (since 1.20) */ function setFooterText( $msg, $section = null ) { @@ -540,7 +540,7 @@ class HTMLForm extends ContextSource { /** * Add text to the end of the display. - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function addPostText( $msg ) { @@ -550,7 +550,7 @@ class HTMLForm extends ContextSource { /** * Set text at the end of the display. - * @param $msg String complete text of message to display + * @param string $msg complete text of message to display * @return HTMLForm $this for chaining calls (since 1.20) */ function setPostText( $msg ) { @@ -560,8 +560,8 @@ class HTMLForm extends ContextSource { /** * Add a hidden field to the output - * @param $name String field name. This will be used exactly as entered - * @param $value String field value + * @param string $name field name. This will be used exactly as entered + * @param string $value field value * @param $attribs Array * @return HTMLForm $this for chaining calls (since 1.20) */ @@ -573,9 +573,9 @@ class HTMLForm extends ContextSource { /** * Add a button to the form - * @param $name String field name. - * @param $value String field value - * @param $id String DOM id for the button (default: null) + * @param string $name field name. + * @param string $value field value + * @param string $id DOM id for the button (default: null) * @param $attribs Array * @return HTMLForm $this for chaining calls (since 1.20) */ @@ -625,7 +625,7 @@ class HTMLForm extends ContextSource { /** * Wrap the form innards in an actual "
" element - * @param $html String HTML contents to wrap. + * @param string $html HTML contents to wrap. * @return String wrapped HTML. */ function wrapForm( $html ) { @@ -765,7 +765,7 @@ class HTMLForm extends ContextSource { /** * Format a stack of error messages into a single HTML string - * @param $errors Array of message keys/values + * @param array $errors of message keys/values * @return String HTML, a "