Commit 83e03cf9 authored by lyricnz's avatar lyricnz
Browse files

Move Geonames config to admin/config/search/geonames

parent 545ba3a9
The Geonames module is a programmatic interface to the web-services provided
by Geonames.org. The configuration for the module is available at
admin/config/geonames where you can configure the username used to access
admin/config/search/geonames where you can configure the username used to access
the services (this is required), as well as whether to enable results
caching.
......
......@@ -59,7 +59,7 @@ function geonames_admin_settings() {
'#type' => 'markup',
'#markup' => t('There are currently %num items in the cache. [!clearlink]', array(
'%num' => db_query("SELECT COUNT(*) FROM {cache_geonames}")->fetchField(),
'!clearlink' => l(t('Clear cache'), 'admin/config/geonames/clear_cache'),
'!clearlink' => l(t('Clear cache'), 'admin/config/search/geonames/clear_cache'),
)),
);
$form['cache']['geonames_cache'] = array(
......@@ -172,7 +172,7 @@ function geonames_cache_clear($adminpage = TRUE) {
cache_clear_all(NULL, 'cache_geonames');
if ($adminpage) {
drupal_set_message(t('Cache cleared.'));
drupal_goto('admin/config/geonames');
drupal_goto('admin/config/search/geonames');
}
}
......@@ -184,6 +184,6 @@ function geonames_credits_reset($adminpage = TRUE) {
variable_set('geonames_commercial_credits_since', REQUEST_TIME);
if ($adminpage) {
drupal_set_message(t('Credits and time reset.'));
drupal_goto('admin/config/geonames');
drupal_goto('admin/config/search/geonames');
}
}
......@@ -14,4 +14,4 @@ files[] = geonames_config.inc
files[] = tests/geonames.test
files[] = tests/geonames.all.test
configure = admin/config/geonames
configure = admin/config/search/geonames
......@@ -238,7 +238,7 @@ function geonames_requirements($phase) {
'value' => $t('!updated (!numcountries countries and !numfeaturecodes feature codes)', $values),
);
if ($updated == 0 || $values['!numcountries'] == 0 || $values['!numfeaturecodes'] == 0) {
$requirements['geonames_metadata']['description'] = $t('Metadata is incomplete. Please check the !link to manually refresh.', array('!link' => l('geonames settings', 'admin/config/geonames')));
$requirements['geonames_metadata']['description'] = $t('Metadata is incomplete. Please check the !link to manually refresh.', array('!link' => l('geonames settings', 'admin/config/search/geonames')));
$requirements['geonames_metadata']['severity'] = REQUIREMENT_WARNING;
}
}
......@@ -272,7 +272,7 @@ function geonames_update_7001() {
$server = $commercial_active ? variable_get('geonames_commercial_server', '') : GEONAMES_FREE_SERVER_URL;
$username = variable_get('geonames_commercial_username', '');
if ($username === '') {
$link = l('GeoNames settings', 'admin/config/geonames');
$link = l('GeoNames settings', 'admin/config/search/geonames');
drupal_set_message('Geonames server username is not set. Please configure this at '. $link, 'warning');
}
......
......@@ -770,7 +770,8 @@ function geonames_credits_pay($service) {
* Implements hook_menu().
*/
function geonames_menu() {
$items['admin/config/geonames'] = array(
$items = array();
$items['admin/config/search/geonames'] = array(
'type' => MENU_NORMAL_ITEM,
'title' => 'GeoNames',
'access arguments' => array('administer site configuration'),
......@@ -779,14 +780,14 @@ function geonames_menu() {
'description' => 'GeoNames Configuration.',
'file' => 'geonames.admin.inc',
);
$items['admin/config/geonames/clear_cache'] = array(
$items['admin/config/search/geonames/clear_cache'] = array(
'type' => MENU_CALLBACK,
'access arguments' => array('administer site configuration'),
'page callback' => 'geonames_cache_clear',
'page arguments' => array(TRUE),
'file' => 'geonames.admin.inc',
);
$items['admin/config/geonames/reset_credits'] = array(
$items['admin/config/search/geonames/reset_credits'] = array(
'type' => MENU_CALLBACK,
'access arguments' => array('administer site configuration'),
'page callback' => 'geonames_credits_reset',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment