From: Thiemo Mättig Date: Mon, 27 Oct 2014 14:35:41 +0000 (+0100) Subject: Remove meaningless default action name X-Git-Tag: 1.31.0-rc.0~12859^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=a9cd3f449ed642251ec7aa92e2fffef575b5ce62;p=lhc%2Fweb%2Fwiklou.git Remove meaningless default action name Before: Get the value of the action=... parameter. If it's undefined return 'view'. Check if 'view' equals 'ajax'. After: Get the value of the action=... parameter. If it's undefined return null. Check if null equals 'ajax'. Same for both places. The default value 'view' is never used. Change-Id: I56656218cfb895bffe886919c67ebf3b79d91515 --- diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 9585c5f589..ed77edf5e4 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -59,7 +59,7 @@ class MediaWiki { $request = $this->context->getRequest(); $curid = $request->getInt( 'curid' ); $title = $request->getVal( 'title' ); - $action = $request->getVal( 'action', 'view' ); + $action = $request->getVal( 'action' ); if ( $request->getCheck( 'search' ) ) { // Compatibility with old search URLs which didn't use Special:Search @@ -489,8 +489,7 @@ class MediaWiki { $request = $this->context->getRequest(); // Send Ajax requests to the Ajax dispatcher. - if ( $this->config->get( 'UseAjax' ) && $request->getVal( 'action', 'view' ) == 'ajax' ) { - + if ( $this->config->get( 'UseAjax' ) && $request->getVal( 'action' ) === 'ajax' ) { // Set a dummy title, because $wgTitle == null might break things $title = Title::makeTitle( NS_MAIN, 'AJAX' ); $this->context->setTitle( $title );