MDL-48766 lib: Import MaxMind GeoIP2 PHP API
[moodle.git] / admin / settings / location.php
CommitLineData
11b749ca 1<?php
1ea1bcb3 2
a559f630 3if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
4
220a90c5 5 // "locations" settingpage
e106013f 6 $temp = new admin_settingpage('locationsettings', new lang_string('locationsettings', 'admin'));
91bafd76
PS
7 $temp->add(new admin_setting_servertimezone());
8 $temp->add(new admin_setting_forcetimezone());
e106013f
SH
9 $temp->add(new admin_settings_country_select('country', new lang_string('country', 'admin'), new lang_string('configcountry', 'admin'), 0));
10 $temp->add(new admin_setting_configtext('defaultcity', new lang_string('defaultcity', 'admin'), new lang_string('defaultcity_help', 'admin'), ''));
220a90c5 11
e106013f
SH
12 $temp->add(new admin_setting_heading('iplookup', new lang_string('iplookup', 'admin'), new lang_string('iplookupinfo', 'admin')));
13 $temp->add(new admin_setting_configfile('geoipfile', new lang_string('geoipfile', 'admin'), new lang_string('configgeoipfile', 'admin', $CFG->dataroot.'/geoip/'), $CFG->dataroot.'/geoip/GeoLiteCity.dat'));
cec7d435 14 $temp->add(new admin_setting_configtext('googlemapkey3', new lang_string('googlemapkey3', 'admin'), new lang_string('googlemapkey3_help', 'admin'), '', PARAM_RAW, 60));
33b17c67 15
e106013f 16 $temp->add(new admin_setting_configtext('allcountrycodes', new lang_string('allcountrycodes', 'admin'), new lang_string('configallcountrycodes', 'admin'), '', '/^(?:\w+(?:,\w+)*)?$/'));
1ea1bcb3 17
7409013e 18 $ADMIN->add('location', $temp);
1ea1bcb3 19
a559f630 20} // end of speedup