X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=maintenance%2FremoveUnusedAccounts.php;h=26be1309fbcf29a4ed6432dc4a524b4690838a2c;hb=b0a40330173be4ea5bc03151e729f4c89ebcb9ea;hp=3cf46ee6cc24c30d4026cb4112b34dad5d0a282f;hpb=c771fc9c96aacb44b86ade5ecca68334c5d8213f;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/removeUnusedAccounts.php b/maintenance/removeUnusedAccounts.php index 3cf46ee6cc..26be1309fb 100644 --- a/maintenance/removeUnusedAccounts.php +++ b/maintenance/removeUnusedAccounts.php @@ -26,7 +26,7 @@ if( isset( $options['help'] ) ) { # Do an initial scan for inactive accounts and report the result echo( "Checking for unused user accounts...\n" ); $del = array(); -$dbr =& wfGetDB( DB_SLAVE ); +$dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'user', array( 'user_id', 'user_name' ), '', $fname ); while( $row = $dbr->fetchObject( $res ) ) { # Check the account, but ignore it if it's the primary administrator @@ -42,7 +42,7 @@ echo( "...found {$count}.\n" ); # If required, go back and delete each marked account if( $count > 0 && isset( $options['delete'] ) ) { echo( "\nDeleting inactive accounts..." ); - $dbw =& wfGetDB( DB_MASTER ); + $dbw = wfGetDB( DB_MASTER ); $dbw->delete( 'user', array( 'user_id' => $del ), $fname ); echo( "done.\n" ); # Update the site_stats.ss_users field @@ -54,4 +54,4 @@ if( $count > 0 && isset( $options['delete'] ) ) { } echo( "\n" ); -?> +