summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-04-23 20:42:53 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-04-23 20:42:53 +0200
commit89921163138ca7318b6f1d2905a66f37c8b40ae6 (patch)
tree39e29ca5b3bac6264cd1e4dcea9e04379cf231f8 /program/include/rcmail.php
parent1fa0b6c0e546e1e003a93780f7c8007cf25dd673 (diff)
Set task variable to 'cli' when loading rcmail instance in shell scripts
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r--program/include/rcmail.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 8d7101e85..cc70739cf 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -139,6 +139,8 @@ class rcmail extends rcube
if ($this->user && $this->user->ID)
$task = !$task ? 'mail' : $task;
+ else if (php_sapi_name() == 'cli')
+ $task = 'cli';
else
$task = 'login';