aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/maxmind/geoip/geoipv6.inc.php98
-rw-r--r--mirrorlist/index.php19
2 files changed, 57 insertions, 60 deletions
diff --git a/lib/maxmind/geoip/geoipv6.inc.php b/lib/maxmind/geoip/geoipv6.inc.php
index de3933d68..750cdd737 100644
--- a/lib/maxmind/geoip/geoipv6.inc.php
+++ b/lib/maxmind/geoip/geoipv6.inc.php
@@ -20,55 +20,55 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-define("GEOIP_COUNTRY_BEGIN", 16776960);
-define("GEOIP_STATE_BEGIN_REV0", 16700000);
-define("GEOIP_STATE_BEGIN_REV1", 16000000);
-define("GEOIP_STANDARD", 0);
-define("GEOIP_MEMORY_CACHE", 1);
-define("GEOIP_SHARED_MEMORY", 2);
-define("STRUCTURE_INFO_MAX_SIZE", 20);
-define("DATABASE_INFO_MAX_SIZE", 100);
-define("GEOIP_COUNTRY_EDITION", 106);
-define("GEOIP_PROXY_EDITION", 8);
-define("GEOIP_ASNUM_EDITION", 9);
-define("GEOIP_NETSPEED_EDITION", 10);
-define("GEOIP_REGION_EDITION_REV0", 112);
-define("GEOIP_REGION_EDITION_REV1", 3);
-define("GEOIP_CITY_EDITION_REV0", 111);
-define("GEOIP_CITY_EDITION_REV1", 2);
-define("GEOIP_ORG_EDITION", 110);
-define("GEOIP_ISP_EDITION", 4);
-define("SEGMENT_RECORD_LENGTH", 3);
-define("STANDARD_RECORD_LENGTH", 3);
-define("ORG_RECORD_LENGTH", 4);
-define("MAX_RECORD_LENGTH", 4);
-define("MAX_ORG_RECORD_LENGTH", 300);
-define("GEOIP_SHM_KEY", 0x4f415401);
-define("US_OFFSET", 1);
-define("CANADA_OFFSET", 677);
-define("WORLD_OFFSET", 1353);
-define("FIPS_RANGE", 360);
-define("GEOIP_UNKNOWN_SPEED", 0);
-define("GEOIP_DIALUP_SPEED", 1);
-define("GEOIP_CABLEDSL_SPEED", 2);
-define("GEOIP_CORPORATE_SPEED", 3);
-define("GEOIP_DOMAIN_EDITION", 11);
-define("GEOIP_COUNTRY_EDITION_V6", 12);
-define("GEOIP_LOCATIONA_EDITION", 13);
-define("GEOIP_ACCURACYRADIUS_EDITION", 14);
-define("GEOIP_CITYCOMBINED_EDITION", 15);
-define("GEOIP_CITY_EDITION_REV1_V6", 30);
-define("GEOIP_CITY_EDITION_REV0_V6",31);
-define("GEOIP_NETSPEED_EDITION_REV1",32);
-define("GEOIP_NETSPEED_EDITION_REV1_V6",33);
-define("GEOIP_USERTYPE_EDITION",28);
-define("GEOIP_USERTYPE_EDITION_V6",29);
-define("GEOIP_ASNUM_EDITION_V6",21);
-define("GEOIP_ISP_EDITION_V6",22);
-define("GEOIP_ORG_EDITION_V6",23);
-define("GEOIP_DOMAIN_EDITION_V6",24);
-
-define("CITYCOMBINED_FIXED_RECORD", 7 );
+if (!defined('GEOIP_COUNTRY_BEGIN')) define("GEOIP_COUNTRY_BEGIN", 16776960);
+if (!defined('GEOIP_STATE_BEGIN_REV0')) define("GEOIP_STATE_BEGIN_REV0", 16700000);
+if (!defined('GEOIP_STATE_BEGIN_REV1')) define("GEOIP_STATE_BEGIN_REV1", 16000000);
+if (!defined('GEOIP_STANDARD')) define("GEOIP_STANDARD", 0);
+if (!defined('GEOIP_MEMORY_CACHE')) define("GEOIP_MEMORY_CACHE", 1);
+if (!defined('GEOIP_SHARED_MEMORY')) define("GEOIP_SHARED_MEMORY", 2);
+if (!defined('STRUCTURE_INFO_MAX_SIZE')) define("STRUCTURE_INFO_MAX_SIZE", 20);
+if (!defined('DATABASE_INFO_MAX_SIZE')) define("DATABASE_INFO_MAX_SIZE", 100);
+if (!defined('GEOIP_COUNTRY_EDITION')) define("GEOIP_COUNTRY_EDITION", 106);
+if (!defined('GEOIP_PROXY_EDITION')) define("GEOIP_PROXY_EDITION", 8);
+if (!defined('GEOIP_ASNUM_EDITION')) define("GEOIP_ASNUM_EDITION", 9);
+if (!defined('GEOIP_NETSPEED_EDITION')) define("GEOIP_NETSPEED_EDITION", 10);
+if (!defined('GEOIP_REGION_EDITION_REV0')) define("GEOIP_REGION_EDITION_REV0", 112);
+if (!defined('GEOIP_REGION_EDITION_REV1')) define("GEOIP_REGION_EDITION_REV1", 3);
+if (!defined('GEOIP_CITY_EDITION_REV0')) define("GEOIP_CITY_EDITION_REV0", 111);
+if (!defined('GEOIP_CITY_EDITION_REV1')) define("GEOIP_CITY_EDITION_REV1", 2);
+if (!defined('GEOIP_ORG_EDITION')) define("GEOIP_ORG_EDITION", 110);
+if (!defined('GEOIP_ISP_EDITION')) define("GEOIP_ISP_EDITION", 4);
+if (!defined('SEGMENT_RECORD_LENGTH')) define("SEGMENT_RECORD_LENGTH", 3);
+if (!defined('STANDARD_RECORD_LENGTH')) define("STANDARD_RECORD_LENGTH", 3);
+if (!defined('ORG_RECORD_LENGTH')) define("ORG_RECORD_LENGTH", 4);
+if (!defined('MAX_RECORD_LENGTH')) define("MAX_RECORD_LENGTH", 4);
+if (!defined('MAX_ORG_RECORD_LENGTH')) define("MAX_ORG_RECORD_LENGTH", 300);
+if (!defined('GEOIP_SHM_KEY')) define("GEOIP_SHM_KEY", 0x4f415401);
+if (!defined('US_OFFSET')) define("US_OFFSET", 1);
+if (!defined('CANADA_OFFSET')) define("CANADA_OFFSET", 677);
+if (!defined('WORLD_OFFSET')) define("WORLD_OFFSET", 1353);
+if (!defined('FIPS_RANGE')) define("FIPS_RANGE", 360);
+if (!defined('GEOIP_UNKNOWN_SPEED')) define("GEOIP_UNKNOWN_SPEED", 0);
+if (!defined('GEOIP_DIALUP_SPEED')) define("GEOIP_DIALUP_SPEED", 1);
+if (!defined('GEOIP_CABLEDSL_SPEED')) define("GEOIP_CABLEDSL_SPEED", 2);
+if (!defined('GEOIP_CORPORATE_SPEED')) define("GEOIP_CORPORATE_SPEED", 3);
+if (!defined('GEOIP_DOMAIN_EDITION')) define("GEOIP_DOMAIN_EDITION", 11);
+if (!defined('GEOIP_COUNTRY_EDITION_V6')) define("GEOIP_COUNTRY_EDITION_V6", 12);
+if (!defined('GEOIP_LOCATIONA_EDITION')) define("GEOIP_LOCATIONA_EDITION", 13);
+if (!defined('GEOIP_ACCURACYRADIUS_EDITION')) define("GEOIP_ACCURACYRADIUS_EDITION", 14);
+if (!defined('GEOIP_CITYCOMBINED_EDITION')) define("GEOIP_CITYCOMBINED_EDITION", 15);
+if (!defined('GEOIP_CITY_EDITION_REV1_V6')) define("GEOIP_CITY_EDITION_REV1_V6", 30);
+if (!defined('GEOIP_CITY_EDITION_REV0_V6')) define("GEOIP_CITY_EDITION_REV0_V6",31);
+if (!defined('GEOIP_NETSPEED_EDITION_REV1')) define("GEOIP_NETSPEED_EDITION_REV1",32);
+if (!defined('GEOIP_NETSPEED_EDITION_REV1_V6')) define("GEOIP_NETSPEED_EDITION_REV1_V6",33);
+if (!defined('GEOIP_USERTYPE_EDITION')) define("GEOIP_USERTYPE_EDITION",28);
+if (!defined('GEOIP_USERTYPE_EDITION_V6')) define("GEOIP_USERTYPE_EDITION_V6",29);
+if (!defined('GEOIP_ASNUM_EDITION_V6')) define("GEOIP_ASNUM_EDITION_V6",21);
+if (!defined('GEOIP_ISP_EDITION_V6')) define("GEOIP_ISP_EDITION_V6",22);
+if (!defined('GEOIP_ORG_EDITION_V6')) define("GEOIP_ORG_EDITION_V6",23);
+if (!defined('GEOIP_DOMAIN_EDITION_V6')) define("GEOIP_DOMAIN_EDITION_V6",24);
+
+if (!defined('CITYCOMBINED_FIXED_RECORD')) define("CITYCOMBINED_FIXED_RECORD", 7 );
class GeoIP {
var $flags;
diff --git a/mirrorlist/index.php b/mirrorlist/index.php
index dd8e3269b..070e4d3cb 100644
--- a/mirrorlist/index.php
+++ b/mirrorlist/index.php
@@ -33,8 +33,6 @@ $repo = get('repo');
$debug = get('debug');
$source = get('source');
-$wsd = new Downloads();
-$dl = $wsd->prepare_download(true, null);
$arraycheck =array(
'release' => array('5', '6', 'cauldron'),
@@ -54,15 +52,14 @@ if ($source){
if ($release && $arch && $section && $repo){
- $oute = check($arraycheck);
- $out= str_replace('MIRROR', $dl['mirror_url'], $link);
- //print_r($out);
+ $out = check($arraycheck);
+ if (!$out){
+ $wsd = new Downloads();
+ $dl = $wsd->prepare_download(true, null);
+ $out= str_replace('MIRROR', $dl['mirror_url'], $link);
+ //print_r($out);
+ }
}else{
$out = "Invalid options";
}
-if ($oute){
- echo $oute;}
-else{
- echo $out;
-}
-
+echo $out;