Permalink
Browse files

Remove deprecated functions (from bc.php file) usage in plugins

  • Loading branch information...
1 parent 4d7964d commit 61be822d62ea245b7f54ad313f49a956ab49076d @alecpl alecpl committed Jan 18, 2013
Showing with 380 additions and 374 deletions.
  1. +21 −21 plugins/acl/acl.php
  2. +2 −2 plugins/archive/archive.php
  3. +5 −5 plugins/database_attachments/database_attachments.php
  4. +13 −13 plugins/enigma/enigma.php
  5. +12 −12 plugins/enigma/lib/enigma_engine.php
  6. +13 −13 plugins/enigma/lib/enigma_ui.php
  7. +1 −1 plugins/hide_blockquote/hide_blockquote.php
  8. +1 −1 plugins/http_authentication/http_authentication.php
  9. +1 −0 plugins/managesieve/Changelog
  10. +1 −1 plugins/managesieve/lib/Roundcube/rcube_sieve.php
  11. +177 −177 plugins/managesieve/managesieve.php
  12. +2 −2 plugins/markasjunk/markasjunk.php
  13. +8 −8 plugins/new_user_dialog/new_user_dialog.php
  14. +1 −1 plugins/new_user_identity/new_user_identity.php
  15. +2 −2 plugins/newmail_notifier/newmail_notifier.php
  16. +1 −1 plugins/password/drivers/chpasswd.php
  17. +1 −1 plugins/password/drivers/dbmail.php
  18. +1 −1 plugins/password/drivers/directadmin.php
  19. +1 −1 plugins/password/drivers/expect.php
  20. +6 −6 plugins/password/drivers/hmail.php
  21. +1 −1 plugins/password/drivers/ldap.php
  22. +1 −1 plugins/password/drivers/ldap_simple.php
  23. +2 −2 plugins/password/drivers/pam.php
  24. +1 −1 plugins/password/drivers/pw_usermod.php
  25. +1 −1 plugins/password/drivers/sasl.php
  26. +1 −1 plugins/password/drivers/smb.php
  27. +7 −7 plugins/password/drivers/sql.php
  28. +1 −1 plugins/password/drivers/virtualmin.php
  29. +2 −2 plugins/password/drivers/xmail.php
  30. +16 −16 plugins/password/password.php
  31. +8 −8 plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
  32. +1 −1 plugins/subscriptions_option/subscriptions_option.php
  33. +12 −12 plugins/userinfo/userinfo.php
  34. +6 −6 plugins/vcard_attachments/vcard_attachments.php
  35. +1 −1 plugins/virtuser_file/virtuser_file.php
  36. +31 −31 plugins/virtuser_query/virtuser_query.php
  37. +17 −12 plugins/zipdownload/zipdownload.php
  38. +1 −1 program/include/rcmail.php
