Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
c01f85bc
Commit
c01f85bc
authored
Nov 25, 2008
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#337820
by Dave Reid: rename menu path logout to user/logout.
parent
eda100b8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
14 deletions
+24
-14
modules/locale/locale.test
modules/locale/locale.test
+3
-3
modules/poll/poll.test
modules/poll/poll.test
+1
-1
modules/simpletest/drupal_web_test_case.php
modules/simpletest/drupal_web_test_case.php
+1
-1
modules/system/system.install
modules/system/system.install
+10
-0
modules/user/user.module
modules/user/user.module
+7
-7
robots.txt
robots.txt
+2
-2
No files found.
modules/locale/locale.test
View file @
c01f85bc
...
@@ -55,7 +55,7 @@ class LocaleTestCase extends DrupalWebTestCase {
...
@@ -55,7 +55,7 @@ class LocaleTestCase extends DrupalWebTestCase {
// No t() here, we do not want to add this string to the database and it's
// No t() here, we do not want to add this string to the database and it's
// surely not translated yet.
// surely not translated yet.
$this
->
assertText
(
$native
,
'Test language added'
);
$this
->
assertText
(
$native
,
'Test language added'
);
$this
->
drupal
Get
(
'l
ogout
'
);
$this
->
drupal
L
ogout
(
);
// Search for the name and translate it.
// Search for the name and translate it.
$this
->
drupalLogin
(
$translate_user
);
$this
->
drupalLogin
(
$translate_user
);
...
@@ -87,7 +87,7 @@ class LocaleTestCase extends DrupalWebTestCase {
...
@@ -87,7 +87,7 @@ class LocaleTestCase extends DrupalWebTestCase {
$this
->
drupalPost
(
'admin/build/translate/search'
,
$search
,
t
(
'Search'
));
$this
->
drupalPost
(
'admin/build/translate/search'
,
$search
,
t
(
'Search'
));
// The indicator should not be here.
// The indicator should not be here.
$this
->
assertNoRaw
(
$language_indicator
,
'String is translated'
);
$this
->
assertNoRaw
(
$language_indicator
,
'String is translated'
);
$this
->
drupal
Get
(
'l
ogout
'
);
$this
->
drupal
L
ogout
(
);
// Delete the language.
// Delete the language.
$this
->
drupalLogin
(
$admin_user
);
$this
->
drupalLogin
(
$admin_user
);
...
@@ -101,7 +101,7 @@ class LocaleTestCase extends DrupalWebTestCase {
...
@@ -101,7 +101,7 @@ class LocaleTestCase extends DrupalWebTestCase {
$this
->
assertNoText
(
$langcode
,
'Language code not found'
);
$this
->
assertNoText
(
$langcode
,
'Language code not found'
);
$this
->
assertNoText
(
$name
,
'Name not found'
);
$this
->
assertNoText
(
$name
,
'Name not found'
);
$this
->
assertNoText
(
$native
,
'Native not found'
);
$this
->
assertNoText
(
$native
,
'Native not found'
);
$this
->
drupal
Get
(
'l
ogout
'
);
$this
->
drupal
L
ogout
(
);
// Delete the name string.
// Delete the name string.
$this
->
drupalLogin
(
$translate_user
);
$this
->
drupalLogin
(
$translate_user
);
...
...
modules/poll/poll.test
View file @
c01f85bc
...
@@ -106,7 +106,7 @@ class PollVoteTestCase extends PollTestCase {
...
@@ -106,7 +106,7 @@ class PollVoteTestCase extends PollTestCase {
$title
=
$this
->
randomName
();
$title
=
$this
->
randomName
();
$choices
=
$this
->
_generateChoices
(
7
);
$choices
=
$this
->
_generateChoices
(
7
);
$poll_nid
=
$this
->
pollCreate
(
$title
,
$choices
,
FALSE
);
$poll_nid
=
$this
->
pollCreate
(
$title
,
$choices
,
FALSE
);
$this
->
drupal
Get
(
'l
ogout
'
);
$this
->
drupal
L
ogout
(
);
$web_user
=
$this
->
drupalCreateUser
(
array
(
'cancel own vote'
,
'inspect all votes'
,
'vote on polls'
,
'access content'
));
$web_user
=
$this
->
drupalCreateUser
(
array
(
'cancel own vote'
,
'inspect all votes'
,
'vote on polls'
,
'access content'
));
$this
->
drupalLogin
(
$web_user
);
$this
->
drupalLogin
(
$web_user
);
...
...
modules/simpletest/drupal_web_test_case.php
View file @
c01f85bc
...
@@ -661,7 +661,7 @@ function drupalLogin($user = NULL) {
...
@@ -661,7 +661,7 @@ function drupalLogin($user = NULL) {
*/
*/
function
drupalLogout
()
{
function
drupalLogout
()
{
// Make a request to the logout page.
// 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.
// Load the user page, the idea being if you were properly logged out you should be seeing a login screen.
$this
->
drupalGet
(
'user'
);
$this
->
drupalGet
(
'user'
);
...
...
modules/system/system.install
View file @
c01f85bc
...
@@ -3132,6 +3132,16 @@ function system_update_7014() {
...
@@ -3132,6 +3132,16 @@ function system_update_7014() {
return
$ret
;
return
$ret
;
}
}
/**
* 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"
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
* The next series of updates should start at 8000.
...
...
modules/user/user.module
View file @
c01f85bc
...
@@ -977,6 +977,13 @@ function user_menu() {
...
@@ -977,6 +977,13 @@ function user_menu() {
'type'
=>
MENU_CALLBACK
,
'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.
// User administration pages.
$items
[
'admin/user'
]
=
array
(
$items
[
'admin/user'
]
=
array
(
'title'
=>
'User management'
,
'title'
=>
'User management'
,
...
@@ -1033,13 +1040,6 @@ function user_menu() {
...
@@ -1033,13 +1040,6 @@ function user_menu() {
'type'
=>
MENU_CALLBACK
,
'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
(
$items
[
'user/%user_uid_optional'
]
=
array
(
'title'
=>
'My account'
,
'title'
=>
'My account'
,
'title callback'
=>
'user_page_title'
,
'title callback'
=>
'user_page_title'
,
...
...
robots.txt
View file @
c01f85bc
...
@@ -43,19 +43,19 @@ Disallow: /xmlrpc.php
...
@@ -43,19 +43,19 @@ Disallow: /xmlrpc.php
Disallow: /admin/
Disallow: /admin/
Disallow: /comment/reply/
Disallow: /comment/reply/
Disallow: /contact/
Disallow: /contact/
Disallow: /logout/
Disallow: /node/add/
Disallow: /node/add/
Disallow: /search/
Disallow: /search/
Disallow: /user/register/
Disallow: /user/register/
Disallow: /user/password/
Disallow: /user/password/
Disallow: /user/login/
Disallow: /user/login/
Disallow: /user/logout/
# Paths (no clean URLs)
# Paths (no clean URLs)
Disallow: /?q=admin/
Disallow: /?q=admin/
Disallow: /?q=comment/reply/
Disallow: /?q=comment/reply/
Disallow: /?q=contact/
Disallow: /?q=contact/
Disallow: /?q=logout/
Disallow: /?q=node/add/
Disallow: /?q=node/add/
Disallow: /?q=search/
Disallow: /?q=search/
Disallow: /?q=user/password/
Disallow: /?q=user/password/
Disallow: /?q=user/register/
Disallow: /?q=user/register/
Disallow: /?q=user/login/
Disallow: /?q=user/login/
Disallow: /?q=user/logout/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment