]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-14129, fix netgeo print_error"
authordongsheng <dongsheng>
Wed, 14 May 2008 08:27:16 +0000 (08:27 +0000)
committerdongsheng <dongsheng>
Wed, 14 May 2008 08:27:16 +0000 (08:27 +0000)
iplookup/index.php
lang/en_utf8/error.php

index f174dbdbe4b802ec1b2b096aaa333867faa57727..6fd6d86c6470d378c405dcd2c25fb2b9b9a74599 100644 (file)
@@ -85,7 +85,7 @@ if (!empty($CFG->geoipfile) and file_exists($CFG->geoipfile)) {
 } else {
     $ipdata = download_file_content('http://netgeo.caida.org/perl/netgeo.cgi?target='.$ip);
     if ($ipdata === false) {
-        print_error('Can not connect to NetGeo server at http://netgeo.caida.org, please check proxy settings or better install MaxMind GeoLite City data file.');
+        print_error('cannotnetgeo');
     }
     $matches = null;
     if (!preg_match('/LAT:\s*(-?\d+\.\d+)/s', $ipdata, $matches)) {
index d8724a18a2e107655949880b73f59443cc235b6b..80e6518fdebdcf1a4869d00cddfaecb31f2bce27 100644 (file)
@@ -46,6 +46,7 @@ $string['cannotfindhelp'] = 'Cannot find \"$a\" language help files';
 $string['cannotfindlang'] = 'Cannot find \"$a\" language pack!';
 $string['cannotfindsite'] = 'Cannot find site-level course';
 $string['cannotimportgrade'] = 'Grade import error';
+$string['cannotnetgeo'] = 'Can not connect to NetGeo server at http://netgeo.caida.org, please check proxy settings or better install MaxMind GeoLite City data file.';
 $string['cannotgradeuser'] = 'Can not grade this user';
 $string['cannotmapfield'] = 'mapping collision detected, 2 fields maps to the same grade item $a';
 $string['cannotmarktopic'] = 'Could not mark that topic for this course';