diff options
author | alecpl <alec@alec.pl> | 2011-12-07 11:39:36 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-12-07 11:39:36 +0000 |
commit | a90ad2840f5a10576caf0219036ae26ed1090dcc (patch) | |
tree | cbe11643ece20d0ea1f3ac5f97c14c0c829ce757 /program/steps | |
parent | b6da0b76afb5697685c35b8584631294cfc7b12f (diff) |
- Deprecate $DB, $USER, $IMAP global variables, Use $RCMAIL instead
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/compose.inc | 2 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 4 | ||||
-rw-r--r-- | program/steps/settings/delete_identity.inc | 2 | ||||
-rw-r--r-- | program/steps/settings/edit_identity.inc | 2 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 4 | ||||
-rw-r--r-- | program/steps/settings/save_identity.inc | 6 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index c3863e448..08503227c 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -245,7 +245,7 @@ if (!empty($msg_uid)) $MESSAGE->compose = array(); // get user's identities -$MESSAGE->identities = $USER->list_identities(); +$MESSAGE->identities = $RCMAIL->user->list_identities(); if (count($MESSAGE->identities)) { foreach ($MESSAGE->identities as $idx => $ident) { diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index e4e5093b1..9d4d42562 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -72,9 +72,9 @@ function rcmail_encrypt_header($what) // get identity record function rcmail_get_identity($id) { - global $USER, $OUTPUT; + global $RCMAIL, $OUTPUT; - if ($sql_arr = $USER->get_identity($id)) { + if ($sql_arr = $RCMAIL->user->get_identity($id)) { $out = $sql_arr; $out['mailto'] = $sql_arr['email']; $out['string'] = format_email_recipient($sql_arr['email'], diff --git a/program/steps/settings/delete_identity.inc b/program/steps/settings/delete_identity.inc index 275bcb684..a110c1c6a 100644 --- a/program/steps/settings/delete_identity.inc +++ b/program/steps/settings/delete_identity.inc @@ -32,7 +32,7 @@ if ($iid && preg_match('/^[0-9]+(,[0-9]+)*$/', $iid)) { $plugin = $RCMAIL->plugins->exec_hook('identity_delete', array('id' => $iid)); - $deleted = !$plugin['abort'] ? $USER->delete_identity($iid) : $plugin['result']; + $deleted = !$plugin['abort'] ? $RCMAIL->user->delete_identity($iid) : $plugin['result']; if ($deleted > 0 && $deleted !== false) $OUTPUT->show_message('deletedsuccessfully', 'confirmation', null, false); diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index a42e8d091..df5cf9328 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -23,7 +23,7 @@ define('IDENTITIES_LEVEL', intval($RCMAIL->config->get('identities_level', 0))); // edit-identity if (($_GET['_iid'] || $_POST['_iid']) && $RCMAIL->action=='edit-identity') { - $IDENTITY_RECORD = $USER->get_identity(get_input_value('_iid', RCUBE_INPUT_GPC)); + $IDENTITY_RECORD = $RCMAIL->user->get_identity(get_input_value('_iid', RCUBE_INPUT_GPC)); if (is_array($IDENTITY_RECORD)) $OUTPUT->set_env('iid', $IDENTITY_RECORD['identity_id']); diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 65836a958..ac55acb3a 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -63,14 +63,14 @@ function rcmail_sections_list($attrib) function rcmail_identities_list($attrib) { - global $OUTPUT, $USER, $RCMAIL; + global $OUTPUT, $RCMAIL; // add id to message list table if not specified if (!strlen($attrib['id'])) $attrib['id'] = 'rcmIdentitiesList'; // get identities list and define 'mail' column - $list = $USER->list_identities(); + $list = $RCMAIL->user->list_identities(); foreach ($list as $idx => $row) $list[$idx]['mail'] = trim($row['name'] . ' <' . rcube_idn_to_utf8($row['email']) .'>'); diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc index f493f7385..f88e732d9 100644 --- a/program/steps/settings/save_identity.inc +++ b/program/steps/settings/save_identity.inc @@ -84,7 +84,7 @@ if ($_POST['_iid']) $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); if (!$plugin['abort']) - $updated = $USER->update_identity($iid, $save_data); + $updated = $RCMAIL->user->update_identity($iid, $save_data); else $updated = $plugin['result']; @@ -124,7 +124,7 @@ else if (IDENTITIES_LEVEL < 2) $save_data['reply-to'] = rcube_idn_to_ascii($save_data['reply-to']); if (!$plugin['abort']) - $insert_id = $save_data['email'] ? $USER->insert_identity($save_data) : null; + $insert_id = $save_data['email'] ? $RCMAIL->user->insert_identity($save_data) : null; else $insert_id = $plugin['result']; @@ -149,7 +149,7 @@ else // mark all other identities as 'not-default' if ($default_id) - $USER->set_default($default_id); + $RCMAIL->user->set_default($default_id); // go to next step rcmail_overwrite_action('identities'); diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index a6388c579..5cb79d160 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -188,7 +188,7 @@ switch ($CURR_SECTION) // Save preferences if (!$plugin['abort']) - $saved = $USER->save_prefs($a_user_prefs); + $saved = $RCMAIL->user->save_prefs($a_user_prefs); else $saved = $plugin['result']; |