From b5debc4f65cba6534419521f6e7db2a7e21ee8f7 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 21 May 2008 18:18:58 +0000 Subject: [PATCH] Doc tweaks: * @ingrouo -> @ingroup (whoops!) * Fix doxygen warnings * Remove duplicate definition of $wgMetaNamespaceTalk in DefaultSettings.php, thanks to VasilievVV for pointing this out --- includes/DefaultSettings.php | 190 +++++++++++++++-------------------- includes/LogEventsList.php | 4 +- includes/Namespace.php | 20 ++-- languages/Language.php | 188 +++++++++++++++++----------------- 4 files changed, 184 insertions(+), 218 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c2431e9d96..39cdf90b8e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -43,8 +43,13 @@ $wgSitename = 'MediaWiki'; $wgMetaNamespace = false; /** - * Name of the project talk namespace. If left set to false, a name derived - * from the name of the project namespace will be used. + * Name of the project talk namespace. + * + * Normally you can ignore this and it will be something like + * $wgMetaNamespace . "_talk". In some languages, you may want to set this + * manually for grammatical reasons. It is currently only respected by those + * languages where it might be relevant and where no automatic grammar converter + * exists. */ $wgMetaNamespaceTalk = false; @@ -90,25 +95,20 @@ if( isset( $_SERVER['SERVER_PORT'] ) $wgScriptPath = '/wiki'; /** - * Whether to support URLs like index.php/Page_title - * These often break when PHP is set up in CGI mode. - * PATH_INFO *may* be correct if cgi.fix_pathinfo is - * set, but then again it may not; lighttpd converts - * incoming path data to lowercase on systems with - * case-insensitive filesystems, and there have been - * reports of problems on Apache as well. + * Whether to support URLs like index.php/Page_title These often break when PHP + * is set up in CGI mode. PATH_INFO *may* be correct if cgi.fix_pathinfo is set, + * but then again it may not; lighttpd converts incoming path data to lowercase + * on systems with case-insensitive filesystems, and there have been reports of + * problems on Apache as well. * * To be safe we'll continue to keep it off by default. * - * Override this to false if $_SERVER['PATH_INFO'] - * contains unexpectedly incorrect garbage, or to - * true if it is really correct. - * - * The default $wgArticlePath will be set based on - * this value at runtime, but if you have customized - * it, having this incorrectly set to true can - * cause redirect loops when "pretty URLs" are used. + * Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly + * incorrect garbage, or to true if it is really correct. * + * The default $wgArticlePath will be set based on this value at runtime, but if + * you have customized it, having this incorrectly set to true can cause + * redirect loops when "pretty URLs" are used. */ $wgUsePathInfo = ( strpos( php_sapi_name(), 'cgi' ) === false ) && @@ -116,53 +116,51 @@ $wgUsePathInfo = ( strpos( php_sapi_name(), 'isapi' ) === false ); -/**#@+ +/**@{ * Script users will request to get articles - * ATTN: Old installations used wiki.phtml and redirect.phtml - - * make sure that LocalSettings.php is correctly set! + * ATTN: Old installations used wiki.phtml and redirect.phtml - make sure that + * LocalSettings.php is correctly set! * - * Will be set based on $wgScriptPath in Setup.php if not overridden - * in LocalSettings.php. Generally you should not need to change this - * unless you don't like seeing "index.php". + * Will be set based on $wgScriptPath in Setup.php if not overridden in + * LocalSettings.php. Generally you should not need to change this unless you + * don't like seeing "index.php". */ -$wgScriptExtension = '.php'; /// extension to append to script names by default -$wgScript = false; /// defaults to "{$wgScriptPath}/index{$wgScriptExtension}" -$wgRedirectScript = false; /// defaults to "{$wgScriptPath}/redirect{$wgScriptExtension}" -/**#@-*/ +$wgScriptExtension = '.php'; ///< extension to append to script names by default +$wgScript = false; ///< defaults to "{$wgScriptPath}/index{$wgScriptExtension}" +$wgRedirectScript = false; ///< defaults to "{$wgScriptPath}/redirect{$wgScriptExtension}" +/**@}*/ -/**#@+ +/**@{ * These various web and file path variables are set to their defaults * in Setup.php if they are not explicitly set from LocalSettings.php. * If you do override them, be sure to set them all! * * These will relatively rarely need to be set manually, unless you are * splitting style sheets or images outside the main document root. - * - * @global string */ /** * style path as seen by users */ -$wgStylePath = false; /// defaults to "{$wgScriptPath}/skins" +$wgStylePath = false; ///< defaults to "{$wgScriptPath}/skins" /** * filesystem stylesheets directory */ -$wgStyleDirectory = false; /// defaults to "{$IP}/skins" +$wgStyleDirectory = false; ///< defaults to "{$IP}/skins" $wgStyleSheetPath = &$wgStylePath; -$wgArticlePath = false; /// default to "{$wgScript}/$1" or "{$wgScript}?title=$1", depending on $wgUsePathInfo +$wgArticlePath = false; ///< default to "{$wgScript}/$1" or "{$wgScript}?title=$1", depending on $wgUsePathInfo $wgVariantArticlePath = false; -$wgUploadPath = false; /// defaults to "{$wgScriptPath}/images" -$wgUploadDirectory = false; /// defaults to "{$IP}/images" +$wgUploadPath = false; ///< defaults to "{$wgScriptPath}/images" +$wgUploadDirectory = false; ///< defaults to "{$IP}/images" $wgHashedUploadDirectory = true; -$wgLogo = false; /// defaults to "{$wgStylePath}/common/images/wiki.png" +$wgLogo = false; ///< defaults to "{$wgStylePath}/common/images/wiki.png" $wgFavicon = '/favicon.ico'; -$wgAppleTouchIcon = false; /// This one'll actually default to off. For iPhone and iPod Touch web app bookmarks -$wgMathPath = false; /// defaults to "{$wgUploadPath}/math" -$wgMathDirectory = false; /// defaults to "{$wgUploadDirectory}/math" -$wgTmpDirectory = false; /// defaults to "{$wgUploadDirectory}/tmp" +$wgAppleTouchIcon = false; ///< This one'll actually default to off. For iPhone and iPod Touch web app bookmarks +$wgMathPath = false; ///< defaults to "{$wgUploadPath}/math" +$wgMathDirectory = false; ///< defaults to "{$wgUploadDirectory}/math" +$wgTmpDirectory = false; ///< defaults to "{$wgUploadDirectory}/tmp" $wgUploadBaseUrl = ""; -/**#@-*/ +/**@}*/ /** * New file storage paths; currently used only for deleted files. @@ -172,11 +170,11 @@ $wgUploadBaseUrl = ""; * */ $wgFileStore = array(); -$wgFileStore['deleted']['directory'] = false;// Defaults to $wgUploadDirectory/deleted -$wgFileStore['deleted']['url'] = null; // Private -$wgFileStore['deleted']['hash'] = 3; // 3-level subdirectory split +$wgFileStore['deleted']['directory'] = false;///< Defaults to $wgUploadDirectory/deleted +$wgFileStore['deleted']['url'] = null; ///< Private +$wgFileStore['deleted']['hash'] = 3; ///< 3-level subdirectory split -/**#@+ +/**@{ * File repository structures * * $wgLocalFileRepo is a single repository structure, and $wgForeignFileRepo is @@ -225,7 +223,7 @@ $wgFileStore['deleted']['hash'] = 3; // 3-level subdirectory split */ $wgLocalFileRepo = false; $wgForeignFileRepos = array(); -/**#@-*/ +/**@}*/ /** * Allowed title characters -- regex character class @@ -274,7 +272,6 @@ $wgUrlProtocols = array( /** internal name of virus scanner. This servers as a key to the $wgAntivirusSetup array. * Set this to NULL to disable virus scanning. If not null, every file uploaded will be scanned for viruses. - * @global string $wgAntivirus */ $wgAntivirus= NULL; @@ -301,8 +298,6 @@ $wgAntivirus= NULL; * "messagepattern" is a perl regular expression to extract the meaningful part of the scanners * output. The relevant part should be matched as group one (\1). * If not defined or the pattern does not match, the full message is shown to the user. - * - * @global array $wgAntivirusSetup */ $wgAntivirusSetup = array( @@ -336,33 +331,24 @@ $wgAntivirusSetup = array( ); -/** Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected. - * @global boolean $wgAntivirusRequired - */ +/** Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected. */ $wgAntivirusRequired= true; -/** Determines if the mime type of uploaded files should be checked - * @global boolean $wgVerifyMimeType - */ +/** Determines if the mime type of uploaded files should be checked */ $wgVerifyMimeType= true; -/** Sets the mime type definition file to use by MimeMagic.php. - * @global string $wgMimeTypeFile - */ +/** Sets the mime type definition file to use by MimeMagic.php. */ $wgMimeTypeFile= "includes/mime.types"; #$wgMimeTypeFile= "/etc/mime.types"; #$wgMimeTypeFile= NULL; #use built-in defaults only. -/** Sets the mime type info file to use by MimeMagic.php. - * @global string $wgMimeInfoFile - */ +/** Sets the mime type info file to use by MimeMagic.php. */ $wgMimeInfoFile= "includes/mime.info"; #$wgMimeInfoFile= NULL; #use built-in defaults only. /** Switch for loading the FileInfo extension by PECL at runtime. * This should be used only if fileinfo is installed as a shared object * or a dynamic libary - * @global string $wgLoadFileinfoExtension */ $wgLoadFileinfoExtension= false; @@ -468,7 +454,6 @@ $wgRepositoryBaseUrl = "http://commons.wikimedia.org/wiki/Image:"; /** * Site admin email address * Default to wikiadmin@SERVER_NAME - * @global string $wgEmergencyContact */ $wgEmergencyContact = 'wikiadmin@' . $wgServerName; @@ -476,7 +461,6 @@ $wgEmergencyContact = 'wikiadmin@' . $wgServerName; * Password reminder email address * The address we should use as sender when a user is requesting his password * Default to apache@SERVER_NAME - * @global string $wgPasswordSender */ $wgPasswordSender = 'MediaWiki Mail '; @@ -492,14 +476,12 @@ $wgNoReplyAddress = 'reply@not.possible'; * Set to true to enable the e-mail basic features: * Password reminders, etc. If sending e-mail on your * server doesn't work, you might want to disable this. - * @global bool $wgEnableEmail */ $wgEnableEmail = true; /** * Set to true to enable user-to-user e-mail. * This can potentially be abused, as it's hard to track. - * @global bool $wgEnableUserEmail */ $wgEnableUserEmail = true; @@ -531,13 +513,11 @@ $wgPasswordReminderResendTime = 24; * "username" => user, * "password" => password * - * - * @global mixed $wgSMTP */ $wgSMTP = false; -/**#@+ +/**@{ * Database settings */ /** database host name or ip address */ @@ -574,7 +554,7 @@ $wgSQLiteDataDir = ''; */ $wgAllDBsAreLocalhost = false; -/**#@-*/ +/**@}*/ /** Live high performance sites should disable this - some checks acquire giant mysql locks */ @@ -706,26 +686,28 @@ $wgDBmysql5 = false; */ $wgLocalDatabases = array(); -/** +/** @{ * Object cache settings * See Defines.php for types */ $wgMainCacheType = CACHE_NONE; $wgMessageCacheType = CACHE_ANYTHING; $wgParserCacheType = CACHE_ANYTHING; +/**@}*/ $wgParserCacheExpireTime = 86400; $wgSessionsInMemcached = false; -/** +/**@{ * Memcached-specific settings * See docs/memcached.txt */ $wgUseMemCached = false; -$wgMemCachedDebug = false; # Will be set to false in Setup.php, if the server isn't working +$wgMemCachedDebug = false; ///< Will be set to false in Setup.php, if the server isn't working $wgMemCachedServers = array( '127.0.0.1:11000' ); $wgMemCachedPersistent = false; +/**@}*/ /** * Directory for local copy of message cache, for use in addition to memcached @@ -770,14 +752,16 @@ $wgInputEncoding = 'UTF-8'; $wgOutputEncoding = 'UTF-8'; $wgEditEncoding = ''; -# Set this to eg 'ISO-8859-1' to perform character set -# conversion when loading old revisions not marked with -# "utf-8" flag. Use this when converting wiki to UTF-8 -# without the burdensome mass conversion of old text data. -# -# NOTE! This DOES NOT touch any fields other than old_text. -# Titles, comments, user names, etc still must be converted -# en masse in the database before continuing as a UTF-8 wiki. +/** + * Set this to eg 'ISO-8859-1' to perform character set + * conversion when loading old revisions not marked with + * "utf-8" flag. Use this when converting wiki to UTF-8 + * without the burdensome mass conversion of old text data. + * + * NOTE! This DOES NOT touch any fields other than old_text. + * Titles, comments, user names, etc still must be converted + * en masse in the database before continuing as a UTF-8 wiki. + */ $wgLegacyEncoding = false; /** @@ -803,12 +787,14 @@ $wgDocType = '-//W3C//DTD XHTML 1.0 Transitional//EN'; $wgDTD = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'; $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'; -# Permit other namespaces in addition to the w3.org default. -# Use the prefix for the key and the namespace for the value. For -# example: -# $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg'; -# Normally we wouldn't have to define this in the root -# element, but IE needs it there in some circumstances. +/** + * Permit other namespaces in addition to the w3.org default. + * Use the prefix for the key and the namespace for the value. For + * example: + * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg'; + * Normally we wouldn't have to define this in the root + * element, but IE needs it there in some circumstances. + */ $wgXhtmlNamespaces = array(); /** Enable to allow rewriting dates in page text. @@ -847,10 +833,10 @@ $wgMaxMsgCacheEntrySize = 10000; */ $wgCheckSerialized = true; -# Whether to enable language variant conversion. +/** Whether to enable language variant conversion. */ $wgDisableLangConversion = false; -# Default variant code, if false, the default will be the language code +/** Default variant code, if false, the default will be the language code */ $wgDefaultLanguageVariant = false; /** @@ -860,22 +846,15 @@ $wgDefaultLanguageVariant = false; */ $wgLoginLanguageSelector = false; -# Whether to use zhdaemon to perform Chinese text processing -# zhdaemon is under developement, so normally you don't want to -# use it unless for testing +/** + * Whether to use zhdaemon to perform Chinese text processing + * zhdaemon is under developement, so normally you don't want to + * use it unless for testing + */ $wgUseZhdaemon = false; $wgZhdaemonHost="localhost"; $wgZhdaemonPort=2004; -/** - * Normally you can ignore this and it will be something - * like $wgMetaNamespace . "_talk". In some languages, you - * may want to set this manually for grammatical reasons. - * It is currently only respected by those languages - * where it might be relevant and where no automatic - * grammar converter exists. - */ -$wgMetaNamespaceTalk = false; # Miscellaneous configuration settings # @@ -942,16 +921,13 @@ $wgSiteSupportPage = ''; # A page where you users can receive donations * Its contents will be shown to users as part of the read-only warning * message. */ -$wgReadOnlyFile = false; /// defaults to "{$wgUploadDirectory}/lock_yBgMBwiR"; +$wgReadOnlyFile = false; ///< defaults to "{$wgUploadDirectory}/lock_yBgMBwiR"; /** * The debug log file should be not be publicly accessible if it is used, as it * may contain private data. */ $wgDebugLogFile = ''; -/**#@+ - * @global bool - */ $wgDebugRedirects = false; $wgDebugRawPage = false; # Avoid overlapping debug entries by leaving out CSS @@ -1042,8 +1018,6 @@ $wgSidebarCacheExpiry = 86400; */ $wgUseCommaCount = false; -/**#@-*/ - /** * wgHitcounterUpdateFreq sets how often page counters should be updated, higher * values are easier on the database. A value of 1 causes the counters to be @@ -1360,7 +1334,7 @@ $wgStyleVersion = '146'; $wgUseFileCache = false; /** Directory where the cached page will be saved */ -$wgFileCacheDirectory = false; /// defaults to "{$wgUploadDirectory}/cache"; +$wgFileCacheDirectory = false; ///< defaults to "{$wgUploadDirectory}/cache"; /** * When using the file cache, we can store the cached HTML gzipped to save disk diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index 253fb4eb7e..b85c9de32d 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -625,7 +625,7 @@ class LogPager extends ReverseChronologicalPager { } /** - * @Deprecated + * @deprecated * @ingroup SpecialPage */ class LogReader { @@ -663,7 +663,7 @@ class LogReader { } /** - * @Deprecated + * @deprecated * @ingroup SpecialPage */ class LogViewer { diff --git a/includes/Namespace.php b/includes/Namespace.php index 2de638b420..6b468c8421 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -48,7 +48,7 @@ class MWNamespace { /** * Can pages in the given namespace be moved? * - * @param int $index Namespace index + * @param $index Int: namespace index * @return bool */ public static function isMovable( $index ) { @@ -59,7 +59,7 @@ class MWNamespace { /** * Is the given namespace is a subject (non-talk) namespace? * - * @param int $index Namespace index + * @param $index Int: namespace index * @return bool */ public static function isMain( $index ) { @@ -69,7 +69,7 @@ class MWNamespace { /** * Is the given namespace a talk namespace? * - * @param int $index Namespace index + * @param $index Int: namespace index * @return bool */ public static function isTalk( $index ) { @@ -80,7 +80,7 @@ class MWNamespace { /** * Get the talk namespace index for a given namespace * - * @param int $index Namespace index + * @param $index Int: namespace index * @return int */ public static function getTalk( $index ) { @@ -92,7 +92,7 @@ class MWNamespace { /** * Get the subject namespace index for a given namespace * - * @param int $index Namespace index + * @param $index Int: Namespace index * @return int */ public static function getSubject( $index ) { @@ -104,7 +104,7 @@ class MWNamespace { /** * Returns the canonical (English Wikipedia) name for a given index * - * @param int $index Namespace index + * @param $index Int: namespace index * @return string */ public static function getCanonicalName( $index ) { @@ -116,7 +116,7 @@ class MWNamespace { * Returns the index for a given canonical name, or NULL * The input *must* be converted to lower case first * - * @param string $name Namespace name + * @param $name String: namespace name * @return int */ public static function getCanonicalIndex( $name ) { @@ -138,7 +138,7 @@ class MWNamespace { /** * Can this namespace ever have a talk namespace? * - * @param $index Namespace index + * @param $index Int: namespace index * @return bool */ public static function canTalk( $index ) { @@ -149,7 +149,7 @@ class MWNamespace { * Does this namespace contain content, for the purposes * of calculating statistics, etc? * - * @param $index Index to check + * @param $index Int: index to check * @return bool */ public static function isContent( $index ) { @@ -160,7 +160,7 @@ class MWNamespace { /** * Can pages in a namespace be watched? * - * @param int $index + * @param $index Int * @return bool */ public static function isWatchable( $index ) { diff --git a/languages/Language.php b/languages/Language.php index 496033633e..8f2ed96a03 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -50,7 +50,7 @@ class FakeConverter { /** * Internationalisation code - * @ingrouo Language + * @ingroup Language */ class Language { var $mConverter, $mVariants, $mCode, $mLoaded = false; @@ -174,11 +174,11 @@ class Language { function initContLang() {} /** - * @deprecated + * @deprecated Use User::getDefaultOptions() * @return array */ function getDefaultUserOptions() { - trigger_error( 'Use of ' . __METHOD__ . ' is deprecated', E_USER_NOTICE ); + wfDeprecated( __METHOD__ ); return User::getDefaultOptions(); } @@ -226,7 +226,7 @@ class Language { * echo $mw_ns; // prints 'MediaWiki' * * - * @param int $index the array key of the namespace to return + * @param $index Int: the array key of the namespace to return * @return mixed, string if the namespace value exists, otherwise false */ function getNsText( $index ) { @@ -251,7 +251,7 @@ class Language { * Only matches namespace names for the current language, not the * canonical ones defined in Namespace.php. * - * @param string $text + * @param $text String * @return mixed An integer if $text is a valid value otherwise false */ function getLocalNsIndex( $text ) { @@ -264,7 +264,7 @@ class Language { * Get a namespace key by value, case insensitive. Canonical namespace * names override custom ones defined for the current language. * - * @param string $text + * @param $text String * @return mixed An integer if $text is a valid value otherwise false */ function getNsIndex( $text ) { @@ -277,7 +277,7 @@ class Language { /** * short names for language variants used for language conversion links. * - * @param string $code + * @param $code String * @return string */ function getVariantname( $code ) { @@ -439,10 +439,10 @@ class Language { /** * Used by date() and time() to adjust the time output. - * @public - * @param int $ts the time in date('YmdHis') format - * @param mixed $tz adjust the time by this amount (default false, - * mean we get user timecorrection setting) + * + * @param $ts Int the time in date('YmdHis') format + * @param $tz Mixed: adjust the time by this amount (default false, mean we + * get user timecorrection setting) * @return int */ function userAdjust( $ts, $tz = false ) { @@ -536,8 +536,8 @@ class Language { * Input timestamp is assumed to be pre-normalized to the desired local * time zone, if any. * - * @param string $format - * @param string $ts 14-character timestamp + * @param $format String + * @param $ts String: 14-character timestamp * YYYYMMDDHHMMSS * 01234567890123 */ @@ -1000,7 +1000,7 @@ class Language { * * Link: http://en.wikipedia.org/wiki/Thai_solar_calendar * - * @param string $ts 14-character timestamp + * @param $ts String: 14-character timestamp * @return array converted year, month, day */ private static function tsToThai( $ts ) { @@ -1113,7 +1113,7 @@ class Language { * } * * - * @param mixed $usePrefs: if true, the user's preference is used + * @param $usePrefs Mixed: if true, the user's preference is used * if false, the site/language default is used * if int/string, assumed to be a format. * @return string @@ -1141,14 +1141,13 @@ class Language { } /** - * @public - * @param mixed $ts the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param bool $adj whether to adjust the time output according to the - * user configured offset ($timecorrection) - * @param mixed $format true to use user's date format preference - * @param string $timecorrection the time offset as returned by - * validateTimeZone() in Special:Preferences + * @param $ts Mixed: the time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param $adj Bool: whether to adjust the time output according to the + * user configured offset ($timecorrection) + * @param $format Mixed: true to use user's date format preference + * @param $timecorrection String: the time offset as returned by + * validateTimeZone() in Special:Preferences * @return string */ function date( $ts, $adj = false, $format = true, $timecorrection = false ) { @@ -1165,16 +1164,15 @@ class Language { } /** - * @public - * @param mixed $ts the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param bool $adj whether to adjust the time output according to the - * user configured offset ($timecorrection) - * @param mixed $format true to use user's date format preference - * @param string $timecorrection the time offset as returned by - * validateTimeZone() in Special:Preferences - * @return string - */ + * @param $ts Mixed: the time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param $adj Bool: whether to adjust the time output according to the + * user configured offset ($timecorrection) + * @param $format Mixed: true to use user's date format preference + * @param $timecorrection String: the time offset as returned by + * validateTimeZone() in Special:Preferences + * @return string + */ function time( $ts, $adj = false, $format = true, $timecorrection = false ) { $this->load(); if ( $adj ) { @@ -1189,18 +1187,16 @@ class Language { } /** - * @public - * @param mixed $ts the time format which needs to be turned into a - * date('YmdHis') format with wfTimestamp(TS_MW,$ts) - * @param bool $adj whether to adjust the time output according to the - * user configured offset ($timecorrection) - - * @param mixed $format what format to return, if it's false output the - * default one (default true) - * @param string $timecorrection the time offset as returned by - * validateTimeZone() in Special:Preferences - * @return string - */ + * @param $ts Mixed: the time format which needs to be turned into a + * date('YmdHis') format with wfTimestamp(TS_MW,$ts) + * @param $adj Bool: whether to adjust the time output according to the + * user configured offset ($timecorrection) + * @param $format Mixed: what format to return, if it's false output the + * default one (default true) + * @param $timecorrection String: the time offset as returned by + * validateTimeZone() in Special:Preferences + * @return string + */ function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false) { $this->load(); @@ -1425,8 +1421,8 @@ class Language { * or characters which need to be converted for MySQL's * indexing to grok it correctly. Make such changes here. * - * @param string $in - * @return string + * @param $string String + * @return String */ function stripForSearch( $string ) { global $wgDBtype; @@ -1463,7 +1459,7 @@ class Language { /** * Get the first character of a string. * - * @param string $s + * @param $s string * @return string */ function firstChar( $s ) { @@ -1661,9 +1657,7 @@ class Language { /** * Italic is unsuitable for some languages * - * @public - * - * @param string $text The text to be emphasized. + * @param $text String: the text to be emphasized. * @return string */ function emphasize( $text ) { @@ -1671,29 +1665,28 @@ class Language { } /** - * Normally we output all numbers in plain en_US style, that is - * 293,291.235 for twohundredninetythreethousand-twohundredninetyone - * point twohundredthirtyfive. However this is not sutable for all - * languages, some such as Pakaran want ੨੯੩,੨੯੫.੨੩੫ and others such as - * Icelandic just want to use commas instead of dots, and dots instead - * of commas like "293.291,235". - * - * An example of this function being called: - * - * wfMsg( 'message', $wgLang->formatNum( $num ) ) - * - * - * See LanguageGu.php for the Gujarati implementation and - * LanguageIs.php for the , => . and . => , implementation. - * - * @todo check if it's viable to use localeconv() for the decimal - * seperator thing. - * @public - * @param mixed $number the string to be formatted, should be an integer or - * a floating point number. - * @param bool $nocommafy Set to true for special numbers like dates - * @return string - */ + * Normally we output all numbers in plain en_US style, that is + * 293,291.235 for twohundredninetythreethousand-twohundredninetyone + * point twohundredthirtyfive. However this is not sutable for all + * languages, some such as Pakaran want ੨੯੩,੨੯੫.੨੩੫ and others such as + * Icelandic just want to use commas instead of dots, and dots instead + * of commas like "293.291,235". + * + * An example of this function being called: + * + * wfMsg( 'message', $wgLang->formatNum( $num ) ) + * + * + * See LanguageGu.php for the Gujarati implementation and + * LanguageIs.php for the , => . and . => , implementation. + * + * @todo check if it's viable to use localeconv() for the decimal + * seperator thing. + * @param $number Mixed: the string to be formatted, should be an integer + * or a floating point number. + * @param $nocommafy Bool: set to true for special numbers like dates + * @return string + */ function formatNum( $number, $nocommafy = false ) { global $wgTranslateNumerals; if (!$nocommafy) { @@ -1724,7 +1717,7 @@ class Language { /** * Adds commas to a given number * - * @param mixed $_ + * @param $_ mixed * @return string */ function commafy($_) { @@ -1745,7 +1738,7 @@ class Language { /** * For the credit list in includes/Credits.php (action=credits) * - * @param array $l + * @param $l Array * @return string */ function listToText( $l ) { @@ -1773,9 +1766,9 @@ class Language { * * If $length is negative, the string will be truncated from the beginning * - * @param string $string String to truncate - * @param int $length Maximum length (excluding ellipses) - * @param string $ellipses String to append to the truncated text + * @param $string String to truncate + * @param $length Int: maximum length (excluding ellipses) + * @param $ellipsis String to append to the truncated text * @return string */ function truncate( $string, $length, $ellipsis = "" ) { @@ -1814,8 +1807,8 @@ class Language { * Grammatical transformations, needed for inflected languages * Invoked by putting {{grammar:case|word}} in a message * - * @param string $word - * @param string $case + * @param $word string + * @param $case string * @return string */ function convertGrammar( $word, $case ) { @@ -1837,8 +1830,8 @@ class Language { * * Example: {{plural:{{NUMBEROFARTICLES}}|article|articles}} * - * @param integer $count Non-localized number - * @param array $forms Different plural forms + * @param $count Integer: non-localized number + * @param $forms Array: different plural forms * @return string Correct form of plural for $count in this language */ function convertPlural( $count, $forms ) { @@ -1852,8 +1845,8 @@ class Language { * Checks that convertPlural was given an array and pads it to requested * amound of forms by copying the last one. * - * @param integer $count How many forms should there be at least - * @param array $forms Array of forms given to convertPlural + * @param $count Integer: How many forms should there be at least + * @param $forms Array of forms given to convertPlural * @return array Padded array of forms or an exception if not an array */ protected function preConvertPlural( /* Array */ $forms, $count ) { @@ -1865,7 +1858,7 @@ class Language { /** * For translaing of expiry times - * @param string The validated block time in English + * @param $str String: the validated block time in English * @return Somehow translated block time * @see LanguageFi.php for example implementation */ @@ -1893,8 +1886,8 @@ class Language { * languages like Chinese need to be segmented in order for the diff * to be of any use * - * @param string $text - * @return string + * @param $text String + * @return String */ function segmentForDiff( $text ) { return $text; @@ -1903,8 +1896,8 @@ class Language { /** * and unsegment to show the result * - * @param string $text - * @return string + * @param $text String + * @return String */ function unsegmentForDiff( $text ) { return $text; @@ -1933,8 +1926,8 @@ class Language { /** * Perform output conversion on a string, and encode for safe HTML output. - * @param string $text - * @param bool $isTitle -- wtf? + * @param $text String + * @param $isTitle Bool -- wtf? * @return string * @todo this should get integrated somewhere sane */ @@ -1967,8 +1960,8 @@ class Language { * actually exists in another variant. this function * tries to find it. See e.g. LanguageZh.php * - * @param string $link the name of the link - * @param mixed $nt the title object of the link + * @param $link String: the name of the link + * @param $nt Mixed: the title object of the link * @return null the input parameters may be modified upon return */ function findVariantLink( &$link, &$nt ) { @@ -1991,7 +1984,6 @@ class Language { * for example, the preferred language variant * * @return string - * @public */ function getExtraHashOptions() { return $this->mConverter->getExtraHashOptions(); @@ -2012,9 +2004,10 @@ class Language { * Enclose a string with the "no conversion" tag. This is used by * various functions in the Parser * - * @param string $text text to be tagged for no conversion + * @param $text String: text to be tagged for no conversion + * @param $noParse * @return string the tagged text - */ + */ function markNoConversion( $text, $noParse=false ) { return $this->mConverter->markNoConversion( $text, $noParse ); } @@ -2024,7 +2017,6 @@ class Language { * which should be merged onto a link of the form [[foo]]bar. * * @return string - * @public */ function linkTrail() { $this->load(); -- 2.20.1