Update namespaces for Luri (lrc) from translatewiki.net
[lhc/web/wiklou.git] / includes / MediaWiki.php
index c21f5e9..c086a39 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 {
        /**
@@ -201,8 +199,6 @@ class MediaWiki {
                        throw new PermissionsError( 'read', $permErrors );
                }
 
-               $pageView = false; // was an article or special page viewed?
-
                // Interwiki redirects
                if ( $title->isExternal() ) {
                        $rdfrom = $request->getVal( 'rdfrom' );
@@ -265,7 +261,6 @@ class MediaWiki {
                        }
                // Special pages
                } elseif ( NS_SPECIAL == $title->getNamespace() ) {
-                       $pageView = true;
                        // Actions that need to be made when we have a special pages
                        SpecialPageFactory::executePath( $title, $this->context );
                } else {
@@ -273,7 +268,6 @@ class MediaWiki {
                        // may be a redirect to another article or URL.
                        $article = $this->initializeArticle();
                        if ( is_object( $article ) ) {
-                               $pageView = true;
                                $this->performAction( $article, $requestTitle );
                        } elseif ( is_string( $article ) ) {
                                $output->redirect( $article );
@@ -282,12 +276,6 @@ class MediaWiki {
                                        . " returned neither an object nor a URL" );
                        }
                }
-
-               if ( $pageView ) {
-                       // Promote user to any groups they meet the criteria for
-                       $user->addAutopromoteOnceGroups( 'onView' );
-               }
-
        }
 
        /**
@@ -489,14 +477,16 @@ 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__ );
                }