diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-23 21:17:48 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-23 21:17:48 +0000 |
commit | 251a761eaa58b6f5e1eac7ff02a5d879e22eaa77 (patch) | |
tree | ccf1ccd340b33e910046a50343f6b8ca0b098e50 /modules | |
parent | 079a1bd2a5cf2d5429e64ed466dd51650b4ef5ba (diff) | |
download | brdo-251a761eaa58b6f5e1eac7ff02a5d879e22eaa77.tar.gz brdo-251a761eaa58b6f5e1eac7ff02a5d879e22eaa77.tar.bz2 |
#337820 by Dave Reid: Rename menu path 'logout' to 'user/logout' for consistency.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/locale/locale.test | 6 | ||||
-rw-r--r-- | modules/poll/poll.test | 3 | ||||
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 2 | ||||
-rw-r--r-- | modules/system/system.admin.inc | 1 | ||||
-rw-r--r-- | modules/system/system.install | 10 | ||||
-rw-r--r-- | modules/system/system.module | 1 | ||||
-rw-r--r-- | modules/upload/upload.module | 1 | ||||
-rw-r--r-- | modules/user/user.module | 15 | ||||
-rw-r--r-- | modules/user/user.pages.inc | 1 |
9 files changed, 23 insertions, 17 deletions
diff --git a/modules/locale/locale.test b/modules/locale/locale.test index 3daf79f5e..81ec48f8c 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -58,7 +58,7 @@ class LocaleTestCase extends DrupalWebTestCase { // No t() here, we do not want to add this string to the database and it's // surely not translated yet. $this->assertText($native, 'Test language added'); - $this->drupalGet('logout'); + $this->drupalLogout(); // Search for the name and translate it. $this->drupalLogin($translate_user); @@ -90,7 +90,7 @@ class LocaleTestCase extends DrupalWebTestCase { $this->drupalPost('admin/build/translate/search', $search, t('Search')); // The indicator should not be here. $this->assertNoRaw($language_indicator, 'String is translated'); - $this->drupalGet('logout'); + $this->drupalLogout(); // Delete the language. $this->drupalLogin($admin_user); @@ -104,7 +104,7 @@ class LocaleTestCase extends DrupalWebTestCase { $this->assertNoText($langcode, 'Language code not found'); $this->assertNoText($name, 'Name not found'); $this->assertNoText($native, 'Native not found'); - $this->drupalGet('logout'); + $this->drupalLogout(); // Delete the name string. $this->drupalLogin($translate_user); diff --git a/modules/poll/poll.test b/modules/poll/poll.test index 6c190a4e3..782a4640b 100644 --- a/modules/poll/poll.test +++ b/modules/poll/poll.test @@ -113,7 +113,7 @@ class PollVoteTestCase extends PollTestCase { $title = $this->randomName(); $choices = $this->_generateChoices(7); $poll_nid = $this->pollCreate($title, $choices, FALSE); - $this->drupalGet('logout'); + $this->drupalLogout(); $web_user = $this->drupalCreateUser(array('cancel own vote', 'inspect all votes', 'vote on polls', 'access content')); $this->drupalLogin($web_user); @@ -130,4 +130,3 @@ class PollVoteTestCase extends PollTestCase { $this->assertText($choices[0], 'Vote recorded'); } } - diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 10d95a546..4d43592d1 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -661,7 +661,7 @@ class DrupalWebTestCase { */ function drupalLogout() { // Make a request to the logout page. - $this->drupalGet('logout'); + $this->drupalGet('user/logout'); // Load the user page, the idea being if you were properly logged out you should be seeing a login screen. $this->drupalGet('user'); diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 970c0488a..febfcde06 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -517,7 +517,6 @@ function system_theme_settings(&$form_state, $key = '') { } } } - $form['#attributes'] = array('enctype' => 'multipart/form-data'); $form = system_settings_form($form); // We don't want to call system_settings_form_submit(), so change #submit. diff --git a/modules/system/system.install b/modules/system/system.install index bcde1b943..518a11e9f 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3131,6 +3131,16 @@ function system_update_7013() { } /** + * Change the user logout path. + */ +function system_update_7014() { + $ret = array(); + $ret[] = update_sql("UPDATE {menu_links} SET link_path = 'user/logout' WHERE link_path = 'logout'"); + $ret[] = update_sql("UPDATE {menu_links} SET router_path = 'user/logout' WHERE router_path = 'logout'"); + return $ret; +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */ diff --git a/modules/system/system.module b/modules/system/system.module index 151c26979..e2e243cff 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -341,6 +341,7 @@ function system_elements() { $type['file'] = array( '#input' => TRUE, '#size' => 60, + '#enctype' => 'multipart/form-data', ); diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 8f223ad1a..8dd3cb6d5 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -258,7 +258,6 @@ function upload_form_alter(&$form, $form_state, $form_id) { } else { $form['attachments']['wrapper'] += _upload_form($node); - $form['#attributes']['enctype'] = 'multipart/form-data'; } } $form['#submit'][] = 'upload_node_form_submit'; diff --git a/modules/user/user.module b/modules/user/user.module index 6e8b83a80..3f3bedb25 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -977,6 +977,13 @@ function user_menu() { 'type' => MENU_CALLBACK, ); + $items['user/logout'] = array( + 'title' => 'Log out', + 'access callback' => 'user_is_logged_in', + 'page callback' => 'user_logout', + 'weight' => 10, + ); + // User administration pages. $items['admin/user'] = array( 'title' => 'User management', @@ -1033,13 +1040,6 @@ function user_menu() { 'type' => MENU_CALLBACK, ); - $items['logout'] = array( - 'title' => 'Log out', - 'access callback' => 'user_is_logged_in', - 'page callback' => 'user_logout', - 'weight' => 10, - ); - $items['user/%user_uid_optional'] = array( 'title' => 'My account', 'title callback' => 'user_page_title', @@ -2415,4 +2415,3 @@ function _user_forms(&$edit, $account, $category, $hook = 'form') { return empty($groups) ? FALSE : $groups; } - diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index ada98b6fb..9d01f3c5a 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -246,7 +246,6 @@ function user_profile_form($form_state, $account, $category = 'account') { '#submit' => array('user_edit_delete_submit'), ); } - $form['#attributes']['enctype'] = 'multipart/form-data'; return $form; } |