Commit 2c51bd53 authored by Dave Reid's avatar Dave Reid

by Dave Reid: Updated menu paths from admin/settinsg/xmlsitemap to admin/config/search/xmlsitemap.

parent dd188d54
......@@ -32,8 +32,8 @@ See http://drupal.org/getting-started/install-contrib for instructions on
how to install or update Drupal modules.
Once XML Sitemap is installed and enabled, you can adjust the settings for your
site's sitemap at admin/settings/xmlsitemap. Your can view your site's sitemap
at http://yoursite.com/sitemap.xml.
site's sitemap at admin/config/search/xmlsitemap. Your can view your site's
sitemap at http://yoursite.com/sitemap.xml.
It is highly recommended that you have clean URLs enabled for this module.
......
......@@ -194,7 +194,7 @@ function xmlsitemap_rebuild_form() {
drupal_set_message(t('Your sitemap is up to date and does not need to be rebuilt.'), 'error');
}
else {
$_REQUEST += array('destination' => 'admin/settings/xmlsitemap');
$_REQUEST += array('destination' => 'admin/config/search/xmlsitemap');
drupal_set_message(t('A rebuild is not necessary. If you are just wanting to regenerate the XML sitemap files, you can <a href="@link-cron">run cron manually</a>.', array('@link-cron' => url('admin/reports/status/run-cron', array('query' => drupal_get_destination())))), 'warning');
}
}
......@@ -220,7 +220,7 @@ function xmlsitemap_rebuild_form() {
return confirm_form(
$form,
t('Are you sure you want to rebuild the sitemap?'),
'admin/settings/xmlsitemap',
'admin/config/search/xmlsitemap',
'',
t('Rebuild sitemap'),
t('Cancel')
......@@ -240,7 +240,7 @@ function xmlsitemap_rebuild_form_submit($form, &$form_state) {
module_load_include('inc', 'xmlsitemap');
$batch = xmlsitemap_rebuild_batch($form_state['values']['modules'], $form_state['values']['save_custom']);
batch_set($batch);
$form_state['redirect'] = 'admin/settings/xmlsitemap';
$form_state['redirect'] = 'admin/config/search/xmlsitemap';
}
/**
......
......@@ -73,7 +73,7 @@ function xmlsitemap_requirements($phase) {
);
if (xmlsitemap_var('rebuild_needed')) {
$requirements['xmlsitemap_generated']['severity'] = REQUIREMENT_ERROR;
$requirements['xmlsitemap_generated']['description'] = $t('The XML sitemap data is out of sync and needs to be <a href="@link-rebuild">completely rebuilt<a>.', array('@link-rebuild' => url('admin/settings/xmlsitemap/rebuild')));
$requirements['xmlsitemap_generated']['description'] = $t('The XML sitemap data is out of sync and needs to be <a href="@link-rebuild">completely rebuilt<a>.', array('@link-rebuild' => url('admin/config/search/xmlsitemap/rebuild')));
}
elseif (xmlsitemap_var('regenerate_needed')) {
if ($generated_ago >= variable_get('cron_threshold_error', 1209600)) {
......
......@@ -43,9 +43,9 @@ function xmlsitemap_help($path, $arg) {
$sitemaps = xmlsitemap_get_sitemaps(TRUE);
$output .= format_plural(count($sitemaps), 'Your sitemap is located at: !sitemaps', 'Your sitemaps are located at: !sitemaps', array('!sitemaps' => theme('item_list', $sitemaps)));
break;
case 'admin/settings/xmlsitemap':
case 'admin/config/search/xmlsitemap':
break;
case 'admin/settings/xmlsitemap/rebuild':
case 'admin/config/search/xmlsitemap/rebuild':
$output .= '<p>' . t("This action rebuilds your site's XML sitemap and regenerates the cached files, and may be a lengthy process. If you just installed XML sitemap, this can be helpful to import all your site's content into the sitemap. Otherwise, this should only be used in emergencies.") . '</p>';
}
......@@ -77,7 +77,7 @@ function xmlsitemap_perm() {
* Implements hook_menu().
*/
function xmlsitemap_menu() {
$items['admin/settings/xmlsitemap'] = array(
$items['admin/config/search/xmlsitemap'] = array(
'title' => 'XML sitemap',
'description' => 'Configure the XML sitemap.',
'page callback' => 'drupal_get_form',
......@@ -85,14 +85,14 @@ function xmlsitemap_menu() {
'access arguments' => array('administer xmlsitemap'),
'file' => 'xmlsitemap.admin.inc',
);
$items['admin/settings/xmlsitemap/settings'] = array(
$items['admin/config/search/xmlsitemap/settings'] = array(
'title' => 'Settings',
'access arguments' => array('administer xmlsitemap'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'file' => 'xmlsitemap.admin.inc',
'weight' => -10,
);
$items['admin/settings/xmlsitemap/rebuild'] = array(
$items['admin/config/search/xmlsitemap/rebuild'] = array(
'title' => 'Rebuild',
'description' => 'Rebuild the site map.',
'page callback' => 'drupal_get_form',
......
......@@ -157,7 +157,7 @@ class XMLSitemapTestHelper extends DrupalWebTestCase {
}
protected function assertXMLSitemapProblems($problem_text = FALSE) {
$this->drupalGet('admin/settings/xmlsitemap');
$this->drupalGet('admin/config/search/xmlsitemap');
$this->assertText(t('One or more problems were detected with your sitemap configuration. Please check the status report for more information.'));
if ($problem_text) {
$this->clickLink(t('status report'));
......@@ -166,7 +166,7 @@ class XMLSitemapTestHelper extends DrupalWebTestCase {
}
protected function assertNoXMLSitemapProblems() {
$this->drupalGet('admin/settings/xmlsitemap');
$this->drupalGet('admin/config/search/xmlsitemap');
$this->assertNoText(t('One or more problems were detected with your sitemap configuration. Please check the status report for more information.'));
}
......@@ -628,7 +628,7 @@ class XMLSitemapFunctionalTest extends XMLSitemapTestHelper {
*/
function testMinimumLifetime() {
$edit = array('xmlsitemap_minimum_lifetime' => 300);
$this->drupalPost('admin/settings/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
xmlsitemap_save_link(array('type' => 'testing', 'id' => 1, 'loc' => 'lifetime-test'));
......@@ -656,19 +656,19 @@ class XMLSitemapFunctionalTest extends XMLSitemapTestHelper {
*/
function testBaseURL() {
$edit = array('xmlsitemap_base_url' => '');
$this->drupalPost('admin/settings/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->assertText(t('Base URL field is required.'));
$edit = array('xmlsitemap_base_url' => 'invalid');
$this->drupalPost('admin/settings/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->assertText(t('Invalid base URL.'));
$edit = array('xmlsitemap_base_url' => 'http://example.com/ ');
$this->drupalPost('admin/settings/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->assertText(t('Invalid base URL.'));
$edit = array('xmlsitemap_base_url' => 'http://example.com/');
$this->drupalPost('admin/settings/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
$this->regenerateSitemap();
......
......@@ -18,14 +18,14 @@ function xmlsitemap_custom_list_links() {
while ($link = db_fetch_object($query)) {
$rows[] = array(
l($link->loc, $link->loc),
l(t('Edit'), 'admin/settings/xmlsitemap/custom/edit/' . $link->id, array('query' => drupal_get_destination())),
l(t('Delete'), 'admin/settings/xmlsitemap/custom/delete/' . $link->id, array('query' => drupal_get_destination())),
l(t('Edit'), 'admin/config/search/xmlsitemap/custom/edit/' . $link->id, array('query' => drupal_get_destination())),
l(t('Delete'), 'admin/config/search/xmlsitemap/custom/delete/' . $link->id, array('query' => drupal_get_destination())),
);
}
$rows[] = array(
array(
'data' => l(t('Add custom link'), 'admin/settings/xmlsitemap/custom/add', array('query' => drupal_get_destination())),
'data' => l(t('Add custom link'), 'admin/config/search/xmlsitemap/custom/add', array('query' => drupal_get_destination())),
'colspan' => 3,
),
);
......@@ -92,10 +92,10 @@ function xmlsitemap_custom_edit_link_form($form_state, $link = array()) {
'#weight' => 10,
);
$form['cancel'] = array(
'#value' => l(t('Cancel'), 'admin/settings/xmlsitemap/custom'),
'#value' => l(t('Cancel'), 'admin/config/search/xmlsitemap/custom'),
'#weight' => 11,
);
$form['#redirect'] = 'admin/settings/xmlsitemap/custom';
$form['#redirect'] = 'admin/config/search/xmlsitemap/custom';
return $form;
}
......@@ -117,7 +117,7 @@ function xmlsitemap_custom_edit_link_form_validate(&$form, &$form_state) {
xmlsitemap_restore_user();
// Since the menu item access results are cached, manually check the current path.
if ($menu_item && strpos($link['loc'], 'admin/settings/xmlsitemap/custom') === 0 && !user_access('administer xmlsitemap', drupal_anonymous_user())) {
if ($menu_item && strpos($link['loc'], 'admin/config/search/xmlsitemap/custom') === 0 && !user_access('administer xmlsitemap', drupal_anonymous_user())) {
$menu_item['access'] = FALSE;
}
......@@ -146,7 +146,7 @@ function xmlsitemap_custom_delete_link_form($form_state, array $link) {
return confirm_form(
$form,
t('Are you sure you want to delete the custom link for %loc?', array('%loc' => $link['loc'])),
'admin/settings/xmlsitemap/custom',
'admin/config/search/xmlsitemap/custom',
t('This action cannot be undone.'),
t('Delete'),
t('Cancel')
......@@ -158,5 +158,5 @@ function xmlsitemap_custom_delete_link_form_submit($form, &$form_state) {
xmlsitemap_delete_link(array('type' => 'custom', 'id' => $link['id']));
drupal_set_message(t('The custom link for %loc has been deleted.', array('%loc' => $link['loc'])));
watchdog('xmlsitemap', 'The custom link for %loc has been deleted.', array('%loc' => $link['loc']), WATCHDOG_NOTICE);
$form_state['redirect'] = 'admin/settings/xmlsitemap/custom';
$form_state['redirect'] = 'admin/config/search/xmlsitemap/custom';
}
......@@ -5,21 +5,21 @@
* Implements hook_menu().
*/
function xmlsitemap_custom_menu() {
$items['admin/settings/xmlsitemap/custom'] = array(
$items['admin/config/search/xmlsitemap/custom'] = array(
'title' => 'Custom links',
'page callback' => 'xmlsitemap_custom_list_links',
'access arguments' => array('administer xmlsitemap'),
'type' => MENU_LOCAL_TASK,
'file' => 'xmlsitemap_custom.admin.inc',
);
$items['admin/settings/xmlsitemap/custom/list'] = array(
$items['admin/config/search/xmlsitemap/custom/list'] = array(
'title' => 'List',
'access arguments' => array('administer xmlsitemap'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
'file' => 'xmlsitemap_custom.admin.inc',
);
$items['admin/settings/xmlsitemap/custom/add'] = array(
$items['admin/config/search/xmlsitemap/custom/add'] = array(
'title' => 'Add custom link',
'page callback' => 'drupal_get_form',
'page arguments' => array('xmlsitemap_custom_edit_link_form'),
......@@ -27,7 +27,7 @@ function xmlsitemap_custom_menu() {
'type' => MENU_LOCAL_TASK,
'file' => 'xmlsitemap_custom.admin.inc',
);
$items['admin/settings/xmlsitemap/custom/edit/%xmlsitemap_custom'] = array(
$items['admin/config/search/xmlsitemap/custom/edit/%xmlsitemap_custom'] = array(
'title' => 'Edit custom link',
'page callback' => 'drupal_get_form',
'page arguments' => array('xmlsitemap_custom_edit_link_form', 5),
......@@ -35,7 +35,7 @@ function xmlsitemap_custom_menu() {
'type' => MENU_CALLBACK,
'file' => 'xmlsitemap_custom.admin.inc',
);
$items['admin/settings/xmlsitemap/custom/delete/%xmlsitemap_custom'] = array(
$items['admin/config/search/xmlsitemap/custom/delete/%xmlsitemap_custom'] = array(
'title' => 'Edit custom link',
'page callback' => 'drupal_get_form',
'page arguments' => array('xmlsitemap_custom_delete_link_form', 5),
......
......@@ -27,7 +27,7 @@ class XMLSitemapCustomFunctionalTest extends XMLSitemapTestHelper {
}
function testCustomLinks() {
$this->drupalGet('admin/settings/xmlsitemap/custom');
$this->drupalGet('admin/config/search/xmlsitemap/custom');
$this->clickLink(t('Add custom link'));
// Test an invalid path.
......@@ -44,7 +44,7 @@ class XMLSitemapCustomFunctionalTest extends XMLSitemapTestHelper {
// Test that the current page, which should not give a false positive for
// $menu_item['access'] since the result has been cached already.
$edit['loc'] = 'admin/settings/xmlsitemap/custom/add';
$edit['loc'] = 'admin/config/search/xmlsitemap/custom/add';
$this->drupalPost(NULL, $edit, t('Save'));
$this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', array('@link' => $edit['loc'])));
$this->assertNotInSitemap(array('type' => 'custom', 'loc' => $edit['loc']));
......@@ -62,25 +62,25 @@ class XMLSitemapCustomFunctionalTest extends XMLSitemapTestHelper {
function testCustomFileLinks() {
// Test an invalid file.
$edit['loc'] = $this->randomName();
$this->drupalPost('admin/settings/xmlsitemap/custom/add', $edit, t('Save'));
$this->drupalPost('admin/config/search/xmlsitemap/custom/add', $edit, t('Save'));
$this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', array('@link' => $edit['loc'])));
$this->assertNotInSitemap(array('type' => 'custom', 'loc' => $edit['loc']));
// Test an unaccessible file .
//$edit['loc'] = '.htaccess';
//$this->drupalPost('admin/settings/xmlsitemap/custom/add', $edit, t('Save'));
//$this->drupalPost('admin/config/search/xmlsitemap/custom/add', $edit, t('Save'));
//$this->assertText(t('The custom link @link is either invalid or it cannot be accessed by anonymous users.', array('@link' => $edit['loc'])));
//$this->assertNotInSitemap(array('type' => 'custom', 'loc' => $edit['loc']));
// Test a valid file.
$edit['loc'] = 'misc/drupal.js';
$this->drupalPost('admin/settings/xmlsitemap/custom/add', $edit, t('Save'));
$this->drupalPost('admin/config/search/xmlsitemap/custom/add', $edit, t('Save'));
$this->assertText('The custom link for ' . $edit['loc'] . ' was saved');
$this->assertInSitemap(array('type' => 'custom', 'loc' => $edit['loc']));
// Test a valid folder.
$edit['loc'] = 'misc';
$this->drupalPost('admin/settings/xmlsitemap/custom/add', $edit, t('Save'));
$this->drupalPost('admin/config/search/xmlsitemap/custom/add', $edit, t('Save'));
$this->assertText('The custom link for ' . $edit['loc'] . ' was saved');
$this->assertInSitemap(array('type' => 'custom', 'loc' => $edit['loc']));
}
......
......@@ -22,7 +22,7 @@ class XMLSitemapEnginesFunctionalTest extends XMLSitemapTestHelper {
function testPing() {
$edit = array('xmlsitemap_engines_engines[simpletest]' => TRUE);
$this->drupalPost('admin/settings/xmlsitemap/engines', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap/engines', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
xmlsitemap_engines_cron();
......@@ -32,12 +32,12 @@ class XMLSitemapEnginesFunctionalTest extends XMLSitemapTestHelper {
function testCustomURL() {
$edit = array('xmlsitemap_engines_custom_urls' => 'an-invalid-url');
$this->drupalPost('admin/settings/xmlsitemap/engines', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap/engines', $edit, t('Save configuration'));
$this->assertText(t('Invalid custom URL an-invalid-url.'));
$this->assertNoText(t('The configuration options have been saved.'));
$edit = array('xmlsitemap_engines_custom_urls' => url('ping', array('absolute' => TRUE)));
$this->drupalPost('admin/settings/xmlsitemap/engines', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap/engines', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
xmlsitemap_engines_cron();
......@@ -45,7 +45,7 @@ class XMLSitemapEnginesFunctionalTest extends XMLSitemapTestHelper {
$this->assertWatchdogMessage(array('type' => 'xmlsitemap', 'message' => 'No sitemap parameter provided.'));
$edit = array('xmlsitemap_engines_custom_urls' => url('ping', array('absolute' => TRUE, 'query' => '[sitemap]')));
$this->drupalPost('admin/settings/xmlsitemap/engines', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap/engines', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
......
......@@ -7,7 +7,7 @@
function xmlsitemap_engines_help($path, $arg) {
$output = '';
switch ($path) {
case 'admin/settings/xmlsitemap/engines':
case 'admin/config/search/xmlsitemap/engines':
if (!module_exists('site_verify')) {
$output .= t('In order to verify site ownership with the search engines listed below, it is highly recommended to download and install the <a href="@site-verify">Site verification module</a>.', array('@site-verify' => 'http://drupal.org/project/site_verify'));
}
......@@ -21,7 +21,7 @@ function xmlsitemap_engines_help($path, $arg) {
* Implements hook_menu().
*/
function xmlsitemap_engines_menu() {
$items['admin/settings/xmlsitemap/engines'] = array(
$items['admin/config/search/xmlsitemap/engines'] = array(
'title' => 'Search Engines',
'page callback' => 'drupal_get_form',
'page arguments' => array('xmlsitemap_engines_settings_form'),
......@@ -29,7 +29,7 @@ function xmlsitemap_engines_menu() {
'type' => MENU_LOCAL_TASK,
'file' => 'xmlsitemap_engines.admin.inc',
);
//$items['admin/settings/xmlsitemap/engines/submit'] = array(
//$items['admin/config/search/xmlsitemap/engines/submit'] = array(
// 'page callback' => 'xmlsitemap_engines_submit',
// 'access callback' => 'xmlsitemap_engines_submit_access',
// 'type' => MENU_CALLBACK,
......@@ -55,7 +55,7 @@ function xmlsitemap_engines_submit_access() {
}
// Allow manual submissions to run.
//if ($_GET['q'] == 'admin/settings/xmlsitemap/engines/submit' && user_access('administer xmlsitemap')) {
//if ($_GET['q'] == 'admin/config/search/xmlsitemap/engines/submit' && user_access('administer xmlsitemap')) {
// return TRUE;
//}
......
......@@ -150,7 +150,7 @@ class XMLSitemapNodeFunctionalTest extends XMLSitemapNodeTestHelper {
$this->drupalLogin($this->admin_user);
$limit = 5;
$this->drupalPost('admin/settings/xmlsitemap', array('xmlsitemap_batch_limit' => $limit), t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap', array('xmlsitemap_batch_limit' => $limit), t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
$nodes = array();
......
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