summaryrefslogtreecommitdiff
path: root/plugins/enigma
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
parent4d7964d9101d08b5e7533cea50e52e07bf3f783a (diff)
Remove deprecated functions (from bc.php file) usage in plugins
Diffstat (limited to 'plugins/enigma')
-rw-r--r--plugins/enigma/enigma.php26
-rw-r--r--plugins/enigma/lib/enigma_engine.php24
-rw-r--r--plugins/enigma/lib/enigma_ui.php26
3 files changed, 38 insertions, 38 deletions
diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php
index a4009ce26..c96b94620 100644
--- a/plugins/enigma/enigma.php
+++ b/plugins/enigma/enigma.php
@@ -79,7 +79,7 @@ class enigma extends rcube_plugin
$this->register_action('plugin.enigma', array($this, 'preferences_ui'));
// grab keys/certs management iframe requests
- $section = get_input_value('_section', RCUBE_INPUT_GET);
+ $section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GET);
if ($this->rc->action == 'edit-prefs' && preg_match('/^enigma(certs|keys)/', $section)) {
$this->load_ui();
$this->ui->init($section);
@@ -230,7 +230,7 @@ class enigma extends rcube_plugin
{
if ($p['section'] == 'enigmasettings') {
$a['prefs'] = array(
-// 'dummy' => get_input_value('_dummy', RCUBE_INPUT_POST),
+// 'dummy' => rcube_utils::get_input_value('_dummy', rcube_utils::INPUT_POST),
);
}
@@ -285,16 +285,16 @@ class enigma extends rcube_plugin
$attrib['class'] = 'enigmaerror';
$code = $status->getCode();
if ($code == enigma_error::E_KEYNOTFOUND)
- $msg = Q(str_replace('$keyid', enigma_key::format_id($status->getData('id')),
+ $msg = rcube::Q(str_replace('$keyid', enigma_key::format_id($status->getData('id')),
$this->gettext('decryptnokey')));
else if ($code == enigma_error::E_BADPASS)
- $msg = Q($this->gettext('decryptbadpass'));
+ $msg = rcube::Q($this->gettext('decryptbadpass'));
else
- $msg = Q($this->gettext('decrypterror'));
+ $msg = rcube::Q($this->gettext('decrypterror'));
}
else {
$attrib['class'] = 'enigmanotice';
- $msg = Q($this->gettext('decryptok'));
+ $msg = rcube::Q($this->gettext('decryptok'));
}
$p['prefix'] .= html::div($attrib, $msg);
@@ -315,27 +315,27 @@ class enigma extends rcube_plugin
if ($sig->valid) {
$attrib['class'] = 'enigmanotice';
$sender = ($sig->name ? $sig->name . ' ' : '') . '<' . $sig->email . '>';
- $msg = Q(str_replace('$sender', $sender, $this->gettext('sigvalid')));
+ $msg = rcube::Q(str_replace('$sender', $sender, $this->gettext('sigvalid')));
}
else {
$attrib['class'] = 'enigmawarning';
$sender = ($sig->name ? $sig->name . ' ' : '') . '<' . $sig->email . '>';
- $msg = Q(str_replace('$sender', $sender, $this->gettext('siginvalid')));
+ $msg = rcube::Q(str_replace('$sender', $sender, $this->gettext('siginvalid')));
}
}
else if ($sig->getCode() == enigma_error::E_KEYNOTFOUND) {
$attrib['class'] = 'enigmawarning';
- $msg = Q(str_replace('$keyid', enigma_key::format_id($sig->getData('id')),
+ $msg = rcube::Q(str_replace('$keyid', enigma_key::format_id($sig->getData('id')),
$this->gettext('signokey')));
}
else {
$attrib['class'] = 'enigmaerror';
- $msg = Q($this->gettext('sigerror'));
+ $msg = rcube::Q($this->gettext('sigerror'));
}
/*
$msg .= '&nbsp;' . html::a(array('href' => "#sigdetails",
- 'onclick' => JS_OBJECT_NAME.".command('enigma-sig-details')"),
- Q($this->gettext('showdetails')));
+ 'onclick' => rcmail_output::JS_OBJECT_NAME.".command('enigma-sig-details')"),
+ rcube::Q($this->gettext('showdetails')));
*/
// test
// $msg .= '<br /><pre>'.$sig->body.'</pre>';
@@ -433,7 +433,7 @@ class enigma extends rcube_plugin
$p['content'] .= html::p(array('style' => $style),
html::a(array(
'href' => "#",
- 'onclick' => "return ".JS_OBJECT_NAME.".enigma_import_attachment('".JQ($part)."')",
+ 'onclick' => "return ".rcmail_output::JS_OBJECT_NAME.".enigma_import_attachment('".rcube::JQ($part)."')",
'title' => $this->gettext('keyattimport')),
html::img(array('src' => $this->url('skins/classic/key_add.png'), 'style' => "vertical-align:middle")))
. ' ' . html::span(null, $this->gettext('keyattfound')));
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'),