From aa21cbc5fba8d66deeb1cf6344ef8f19e6d8f4fe Mon Sep 17 00:00:00 2001 From: withoutaname Date: Thu, 31 Jul 2014 00:23:56 -0700 Subject: [PATCH] Remove global functions deprecated since 1.22 Specifically functions wfArrayLookup(), wfArrayMerge(), wfDebugDieBacktrace() and wfTime() from GlobalFunctions.php. Change-Id: I9339cb2d8da41953a0e2a051452298f480256ebc --- RELEASE-NOTES-1.24 | 2 ++ includes/GlobalFunctions.php | 59 ------------------------------------ 2 files changed, 2 insertions(+), 59 deletions(-) diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 37a6950b58..76ccd8aec8 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -288,6 +288,8 @@ changes to languages because of Bugzilla reports. userNotLoggedInPage() from EditPage.php. (deprecated since 1.19) * Removed functions getContent(), getPreloadedText(), mergeChangesInto() and setPreloadedText() from EditPage.php. (deprecated since 1.21) +* Removed global functions wfArrayLookup(), wfArrayMerge(), wfDebugDieBacktrace() + and wfTime(). (deprecated since 1.22) ==== Renamed classes ==== * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index b40b00703c..7d54dbcfa0 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -176,21 +176,6 @@ function wfArrayDiff2_cmp( $a, $b ) { } } -/** - * Array lookup - * Returns an array where the values in array $b are replaced by the - * values in array $a with the corresponding keys - * - * @deprecated since 1.22; use array_intersect_key() - * @param array $a - * @param array $b - * @return array - */ -function wfArrayLookup( $a, $b ) { - wfDeprecated( __FUNCTION__, '1.22' ); - return array_flip( array_intersect( array_flip( $a ), array_keys( $b ) ) ); -} - /** * Appends to second array if $value differs from that in $default * @@ -209,27 +194,6 @@ function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) { } } -/** - * Backwards array plus for people who haven't bothered to read the PHP manual - * XXX: will not darn your socks for you. - * - * @deprecated since 1.22; use array_replace() - * - * @param array $array1 Initial array to merge. - * @param array $array2,... Variable list of arrays to merge. - * @return array - */ -function wfArrayMerge( $array1 /*...*/ ) { - wfDeprecated( __FUNCTION__, '1.22' ); - $args = func_get_args(); - $args = array_reverse( $args, true ); - $out = array(); - foreach ( $args as $arg ) { - $out += $arg; - } - return $out; -} - /** * Merge arrays in the style of getUserPermissionsErrors, with duplicate removal * e.g. @@ -1807,19 +1771,6 @@ function wfEmptyMsg( $key ) { return MessageCache::singleton()->get( $key, /*useDB*/true, /*content*/false ) === false; } -/** - * Throw a debugging exception. This function previously once exited the process, - * but now throws an exception instead, with similar results. - * - * @deprecated since 1.22; just throw an MWException yourself - * @param string $msg Message shown when dying. - * @throws MWException - */ -function wfDebugDieBacktrace( $msg = '' ) { - wfDeprecated( __FUNCTION__, '1.22' ); - throw new MWException( $msg ); -} - /** * Fetch server name for use in error reporting etc. * Use real server name if available, so we know which machine @@ -2116,16 +2067,6 @@ function wfEscapeWikiText( $text ) { return $text; } -/** - * Get the current unix timestamp with microseconds. Useful for profiling - * @deprecated since 1.22; call microtime() directly - * @return float - */ -function wfTime() { - wfDeprecated( __FUNCTION__, '1.22' ); - return microtime( true ); -} - /** * Sets dest to source and returns the original value of dest * If source is NULL, it just returns the value, it doesn't set the variable -- 2.20.1