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

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

        // script must be deactivated first
        if ($name == $this->sieve->getActive()) {
            $result = $this->sieve->setActive('');

            if (is_a($result, 'PEAR_Error')) {
                return $this->_set_error(self::ERROR_DELETE);
            }

            $this->active = null;
        }

        $result = $this->sieve->removeScript($name);

        if (is_a($result, 'PEAR_Error')) {
            return $this->_set_error(self::ERROR_DELETE);
        }

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

        $this->list = null;

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

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

        // script must be deactivated first
        if ($name == $this->sieve->getActive()) {
            $result = $this->sieve->setActive('');

            if (is_a($result, 'PEAR_Error')) {
                return $this->_set_error(self::ERROR_DELETE);
            }

            $this->active = null;
        }

        $result = $this->sieve->removeScript($name);

        if (is_a($result, 'PEAR_Error')) {
            return $this->_set_error(self::ERROR_DELETE);
        }

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

        $this->list = null;

        return true;
    }
public function remove ( $ name = null ) { if ( ! $ this -> sieve ) { return $ this -> _set_error ( self :: ERROR_INTERNAL ) ; } if ( ! $ name ) { $ name = $ this -> current ; } // script must be deactivated first if ( $ name == $ this -> sieve -> getActive ( ) ) { $ result = $ this -> sieve -> setActive ( '' ) ; if ( is_a ( $ result , 'PEAR_Error' ) ) { return $ this -> _set_error ( self :: ERROR_DELETE ) ; } $ this -> active = null ; } $ result = $ this -> sieve -> removeScript ( $ name ) ; if ( is_a ( $ result , 'PEAR_Error' ) ) { return $ this -> _set_error ( self :: ERROR_DELETE ) ; } if ( $ name == $ this -> current ) { $ this -> current = null ; } $ this -> list = null ; return true ; }
Removes specified script
Removes specified script