Changeset 4596 in subversion
- Timestamp:
- Mar 7, 2011 9:22:11 AM (2 years ago)
- Location:
- trunk/plugins/managesieve
- Files:
-
- 4 edited
-
Changelog (modified) (2 diffs)
-
lib/rcube_sieve.php (modified) (4 diffs)
-
lib/rcube_sieve_script.php (modified) (3 diffs)
-
managesieve.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/managesieve/Changelog
r4562 r4596 1 * version 4.1 [2011-03-07] 2 ----------------------------------------------------------- 1 3 - Fix fileinto target is always INBOX (#1487776) 2 4 - Fix escaping of backslash character in quoted strings (#1487780) … … 4 6 or UTF-8 characters (dovecot's implementation bug workaround) 5 7 in script names 8 - Fix saving of a script using flags extension on servers with imap4flags support (#1487825) 6 9 7 10 * version 4.0 [2011-02-10] -
trunk/plugins/managesieve/lib/rcube_sieve.php
r4524 r4596 32 32 public $current; // name of currently loaded script 33 33 private $disabled; // array of disabled extensions 34 private $exts; // array of supported extensions 34 35 35 36 … … 74 75 } 75 76 77 $this->exts = $this->get_extensions(); 76 78 $this->disabled = $disabled; 77 79 } … … 192 194 public function get_extensions() 193 195 { 196 if ($this->exts) 197 return $this->exts; 198 194 199 if (!$this->sieve) 195 200 return $this->_set_error(SIEVE_ERROR_INTERNAL); … … 281 286 { 282 287 // try to parse from Roundcube format 283 $script = new rcube_sieve_script($txt, $this->disabled );288 $script = new rcube_sieve_script($txt, $this->disabled, $this->exts); 284 289 285 290 // ... else try to import from different formats 286 291 if (empty($script->content)) { 287 292 $script = $this->_import_rules($txt); 288 $script = new rcube_sieve_script($script, $this->disabled );293 $script = new rcube_sieve_script($script, $this->disabled, $this->exts); 289 294 } 290 295 -
trunk/plugins/managesieve/lib/rcube_sieve_script.php
r4558 r4596 27 27 ); 28 28 29 private $capabilities; 30 29 31 /** 30 32 * Object constructor 31 33 * 32 34 * @param string Script's text content 33 * @param array Disabled extensions 34 */ 35 public function __construct($script, $disabled=null) 35 * @param array List of disabled extensions 36 * @param array List of capabilities supported by server 37 */ 38 public function __construct($script, $disabled=null, $capabilities=null) 36 39 { 37 40 if (!empty($disabled)) { … … 45 48 } 46 49 47 $this->content = $this->_parse_text($script); 50 $this->capabilities = $capabilities; 51 $this->content = $this->_parse_text($script); 48 52 } 49 53 … … 217 221 case 'setflag': 218 222 case 'removeflag': 219 if ( !empty($action['mode']) && strtolower($action['mode']) == 'imap4flags')223 if (is_array($this->capabilities) && in_array('imap4flags', $this->capabilities)) 220 224 array_push($exts, 'imap4flags'); 221 225 else -
trunk/plugins/managesieve/managesieve.php
r4536 r4596 535 535 } 536 536 $this->form['actions'][$i]['target'] = $_target; 537 if (in_array('imap4flags', $this->exts)) {538 $this->form['actions'][$i]['mode'] = 'imap4flags';539 }540 537 break; 541 538 … … 1086 1083 . $this->error_class($id, 'action', 'flags', 'action_flags') . '>'; 1087 1084 foreach ($flags as $fidx => $flag) { 1088 $out .= '< nobr><input type="checkbox" name="_action_flags[' .$id .'][]" value="' . $flag . '"'1085 $out .= '<input type="checkbox" name="_action_flags[' .$id .'][]" value="' . $flag . '"' 1089 1086 . (in_array_nocase($flag, $flags_target) ? 'checked="checked"' : '') . ' />' 1090 . Q($this->gettext('flag'.$fidx)) .'< /nobr>';1087 . Q($this->gettext('flag'.$fidx)) .'<br>'; 1091 1088 } 1092 1089 $out .= '</div>';
Note: See TracChangeset
for help on using the changeset viewer.
