summaryrefslogtreecommitdiff
path: root/plugins/managesieve
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/managesieve')
-rw-r--r--plugins/managesieve/lib/Roundcube/rcube_sieve_script.php6
-rw-r--r--plugins/managesieve/managesieve.php8
2 files changed, 6 insertions, 8 deletions
diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
index 80f590f4b..0e95b0fba 100644
--- a/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
+++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
@@ -206,7 +206,6 @@ class rcube_sieve_script
// rules
foreach ($this->content as $rule) {
- $extension = '';
$script = '';
$tests = array();
$i = 0;
@@ -1015,11 +1014,10 @@ class rcube_sieve_script
* @param mixed $num Number of tokens to return, 0 for all
* or True for all tokens until separator is found.
* Separator will be returned as last token.
- * @param int $in_list Enable to call recursively inside a list
*
* @return mixed Tokens array or string if $num=1
*/
- static function tokenize(&$str, $num=0, $in_list=false)
+ static function tokenize(&$str, $num=0)
{
$result = array();
@@ -1054,7 +1052,7 @@ class rcube_sieve_script
// Parenthesized list
case '[':
$str = substr($str, 1);
- $result[] = self::tokenize($str, 0, true);
+ $result[] = self::tokenize($str, 0);
break;
case ']':
$str = substr($str, 1);
diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php
index 817fa8650..fc2a79ddb 100644
--- a/plugins/managesieve/managesieve.php
+++ b/plugins/managesieve/managesieve.php
@@ -1640,7 +1640,7 @@ class managesieve extends rcube_plugin
.'value="' . rcube::Q($action['value']) . '" size="35" '
. $this->error_class($id, 'action', 'value', 'action_varvalue') .' />';
$out .= '<br /><span class="label">' .rcube::Q($this->gettext('setvarmodifiers')) . '</span><br />';
- foreach ($set_modifiers as $j => $s_m) {
+ foreach ($set_modifiers as $s_m) {
$s_m_id = 'action_varmods' . $id . $s_m;
$out .= sprintf('<input type="checkbox" name="_action_varmods[%s][]" value="%s" id="%s"%s />%s<br>',
$id, $s_m, $s_m_id,
@@ -1902,7 +1902,7 @@ class managesieve extends rcube_plugin
$user_script = $_SESSION['managesieve_user_script'];
// if the script is not active...
- if ($user_script && ($key = array_search($name, $this->active)) === false) {
+ if ($user_script && array_search($name, $this->active) === false) {
// ...rewrite USER file adding appropriate include command
if ($this->sieve->load($user_script)) {
$script = $this->sieve->script->as_array();
@@ -1920,7 +1920,7 @@ class managesieve extends rcube_plugin
// get all active scripts for sorting
foreach ($script as $rid => $rules) {
- foreach ($rules['actions'] as $aid => $action) {
+ foreach ($rules['actions'] as $action) {
if ($action['type'] == 'include' && empty($action['global'])) {
$target = $extension ? preg_replace($regexp, '', $action['target']) : $action['target'];
$list[] = $target;
@@ -1988,7 +1988,7 @@ class managesieve extends rcube_plugin
$name = $name.$extension;
foreach ($script as $rid => $rules) {
- foreach ($rules['actions'] as $aid => $action) {
+ foreach ($rules['actions'] as $action) {
if ($action['type'] == 'include' && empty($action['global'])
&& $action['target'] == $name
) {