r86767 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86766‎ | r86767 | r86768 >
Date:13:55, 23 April 2011
Author:happy-melon
Status:ok
Tags:
Comment:
Documentation and type hinting.
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -207,6 +207,11 @@
208208 }
209209 }
210210
 211+/**
 212+ * Get microsecond timestamps for debug logs
 213+ *
 214+ * @return string
 215+ */
211216 function wfDebugTimer() {
212217 global $wgDebugTimestamps;
213218 if ( !$wgDebugTimestamps ) {
@@ -226,6 +231,7 @@
227232
228233 /**
229234 * Send a line giving PHP memory usage.
 235+ *
230236 * @param $exact Bool: print exact values instead of kilobytes (default: false)
231237 */
232238 function wfDebugMem( $exact = false ) {
@@ -266,6 +272,7 @@
267273
268274 /**
269275 * Log for database errors
 276+ *
270277 * @param $text String: database error message.
271278 */
272279 function wfLogDBError( $text ) {
@@ -282,6 +289,9 @@
283290 *
284291 * Can also log to TCP or UDP with the syntax udp://host:port/prefix. This will
285292 * send lines to the specified port, prefixed by the specified prefix and a space.
 293+ *
 294+ * @param $text String
 295+ * @param $file String filename
286296 */
287297 function wfErrorLog( $text, $file ) {
288298 if ( substr( $file, 0, 4 ) == 'udp:' ) {
@@ -395,6 +405,7 @@
396406 * Check if the wiki read-only lock file is present. This can be used to lock
397407 * off editing functions, but doesn't guarantee that the database will not be
398408 * modified.
 409+ *
399410 * @return bool
400411 */
401412 function wfReadOnly() {
@@ -423,6 +434,7 @@
424435
425436 /**
426437 * Return a Language object from $langcode
 438+ *
427439 * @param $langcode Mixed: either:
428440 * - a Language object
429441 * - code of the language to get the message for, if it is
@@ -473,6 +485,8 @@
474486 * in many ways, especially regarding to text direction. There is lots stuff
475487 * to fix, hence this function to keep the old behaviour unless the global
476488 * $wgBetterDirectionality is enabled (or removed when everything works).
 489+ *
 490+ * @return Language
477491 */
478492 function wfUILang() {
479493 global $wgBetterDirectionality;
@@ -501,7 +515,7 @@
502516 * This function accepts multiple message keys and returns a message instance
503517 * for the first message which is non-empty. If all messages are empty then an
504518 * instance of the first message key is returned.
505 - * Varargs: message keys
 519+ * @param varargs: message keys
506520 * @return Message
507521 * @since 1.18
508522 */
@@ -522,6 +536,7 @@
523537 * This function also takes extra optional parameters (not
524538 * shown in the function definition), which can be used to
525539 * insert variable text into the predefined message.
 540+ * @return String
526541 */
527542 function wfMsg( $key ) {
528543 $args = func_get_args();
@@ -531,6 +546,9 @@
532547
533548 /**
534549 * Same as above except doesn't transform the message
 550+ *
 551+ * @param $key String
 552+ * @return String
535553 */
536554 function wfMsgNoTrans( $key ) {
537555 $args = func_get_args();
@@ -558,7 +576,8 @@
559577 * order to, e.g., fix a link in every possible language.
560578 *
561579 * @param $key String: lookup key for the message, usually
562 - * defined in languages/Language.php
 580+ * defined in languages/Language.php
 581+ * @return String
563582 */
564583 function wfMsgForContent( $key ) {
565584 global $wgForceUIMsgAsContentMsg;
@@ -575,6 +594,9 @@
576595
577596 /**
578597 * Same as above except doesn't transform the message
 598+ *
 599+ * @param $key String
 600+ * @return String
579601 */
580602 function wfMsgForContentNoTrans( $key ) {
581603 global $wgForceUIMsgAsContentMsg;
@@ -623,6 +645,7 @@
624646
625647 /**
626648 * Really get a message
 649+ *
627650 * @param $key String: key to get.
628651 * @param $args
629652 * @param $useDB Boolean
@@ -656,6 +679,7 @@
657680
658681 /**
659682 * Fetch a message string value, but don't replace any keys yet.
 683+ *
660684 * @param $key String
661685 * @param $useDB Bool
662686 * @param $langCode String: Code of the language to get the message for, or
@@ -757,6 +781,8 @@
758782 * (overriden by <i>content</i>), its behaviour with parse, parseinline
759783 * and parsemag is undefined.
760784 * Behavior for conflicting options (e.g., parse+parseinline) is undefined.
 785+ *
 786+ * @return String
761787 */
762788 function wfMsgExt( $key, $options ) {
763789 $args = func_get_args();
@@ -875,6 +901,7 @@
876902 * etc). This should not be called directly once $wgFullyInitialised is set; instead,
877903 * throw an exception and let Exception.php handle whether or not it's possible to show
878904 * a prettier error.
 905+ *
879906 * @param $msg String
880907 */
881908 if( !function_exists( 'wfDie' ) ){
@@ -898,6 +925,7 @@
899926 * Fetch server name for use in error reporting etc.
900927 * Use real server name if available, so we know which machine
901928 * in a server farm generated the current page.
 929+ *
902930 * @return string
903931 */
904932 function wfHostname() {
@@ -925,6 +953,7 @@
926954 /**
927955 * Returns a HTML comment with the elapsed time since request.
928956 * This method has no side effects.
 957+ *
929958 * @return string
930959 */
931960 function wfReportTime() {
@@ -976,6 +1005,11 @@
9771006 return array_slice( debug_backtrace(), 1 );
9781007 }
9791008
 1009+/**
 1010+ * Get a debug backtrace as a string
 1011+ *
 1012+ * @return string
 1013+ */
9801014 function wfBacktrace() {
9811015 global $wgCommandLineMode;
9821016
@@ -1028,6 +1062,10 @@
10291063
10301064 /**
10311065 * @todo document
 1066+ *
 1067+ * @param $offset Int
 1068+ * @param $limit Int
 1069+ * @return String
10321070 */
10331071 function wfShowingResults( $offset, $limit ) {
10341072 global $wgLang;
@@ -1041,6 +1079,11 @@
10421080
10431081 /**
10441082 * @todo document
 1083+ *
 1084+ * @param $offset Int
 1085+ * @param $limit Int
 1086+ * @param $num Int
 1087+ * @return String
10451088 */
10461089 function wfShowingResultsNum( $offset, $limit, $num ) {
10471090 global $wgLang;
@@ -1055,11 +1098,13 @@
10561099
10571100 /**
10581101 * Generate (prev x| next x) (20|50|100...) type links for paging
 1102+ *
10591103 * @param $offset String
10601104 * @param $limit Integer
10611105 * @param $link String
10621106 * @param $query String: optional URL query parameter string
10631107 * @param $atend Bool: optional param for specified if this is the last page
 1108+ * @return String
10641109 */
10651110 function wfViewPrevNext( $offset, $limit, $link, $query = '', $atend = false ) {
10661111 global $wgLang;
@@ -1116,6 +1161,7 @@
11171162
11181163 /**
11191164 * Generate links for (20|50|100...) items-per-page links
 1165+ *
11201166 * @param $offset String
11211167 * @param $limit Integer
11221168 * @param $title Title
@@ -1139,6 +1185,7 @@
11401186 * @todo document
11411187 * @todo FIXME: we may want to blacklist some broken browsers
11421188 *
 1189+ * @param $force Bool
11431190 * @return bool Whereas client accept gzip compression
11441191 */
11451192 function wfClientAcceptsGzip( $force = false ) {
@@ -1170,8 +1217,8 @@
11711218 * Obtain the offset and limit values from the request string;
11721219 * used in special pages
11731220 *
1174 - * @param $deflimit Default limit if none supplied
1175 - * @param $optionname Name of a user preference to check against
 1221+ * @param $deflimit Int default limit if none supplied
 1222+ * @param $optionname String Name of a user preference to check against
11761223 * @return array
11771224 *
11781225 */
@@ -1187,6 +1234,7 @@
11881235 * As required by the callers, <nowiki> is not used.
11891236 *
11901237 * @param $text String: text to be escaped
 1238+ * @return String
11911239 */
11921240 function wfEscapeWikiText( $text ) {
11931241 $text = strtr( "\n$text", array(
@@ -1201,8 +1249,8 @@
12021250 }
12031251
12041252 /**
1205 - * @todo document
1206 - * @return float
 1253+ * Get the current unix timetstamp with microseconds. Useful for profiling
 1254+ * @return Float
12071255 */
12081256 function wfTime() {
12091257 return microtime( true );
@@ -1212,6 +1260,11 @@
12131261 * Sets dest to source and returns the original value of dest
12141262 * If source is NULL, it just returns the value, it doesn't set the variable
12151263 * If force is true, it will set the value even if source is NULL
 1264+ *
 1265+ * @param $dest Mixed
 1266+ * @param $source Mixed
 1267+ * @param $force Bool
 1268+ * @return Mixed
12161269 */
12171270 function wfSetVar( &$dest, $source, $force = false ) {
12181271 $temp = $dest;
@@ -1223,6 +1276,10 @@
12241277
12251278 /**
12261279 * As for wfSetVar except setting a bit
 1280+ *
 1281+ * @param $dest Int
 1282+ * @param $bit Int
 1283+ * @param $state Bool
12271284 */
12281285 function wfSetBit( &$dest, $bit, $state = true ) {
12291286 $temp = (bool)( $dest & $bit );
@@ -1240,6 +1297,10 @@
12411298 * This function takes two arrays as input, and returns a CGI-style string, e.g.
12421299 * "days=7&limit=100". Options in the first array override options in the second.
12431300 * Options set to "" will not be output.
 1301+ *
 1302+ * @param $array1 Array( String|Array )
 1303+ * @param $array2 Array( String|Array )
 1304+ * @return String
12441305 */
12451306 function wfArrayToCGI( $array1, $array2 = null ) {
12461307 if ( !is_null( $array2 ) ) {
@@ -1352,6 +1413,9 @@
13531414 *
13541415 * Also fixes the locale problems on Linux in PHP 5.2.6+ (bug backported to
13551416 * earlier distro releases of PHP)
 1417+ *
 1418+ * @param varargs
 1419+ * @return String
13561420 */
13571421 function wfEscapeShellArg( ) {
13581422 wfInitShellLocale();
@@ -1409,6 +1473,12 @@
14101474 /**
14111475 * wfMerge attempts to merge differences between three texts.
14121476 * Returns true for a clean merge and false for failure or a conflict.
 1477+ *
 1478+ * @param $old String
 1479+ * @param $mine String
 1480+ * @param $yours String
 1481+ * @param $result String
 1482+ * @return Bool
14131483 */
14141484 function wfMerge( $old, $mine, $yours, &$result ) {
14151485 global $wgDiff3;
@@ -1478,6 +1548,7 @@
14791549 /**
14801550 * Returns unified plain-text diff of two texts.
14811551 * Useful for machine processing of diffs.
 1552+ *
14821553 * @param $before String: the text before the changes.
14831554 * @param $after String: the text after the changes.
14841555 * @param $params String: command-line options for the diff command.
@@ -1564,6 +1635,10 @@
15651636
15661637 /**
15671638 * Provide a simple HTTP error.
 1639+ *
 1640+ * @param $code Int|String
 1641+ * @param $label String
 1642+ * @param $desc String
15681643 */
15691644 function wfHttpError( $code, $label, $desc ) {
15701645 global $wgOut;
@@ -1657,6 +1732,10 @@
16581733 /**
16591734 * Converts an Accept-* header into an array mapping string values to quality
16601735 * factors
 1736+ *
 1737+ * @param $accept String
 1738+ * @param $def String default
 1739+ * @return Array
16611740 */
16621741 function wfAcceptToPrefs( $accept, $def = '*/*' ) {
16631742 # No arg means accept anything (per HTTP spec)
@@ -1763,6 +1842,8 @@
17641843 * Returns an array where the values in the first array are replaced by the
17651844 * values in the second array with the corresponding keys
17661845 *
 1846+ * @param $a Array
 1847+ * @param $b Array
17671848 * @return array
17681849 */
17691850 function wfArrayLookup( $a, $b ) {
@@ -1771,6 +1852,7 @@
17721853
17731854 /**
17741855 * Convenience function; returns MediaWiki timestamp for the present time.
 1856+ *
17751857 * @return string
17761858 */
17771859 function wfTimestampNow() {
@@ -1780,6 +1862,8 @@
17811863
17821864 /**
17831865 * Reference-counted warning suppression
 1866+ *
 1867+ * @param $end Bool
17841868 */
17851869 function wfSuppressWarnings( $end = false ) {
17861870 static $suppressCount = 0;
@@ -1865,13 +1949,13 @@
18661950 define( 'TS_DB2', 8 );
18671951
18681952 /**
1869 - * ISO 8601 basic format with no timezone: 19860209T200000Z
1870 - *
1871 - * This is used by ResourceLoader
 1953+ * ISO 8601 basic format with no timezone: 19860209T200000Z. This is used by ResourceLoader
18721954 */
18731955 define( 'TS_ISO_8601_BASIC', 9 );
18741956
18751957 /**
 1958+ * Get a timestamp string in one of various formats
 1959+ *
18761960 * @param $outputtype Mixed: A timestamp in one of the supported formats, the
18771961 * function will autodetect which format is supplied and act
18781962 * accordingly.
@@ -1998,6 +2082,7 @@
19992083 /**
20002084 * Return a formatted timestamp, or null if input is null.
20012085 * For dealing with nullable timestamp columns in the database.
 2086+ *
20022087 * @param $outputtype Integer
20032088 * @param $ts String
20042089 * @return String
@@ -2025,6 +2110,8 @@
20262111
20272112 /**
20282113 * Check if we are running under HipHop
 2114+ *
 2115+ * @return Bool
20292116 */
20302117 function wfIsHipHop() {
20312118 return function_exists( 'hphp_thread_set_warmup_enabled' );
@@ -2032,6 +2119,9 @@
20332120
20342121 /**
20352122 * Swap two variables
 2123+ *
 2124+ * @param $x Mixed
 2125+ * @param $y Mixed
20362126 */
20372127 function swap( &$x, &$y ) {
20382128 $z = $x;
@@ -2113,6 +2203,9 @@
21142204
21152205 /**
21162206 * Increment a statistics counter
 2207+ *
 2208+ * @param $key String
 2209+ * @param $count Int
21172210 */
21182211 function wfIncrStats( $key, $count = 1 ) {
21192212 global $wgStatsMethod;
@@ -2176,7 +2269,7 @@
21772270 * @param $userid Integer: ID of the user
21782271 * @param $password String: password of the user
21792272 * @return String: hashed password
2180 - * @deprecated Use User::crypt() or User::oldCrypt() instead
 2273+ * @deprecated since 1.13 Use User::crypt() or User::oldCrypt() instead
21812274 */
21822275 function wfEncryptPassword( $userid, $password ) {
21832276 wfDeprecated(__FUNCTION__);
@@ -2186,6 +2279,11 @@
21872280
21882281 /**
21892282 * Appends to second array if $value differs from that in $default
 2283+ *
 2284+ * @param $key String|Int
 2285+ * @param $value Mixed
 2286+ * @param $default Mixed
 2287+ * @param $changed Array to alter
21902288 */
21912289 function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) {
21922290 if ( is_null( $changed ) ) {
@@ -2579,6 +2677,8 @@
25802678 * array( 'x' ),
25812679 * array( 'y' )
25822680 * )
 2681+ * @param varargs
 2682+ * @return Array
25832683 */
25842684 function wfMergeErrorArrays( /*...*/ ) {
25852685 $args = func_get_args();
@@ -2633,6 +2733,9 @@
26342734
26352735 /**
26362736 * Make a URL index, appropriate for the el_index field of externallinks.
 2737+ *
 2738+ * @param $url String
 2739+ * @return String
26372740 */
26382741 function wfMakeUrlIndex( $url ) {
26392742 $bits = wfParseUrl( $url );
@@ -2800,6 +2903,7 @@
28012904
28022905 /**
28032906 * Create an object with a given name and an array of construct parameters
 2907+ *
28042908 * @param $name String
28052909 * @param $p Array: parameters
28062910 * @deprecated
@@ -2824,6 +2928,8 @@
28252929
28262930 /**
28272931 * Initialise php session
 2932+ *
 2933+ * @param $sessionId Bool
28282934 */
28292935 function wfSetupSession( $sessionId = false ) {
28302936 global $wgSessionsInMemcached, $wgCookiePath, $wgCookieDomain,
@@ -2867,6 +2973,7 @@
28682974 /**
28692975 * Get an object from the precompiled serialized directory
28702976 *
 2977+ * @param $name String
28712978 * @return Mixed: the variable on success, false on failure
28722979 */
28732980 function wfGetPrecompiledData( $name ) {
@@ -2882,6 +2989,12 @@
28832990 return false;
28842991 }
28852992
 2993+/**
 2994+ * Get the name of the function which called this function
 2995+ *
 2996+ * @param $level Int
 2997+ * @return Bool|string
 2998+ */
28862999 function wfGetCaller( $level = 2 ) {
28873000 $backtrace = wfDebugBacktrace();
28883001 if ( isset( $backtrace[$level] ) ) {
@@ -2898,6 +3011,7 @@
28993012 *
29003013 * @param $limit The maximum depth of the stack frame to return, or false for
29013014 * the entire stack.
 3015+ * @return String
29023016 */
29033017 function wfGetAllCallers( $limit = 3 ) {
29043018 $trace = array_reverse( wfDebugBacktrace() );
@@ -2910,6 +3024,9 @@
29113025
29123026 /**
29133027 * Return a string representation of frame
 3028+ *
 3029+ * @param $frame Array
 3030+ * @return Bool
29143031 */
29153032 function wfFormatStackFrame( $frame ) {
29163033 return isset( $frame['class'] ) ?
@@ -2919,6 +3036,9 @@
29203037
29213038 /**
29223039 * Get a cache key
 3040+ *
 3041+ * @param varargs
 3042+ * @return String
29233043 */
29243044 function wfMemcKey( /*... */ ) {
29253045 $args = func_get_args();
@@ -2929,6 +3049,11 @@
29303050
29313051 /**
29323052 * Get a cache key for a foreign DB
 3053+ *
 3054+ * @param $db String
 3055+ * @param $prefix String
 3056+ * @param varargs String
 3057+ * @return String
29333058 */
29343059 function wfForeignMemcKey( $db, $prefix /*, ... */ ) {
29353060 $args = array_slice( func_get_args(), 2 );
@@ -2943,6 +3068,8 @@
29443069 /**
29453070 * Get an ASCII string identifying this wiki
29463071 * This is used as a prefix in memcached keys
 3072+ *
 3073+ * @return String
29473074 */
29483075 function wfWikiID() {
29493076 global $wgDBprefix, $wgDBname;
@@ -2955,6 +3082,9 @@
29563083
29573084 /**
29583085 * Split a wiki ID into DB name and table prefix
 3086+ *
 3087+ * @param $wiki String
 3088+ * @param $bits String
29593089 */
29603090 function wfSplitWikiID( $wiki ) {
29613091 $bits = explode( '-', $wiki, 2 );
@@ -2966,6 +3096,7 @@
29673097
29683098 /**
29693099 * Get a Database object.
 3100+ *
29703101 * @param $db Integer: index of the connection to get. May be DB_MASTER for the
29713102 * master (for write queries), DB_SLAVE for potentially lagged read
29723103 * queries, or an integer >= 0 for a particular server.
@@ -2998,6 +3129,7 @@
29993130
30003131 /**
30013132 * Get the load balancer factory object
 3133+ *
30023134 * @return LBFactory
30033135 */
30043136 function &wfGetLBFactory() {
@@ -3007,6 +3139,7 @@
30083140 /**
30093141 * Find a file.
30103142 * Shortcut for RepoGroup::singleton()->findFile()
 3143+ *
30113144 * @param $title String or Title object
30123145 * @param $options Associative array of options:
30133146 * time: requested time for an archived image, or false for the
@@ -3030,6 +3163,7 @@
30313164 /**
30323165 * Get an object referring to a locally registered file.
30333166 * Returns a valid placeholder object if the file does not exist.
 3167+ *
30343168 * @param $title Title or String
30353169 * @return File, or null if passed an invalid Title
30363170 */
@@ -3099,16 +3233,16 @@
31003234
31013235 /**
31023236 * Load an extension messages file
 3237+ *
31033238 * @deprecated in 1.16, warnings in 1.18, remove in 1.20
31043239 * @codeCoverageIgnore
31053240 */
3106 -function wfLoadExtensionMessages( $extensionName, $langcode = false ) {
 3241+function wfLoadExtensionMessages() {
31073242 wfDeprecated( __FUNCTION__ );
31083243 }
31093244
31103245 /**
3111 - * Get a platform-independent path to the null file, e.g.
3112 - * /dev/null
 3246+ * Get a platform-independent path to the null file, e.g. /dev/null
31133247 *
31143248 * @return string
31153249 */
@@ -3120,6 +3254,7 @@
31213255
31223256 /**
31233257 * Throws a warning that $function is deprecated
 3258+ *
31243259 * @param $function String
31253260 * @return null
31263261 */
@@ -3228,6 +3363,7 @@
32293364 * Generate a random 32-character hexadecimal token.
32303365 * @param $salt Mixed: some sort of salt, if necessary, to add to random
32313366 * characters before hashing.
 3367+ * @return Array
32323368 * @codeCoverageIgnore
32333369 */
32343370 function wfGenerateToken( $salt = '' ) {
@@ -3237,7 +3373,9 @@
32383374
32393375 /**
32403376 * Replace all invalid characters with -
 3377+ *
32413378 * @param $name Mixed: filename to process
 3379+ * @return String
32423380 */
32433381 function wfStripIllegalFilenameChars( $name ) {
32443382 global $wgIllegalFileChars;
@@ -3254,11 +3392,11 @@
32553393
32563394 /**
32573395 * Insert array into another array after the specified *KEY*
 3396+ *
32583397 * @param $array Array: The array.
32593398 * @param $insert Array: The array to insert.
32603399 * @param $after Mixed: The key to insert after
32613400 * @return Array
3262 - * @since 1.16
32633401 */
32643402 function wfArrayInsertAfter( $array, $insert, $after ) {
32653403 // Find the offset of the element to insert after.
@@ -3276,7 +3414,13 @@
32773415 return $output;
32783416 }
32793417
3280 -/* Recursively converts the parameter (an object) to an array with the same data */
 3418+/**
 3419+ * Recursively converts the parameter (an object) to an array with the same data
 3420+ *
 3421+ * @param $objOrArray Object|Array
 3422+ * @param $recursive Bool
 3423+ * @return Array
 3424+ */
32813425 function wfObjectToArray( $objOrArray, $recursive = true ) {
32823426 $array = array();
32833427 if( is_object( $objOrArray ) ) {
@@ -3295,6 +3439,7 @@
32963440
32973441 /**
32983442 * Set PHP's memory limit to the larger of php.ini or $wgMemoryLimit;
 3443+ *
32993444 * @return Integer value memory was set to.
33003445 */
33013446 function wfMemoryLimit() {
@@ -3321,6 +3466,7 @@
33223467
33233468 /**
33243469 * Converts shorthand byte notation to integer form
 3470+ *
33253471 * @param $string String
33263472 * @return Integer
33273473 */
@@ -3351,11 +3497,13 @@
33523498 /**
33533499 * Get the normalised IETF language tag
33543500 * See unit test for examples.
 3501+ *
33553502 * @param $code String: The language code.
33563503 * @return $langCode String: The language code which complying with BCP 47 standards.
33573504 */
33583505 function wfBCP47( $code ) {
33593506 $codeSegment = explode( '-', $code );
 3507+ $codeBCP = array();
33603508 foreach ( $codeSegment as $segNo => $seg ) {
33613509 if ( count( $codeSegment ) > 0 ) {
33623510 // when previous segment is x, it is a private segment and should be lc
@@ -3380,6 +3528,13 @@
33813529 return $langCode;
33823530 }
33833531
 3532+/**
 3533+ * Wrapper around array_map() which also taints variables
 3534+ *
 3535+ * @param $function Callback
 3536+ * @param $input Array
 3537+ * @return Array
 3538+ */
33843539 function wfArrayMap( $function, $input ) {
33853540 $ret = array_map( $function, $input );
33863541 foreach ( $ret as $key => $value ) {
@@ -3394,27 +3549,39 @@
33953550
33963551 /**
33973552 * Get a cache object.
 3553+ *
33983554 * @param integer $inputType Cache type, one the the CACHE_* constants.
3399 - *
34003555 * @return BagOStuff
34013556 */
34023557 function wfGetCache( $inputType ) {
34033558 return ObjectCache::getInstance( $inputType );
34043559 }
34053560
3406 -/** Get the main cache object */
 3561+/**
 3562+ * Get the main cache object
 3563+ *
 3564+ * @return BagOStuff
 3565+ */
34073566 function wfGetMainCache() {
34083567 global $wgMainCacheType;
34093568 return ObjectCache::getInstance( $wgMainCacheType );
34103569 }
34113570
3412 -/** Get the cache object used by the message cache */
 3571+/**
 3572+ * Get the cache object used by the message cache
 3573+ *
 3574+ * @return BagOStuff
 3575+ */
34133576 function wfGetMessageCacheStorage() {
34143577 global $wgMessageCacheType;
34153578 return ObjectCache::getInstance( $wgMessageCacheType );
34163579 }
34173580
3418 -/** Get the cache object used by the parser cache */
 3581+/**
 3582+ * Get the cache object used by the parser cache
 3583+ *
 3584+ * @return BagOStuff
 3585+ */
34193586 function wfGetParserCacheStorage() {
34203587 global $wgParserCacheType;
34213588 return ObjectCache::getInstance( $wgParserCacheType );
Index: trunk/phase3/includes/Setup.php
@@ -401,7 +401,7 @@
402402
403403 // Now that variant lists may be available...
404404 $wgRequest->interpolateTitle();
405 -$wgUser = RequestContext::getMain()->user; # BackCompat
 405+$wgUser = RequestContext::getMain()->getUser(); # BackCompat
406406
407407 /**
408408 * @var Language
@@ -411,7 +411,7 @@
412412 /**
413413 * @var OutputPage
414414 */
415 -$wgOut = RequestContext::getMain()->output; # BackCompat
 415+$wgOut = RequestContext::getMain()->getOutput(); # BackCompat
416416
417417 /**
418418 * @var Parser
Index: trunk/phase3/includes/EditPage.php
@@ -1268,9 +1268,8 @@
12691269
12701270 /**
12711271 * Send the edit form and related headers to $wgOut
1272 - * @param $formCallback Optional callable that takes an OutputPage
1273 - * parameter; will be called during form output
1274 - * near the top, for captchas and the like.
 1272+ * @param $formCallback Callback that takes an OutputPage parameter; will be called
 1273+ * during form output near the top, for captchas and the like.
12751274 */
12761275 function showEditForm( $formCallback = null ) {
12771276 global $wgOut, $wgUser;

Status & tagging log