summaryrefslogtreecommitdiff
path: root/roundcubemail/plugins
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-02-06 18:12:49 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-02-06 18:12:49 +0000
commit456b357481dea5776143ea17ec9c13a2ab9e90ec (patch)
treeaaf215b5d0222028e3f26aa4e70d674d8c850f5c /roundcubemail/plugins
parent99cddf34ce03bf903c06cc1fefcbdea53ed4edcb (diff)
- Fix setting task name according to auth state. So, any action before user
is authenticated is assigned to 'login' task instead of 'mail'. Now binding plugins to 'login' task is possible and realy usefull. It's also possible to bind to all tasks excluding 'login'. git-svn-id: https://svn.roundcube.net/trunk@3258 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/plugins')
-rw-r--r--roundcubemail/plugins/archive/archive.php3
-rw-r--r--roundcubemail/plugins/autologon/autologon.php3
-rw-r--r--roundcubemail/plugins/help/help.php6
-rw-r--r--roundcubemail/plugins/http_authentication/http_authentication.php3
-rw-r--r--roundcubemail/plugins/markasjunk/markasjunk.php3
-rw-r--r--roundcubemail/plugins/new_user_identity/new_user_identity.php2
-rw-r--r--roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php2
7 files changed, 11 insertions, 11 deletions
diff --git a/roundcubemail/plugins/archive/archive.php b/roundcubemail/plugins/archive/archive.php
index d2269baba..939faf8ba 100644
--- a/roundcubemail/plugins/archive/archive.php
+++ b/roundcubemail/plugins/archive/archive.php
@@ -17,9 +17,6 @@ class archive extends rcube_plugin
{
$rcmail = rcmail::get_instance();
- if (!$rcmail->user->ID)
- return;
-
$this->register_action('plugin.archive', array($this, 'request_action'));
// There is no "Archived flags"
diff --git a/roundcubemail/plugins/autologon/autologon.php b/roundcubemail/plugins/autologon/autologon.php
index c40f2d4eb..bc3d2ee76 100644
--- a/roundcubemail/plugins/autologon/autologon.php
+++ b/roundcubemail/plugins/autologon/autologon.php
@@ -6,6 +6,7 @@
*/
class autologon extends rcube_plugin
{
+ public $task = 'login';
function init()
{
@@ -18,7 +19,7 @@ class autologon extends rcube_plugin
$rcmail = rcmail::get_instance();
// change action to login
- if ($args['task'] == 'mail' && empty($args['action']) && empty($_SESSION['user_id']) && !empty($_GET['_autologin']) && $this->is_localhost())
+ if (empty($_SESSION['user_id']) && !empty($_GET['_autologin']) && $this->is_localhost())
$args['action'] = 'login';
return $args;
diff --git a/roundcubemail/plugins/help/help.php b/roundcubemail/plugins/help/help.php
index 94d06542c..a7b3d5793 100644
--- a/roundcubemail/plugins/help/help.php
+++ b/roundcubemail/plugins/help/help.php
@@ -12,13 +12,13 @@
class help extends rcube_plugin
{
+ // all task excluding 'login' and 'logout'
+ public $task = '?(?!login|logout).*';
+
function init()
{
$rcmail = rcmail::get_instance();
- if (!$rcmail->user->ID)
- return;
-
$this->add_texts('localization/', false);
// register actions
diff --git a/roundcubemail/plugins/http_authentication/http_authentication.php b/roundcubemail/plugins/http_authentication/http_authentication.php
index 57422a74d..7c2296614 100644
--- a/roundcubemail/plugins/http_authentication/http_authentication.php
+++ b/roundcubemail/plugins/http_authentication/http_authentication.php
@@ -10,6 +10,7 @@
*/
class http_authentication extends rcube_plugin
{
+ public $task = 'login';
function init()
{
@@ -20,7 +21,7 @@ class http_authentication extends rcube_plugin
function startup($args)
{
// change action to login
- if ($args['task'] == 'mail' && empty($args['action']) && empty($_SESSION['user_id'])
+ if (empty($args['action']) && empty($_SESSION['user_id'])
&& !empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW']))
$args['action'] = 'login';
diff --git a/roundcubemail/plugins/markasjunk/markasjunk.php b/roundcubemail/plugins/markasjunk/markasjunk.php
index 9f75590c8..046645872 100644
--- a/roundcubemail/plugins/markasjunk/markasjunk.php
+++ b/roundcubemail/plugins/markasjunk/markasjunk.php
@@ -17,9 +17,6 @@ class markasjunk extends rcube_plugin
{
$rcmail = rcmail::get_instance();
- if (!$rcmail->user->ID)
- return;
-
$this->register_action('plugin.markasjunk', array($this, 'request_action'));
if ($rcmail->action == '' || $rcmail->action == 'show') {
diff --git a/roundcubemail/plugins/new_user_identity/new_user_identity.php b/roundcubemail/plugins/new_user_identity/new_user_identity.php
index 78c99522d..43eeae9dd 100644
--- a/roundcubemail/plugins/new_user_identity/new_user_identity.php
+++ b/roundcubemail/plugins/new_user_identity/new_user_identity.php
@@ -22,6 +22,8 @@
*/
class new_user_identity extends rcube_plugin
{
+ public $task = 'login';
+
function init()
{
$this->add_hook('create_user', array($this, 'lookup_user_name'));
diff --git a/roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php b/roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
index 4a14ff2c9..aff2f494f 100644
--- a/roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
+++ b/roundcubemail/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
@@ -10,6 +10,8 @@
*/
class squirrelmail_usercopy extends rcube_plugin
{
+ public $task = 'login|settings';
+
private $prefs = null;
private $abook = array();