Index: robots.txt =================================================================== RCS file: /cvs/drupal/drupal/robots.txt,v retrieving revision 1.12 diff -u -p -r1.12 robots.txt --- robots.txt 27 Nov 2008 07:07:00 -0000 1.12 +++ robots.txt 27 Nov 2008 18:46:02 -0000 @@ -43,19 +43,19 @@ Disallow: /xmlrpc.php Disallow: /admin/ Disallow: /comment/reply/ Disallow: /contact/ -Disallow: /logout/ Disallow: /node/add/ Disallow: /search/ Disallow: /user/register/ Disallow: /user/password/ Disallow: /user/login/ +Disallow: /user/logout/ # Paths (no clean URLs) Disallow: /?q=admin/ Disallow: /?q=comment/reply/ Disallow: /?q=contact/ -Disallow: /?q=logout/ Disallow: /?q=node/add/ Disallow: /?q=search/ Disallow: /?q=user/password/ Disallow: /?q=user/register/ Disallow: /?q=user/login/ +Disallow: /?q=user/logout/ Index: modules/locale/locale.test =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.test,v retrieving revision 1.10 diff -u -p -r1.10 locale.test --- modules/locale/locale.test 27 Nov 2008 07:07:01 -0000 1.10 +++ modules/locale/locale.test 27 Nov 2008 18:46:05 -0000 @@ -55,7 +55,7 @@ class LocaleTestCase extends DrupalWebTe // 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); @@ -87,7 +87,7 @@ class LocaleTestCase extends DrupalWebTe $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); @@ -101,7 +101,7 @@ class LocaleTestCase extends DrupalWebTe $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); Index: modules/menu/menu.test =================================================================== RCS file: /cvs/drupal/drupal/modules/menu/menu.test,v retrieving revision 1.4 diff -u -p -r1.4 menu.test --- modules/menu/menu.test 25 Nov 2008 13:14:27 -0000 1.4 +++ modules/menu/menu.test 27 Nov 2008 18:46:05 -0000 @@ -365,10 +365,9 @@ class MenuTestCase extends DrupalWebTest * Get standard menu item. * */ - private function getStandardMenuItem() - { - // Retrieve menu link id (presumably the Log out menu item, but not necessary). - $mlid = db_result(db_query("SELECT MIN(mlid) FROM {menu_links} WHERE module = 'system' AND hidden = 0 AND has_children = 0")); + private function getStandardMenuItem() { + // Retrieve menu link id of the Log out menu item, which will always be on the front page. + $mlid = db_query("SELECT mlid FROM {menu_links} WHERE module = 'system' AND router_path = 'user/logout'")->fetchField(); $this->assertTrue($mlid > 0, 'Standard menu link id was found'); // Load menu item. // Use api function so that link is translated for rendering. Index: modules/poll/poll.test =================================================================== RCS file: /cvs/drupal/drupal/modules/poll/poll.test,v retrieving revision 1.10 diff -u -p -r1.10 poll.test --- modules/poll/poll.test 27 Nov 2008 07:07:01 -0000 1.10 +++ modules/poll/poll.test 27 Nov 2008 18:46:05 -0000 @@ -106,7 +106,7 @@ class PollVoteTestCase extends PollTestC $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); Index: modules/simpletest/drupal_web_test_case.php =================================================================== RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v retrieving revision 1.62 diff -u -p -r1.62 drupal_web_test_case.php --- modules/simpletest/drupal_web_test_case.php 27 Nov 2008 07:07:01 -0000 1.62 +++ modules/simpletest/drupal_web_test_case.php 27 Nov 2008 18:46:06 -0000 @@ -745,7 +745,7 @@ class DrupalWebTestCase { */ protected 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'); Index: modules/system/system.install =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.install,v retrieving revision 1.289 diff -u -p -r1.289 system.install --- modules/system/system.install 27 Nov 2008 07:07:01 -0000 1.289 +++ modules/system/system.install 27 Nov 2008 18:46:10 -0000 @@ -3133,6 +3133,16 @@ function system_update_7014() { } /** + * Change the user logout path. + */ +function system_update_7015() { + $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. */ Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.943 diff -u -p -r1.943 user.module --- modules/user/user.module 27 Nov 2008 07:07:01 -0000 1.943 +++ modules/user/user.module 27 Nov 2008 18:46:11 -0000 @@ -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',