Index: trunk/phase3/includes/Title.php |
— | — | @@ -1219,8 +1219,18 @@ |
1220 | 1220 | |
1221 | 1221 | /** |
1222 | 1222 | * Helper to fix up the get{Local,Full,Link,Canonical}URL args |
| 1223 | + * get{Canonical,Full,Link,Local}URL methods accepted an optional |
| 1224 | + * second argument named variant. This was deprecated in favor |
| 1225 | + * of passing an array of option with a "variant" key |
| 1226 | + * Once $query2 is removed for good, this helper can be dropped |
| 1227 | + * andthe wfArrayToCGI moved to getLocalURL(); |
| 1228 | + * |
| 1229 | + * @since 1.19 (r105919) |
1223 | 1230 | */ |
1224 | | - private static function fixUrlQueryArgs( $query, $query2 ) { |
| 1231 | + private static function fixUrlQueryArgs( $query, $query2 = false ) { |
| 1232 | + if( $query2 !== false ) { |
| 1233 | + wfDeprecated( "Title::get{Canonical,Full,Link,Local} method called with a second parameter is deprecated. Add your parameter to an array passed as the first parameter. This ", "1.19" ); |
| 1234 | + } |
1225 | 1235 | if ( is_array( $query ) ) { |
1226 | 1236 | $query = wfArrayToCGI( $query ); |
1227 | 1237 | } |
— | — | @@ -1282,6 +1292,9 @@ |
1283 | 1293 | * be an array. If a string is passed it will be interpreted as a deprecated |
1284 | 1294 | * variant argument and urlencoded into a variant= argument. |
1285 | 1295 | * This second query argument will be added to the $query |
| 1296 | + * The second parameter is deprecated since 1.19. Pass it as a key,value |
| 1297 | + * pair in the first parameter array instead. |
| 1298 | + * |
1286 | 1299 | * @return String the URL |
1287 | 1300 | */ |
1288 | 1301 | public function getLocalURL( $query = '', $query2 = false ) { |