roundcubemail/plugins/enigma/lib/enigma_engine.php
function part_body($p)
    {
        // encrypted attachment, see parse_plain_encrypted()
        if ($p['part']->need_decryption && $p['part']->body === null) {
            $this->load_pgp_driver();

            $storage = $this->rc->get_storage();
            $body    = $storage->get_message_part($p['object']->uid, $p['part']->mime_id, $p['part'], null, null, true, 0, false);
            $result  = $this->pgp_decrypt($body);

            // @TODO: what to do on error?
            if ($result === true) {
                $p['part']->body = $body;
                $p['part']->size = strlen($body);
                $p['part']->body_modified = true;
            }
        }

        return $p;
    }
function part_body($p)
    {
        // encrypted attachment, see parse_plain_encrypted()
        if ($p['part']->need_decryption && $p['part']->body === null) {
            $this->load_pgp_driver();

            $storage = $this->rc->get_storage();
            $body    = $storage->get_message_part($p['object']->uid, $p['part']->mime_id, $p['part'], null, null, true, 0, false);
            $result  = $this->pgp_decrypt($body);

            // @TODO: what to do on error?
            if ($result === true) {
                $p['part']->body = $body;
                $p['part']->size = strlen($body);
                $p['part']->body_modified = true;
            }
        }

        return $p;
    }
function part_body ( $ p ) { // encrypted attachment, see parse_plain_encrypted() if ( $ p [ 'part' ] -> need_decryption && $ p [ 'part' ] -> body === null ) { $ this -> load_pgp_driver ( ) ; $ storage = $ this -> rc -> get_storage ( ) ; $ body = $ storage -> get_message_part ( $ p [ 'object' ] -> uid , $ p [ 'part' ] -> mime_id , $ p [ 'part' ] , null , null , true , 0 , false ) ; $ result = $ this -> pgp_decrypt ( $ body ) ; // @TODO: what to do on error? if ( $ result === true ) { $ p [ 'part' ] -> body = $ body ; $ p [ 'part' ] -> size = strlen ( $ body ) ; $ p [ 'part' ] -> body_modified = true ; } } return $ p ; }
Handler for message_part_body hook.

@param array Original parameters

@return array Modified parameters
Handler for message_part_body hook .