Remove some deprecated global functions
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Sat, 11 Jan 2014 20:08:56 +0000 (21:08 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Thu, 23 Jan 2014 00:38:27 +0000 (01:38 +0100)
Some uses remained in Gerrit extensions, and patches have been submitted
to replace the usages. See below for details.

* in_string (deprecated in 1.21)
* wfGenerateToken (deprecated in 1.20) (had 2 uses)
* wfStreamFile (deprecated in 1.19) (had 1 use)
* wfUILang (deprecated in 1.18)

Change-Id: Ic67a968da8f37daf44503b98d00710eb99180805

RELEASE-NOTES-1.23
includes/GlobalFunctions.php

index 35396be..21d8548 100644 (file)
@@ -252,6 +252,7 @@ changes to languages because of Bugzilla reports.
 * EditPage::spamPage() (deprecated since 1.17)
 * Exif::getFormattedData() (deprecated in 1.18)
 * Exif::makeFormattedData() (deprecated in 1.18)
+* in_string (deprecated in 1.21)
 * Language::convertLinkToAllVariants() (deprecated in 1.17)
 * LanguageConverter::convertLinkToAllVariants() (deprecated in 1.17)
 * Linker::makeBrokenLink() (deprecated in 1.16)
@@ -291,6 +292,9 @@ changes to languages because of Bugzilla reports.
 * User::getPageRenderingHash() (deprecated in 1.17)
 * WebRequest::getFileSize() (deprecated in 1.17)
 * WebRequest::isPathInfoBad() (deprecated in 1.17)
+* wfGenerateToken (deprecated in 1.20)
+* wfStreamFile (deprecated in 1.19)
+* wfUILang (deprecated in 1.18)
 * WikiPage::createUpdates() (deprecated in 1.18)
 * WikiPage::quickEdit() (deprecated in 1.18)
 * WikiPage::useParserCache() (deprecated in 1.18)
index a638287..2dda695 100644 (file)
@@ -1340,19 +1340,6 @@ function wfGetLangObj( $langcode = false ) {
        return $wgContLang;
 }
 
-/**
- * Old function when $wgBetterDirectionality existed
- * All usage removed, wfUILang can be removed in near future
- *
- * @deprecated since 1.18
- * @return Language
- */
-function wfUILang() {
-       wfDeprecated( __METHOD__, '1.18' );
-       global $wgLang;
-       return $wgLang;
-}
-
 /**
  * This is the function for getting translated interface messages.
  *
@@ -2619,25 +2606,6 @@ function wfPercent( $nr, $acc = 2, $round = true ) {
        return $round ? round( $ret, $acc ) . '%' : "$ret%";
 }
 
-/**
- * Find out whether or not a mixed variable exists in a string
- *
- * @deprecated Just use str(i)pos
- * @param $needle String
- * @param $str String
- * @param $insensitive Boolean
- * @return Boolean
- */
-function in_string( $needle, $str, $insensitive = false ) {
-       wfDeprecated( __METHOD__, '1.21' );
-       $func = 'strpos';
-       if ( $insensitive ) {
-               $func = 'stripos';
-       }
-
-       return $func( $str, $needle ) !== false;
-}
-
 /**
  * Safety wrapper around ini_get() for boolean settings.
  * The values returned from ini_get() are pre-normalized for settings
@@ -3712,15 +3680,6 @@ function wfLocalFile( $title ) {
        return RepoGroup::singleton()->getLocalRepo()->newFile( $title );
 }
 
-/**
- * Stream a file to the browser. Back-compat alias for StreamFile::stream()
- * @deprecated since 1.19
- */
-function wfStreamFile( $fname, $headers = array() ) {
-       wfDeprecated( __FUNCTION__, '1.19' );
-       StreamFile::stream( $fname, $headers );
-}
-
 /**
  * Should low-performance queries be disabled?
  *
@@ -3848,23 +3807,6 @@ function wfCountDown( $n ) {
        echo "\n";
 }
 
-/**
- * Generate a random 32-character hexadecimal token.
- * @param $salt Mixed: some sort of salt, if necessary, to add to random
- *              characters before hashing.
- * @return string
- * @codeCoverageIgnore
- * @deprecated since 1.20; Please use MWCryptRand for security purposes and
- * wfRandomString for pseudo-random strings
- * @warning This method is NOT secure. Additionally it has many callers that
- * use it for pseudo-random purposes.
- */
-function wfGenerateToken( $salt = '' ) {
-       wfDeprecated( __METHOD__, '1.20' );
-       $salt = serialize( $salt );
-       return md5( mt_rand( 0, 0x7fffffff ) . $salt );
-}
-
 /**
  * Replace all invalid characters with -
  * Additional characters can be defined in $wgIllegalFileChars (see bug 20489)