Merge "Add framework for file warnings"
[lhc/web/wiklou.git] / includes / MediaWiki.php
index 2a0a405..2644023 100644 (file)
@@ -22,8 +22,6 @@
 
 /**
  * The MediaWiki class is the helper class for the index.php entry point.
- *
- * @internal documentation reviewed 15 Mar 2010
  */
 class MediaWiki {
        /**
@@ -489,14 +487,17 @@ class MediaWiki {
                $action = $this->getAction();
                $wgTitle = $title;
 
+               $trxProfiler = Profiler::instance()->getTransactionProfiler();
+
                // Aside from rollback, master queries should not happen on GET requests.
                // Periodic or "in passing" updates on GET should use the job queue.
                if ( !$request->wasPosted()
                        && in_array( $action, array( 'view', 'edit', 'history' ) )
                ) {
-                       $trxProfiler = Profiler::instance()->getTransactionProfiler();
                        $trxProfiler->setExpectation( 'masterConns', 0, __METHOD__ );
                        $trxProfiler->setExpectation( 'writes', 0, __METHOD__ );
+               } else {
+                       $trxProfiler->setExpectation( 'maxAffected', 500, __METHOD__ );
                }
 
                // If the user has forceHTTPS set to true, or if the user