Wrong dir ... deleting .. om nom nom
authorTomasz Finc <tomasz@users.mediawiki.org>
Fri, 6 Nov 2009 14:19:54 +0000 (14:19 +0000)
committerTomasz Finc <tomasz@users.mediawiki.org>
Fri, 6 Nov 2009 14:19:54 +0000 (14:19 +0000)
extensions/GeoLite/GeoLite.i18n.php [deleted file]
extensions/GeoLite/GeoLite.php [deleted file]
extensions/GeoLite/GeoLite_body.php [deleted file]

diff --git a/extensions/GeoLite/GeoLite.i18n.php b/extensions/GeoLite/GeoLite.i18n.php
deleted file mode 100644 (file)
index 635892a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * Internationalisation for GeoLite extension
- *
- * @file
- * @ingroup Extensions
- */
-
-$messages = array();
-
-/** English
- * @author Tomasz Finc
- */
-$messages['en'] = array(
-       'geolite-desc' => 'Lightweight GeoIp Redirection',
-        'geolite' => 'GeoLite',
-); 
diff --git a/extensions/GeoLite/GeoLite.php b/extensions/GeoLite/GeoLite.php
deleted file mode 100644 (file)
index a36649a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-# Alert the user that this is not a valid entry point to MediaWiki if they try to access the special pages file directly.
-if ( !defined( 'MEDIAWIKI' ) ) {
-        echo <<<EOT
-To install my extension, put the following line in LocalSettings.php:
-require_once( "\$IP/extensions/ContributionReporting/ContributionReporting.php" );
-EOT;
-        exit( 1 );
-}
-
-$wgLandingPageBase = 'http://wikimediafoundation.org/wiki/Support_Wikipedia';
-
-$wgKnownLandingPages = array( 'US' => 'en',
-                             'DE' => '',
-                             'PL' => ''
-                      ); # Which Chapters actually have landing pages
-
-$wgExtensionCredits['specialpage'][] = array(
-        'path' => __FILE__,
-        'name' => 'GeoLite',
-        'url' => 'http://www.mediawiki.org/wiki/Extension:GeoLite',
-        'author' => array( 'Tomasz Finc' ),
-        'descriptionmsg' => 'geolite-desc',
-);
-
-$dir = dirname( __FILE__ ) . '/';
-
-$wgAutoloadClasses['SpecialGeoLite'] = $dir . 'GeoLite_body.php';
-$wgExtensionMessagesFiles['GeoLite'] = $dir . 'GeoLite.i18n.php';
-$wgSpecialPages['GeoLite'] = 'SpecialGeoLite';
-$wgSpecialPageGroups['GeoLite'] = 'contribution';
-
-?>
diff --git a/extensions/GeoLite/GeoLite_body.php b/extensions/GeoLite/GeoLite_body.php
deleted file mode 100644 (file)
index d28ff39..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php 
-/**
- * Special Page for GeoLite
- *
- * @file
- * @ingroup Extensions
- */
-
-// Special page GeoLite
-
-class SpecialGeoLite extends SpecialPage {
-
-        /* Functions */
-
-        public function __construct() {
-                // Initialize special page
-                parent::__construct( 'GeoLite' );
-        }
-
-       public function execute( $sub ) {
-               global $wgOut, $wgRequest, $wgLandingPageBase, $wgKnownLandingPages;
-
-               $lang = ( $wgRequest->getVal( 'lang' ) ) ? $wgRequest->getVal( 'lang' ) : 'en' ;
-               $utm_source = $wgRequest->getVal( 'utm_source' );
-               $utm_medium = $wgRequest->getVal( 'utm_medium' );
-               $utm_campaign = $wgRequest->getVal( 'utm_camapaign' );
-
-               $tracking = '?' . "utm_source=$utm_source" . "&utm_medium=$utm_medium" . "&utm_campaign=$utm_campaign";
-               
-               if ( $wgRequest->getVal( 'ip') ) {
-                  $ip = $wgRequest->getVal( 'ip' ); 
-               } else { 
-                  $ip = $_SERVER[ 'REMOTE_ADDR' ];
-               }
-               
-               if ( IP::isValid( $ip ) ) {
-                  $country = geoip_country_code_by_name( $ip );
-               
-                   if ( is_string ( $country ) && array_key_exists( $country, $wgKnownLandingPages ) ) {
-                         $wgOut->redirect( $wgLandingPageBase . "/" . $wgKnownLandingPages[ $country ] . $tracking );
-                  }
-               }
-               $wgOut->redirect( $wgLandingPageBase . "/" . $lang . $tracking );
-       }
-
-}