https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106377
Revision: 106377
Author: awjrichards
Date: 2011-12-15 21:34:49 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
MFT r106136, r106159, r106160
Modified Paths:
--------------
branches/wmf/1.18wmf1/extensions/LandingCheck/LandingCheck.php
branches/wmf/1.18wmf1/extensions/LandingCheck/SpecialLandingCheck.php
Property Changed:
----------------
branches/wmf/1.18wmf1/extensions/LandingCheck/
branches/wmf/1.18wmf1/extensions/LandingCheck/LandingCheck.php
branches/wmf/1.18wmf1/extensions/LandingCheck/SpecialLandingCheck.php
Property changes on: branches/wmf/1.18wmf1/extensions/LandingCheck
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/wmf/1.16wmf4/extensions/LandingCheck:67177,69199,76243,77266
/branches/wmf-deployment/extensions/LandingCheck:60970
/trunk/extensions/LandingCheck:76551,77519-77521,77622-78860
/trunk/phase3/extensions/LandingCheck:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,70559,71970,75332,75481,77555,77558-77560,77563-77565,77573
+ /branches/wmf/1.16wmf4/extensions/LandingCheck:67177,69199,76243,77266
/branches/wmf-deployment/extensions/LandingCheck:60970
/trunk/extensions/LandingCheck:76551,77519-77521,77622-78860,106136,106159-106160
/trunk/phase3/extensions/LandingCheck:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,70559,71970,75332,75481,77555,77558-77560,77563-77565,77573
Modified: branches/wmf/1.18wmf1/extensions/LandingCheck/LandingCheck.php
===================================================================
--- branches/wmf/1.18wmf1/extensions/LandingCheck/LandingCheck.php
2011-12-15 21:32:57 UTC (rev 106376)
+++ branches/wmf/1.18wmf1/extensions/LandingCheck/LandingCheck.php
2011-12-15 21:34:49 UTC (rev 106377)
@@ -14,7 +14,7 @@
'path' => __FILE__,
'name' => 'LandingCheck',
'version' => '2.0',
- 'url' => 'http://www.mediawiki.org/wiki/Extension:LandingCheck',
+ 'url' => 'https://www.mediawiki.org/wiki/Extension:LandingCheck',
'author' => array( 'Ryan Kaldari', 'Arthur Richards' ),
'descriptionmsg' => 'landingcheck-desc',
);
Property changes on:
branches/wmf/1.18wmf1/extensions/LandingCheck/LandingCheck.php
___________________________________________________________________
Modified: svn:mergeinfo
-
/branches/wmf/1.16wmf4/extensions/LandingCheck/LandingCheck.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/LandingCheck/LandingCheck.php:60970
/trunk/extensions/LandingCheck/LandingCheck.php:76551,77519-77521,77622-78860,101335-101514
/trunk/phase3/extensions/LandingCheck/LandingCheck.php:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,70559,71970,75332,75481,77555,77558-77560,77563-77565,77573
+
/branches/wmf/1.16wmf4/extensions/LandingCheck/LandingCheck.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/LandingCheck/LandingCheck.php:60970
/trunk/extensions/LandingCheck/LandingCheck.php:76551,77519-77521,77622-78860,101335-101514,106136,106159-106160
/trunk/phase3/extensions/LandingCheck/LandingCheck.php:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,70559,71970,75332,75481,77555,77558-77560,77563-77565,77573
Modified: branches/wmf/1.18wmf1/extensions/LandingCheck/SpecialLandingCheck.php
===================================================================
--- branches/wmf/1.18wmf1/extensions/LandingCheck/SpecialLandingCheck.php
2011-12-15 21:32:57 UTC (rev 106376)
+++ branches/wmf/1.18wmf1/extensions/LandingCheck/SpecialLandingCheck.php
2011-12-15 21:34:49 UTC (rev 106377)
@@ -11,6 +11,13 @@
*/
class SpecialLandingCheck extends SpecialPage {
protected $localServerType = null;
+ /**
+ * If basic is set to true, do a local redirect, ignore priority, and
don't pass tracking
+ * params. This is for non-fundraising links that just need
localization.
+ *
+ * @var boolean
+ */
+ protected $basic = false;
public function __construct() {
// Register special page
@@ -22,8 +29,9 @@
// Pull in query string parameters
$language = $wgRequest->getVal( 'language', 'en' );
+ $this->basic = $wgRequest->getBool( 'basic' );
+ $country = $wgRequest->getVal( 'country' );
- $country = $wgRequest->getVal( 'country' );
// If no country was passed, try to do GeoIP lookup
// Requires php5-geoip package
if ( !$country && function_exists( 'geoip_country_code_by_name'
) ) {
@@ -85,8 +93,11 @@
*/
public function routeRedirect( $country, $language, $priority ) {
$localServerType = $this->getLocalServerType();
-
- if ( $localServerType == 'local' ) {
+
+ if ( $this->basic ) {
+ $this->localRedirect( $country, $language, false );
+
+ } elseif ( $localServerType == 'local' ) {
$this->localRedirect( $country, $language, $priority );
} elseif ( $priority && $localServerType == 'priority' ) {
@@ -169,7 +180,11 @@
foreach ( $targetTexts as $targetText ) {
$target = Title::newFromText( $targetText );
if ( $target && $target->isKnown() &&
$target->getNamespace() == NS_MAIN ) {
- $wgOut->redirect( $target->getLocalURL(
$tracking ) );
+ if ( $this->basic ) {
+ $wgOut->redirect(
$target->getLocalURL() );
+ } else {
+ $wgOut->redirect( $target->getLocalURL(
$tracking ) );
+ }
return;
}
}
Property changes on:
branches/wmf/1.18wmf1/extensions/LandingCheck/SpecialLandingCheck.php
___________________________________________________________________
Modified: svn:mergeinfo
-
/branches/wmf/1.16wmf4/extensions/LandingCheck/SpecialLandingCheck.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/LandingCheck/SpecialLandingCheck.php:60970
/trunk/extensions/LandingCheck/SpecialLandingCheck.php:76551,77519-77521,77622-78860,78862-92646,92648-95541,100774-101514
/trunk/phase3/extensions/LandingCheck/SpecialLandingCheck.php:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,70559,71970,75332,75481,77555,77558-77560,77563-77565,77573
+
/branches/wmf/1.16wmf4/extensions/LandingCheck/SpecialLandingCheck.php:67177,69199,76243,77266
/branches/wmf-deployment/extensions/LandingCheck/SpecialLandingCheck.php:60970
/trunk/extensions/LandingCheck/SpecialLandingCheck.php:76551,77519-77521,77622-78860,78862-92646,92648-95541,100774-101514,106159-106160
/trunk/phase3/extensions/LandingCheck/SpecialLandingCheck.php:63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,70559,71970,75332,75481,77555,77558-77560,77563-77565,77573
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs