$message = $wgMessageCache->get( $key, $useDB, $langCode );
if ( $transform ) {
$message = $wgMessageCache->transform( $message );
- // Decode two entities used in messages, to allow them "pass" htmlspecialchars
- $message = str_replace( array( ' ', ' ' ), array( ' ', "\xc2\xa0" ), $message );
}
} else {
$lang = wfGetLangObj( $langCode );
foreach( $options as $arrayKey => $option ) {
if( !preg_match( '/^[0-9]+|language$/', $arrayKey ) ) {
# An unknown index, neither numeric nor "language"
- trigger_error( "wfMsgExt called with incorrect parameter key $arrayKey", E_USER_WARNING );
+ wfWarn( "wfMsgExt called with incorrect parameter key $arrayKey", 1, E_USER_WARNING );
} elseif( preg_match( '/^[0-9]+$/', $arrayKey ) && !in_array( $option,
array( 'parse', 'parseinline', 'escape', 'escapenoentities',
'replaceafter', 'parsemag', 'content' ) ) ) {
# A numeric index with unknown value
- trigger_error( "wfMsgExt called with incorrect parameter $option", E_USER_WARNING );
+ wfWarn( "wfMsgExt called with incorrect parameter $option", 1, E_USER_WARNING );
}
}
$string = $wgMessageCache->transform( $string,
!$forContent,
is_object( $langCode ) ? $langCode : null );
- // Decode two entities used in messages, to allow them "pass" htmlspecialchars
- $string = str_replace( array( ' ', ' ' ), array( ' ', "\xc2\xa0" ), $string );
}
}
} elseif (preg_match('/^\d{1,13}$/D',$ts)) {
# TS_UNIX
$uts = $ts;
- } elseif (preg_match('/^\d{1,2}-...-\d\d(?:\d\d)? \d\d\.\d\d\.\d\d/', $ts)) {
- # TS_ORACLE
+ } elseif (preg_match('/^\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}.\d{6}$/', $ts)) {
+ # TS_ORACLE // session altered to DD-MM-YYYY HH24:MI:SS.FF6
$uts = strtotime(preg_replace('/(\d\d)\.(\d\d)\.(\d\d)(\.(\d+))?/', "$1:$2:$3",
str_replace("+00:00", "UTC", $ts)));
} elseif (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.*\d*)?Z$/', $ts, $da)) {
case TS_RFC2822:
return gmdate( 'D, d M Y H:i:s', $uts ) . ' GMT';
case TS_ORACLE:
- return gmdate( 'd-M-y h.i.s A', $uts) . ' +00:00';
+ return gmdate( 'd-m-Y H:i:s.000000', $uts);
+ //return gmdate( 'd-M-y h.i.s A', $uts) . ' +00:00';
case TS_POSTGRES:
return gmdate( 'Y-m-d H:i:s', $uts) . ' GMT';
case TS_DB2:
}
wfProfileOut( $fname );
- // Use $wgContLang to get a converted string by language.
- global $wgContLang;
- return $wgContLang->convert( $notice );
+ return $notice;
}
function wfGetNamespaceNotice() {
return $output;
}
+
+/* Recursively converts the parameter (an object) to an array with the same data */
+function wfObjectToArray( $object, $recursive = true ) {
+ $array = array();
+ foreach ( get_object_vars($object) as $key => $value ) {
+ if ( is_object($value) && $recursive ) {
+ $value = wfObjectToArray( $value );
+ }
+
+ $array[$key] = $value;
+ }
+
+ return $array;
+}