diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 20:21:25 +0000 |
commit | d81f562b712f2387fa02290bf2ca86392ab356f2 (patch) | |
tree | d666cdefbe6ac320827a2c6cb473581b46e22c4c /includes/Wiki.php | |
parent | 183851b06bd6c52f3cae5375f433da720d410447 (diff) |
Aktualisierung auf Version 1.8.1
Diffstat (limited to 'includes/Wiki.php')
-rw-r--r-- | includes/Wiki.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/includes/Wiki.php b/includes/Wiki.php index 6f010003..401756be 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -170,6 +170,12 @@ class MediaWiki { * @return Article */ function articleFromTitle( $title ) { + $article = null; + wfRunHooks('ArticleFromTitle', array( &$title, &$article ) ); + if ( $article ) { + return $article; + } + if( NS_MEDIA == $title->getNamespace() ) { // FIXME: where should this go? $title = Title::makeTitle( NS_IMAGE, $title->getDBkey() ); @@ -258,8 +264,14 @@ class MediaWiki { */ function doUpdates ( &$updates ) { wfProfileIn( 'MediaWiki::doUpdates' ); + $dbw =& wfGetDB( DB_MASTER ); foreach( $updates as $up ) { $up->doUpdate(); + + # Commit after every update to prevent lock contention + if ( $dbw->trxLevel() ) { + $dbw->commit(); + } } wfProfileOut( 'MediaWiki::doUpdates' ); } @@ -270,7 +282,7 @@ class MediaWiki { function doJobs() { global $wgJobRunRate; - if ( $wgJobRunRate <= 0 ) { + if ( $wgJobRunRate <= 0 || wfReadOnly() ) { return; } if ( $wgJobRunRate < 1 ) { @@ -302,8 +314,7 @@ class MediaWiki { * Ends this task peacefully */ function restInPeace ( &$loadBalancer ) { - wfProfileClose(); - logProfilingData(); + wfLogProfilingData(); $loadBalancer->closeAll(); wfDebug( "Request ended normally\n" ); } |