X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMediaWiki.php;h=c086a39d1ed8160dac097061129b47b2cf09ffcb;hb=ba05f8ca5d895f45253f108815856f97460502c7;hp=669d8e945f2c558cc1b232aa15b14ac59da56e73;hpb=c928d9cfb7cd26965aefbd7640f010cf9da9f216;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 669d8e945f..c086a39d1e 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -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' ); - } - } /** @@ -393,7 +381,11 @@ class MediaWiki { if ( $action instanceof Action ) { # Let Squid cache things if we can purge them. if ( $this->config->get( 'UseSquid' ) && - in_array( $request->getFullRequestURL(), $requestTitle->getSquidURLs() ) + in_array( + // Use PROTO_INTERNAL because that's what getSquidURLs() uses + wfExpandUrl( $request->getRequestURL(), PROTO_INTERNAL ), + $requestTitle->getSquidURLs() + ) ) { $output->setSquidMaxage( $this->config->get( 'SquidMaxage' ) ); } @@ -485,14 +477,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