Skip to content

Commit

Permalink
- always call logout action as task (#1485919)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jun 15, 2009
1 parent 9d147c8 commit 3a2b270
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -121,7 +121,7 @@
}

// end session
else if (($RCMAIL->task=='logout' || $RCMAIL->action=='logout') && isset($_SESSION['user_id'])) {
else if ($RCMAIL->task=='logout' && isset($_SESSION['user_id'])) {
$OUTPUT->show_message('loggedout');
$RCMAIL->logout_actions();
$RCMAIL->kill_session();
Expand Down
2 changes: 1 addition & 1 deletion program/include/rcube_template.php
Expand Up @@ -969,7 +969,7 @@ private function login_form($attrib)

// save original url
$url = get_input_value('_url', RCUBE_INPUT_POST);
if (empty($url) && !preg_match('/_action=logout/', $_SERVER['QUERY_STRING']))
if (empty($url) && !preg_match('/_(task|action)=logout/', $_SERVER['QUERY_STRING']))
$url = $_SERVER['QUERY_STRING'];

$input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser', 'size' => 30) + $attrib);
Expand Down
8 changes: 1 addition & 7 deletions program/js/app.js
Expand Up @@ -367,9 +367,6 @@ function rcube_webmail()
break;
}

// enable basic commands
this.enable_command('logout', true);

// flag object as complete
this.loaded = true;

Expand Down Expand Up @@ -551,14 +548,11 @@ function rcube_webmail()
this.gui_objects.loginform.submit();
break;

case 'logout':
this.goto_url('logout', '', true);
break;

// commands to switch task
case 'mail':
case 'addressbook':
case 'settings':
case 'logout':
this.switch_task(command);
break;

Expand Down

0 comments on commit 3a2b270

Please sign in to comment.