dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CologneBlue rewrite: output the sidebar items as <ul> lists
[lhc/web/wiklou.git]
/
includes
/
GlobalFunctions.php
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
4080e46
..
3de25e7
100644
(file)
--- a/
includes/GlobalFunctions.php
+++ b/
includes/GlobalFunctions.php
@@
-169,6
+169,7
@@
function wfArrayLookup( $a, $b ) {
* @param $value Mixed
* @param $default Mixed
* @param $changed Array to alter
* @param $value Mixed
* @param $default Mixed
* @param $changed Array to alter
+ * @throws MWException
*/
function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) {
if ( is_null( $changed ) ) {
*/
function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) {
if ( is_null( $changed ) ) {
@@
-1110,6
+1111,7
@@
function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) {
*
* @param $text String
* @param $file String filename
*
* @param $text String
* @param $file String filename
+ * @throws MWException
*/
function wfErrorLog( $text, $file ) {
if ( substr( $file, 0, 4 ) == 'udp:' ) {
*/
function wfErrorLog( $text, $file ) {
if ( substr( $file, 0, 4 ) == 'udp:' ) {
@@
-1719,6
+1721,7
@@
function wfEmptyMsg( $key ) {
* but now throws an exception instead, with similar results.
*
* @param $msg String: message shown when dying.
* but now throws an exception instead, with similar results.
*
* @param $msg String: message shown when dying.
+ * @throws MWException
*/
function wfDebugDieBacktrace( $msg = '' ) {
throw new MWException( $msg );
*/
function wfDebugDieBacktrace( $msg = '' ) {
throw new MWException( $msg );
@@
-2409,8
+2412,13
@@
define( 'TS_ISO_8601_BASIC', 9 );
* @return Mixed: String / false The same date in the format specified in $outputtype or false
*/
function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) {
* @return Mixed: String / false The same date in the format specified in $outputtype or false
*/
function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) {
- $timestamp = new MWTimestamp( $ts );
- return $timestamp->getTimestamp( $outputtype );
+ try {
+ $timestamp = new MWTimestamp( $ts );
+ return $timestamp->getTimestamp( $outputtype );
+ } catch( TimestampException $e ) {
+ wfDebug("wfTimestamp() fed bogus time value: TYPE=$outputtype; VALUE=$ts\n");
+ return false;
+ }
}
/**
}
/**
@@
-2507,6
+2515,7
@@
function wfTempDir() {
* @param $dir String: 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 $dir String: full path to directory to create
* @param $mode Integer: chmod value to use, default is $wgDirectoryMode
* @param $caller String: optional caller param for debugging.
+ * @throws MWException
* @return bool
*/
function wfMkdirParents( $dir, $mode = null, $caller = null ) {
* @return bool
*/
function wfMkdirParents( $dir, $mode = null, $caller = null ) {
@@
-3017,6
+3026,7
@@
function wfDiff( $before, $after, $params = '-u' ) {
*
* @param $req_ver Mixed: the version to check, can be a string, an integer, or
* a float
*
* @param $req_ver Mixed: the version to check, can be a string, an integer, or
* a float
+ * @throws MWException
*/
function wfUsePHP( $req_ver ) {
$php_ver = PHP_VERSION;
*/
function wfUsePHP( $req_ver ) {
$php_ver = PHP_VERSION;
@@
-3038,6
+3048,7
@@
function wfUsePHP( $req_ver ) {
*
* @param $req_ver Mixed: the version to check, can be a string, an integer, or
* a float
*
* @param $req_ver Mixed: the version to check, can be a string, an integer, or
* a float
+ * @throws MWException
*/
function wfUseMW( $req_ver ) {
global $wgVersion;
*/
function wfUseMW( $req_ver ) {
global $wgVersion;
@@
-3546,16
+3557,6
@@
function wfBoolToStr( $value ) {
return $value ? 'true' : 'false';
}
return $value ? 'true' : 'false';
}
-/**
- * Load an extension messages file
- *
- * @deprecated since 1.16, warnings in 1.18, remove in 1.20
- * @codeCoverageIgnore
- */
-function wfLoadExtensionMessages() {
- wfDeprecated( __FUNCTION__, '1.16' );
-}
-
/**
* Get a platform-independent path to the null file, e.g. /dev/null
*
/**
* Get a platform-independent path to the null file, e.g. /dev/null
*