summaryrefslogtreecommitdiff
path: root/plugins/enigma/lib
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-01-18 15:24:49 +0100
committerAleksander Machniak <alec@alec.pl>2013-01-18 15:24:49 +0100
commit61be822d62ea245b7f54ad313f49a956ab49076d (patch)
tree2e351bb7796481af16502c85c6f24a896094f522 /plugins/enigma/lib
parent4d7964d9101d08b5e7533cea50e52e07bf3f783a (diff)
Remove deprecated functions (from bc.php file) usage in plugins
Diffstat (limited to 'plugins/enigma/lib')
-rw-r--r--plugins/enigma/lib/enigma_engine.php24
-rw-r--r--plugins/enigma/lib/enigma_ui.php26
2 files changed, 25 insertions, 25 deletions
diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php
index 89cb4b796..220d6c0b3 100644
--- a/plugins/enigma/lib/enigma_engine.php
+++ b/plugins/enigma/lib/enigma_engine.php
@@ -65,7 +65,7 @@ class enigma_engine
$this->pgp_driver = new $driver($username);
if (!$this->pgp_driver) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Enigma plugin: Unable to load PGP driver: $driver"
@@ -76,7 +76,7 @@ class enigma_engine
$result = $this->pgp_driver->init();
if ($result instanceof enigma_error) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Enigma plugin: ".$result->getMessage()
@@ -102,7 +102,7 @@ class enigma_engine
$this->smime_driver = new $driver($username);
if (!$this->smime_driver) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Enigma plugin: Unable to load S/MIME driver: $driver"
@@ -113,7 +113,7 @@ class enigma_engine
$result = $this->smime_driver->init();
if ($result instanceof enigma_error) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Enigma plugin: ".$result->getMessage()
@@ -378,7 +378,7 @@ class enigma_engine
$sig = $this->pgp_driver->verify($msg_body, $sig_body);
if (($sig instanceof enigma_error) && $sig->getCode() != enigma_error::E_KEYNOTFOUND)
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Enigma plugin: " . $error->getMessage()
@@ -407,7 +407,7 @@ class enigma_engine
if ($result instanceof enigma_error) {
$err_code = $result->getCode();
if (!in_array($err_code, array(enigma_error::E_KEYNOTFOUND, enigma_error::E_BADPASS)))
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Enigma plugin: " . $result->getMessage()
@@ -432,7 +432,7 @@ class enigma_engine
$result = $this->pgp_driver->list_keys($pattern);
if ($result instanceof enigma_error) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Enigma plugin: " . $result->getMessage()
@@ -455,7 +455,7 @@ class enigma_engine
$result = $this->pgp_driver->get_key($keyid);
if ($result instanceof enigma_error) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Enigma plugin: " . $result->getMessage()
@@ -479,7 +479,7 @@ class enigma_engine
$result = $this->pgp_driver->import($content, $isfile);
if ($result instanceof enigma_error) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Enigma plugin: " . $result->getMessage()
@@ -498,9 +498,9 @@ class enigma_engine
*/
function import_file()
{
- $uid = get_input_value('_uid', RCUBE_INPUT_POST);
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
- $mime_id = get_input_value('_part', RCUBE_INPUT_POST);
+ $uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
+ $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
+ $mime_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_POST);
if ($uid && $mime_id) {
$part = $this->rc->storage->get_message_part($uid, $mime_id);
diff --git a/plugins/enigma/lib/enigma_ui.php b/plugins/enigma/lib/enigma_ui.php
index dc3580872..47366b7e8 100644
--- a/plugins/enigma/lib/enigma_ui.php
+++ b/plugins/enigma/lib/enigma_ui.php
@@ -49,7 +49,7 @@ class enigma_ui
// Enigma actions
if ($this->rc->action == 'plugin.enigma') {
- $action = get_input_value('_a', RCUBE_INPUT_GPC);
+ $action = rcube_utils::get_input_value('_a', rcube_utils::INPUT_GPC);
switch ($action) {
case 'keyedit':
@@ -152,7 +152,7 @@ class enigma_ui
$a_show_cols = array('name');
// create XHTML table
- $out = rcube_table_output($attrib, array(), $a_show_cols, 'id');
+ $out = $this->rc->table_output($attrib, array(), $a_show_cols, 'id');
// set client env
$this->rc->output->add_gui_object('keyslist', $attrib['id']);
@@ -172,8 +172,8 @@ class enigma_ui
$this->enigma->load_engine();
$pagesize = $this->rc->config->get('pagesize', 100);
- $page = max(intval(get_input_value('_p', RCUBE_INPUT_GPC)), 1);
- $search = get_input_value('_q', RCUBE_INPUT_GPC);
+ $page = max(intval(rcube_utils::get_input_value('_p', rcube_utils::INPUT_GPC)), 1);
+ $search = rcube_utils::get_input_value('_q', rcube_utils::INPUT_GPC);
// define list of cols to be displayed
$a_show_cols = array('name');
@@ -202,7 +202,7 @@ class enigma_ui
// Add rows
foreach($list as $idx => $key) {
$this->rc->output->command('enigma_add_list_row',
- array('name' => Q($key->name), 'id' => $key->id));
+ array('name' => rcube::Q($key->name), 'id' => $key->id));
}
}
}
@@ -261,7 +261,7 @@ class enigma_ui
*/
private function key_info()
{
- $id = get_input_value('_id', RCUBE_INPUT_GET);
+ $id = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GET);
$this->enigma->load_engine();
$res = $this->enigma->engine->get_key($id);
@@ -288,7 +288,7 @@ class enigma_ui
*/
function tpl_key_name($attrib)
{
- return Q($this->data->name);
+ return rcube::Q($this->data->name);
}
/**
@@ -301,7 +301,7 @@ class enigma_ui
// Key user ID
$table->add('title', $this->enigma->gettext('keyuserid'));
- $table->add(null, Q($this->data->name));
+ $table->add(null, rcube::Q($this->data->name));
// Key ID
$table->add('title', $this->enigma->gettext('keyid'));
$table->add(null, $this->data->subkeys[0]->get_short_id());
@@ -369,7 +369,7 @@ class enigma_ui
else if ($err = $_FILES['_file']['error']) {
if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) {
$this->rc->output->show_message('filesizeerror', 'error',
- array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize')))));
+ array('size' => $this->rc->show_bytes(parse_bytes(ini_get('upload_max_filesize')))));
} else {
$this->rc->output->show_message('fileuploaderror', 'error');
}
@@ -394,7 +394,7 @@ class enigma_ui
'id' => 'rcmimportfile', 'size' => 30));
$form = html::p(null,
- Q($this->enigma->gettext('keyimporttext'), 'show')
+ rcube::Q($this->enigma->gettext('keyimporttext'), 'show')
. html::br() . html::br() . $upload->show()
);
@@ -433,15 +433,15 @@ class enigma_ui
$chbox = new html_checkbox(array('value' => 1));
$menu->add(null, html::label(array('for' => 'enigmadefaultopt'),
- Q($this->enigma->gettext('identdefault'))));
+ rcube::Q($this->enigma->gettext('identdefault'))));
$menu->add(null, $chbox->show(1, array('name' => '_enigma_default', 'id' => 'enigmadefaultopt')));
$menu->add(null, html::label(array('for' => 'enigmasignopt'),
- Q($this->enigma->gettext('signmsg'))));
+ rcube::Q($this->enigma->gettext('signmsg'))));
$menu->add(null, $chbox->show(1, array('name' => '_enigma_sign', 'id' => 'enigmasignopt')));
$menu->add(null, html::label(array('for' => 'enigmacryptopt'),
- Q($this->enigma->gettext('encryptmsg'))));
+ rcube::Q($this->enigma->gettext('encryptmsg'))));
$menu->add(null, $chbox->show(1, array('name' => '_enigma_crypt', 'id' => 'enigmacryptopt')));
$menu = html::div(array('id' => 'enigmamenu', 'class' => 'popupmenu'),