View
@@ -55,7 +55,7 @@ function init()
*/
function acl_actions()
{
- $action = trim(get_input_value('_act', RCUBE_INPUT_GPC));
+ $action = trim(rcube_utils::get_input_value('_act', rcube_utils::INPUT_GPC));
// Connect to IMAP
$this->rc->storage_init();
@@ -85,8 +85,8 @@ function acl_autocomplete()
{
$this->load_config();
- $search = get_input_value('_search', RCUBE_INPUT_GPC, true);
- $sid = get_input_value('_id', RCUBE_INPUT_GPC);
+ $search = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC, true);
+ $sid = rcube_utils::get_input_value('_id', rcube_utils::INPUT_GPC);
$users = array();
if ($this->init_ldap()) {
@@ -157,12 +157,12 @@ function folder_form($args)
// add Info fieldset if it doesn't exist
if (!isset($args['form']['props']['fieldsets']['info']))
$args['form']['props']['fieldsets']['info'] = array(
- 'name' => rcube_label('info'),
+ 'name' => $this->rc->gettext('info'),
'content' => array());
// Display folder rights to 'Info' fieldset
$args['form']['props']['fieldsets']['info']['content']['myrights'] = array(
- 'label' => Q($this->gettext('myrights')),
+ 'label' => rcube::Q($this->gettext('myrights')),
'value' => $this->acl2text($myrights)
);
@@ -186,7 +186,7 @@ function folder_form($args)
$this->rc->output->add_label('autocompletechars', 'autocompletemore');
$args['form']['sharing'] = array(
- 'name' => Q($this->gettext('sharing')),
+ 'name' => rcube::Q($this->gettext('sharing')),
'content' => $this->rc->output->parse('acl.table', false, false),
);
@@ -392,14 +392,14 @@ private function list_rights($attrib=array())
// filter out virtual rights (c or d) the server may return
$userrights = array_intersect($rights, $supported);
- $userid = html_identifier($user);
+ $userid = rcube_utils::html_identifier($user);
if (!empty($this->specials) && in_array($user, $this->specials)) {
$user = $this->gettext($user);
}
$table->add_row(array('id' => 'rcmrow'.$userid));
- $table->add('user', Q($user));
+ $table->add('user', rcube::Q($user));
foreach ($items as $key => $right) {
$in = $this->acl_compare($userrights, $right);
@@ -427,10 +427,10 @@ private function list_rights($attrib=array())
*/
private function action_save()
{
- $mbox = trim(get_input_value('_mbox', RCUBE_INPUT_GPC, true)); // UTF7-IMAP
- $user = trim(get_input_value('_user', RCUBE_INPUT_GPC));
- $acl = trim(get_input_value('_acl', RCUBE_INPUT_GPC));
- $oldid = trim(get_input_value('_old', RCUBE_INPUT_GPC));
+ $mbox = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true)); // UTF7-IMAP
+ $user = trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_GPC));
+ $acl = trim(rcube_utils::get_input_value('_acl', rcube_utils::INPUT_GPC));
+ $oldid = trim(rcube_utils::get_input_value('_old', rcube_utils::INPUT_GPC));
$acl = array_intersect(str_split($acl), $this->rights_supported());
$users = $oldid ? array($user) : explode(',', $user);
@@ -443,7 +443,7 @@ private function action_save()
}
else {
if (!strpos($user, '@') && ($realm = $this->get_realm())) {
- $user .= '@' . rcube_idn_to_ascii(preg_replace('/^@/', '', $realm));
+ $user .= '@' . rcube_utils::idn_to_ascii(preg_replace('/^@/', '', $realm));
}
$username = $user;
}
@@ -454,7 +454,7 @@ private function action_save()
if ($user != $_SESSION['username'] && $username != $_SESSION['username']) {
if ($this->rc->storage->set_acl($mbox, $user, $acl)) {
- $ret = array('id' => html_identifier($user),
+ $ret = array('id' => rcube_utils::html_identifier($user),
'username' => $username, 'acl' => implode($acl), 'old' => $oldid);
$this->rc->output->command('acl_update', $ret);
$result++;
@@ -475,15 +475,15 @@ private function action_save()
*/
private function action_delete()
{
- $mbox = trim(get_input_value('_mbox', RCUBE_INPUT_GPC, true)); //UTF7-IMAP
- $user = trim(get_input_value('_user', RCUBE_INPUT_GPC));
+ $mbox = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true)); //UTF7-IMAP
+ $user = trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_GPC));
$user = explode(',', $user);
foreach ($user as $u) {
$u = trim($u);
if ($this->rc->storage->delete_acl($mbox, $u)) {
- $this->rc->output->command('acl_remove_row', html_identifier($u));
+ $this->rc->output->command('acl_remove_row', rcube_utils::html_identifier($u));
}
else {
$error = true;
@@ -507,8 +507,8 @@ private function action_list()
return;
}
- $this->mbox = trim(get_input_value('_mbox', RCUBE_INPUT_GPC, true)); // UTF7-IMAP
- $advanced = trim(get_input_value('_mode', RCUBE_INPUT_GPC));
+ $this->mbox = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true)); // UTF7-IMAP
+ $advanced = trim(rcube_utils::get_input_value('_mode', rcube_utils::INPUT_GPC));
$advanced = $advanced == 'advanced' ? true : false;
// Save state in user preferences
@@ -543,12 +543,12 @@ function acl2text($rights)
foreach ($supported as $right) {
if (in_array($right, $rights)) {
- $list[] = html::tag('li', null, Q($this->gettext('acl' . $right)));
+ $list[] = html::tag('li', null, rcube::Q($this->gettext('acl' . $right)));
}
}
if (count($list) == count($supported))
- return Q($this->gettext('aclfull'));
+ return rcube::Q($this->gettext('aclfull'));
return html::tag('ul', $attrib, implode("\n", $list));
}
@@ -104,7 +104,7 @@ function prefs_table($args)
// load folders list when needed
if ($CURR_SECTION)
- $select = rcmail_mailbox_select(array('noselection' => '---', 'realnames' => true,
+ $select = $rcmail->folder_selector(array('noselection' => '---', 'realnames' => true,
'maxlength' => 30, 'exceptions' => array('INBOX'), 'folder_filter' => 'mail', 'folder_rights' => 'w'));
else
$select = new html_select();
@@ -121,7 +121,7 @@ function prefs_table($args)
function save_prefs($args)
{
if ($args['section'] == 'folders') {
- $args['prefs']['archive_mbox'] = get_input_value('_archive_mbox', RCUBE_INPUT_POST);
+ $args['prefs']['archive_mbox'] = rcube_utils::get_input_value('_archive_mbox', rcube_utils::INPUT_POST);
return $args;
}
}
@@ -46,7 +46,7 @@ function upload($args)
$data = base64_encode($data);
$status = $rcmail->db->query(
- "INSERT INTO ".get_table_name('cache')
+ "INSERT INTO ".$rcmail->db->table_name('cache')
." (created, user_id, cache_key, data)"
." VALUES (".$rcmail->db->now().", ?, ?, ?)",
$_SESSION['user_id'],
@@ -82,7 +82,7 @@ function save($args)
$data = base64_encode($args['data']);
$status = $rcmail->db->query(
- "INSERT INTO ".get_table_name('cache')
+ "INSERT INTO ".$rcmail->db->table_name('cache')
." (created, user_id, cache_key, data)"
." VALUES (".$rcmail->db->now().", ?, ?, ?)",
$_SESSION['user_id'],
@@ -106,7 +106,7 @@ function remove($args)
$args['status'] = false;
$rcmail = rcmail::get_instance();
$status = $rcmail->db->query(
- "DELETE FROM ".get_table_name('cache')
+ "DELETE FROM ".$rcmail->db->table_name('cache')
." WHERE user_id = ?"
." AND cache_key = ?",
$_SESSION['user_id'],
@@ -139,7 +139,7 @@ function get($args)
$sql_result = $rcmail->db->query(
"SELECT data"
- ." FROM ".get_table_name('cache')
+ ." FROM ".$rcmail->db->table_name('cache')
." WHERE user_id=?"
." AND cache_key=?",
$_SESSION['user_id'],
@@ -161,7 +161,7 @@ function cleanup($args)
$prefix = $this->cache_prefix . $args['group'];
$rcmail = rcmail::get_instance();
$rcmail->db->query(
- "DELETE FROM ".get_table_name('cache')
+ "DELETE FROM ".$rcmail->db->table_name('cache')
." WHERE user_id = ?"
." AND cache_key LIKE '{$prefix}%'",
$_SESSION['user_id']);
View
@@ -79,7 +79,7 @@ function init()
$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 @@ function preferences_save($p)
{
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 @@ function status_message($p)
$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 @@ function status_message($p)
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 @@ function message_output($p)
$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')));
@@ -65,7 +65,7 @@ function load_pgp_driver()
$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 @@ function load_pgp_driver()
$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 @@ function load_smime_driver()
$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 @@ function load_smime_driver()
$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 @@ private function pgp_verify(&$msg_body, $sig_body=null)
$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 @@ private function pgp_decrypt(&$msg_body)
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 @@ function list_keys($pattern='')
$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 @@ function get_key($keyid)
$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 @@ function import_key($content, $isfile=false)
$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 @@ function import_key($content, $isfile=false)
*/
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);
Oops, something went wrong.

0 comments on commit 61be822

Please sign in to comment.