From: Timo Tijhof Date: Sat, 5 May 2012 17:02:58 +0000 (+0200) Subject: (bug 36537) Rename wfArrayToCGI to wfArrayToCgi X-Git-Tag: 1.31.0-rc.0~23712^2 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=6b8a256d5dde4883cbf5fe457ee423765bfd3779;p=lhc%2Fweb%2Fwiklou.git (bug 36537) Rename wfArrayToCGI to wfArrayToCgi - For consistency with wfCgiToArray() This way instead of the other way around to keep lowerCamelCase natural. Change-Id: If4528f6572afeab42ef0602a427ac44da9830a3f --- diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index c796df3b9a..125d607bde 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -98,6 +98,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki. * (bug 31757) Add a word-separator between help-messages in HTMLForm * (bug 30410) Removed deprecated $wgFilterCallback and the 'filtered' API error. * (bug 32604) Some messages needs escaping of wikitext inside username +* (bug 36537) Rename wfArrayToCGI to wfArrayToCgi for consistency with wfCgiToArray. === API changes in 1.20 === * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API. diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 70865cb2f2..cea7e48014 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -368,7 +368,7 @@ function wfUrlencode( $s ) { * @param $prefix String * @return String */ -function wfArrayToCGI( $array1, $array2 = null, $prefix = '' ) { +function wfArrayToCgi( $array1, $array2 = null, $prefix = '' ) { if ( !is_null( $array2 ) ) { $array1 = $array1 + $array2; } @@ -387,7 +387,7 @@ function wfArrayToCGI( $array1, $array2 = null, $prefix = '' ) { foreach ( $value as $k => $v ) { $cgi .= $firstTime ? '' : '&'; if ( is_array( $v ) ) { - $cgi .= wfArrayToCGI( $v, null, $key . "[$k]" ); + $cgi .= wfArrayToCgi( $v, null, $key . "[$k]" ); } else { $cgi .= urlencode( $key . "[$k]" ) . '=' . urlencode( $v ); } @@ -405,7 +405,7 @@ function wfArrayToCGI( $array1, $array2 = null, $prefix = '' ) { } /** - * This is the logical opposite of wfArrayToCGI(): it accepts a query string as + * This is the logical opposite of wfArrayToCgi(): it accepts a query string as * its argument and returns the same string in array form. This allows compa- * tibility with legacy functions that accept raw query strings instead of nice * arrays. Of course, keys and values are urldecode()d. @@ -462,7 +462,7 @@ function wfCgiToArray( $query ) { */ function wfAppendQuery( $url, $query ) { if ( is_array( $query ) ) { - $query = wfArrayToCGI( $query ); + $query = wfArrayToCgi( $query ); } if( $query != '' ) { if( false === strpos( $url, '?' ) ) {