Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2860,9 +2860,10 @@ |
2861 | 2861 | /** |
2862 | 2862 | * Do any deferred updates and clear the list |
2863 | 2863 | * |
2864 | | - * @param $commit Boolean: commit after every update to prevent lock contention |
| 2864 | + * @param $commit String: set to 'commit' to commit after every update to |
| 2865 | + * prevent lock contention |
2865 | 2866 | */ |
2866 | | -function wfDoUpdates( $commit = false ) { |
| 2867 | +function wfDoUpdates( $commit = '' ) { |
2867 | 2868 | global $wgDeferredUpdateList; |
2868 | 2869 | |
2869 | 2870 | wfProfileIn( __METHOD__ ); |
— | — | @@ -2873,14 +2874,15 @@ |
2874 | 2875 | return; |
2875 | 2876 | } |
2876 | 2877 | |
2877 | | - if ( $commit ) { |
| 2878 | + $doCommit = $commit == 'commit'; |
| 2879 | + if ( $doCommit ) { |
2878 | 2880 | $dbw = wfGetDB( DB_MASTER ); |
2879 | 2881 | } |
2880 | 2882 | |
2881 | 2883 | foreach ( $wgDeferredUpdateList as $update ) { |
2882 | 2884 | $update->doUpdate(); |
2883 | 2885 | |
2884 | | - if ( $commit && $dbw->trxLevel() ) { |
| 2886 | + if ( $doCommit && $dbw->trxLevel() ) { |
2885 | 2887 | $dbw->commit(); |
2886 | 2888 | } |
2887 | 2889 | } |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -371,7 +371,7 @@ |
372 | 372 | // Output everything! |
373 | 373 | $output->output(); |
374 | 374 | // Do any deferred jobs |
375 | | - wfDoUpdates( true ); |
| 375 | + wfDoUpdates( 'commit' ); |
376 | 376 | // Close the session so that jobs don't access the current session |
377 | 377 | session_write_close(); |
378 | 378 | $this->doJobs(); |