roundcubemail/plugins/managesieve/lib/Roundcube/rcube_sieve.php
public function save($name = null)
    {
        if (!$this->sieve) {
            return $this->_set_error(self::ERROR_INTERNAL);
        }

        if (!$this->script) {
            return $this->_set_error(self::ERROR_INTERNAL);
        }

        if (!$name) {
            $name = $this->current;
        }

        $script = $this->script->as_text();

        if (!$script) {
            $script = '/* empty script */';
        }

        $result = $this->sieve->installScript($name, $script);
        if (is_a($result, 'PEAR_Error')) {
            return $this->_set_error(self::ERROR_INSTALL);
        }

        return true;
    }
public function save($name = null)
    {
        if (!$this->sieve) {
            return $this->_set_error(self::ERROR_INTERNAL);
        }

        if (!$this->script) {
            return $this->_set_error(self::ERROR_INTERNAL);
        }

        if (!$name) {
            $name = $this->current;
        }

        $script = $this->script->as_text();

        if (!$script) {
            $script = '/* empty script */';
        }

        $result = $this->sieve->installScript($name, $script);
        if (is_a($result, 'PEAR_Error')) {
            return $this->_set_error(self::ERROR_INSTALL);
        }

        return true;
    }
public function save ( $ name = null ) { if ( ! $ this -> sieve ) { return $ this -> _set_error ( self :: ERROR_INTERNAL ) ; } if ( ! $ this -> script ) { return $ this -> _set_error ( self :: ERROR_INTERNAL ) ; } if ( ! $ name ) { $ name = $ this -> current ; } $ script = $ this -> script -> as_text ( ) ; if ( ! $ script ) { $ script = '/* empty script */' ; } $ result = $ this -> sieve -> installScript ( $ name , $ script ) ; if ( is_a ( $ result , 'PEAR_Error' ) ) { return $ this -> _set_error ( self :: ERROR_INSTALL ) ; } return true ; }
Saves current script into server
Saves current script into server