Commit bd955495 authored by webchick's avatar webchick

Reverting #337820 which causes menu tests to fail, unbeknownst to testing bot. Hrm...

parent 3d1dcb49
......@@ -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->drupalLogout();
$this->drupalGet('logout');
// 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->drupalLogout();
$this->drupalGet('logout');
// 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->drupalLogout();
$this->drupalGet('logout');
// Delete the name string.
$this->drupalLogin($translate_user);
......
......@@ -113,7 +113,7 @@ class PollVoteTestCase extends PollTestCase {
$title = $this->randomName();
$choices = $this->_generateChoices(7);
$poll_nid = $this->pollCreate($title, $choices, FALSE);
$this->drupalLogout();
$this->drupalGet('logout');
$web_user = $this->drupalCreateUser(array('cancel own vote', 'inspect all votes', 'vote on polls', 'access content'));
$this->drupalLogin($web_user);
......@@ -130,3 +130,4 @@ class PollVoteTestCase extends PollTestCase {
$this->assertText($choices[0], 'Vote recorded');
}
}
......@@ -661,7 +661,7 @@ function drupalLogin($user = NULL) {
*/
function drupalLogout() {
// Make a request to the logout page.
$this->drupalGet('user/logout');
$this->drupalGet('logout');
// Load the user page, the idea being if you were properly logged out you should be seeing a login screen.
$this->drupalGet('user');
......
......@@ -3130,16 +3130,6 @@ function system_update_7013() {
return $ret;
}
/**
* 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.
......
......@@ -977,13 +977,6 @@ 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',
......@@ -1040,6 +1033,13 @@ 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,3 +2415,4 @@ function _user_forms(&$edit, $account, $category, $hook = 'form') {
return empty($groups) ? FALSE : $groups;
}
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