Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -144,7 +144,6 @@ |
145 | 145 | array( 'check_bin', 'protected_titles', 'pt_title', 'patch-pt_title-encoding.sql', ), |
146 | 146 | array( 'maybe_do_profiling_memory_update' ), |
147 | 147 | array( 'do_filearchive_indices_update' ), |
148 | | - array( 'update_password_format' ), |
149 | 148 | |
150 | 149 | // 1.14 |
151 | 150 | array( 'add_field', 'site_stats', 'ss_active_users', 'patch-ss_active_users.sql' ), |
— | — | @@ -266,41 +265,6 @@ |
267 | 266 | } |
268 | 267 | } |
269 | 268 | |
270 | | -function do_revision_updates() { |
271 | | - global $wgSoftwareRevision; |
272 | | - if ( $wgSoftwareRevision < 1001 ) { |
273 | | - update_passwords(); |
274 | | - } |
275 | | -} |
276 | | - |
277 | | -function update_passwords() { |
278 | | - wfDebugDieBacktrace( "This function needs to be updated or removed.\n" ); |
279 | | - |
280 | | - global $wgDatabase; |
281 | | - $fname = "Update script: update_passwords()"; |
282 | | - wfOut( "\nIt appears that you need to update the user passwords in your\n" . |
283 | | - "database. If you have already done this (if you've run this update\n" . |
284 | | - "script once before, for example), doing so again will make all your\n" . |
285 | | - "user accounts inaccessible, so be sure you only do this once.\n" . |
286 | | - "Update user passwords? (yes/no)" ); |
287 | | - |
288 | | - $resp = readconsole(); |
289 | | - if ( ! ( "Y" == $resp{0} || "y" == $resp{0} ) ) { return; } |
290 | | - |
291 | | - $sql = "SELECT user_id,user_password FROM user"; |
292 | | - $source = $wgDatabase->query( $sql, $fname ); |
293 | | - |
294 | | - while ( $row = $wgDatabase->fetchObject( $source ) ) { |
295 | | - $id = $row->user_id; |
296 | | - $oldpass = $row->user_password; |
297 | | - $newpass = md5( "{$id}-{$oldpass}" ); |
298 | | - |
299 | | - $sql = "UPDATE user SET user_password='{$newpass}' " . |
300 | | - "WHERE user_id={$id}"; |
301 | | - $wgDatabase->query( $sql, $fname ); |
302 | | - } |
303 | | -} |
304 | | - |
305 | 269 | function do_interwiki_update() { |
306 | 270 | # Check that interwiki table exists; if it doesn't source it |
307 | 271 | global $wgDatabase, $IP; |
— | — | @@ -1263,29 +1227,6 @@ |
1264 | 1228 | populate_rev_parent_id( $wgDatabase ); |
1265 | 1229 | } |
1266 | 1230 | |
1267 | | -function update_password_format() { |
1268 | | - if ( update_row_exists( 'password format' ) ) { |
1269 | | - wfOut( "...password hash format already changed\n" ); |
1270 | | - return; |
1271 | | - } |
1272 | | - |
1273 | | - wfOut( "Updating password hash format..." ); |
1274 | | - |
1275 | | - global $wgDatabase, $wgPasswordSalt; |
1276 | | - $user = $wgDatabase->tableName( 'user' ); |
1277 | | - if ( $wgPasswordSalt ) { |
1278 | | - $sql = "UPDATE $user SET user_password=CONCAT(':B:', user_id, ':', user_password) " . |
1279 | | - "WHERE user_password NOT LIKE ':%'"; |
1280 | | - } else { |
1281 | | - $sql = "UPDATE $user SET user_password=CONCAT(':A:', user_password) " . |
1282 | | - "WHERE user_password NOT LIKE ':%'"; |
1283 | | - } |
1284 | | - $wgDatabase->query( $sql, __METHOD__ ); |
1285 | | - $wgDatabase->insert( 'updatelog', array( 'ul_key' => 'password format' ), __METHOD__ ); |
1286 | | - |
1287 | | - wfOut( "done\n" ); |
1288 | | -} |
1289 | | - |
1290 | 1231 | function sqlite_initial_indexes() { |
1291 | 1232 | global $wgDatabase; |
1292 | 1233 | if ( update_row_exists( 'initial_indexes' ) ) { |