Changeset 3258 in subversion
- Timestamp:
- Feb 6, 2010 1:12:49 PM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 12 edited
-
CHANGELOG (modified) (1 diff)
-
index.php (modified) (5 diffs)
-
plugins/archive/archive.php (modified) (1 diff)
-
plugins/autologon/autologon.php (modified) (2 diffs)
-
plugins/help/help.php (modified) (1 diff)
-
plugins/http_authentication/http_authentication.php (modified) (2 diffs)
-
plugins/markasjunk/markasjunk.php (modified) (1 diff)
-
plugins/new_user_identity/new_user_identity.php (modified) (1 diff)
-
plugins/squirrelmail_usercopy/squirrelmail_usercopy.php (modified) (1 diff)
-
program/include/rcmail.php (modified) (5 diffs)
-
program/include/rcube_plugin_api.php (modified) (1 diff)
-
program/steps/mail/func.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r3257 r3258 2 2 =========================== 3 3 4 - Fix setting task name according to auth state 4 5 - Password: fix vpopmaild driver (#1486478) 5 6 - Add workaround for MySQL bug [http://bugs.mysql.com/bug.php?id=46293] (#1486474) -
trunk/roundcubemail/index.php
r3231 r3258 81 81 82 82 // try to log in 83 if ($RCMAIL-> action=='login' && $RCMAIL->task=='mail') {83 if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') { 84 84 // purge the session in case of new login when a session already exists 85 85 $RCMAIL->kill_session(); … … 118 118 parse_str($url, $query); 119 119 120 $RCMAIL->set_task('mail'); 121 120 122 // allow plugins to control the redirect url after login success 121 123 $redir = $RCMAIL->plugins->exec_hook('login_after', $query + array('task' => $RCMAIL->task)); … … 133 135 134 136 // end session 135 else if ($RCMAIL->task =='logout' && isset($_SESSION['user_id'])) {137 else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id'])) { 136 138 $userdata = array('user' => $_SESSION['username'], 'host' => $_SESSION['imap_host'], 'lang' => $RCMAIL->user->language); 137 139 $OUTPUT->show_message('loggedout'); … … 142 144 143 145 // check session and auth cookie 144 else if ($RCMAIL-> action!= 'login' && $_SESSION['user_id'] && $RCMAIL->action != 'send') {146 else if ($RCMAIL->task != 'login' && $_SESSION['user_id'] && $RCMAIL->action != 'send') { 145 147 if (!$RCMAIL->authenticate_session()) { 146 148 $OUTPUT->show_message('sessionerror', 'error'); … … 169 171 if ($OUTPUT->ajax_call) 170 172 $OUTPUT->redirect(array(), 2000); 171 173 172 174 if (!empty($_REQUEST['_framed'])) 173 175 $OUTPUT->command('redirect', '?'); -
trunk/roundcubemail/plugins/archive/archive.php
r3253 r3258 17 17 { 18 18 $rcmail = rcmail::get_instance(); 19 20 if (!$rcmail->user->ID)21 return;22 19 23 20 $this->register_action('plugin.archive', array($this, 'request_action')); -
trunk/roundcubemail/plugins/autologon/autologon.php
r2209 r3258 7 7 class autologon extends rcube_plugin 8 8 { 9 public $task = 'login'; 9 10 10 11 function init() … … 19 20 20 21 // change action to login 21 if ( $args['task'] == 'mail' && empty($args['action']) &&empty($_SESSION['user_id']) && !empty($_GET['_autologin']) && $this->is_localhost())22 if (empty($_SESSION['user_id']) && !empty($_GET['_autologin']) && $this->is_localhost()) 22 23 $args['action'] = 'login'; 23 24 -
trunk/roundcubemail/plugins/help/help.php
r3253 r3258 13 13 class help extends rcube_plugin 14 14 { 15 // all task excluding 'login' and 'logout' 16 public $task = '?(?!login|logout).*'; 17 15 18 function init() 16 19 { 17 20 $rcmail = rcmail::get_instance(); 18 21 19 if (!$rcmail->user->ID)20 return;21 22 22 $this->add_texts('localization/', false); 23 23 -
trunk/roundcubemail/plugins/http_authentication/http_authentication.php
r2401 r3258 11 11 class http_authentication extends rcube_plugin 12 12 { 13 public $task = 'login'; 13 14 14 15 function init() … … 21 22 { 22 23 // change action to login 23 if ( $args['task'] == 'mail' &&empty($args['action']) && empty($_SESSION['user_id'])24 if (empty($args['action']) && empty($_SESSION['user_id']) 24 25 && !empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) 25 26 $args['action'] = 'login'; -
trunk/roundcubemail/plugins/markasjunk/markasjunk.php
r3253 r3258 17 17 { 18 18 $rcmail = rcmail::get_instance(); 19 20 if (!$rcmail->user->ID)21 return;22 19 23 20 $this->register_action('plugin.markasjunk', array($this, 'request_action')); -
trunk/roundcubemail/plugins/new_user_identity/new_user_identity.php
r2967 r3258 23 23 class new_user_identity extends rcube_plugin 24 24 { 25 public $task = 'login'; 26 25 27 function init() 26 28 { -
trunk/roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
r2728 r3258 11 11 class squirrelmail_usercopy extends rcube_plugin 12 12 { 13 public $task = 'login|settings'; 14 13 15 private $prefs = null; 14 16 private $abook = array(); -
trunk/roundcubemail/program/include/rcmail.php
r3237 r3258 40 40 public $output; 41 41 public $plugins; 42 public $task = 'mail';42 public $task; 43 43 public $action = ''; 44 44 public $comm_path = './'; … … 92 92 } 93 93 94 // set task and action properties95 $this->set_task(get_input_value('_task', RCUBE_INPUT_GPC));96 $this->action = asciiwords(get_input_value('_action', RCUBE_INPUT_GPC));97 98 94 // connect to database 99 95 $GLOBALS['DB'] = $this->get_dbh(); … … 124 120 $this->set_user(new rcube_user($_SESSION['user_id'])); 125 121 122 // set task and action properties 123 $this->set_task(get_input_value('_task', RCUBE_INPUT_GPC)); 124 $this->action = asciiwords(get_input_value('_action', RCUBE_INPUT_GPC)); 125 126 126 // reset some session parameters when changing task 127 127 if ($_SESSION['task'] != $this->task) … … 132 132 133 133 // create IMAP object 134 if ($this->task == ' mail')134 if ($this->task == 'login') 135 135 $this->imap_init(); 136 136 … … 148 148 { 149 149 $task = asciiwords($task); 150 $this->task = $task ? $task : 'mail'; 150 151 if ($this->user && $this->user->ID) 152 $task = !$task || $task == 'login' ? 'mail' : $task; 153 else 154 $task = 'login'; 155 156 $this->task = $task; 151 157 $this->comm_path = $this->url(array('task' => $this->task)); 152 158 -
trunk/roundcubemail/program/include/rcube_plugin_api.php
r3231 r3258 91 91 $plugin = new $plugin_name($this); 92 92 // check inheritance and task specification 93 if (is_subclass_of($plugin, 'rcube_plugin') && (!$plugin->task || preg_match('/ ('.$plugin->task.')/i', $rcmail->task))) {93 if (is_subclass_of($plugin, 'rcube_plugin') && (!$plugin->task || preg_match('/^('.$plugin->task.')$/i', $rcmail->task))) { 94 94 $plugin->init(); 95 95 $this->plugins[] = $plugin; -
trunk/roundcubemail/program/steps/mail/func.inc
r3249 r3258 25 25 $NOIMAP_ACTIONS = array('spell', 'addcontact', 'autocomplete', 'upload', 'display-attachment', 'remove-attachment'); 26 26 27 // Init IMAP object 28 $RCMAIL->imap_init(); 27 29 28 30 // log in to imap server
Note: See TracChangeset
for help on using the changeset viewer.
