diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-07-20 18:51:36 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-07-20 18:51:36 +0000 |
commit | d24d954479320116bc01f332c28a8eaab28c3ccd (patch) | |
tree | 1c791703bde5429b500e91cabb5845a80e13aff3 /modules/contact | |
parent | 999d76e7aa9d9fb1b79b0be171e18e705d9ab7ff (diff) | |
download | brdo-d24d954479320116bc01f332c28a8eaab28c3ccd.tar.gz brdo-d24d954479320116bc01f332c28a8eaab28c3ccd.tar.bz2 |
- Patch #521474 by bangpound, JuliaKM et al: rename admin/site-building to admin/structure.
Diffstat (limited to 'modules/contact')
-rw-r--r-- | modules/contact/contact.admin.inc | 16 | ||||
-rw-r--r-- | modules/contact/contact.module | 14 | ||||
-rw-r--r-- | modules/contact/contact.pages.inc | 2 | ||||
-rw-r--r-- | modules/contact/contact.test | 6 |
4 files changed, 19 insertions, 19 deletions
diff --git a/modules/contact/contact.admin.inc b/modules/contact/contact.admin.inc index 08aba8829..0218a5b48 100644 --- a/modules/contact/contact.admin.inc +++ b/modules/contact/contact.admin.inc @@ -23,14 +23,14 @@ function contact_admin_categories() { $record->category, $record->recipients, ($record->selected ? t('Yes') : t('No')), - l(t('edit'), 'admin/build/contact/edit/' . $record->cid), - l(t('delete'), 'admin/build/contact/delete/' . $record->cid), + l(t('edit'), 'admin/structure/contact/edit/' . $record->cid), + l(t('delete'), 'admin/structure/contact/delete/' . $record->cid), ); } // If no categories were found, let the user know. if (empty($rows)) { - $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/build/contact/add'))), 'colspan' => 5)); + $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/structure/contact/add'))), 'colspan' => 5)); } return theme('table', $header, $rows); @@ -122,16 +122,16 @@ function contact_admin_edit_submit($form, &$form_state) { if (empty($form_state['values']['cid']) || $form_state['values']['contact_op'] == 'add') { drupal_write_record('contact', $form_state['values']); drupal_set_message(t('Category %category has been added.', array('%category' => $form_state['values']['category']))); - watchdog('mail', 'Contact form: category %category added.', array('%category' => $form_state['values']['category']), WATCHDOG_NOTICE, l(t('view'), 'admin/build/contact')); + watchdog('mail', 'Contact form: category %category added.', array('%category' => $form_state['values']['category']), WATCHDOG_NOTICE, l(t('view'), 'admin/structure/contact')); } else { drupal_write_record('contact', $form_state['values'], 'cid'); drupal_set_message(t('Category %category has been updated.', array('%category' => $form_state['values']['category']))); - watchdog('mail', 'Contact form: category %category updated.', array('%category' => $form_state['values']['category']), WATCHDOG_NOTICE, l(t('view'), 'admin/build/contact')); + watchdog('mail', 'Contact form: category %category updated.', array('%category' => $form_state['values']['category']), WATCHDOG_NOTICE, l(t('view'), 'admin/structure/contact')); } - $form_state['redirect'] = 'admin/build/contact'; + $form_state['redirect'] = 'admin/structure/contact'; return; } @@ -145,7 +145,7 @@ function contact_admin_delete(&$form_state, $contact) { '#value' => $contact, ); - return confirm_form($form, t('Are you sure you want to delete %category?', array('%category' => $contact['category'])), 'admin/build/contact', t('This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form($form, t('Are you sure you want to delete %category?', array('%category' => $contact['category'])), 'admin/structure/contact', t('This action cannot be undone.'), t('Delete'), t('Cancel')); } /** @@ -159,7 +159,7 @@ function contact_admin_delete_submit($form, &$form_state) { drupal_set_message(t('Category %category has been deleted.', array('%category' => $contact['category']))); watchdog('mail', 'Contact form: category %category deleted.', array('%category' => $contact['category']), WATCHDOG_NOTICE); - $form_state['redirect'] = 'admin/build/contact'; + $form_state['redirect'] = 'admin/structure/contact'; return; } diff --git a/modules/contact/contact.module b/modules/contact/contact.module index 6d59ebc53..1cbbec704 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -19,7 +19,7 @@ function contact_help($path, $arg) { $output .= '<p>' . t('Customize the <a href="@contact">contact page</a> with additional information (like physical location, mailing address, and telephone number) using the <a href="@contact-settings">contact form settings page</a>. The <a href="@contact-settings">settings page</a> also provides configuration options for the maximum number of contact form submissions a user may perform per hour, and the default status of users\' personal contact forms.', array('@contact-settings' => url('admin/settings/contact'), '@contact' => url('contact'))) . '</p>'; $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@contact">Contact module</a>.', array('@contact' => url('http://drupal.org/handbook/modules/contact/', array('absolute' => TRUE)))) . '</p>'; return $output; - case 'admin/build/contact': + case 'admin/structure/contact': $output = '<p>' . t('This page lets you set up <a href="@form">your site-wide contact form</a>. To do so, add one or more categories. You can associate different recipients with each category to route e-mails to different people. For example, you can route website feedback to the webmaster and direct product information requests to the sales department. On the <a href="@settings">settings page</a>, you can customize the information shown above the contact form. This can be useful to provide additional contact information such as your postal address and telephone number.', array('@settings' => url('admin/settings/contact'), '@form' => url('contact'))) . '</p>'; if (!module_exists('menu')) { $menu_note = t('The menu item can be customized and configured only once the menu module has been <a href="@modules-page">enabled</a>.', array('@modules-page' => url('admin/settings/modules'))); @@ -27,7 +27,7 @@ function contact_help($path, $arg) { else { $menu_note = ''; } - $output .= '<p>' . t('The contact module also adds a <a href="@menu-settings">menu item</a> (disabled by default) to the navigation block.', array('@menu-settings' => url('admin/build/menu'))) . ' ' . $menu_note . '</p>'; + $output .= '<p>' . t('The contact module also adds a <a href="@menu-settings">menu item</a> (disabled by default) to the navigation block.', array('@menu-settings' => url('admin/structure/menu'))) . ' ' . $menu_note . '</p>'; return $output; } } @@ -52,18 +52,18 @@ function contact_permission() { * Implement hook_menu(). */ function contact_menu() { - $items['admin/build/contact'] = array( + $items['admin/structure/contact'] = array( 'title' => 'Contact form', 'description' => 'Create a system contact form and set up categories for the form to use.', 'page callback' => 'contact_admin_categories', 'access arguments' => array('administer site-wide contact form'), ); - $items['admin/build/contact/list'] = array( + $items['admin/structure/contact/list'] = array( 'title' => 'List', 'page callback' => 'contact_admin_categories', 'type' => MENU_DEFAULT_LOCAL_TASK, ); - $items['admin/build/contact/add'] = array( + $items['admin/structure/contact/add'] = array( 'title' => 'Add category', 'page callback' => 'drupal_get_form', 'page arguments' => array('contact_admin_edit', 3), @@ -71,14 +71,14 @@ function contact_menu() { 'type' => MENU_LOCAL_TASK, 'weight' => 1, ); - $items['admin/build/contact/edit/%contact'] = array( + $items['admin/structure/contact/edit/%contact'] = array( 'title' => 'Edit contact category', 'page callback' => 'drupal_get_form', 'page arguments' => array('contact_admin_edit', 3, 4), 'access arguments' => array('administer site-wide contact form'), 'type' => MENU_CALLBACK, ); - $items['admin/build/contact/delete/%contact'] = array( + $items['admin/structure/contact/delete/%contact'] = array( 'title' => 'Delete contact', 'page callback' => 'drupal_get_form', 'page arguments' => array('contact_admin_delete', 4), diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc index 9f377fd09..93b534ee7 100644 --- a/modules/contact/contact.pages.inc +++ b/modules/contact/contact.pages.inc @@ -16,7 +16,7 @@ function contact_site_page() { } elseif (!db_query("SELECT COUNT(cid) FROM {contact}")->fetchField()) { if (user_access('administer site-wide contact form')) { - $output = t('The contact form has not been configured. <a href="@add">Add one or more categories</a> to the form.', array('@add' => url('admin/build/contact/add'))); + $output = t('The contact form has not been configured. <a href="@add">Add one or more categories</a> to the form.', array('@add' => url('admin/structure/contact/add'))); } else { return drupal_not_found(); diff --git a/modules/contact/contact.test b/modules/contact/contact.test index dcd9a9a10..aa02bf7b8 100644 --- a/modules/contact/contact.test +++ b/modules/contact/contact.test @@ -207,7 +207,7 @@ class ContactSitewideTestCase extends DrupalWebTestCase { $edit['recipients'] = $recipients; $edit['reply'] = $reply; $edit['selected'] = ($selected ? '1' : '0'); - $this->drupalPost('admin/build/contact/add', $edit, t('Save')); + $this->drupalPost('admin/structure/contact/add', $edit, t('Save')); } /** @@ -225,7 +225,7 @@ class ContactSitewideTestCase extends DrupalWebTestCase { $edit['recipients'] = $recipients; $edit['reply'] = $reply; $edit['selected'] = ($selected ? '1' : '0'); - $this->drupalPost('admin/build/contact/edit/' . $category_id, $edit, t('Save')); + $this->drupalPost('admin/structure/contact/edit/' . $category_id, $edit, t('Save')); return ($category_id); } @@ -255,7 +255,7 @@ class ContactSitewideTestCase extends DrupalWebTestCase { $categories = $this->getCategories(); foreach ($categories as $category) { $category_name = db_query("SELECT category FROM {contact} WHERE cid = :cid", array(':cid' => $category))->fetchField(); - $this->drupalPost('admin/build/contact/delete/' . $category, array(), t('Delete')); + $this->drupalPost('admin/structure/contact/delete/' . $category, array(), t('Delete')); $this->assertRaw(t('Category %category has been deleted.', array('%category' => $category_name)), t('Category deleted sucessfully.')); } } |