Changeset 806 in subversion
- Timestamp:
- Sep 22, 2007 12:49:56 PM (6 years ago)
- Location:
- branches/devel-vnext
- Files:
-
- 18 added
- 19 deleted
- 55 edited
- 2 moved
-
README (modified) (2 diffs)
-
bin/quotaimg.php (modified) (1 diff)
-
index.php (modified) (21 diffs)
-
plugins/addressbook/rcube_contacts_macbay.inc (modified) (11 diffs)
-
plugins/macbay_filter/bin/plugin_action.php (modified) (2 diffs)
-
plugins/macbay_filter/bootstrap.php (modified) (1 diff)
-
plugins/macbay_filter/delete.php (modified) (2 diffs)
-
plugins/macbay_filter/form.php (modified) (5 diffs)
-
plugins/macbay_filter/lib/macbay_filter.class.php (modified) (1 diff)
-
plugins/macbay_pop3/ajax/new_rpop.php (modified) (1 diff)
-
plugins/macbay_pop3/bin/plugin_action.php (modified) (1 diff)
-
plugins/macbay_pop3/bootstrap.php (modified) (1 diff)
-
plugins/macbay_pop3/form.php (modified) (1 diff)
-
plugins/macbay_pop3/lib/macbay_pop3.class.php (modified) (1 diff)
-
program/include/bootstrap.php (modified) (5 diffs)
-
program/include/bugs.inc (deleted)
-
program/include/cache.inc (deleted)
-
program/include/globals.php (added)
-
program/include/html.php (added)
-
program/include/main.inc (deleted)
-
program/include/rcmail_template.inc (deleted)
-
program/include/rcube.php (added)
-
program/include/rcube/base_form_element.php (deleted)
-
program/include/rcube/css.php (deleted)
-
program/include/rcube/form_elements.php (deleted)
-
program/include/rcube/header_sorter.php (deleted)
-
program/include/rcube/html_page.php (deleted)
-
program/include/rcube/message_part.php (deleted)
-
program/include/rcube/rcmail_compose.php (modified) (41 diffs)
-
program/include/rcube/rcmail_send.php (modified) (5 diffs)
-
program/include/rcube/registry (deleted)
-
program/include/rcube/registry.php (deleted)
-
program/include/rcube/result_set.php (deleted)
-
program/include/rcube_browser.php (added)
-
program/include/rcube_contacts.inc (deleted)
-
program/include/rcube_contacts.php (added)
-
program/include/rcube_db.php (moved) (moved from branches/devel-vnext/program/include/rcube_db.inc) (5 diffs)
-
program/include/rcube_error.php (added)
-
program/include/rcube_header_sorter.php (added)
-
program/include/rcube_html_page.php (added)
-
program/include/rcube_imap.inc (deleted)
-
program/include/rcube_imap.php (added)
-
program/include/rcube_json_output.php (added)
-
program/include/rcube_ldap.inc (deleted)
-
program/include/rcube_ldap.php (added)
-
program/include/rcube_mail_mime.php (added)
-
program/include/rcube_mdb2.php (moved) (moved from branches/devel-vnext/program/include/rcube_mdb2.inc) (4 diffs)
-
program/include/rcube_message_part.php (added)
-
program/include/rcube_registry.php (added)
-
program/include/rcube_registry_exception.php (added)
-
program/include/rcube_result_set.php (added)
-
program/include/rcube_shared.inc (deleted)
-
program/include/rcube_smtp.inc (deleted)
-
program/include/rcube_smtp.php (added)
-
program/include/rcube_sqlite.inc (modified) (1 diff)
-
program/include/rcube_template.php (added)
-
program/include/session.inc (modified) (10 diffs)
-
program/lib/imap.inc (modified) (2 diffs)
-
program/lib/rc_mail_mime.inc (deleted)
-
program/lib/utf8.class.php (modified) (1 diff)
-
program/steps/addressbook/copy.inc (modified) (1 diff)
-
program/steps/addressbook/delete.inc (modified) (1 diff)
-
program/steps/addressbook/edit.inc (modified) (9 diffs)
-
program/steps/addressbook/func.inc (modified) (20 diffs)
-
program/steps/addressbook/list.inc (modified) (1 diff)
-
program/steps/addressbook/mailto.inc (modified) (3 diffs)
-
program/steps/addressbook/save.inc (modified) (9 diffs)
-
program/steps/addressbook/search.inc (modified) (2 diffs)
-
program/steps/addressbook/show.inc (modified) (5 diffs)
-
program/steps/error.inc (modified) (3 diffs)
-
program/steps/mail/addcontact.inc (modified) (2 diffs)
-
program/steps/mail/check_recent.inc (modified) (1 diff)
-
program/steps/mail/compose.inc (modified) (11 diffs)
-
program/steps/mail/folders.inc (modified) (3 diffs)
-
program/steps/mail/func.inc (modified) (74 diffs)
-
program/steps/mail/get.inc (modified) (3 diffs)
-
program/steps/mail/list.inc (modified) (2 diffs)
-
program/steps/mail/mark.inc (modified) (1 diff)
-
program/steps/mail/move_del.inc (modified) (5 diffs)
-
program/steps/mail/rss.inc (modified) (2 diffs)
-
program/steps/mail/search.inc (modified) (1 diff)
-
program/steps/mail/sendmail.inc (modified) (19 diffs)
-
program/steps/mail/show.inc (modified) (9 diffs)
-
program/steps/mail/spell.inc (modified) (1 diff)
-
program/steps/mail/upload.inc (modified) (3 diffs)
-
program/steps/mail/viewsource.inc (modified) (2 diffs)
-
program/steps/settings/delete_identity.inc (modified) (2 diffs)
-
program/steps/settings/edit_identity.inc (modified) (9 diffs)
-
program/steps/settings/func.inc (modified) (20 diffs)
-
program/steps/settings/identities.inc (modified) (4 diffs)
-
program/steps/settings/manage_folders.inc (modified) (24 diffs)
-
program/steps/settings/save_identity.inc (modified) (11 diffs)
-
program/steps/settings/save_prefs.inc (modified) (3 diffs)
-
skins/default/templates/error.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/devel-vnext/README
r589 r806 47 47 ------------ 48 48 Basic sequence (index.php): 49 - index.php -> rcmail_load_gui -> new rcmail_template -> rcmail_template::send49 - index.php -> load_gui -> new rcube_template -> rcube_template::send 50 50 - authentication details in this sequence 51 51 … … 54 54 - can see task in roundcube link when you mouse over it 55 55 - task templates stored in skins/default/templates 56 - templates "roundcube:" tokens that get replaced in rc mail_template class56 - templates "roundcube:" tokens that get replaced in rcube_template class 57 57 58 58 program/include/rcube_shared.inc -
branches/devel-vnext/bin/quotaimg.php
r676 r806 34 34 * and total quota (in MB or GB) along with the image. 35 35 * 36 * @todo Move in rc _main36 * @todo Move in rcmail 37 37 * @todo Move doc from within the table to docblock. 38 38 * @todo Create config vars for this. -
branches/devel-vnext/index.php
r758 r806 3 3 +-----------------------------------------------------------------------+ 4 4 | RoundCube Webmail IMAP Client | 5 | Version 0.1- rc1|5 | Version 0.1-devel-vnext | 6 6 | | 7 7 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | … … 41 41 */ 42 42 43 $INSTALL_PATH = dirname(__FILE__); 44 require_once dirname(__FILE__) . '/program/include/bootstrap.php'; 45 46 // include base files 47 require_once 'include/rcube_shared.inc'; 48 require_once 'include/rcube_imap.inc'; 49 require_once 'include/bugs.inc'; 50 require_once 'include/main.inc'; 51 require_once 'include/cache.inc'; 52 require_once 'PEAR.php'; 53 54 $RC_URI = str_replace( 55 $_SERVER['QUERY_STRING'], 56 '', 57 $_SERVER['REQUEST_URI'] 43 // bootstrap 44 require_once 'program/include/bootstrap.php'; 45 46 $BASE_URI = str_replace($_SERVER['QUERY_STRING'], '', $_SERVER['REQUEST_URI']); 47 if (substr($BASE_URI, -1, 1) == '?') { 48 $BASE_URI = substr($BASE_URI, 0, -1); 49 } 50 51 $MAIN_TASKS = array( 52 'mail', 53 'settings', 54 'logout', 55 'plugin', 56 'addressbook', 58 57 ); 59 if (substr($RC_URI, -1, 1) == '?') {60 $RC_URI = substr($RC_URI, 0, -1);61 }62 63 //rc_main::tfk_debug($RC_URI);64 65 $registry = rc_registry::getInstance();66 $registry->set('INSTALL_PATH', $INSTALL_PATH, 'core');67 $registry->set('s_mbstring_loaded', null, 'core');68 $registry->set('sa_languages', null, 'core');69 $registry->set('MAIN_TASKS', $MAIN_TASKS, 'core');70 $registry->set('RC_URI', $RC_URI, 'core');71 72 /**73 * log all $_POST74 * @author Till Klampaeckel <till@php.net>75 * @ignore76 */77 if ($_SERVER['REQUEST_METHOD'] == 'POST') {78 //rc_main::tfk_debug(var_export($_POST, true));79 //rc_main::tfk_debug(var_export($_GET, true));80 }81 else {82 //rc_main::tfk_debug('We are GET.');83 }84 85 //rc_main::tfk_debug('Included all files!');86 87 // set PEAR error handling88 // PEAR::setErrorHandling(PEAR_ERROR_TRIGGER, E_USER_NOTICE);89 90 58 91 59 // catch some url/post parameters 92 $_task = rc_main::strip_quotes(rc_main::get_input_value('_task', RCUBE_INPUT_GPC));93 $_action = rc_main::strip_quotes(rc_main::get_input_value('_action', RCUBE_INPUT_GPC));60 $_task = strip_quotes(rcube::get_input_value('_task', rcube::INPUT_GPC)); 61 $_action = strip_quotes(rcube::get_input_value('_action', rcube::INPUT_GPC)); 94 62 $_framed = (!empty($_GET['_framed']) || !empty($_POST['_framed'])); 95 63 … … 99 67 } 100 68 101 // set output buffering102 if ($_action != 'get' && $_action != 'viewsource') {103 // use gzip compression if supported104 if (function_exists('ob_gzhandler') && ini_get('zlib.output_compression')) {105 ob_start('ob_gzhandler');106 }107 else {108 ob_start();109 }110 }111 112 113 69 // start session with requested task 114 rc _main::rcmail_startup($_task);115 116 //rc _main::tfk_debug('// rcmail_startup');70 rcube::startup($_task); 71 72 //rcube::tfk_debug('// startup'); 117 73 118 74 // set session related variables 119 $COMM_PATH = sprintf(' ./?_task=%s', $_task);75 $COMM_PATH = sprintf('%s?_task=%s', $BASE_URI, $_task); 120 76 $SESS_HIDDEN_FIELD = ''; 121 122 77 123 78 // add framed parameter 124 79 if ($_framed) { 125 80 $COMM_PATH .= '&_framed=1'; 126 $SESS_HIDDEN_FIELD .= "\n".'<input type="hidden" name="_framed" value="1" />'; 127 } 81 $SESS_HIDDEN_FIELD .= "\n" . html::tag('input', array('type' => "hidden", 'name' => "_framed", 'value' => 1)); 82 } 83 84 // set some global properties 85 $registry = rcube_registry::get_instance(); 86 $registry->set('MAIN_TASKS', $MAIN_TASKS, 'core'); 87 $registry->set('BASE_URI', $BASE_URI, 'core'); 128 88 $registry->set('COMM_PATH', $COMM_PATH, 'core'); 89 $registry->set('OUTPUT_TYPE', 'html', 'core'); 90 $registry->set('OUTPUT_CHARSET', RCMAIL_CHARSET, 'core'); 129 91 $registry->set('SESS_HIDDEN_FIELD', $SESS_HIDDEN_FIELD, 'core'); 130 $registry->set('s_username', '', 'core'); 131 132 // init necessary objects for GUI 133 rc_main::rcmail_load_gui(); 134 135 //rc_main::tfk_debug('// rcmail_load_gui'); 92 93 94 // init output class 95 if (!empty($_GET['_remote']) || !empty($_POST['_remote'])) { 96 $registry->set('ajax_call', true, 'core'); 97 rcube::init_json(); 98 } 99 else { 100 $registry->set('ajax_call', false, 'core'); 101 rcube::load_gui(); 102 } 103 136 104 137 105 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 139 107 140 108 141 if ($OUTPUT->ajax_call) { 142 143 } 144 else { 145 $OUTPUT->include_script('jquery-1.1.4.js'); 146 $OUTPUT->include_script('tablesort/jquery.easydom.js'); 147 $OUTPUT->include_script('tablesort/jquery.strip_alternate_row.js'); 148 $OUTPUT->include_script('tablesort/jquery.tablesort.compressed.js'); 149 } 109 $OUTPUT->set_env('comm_path', $COMM_PATH); 110 150 111 151 112 // check DB connections and exit on failure 152 113 if (is_null($DB)) { 153 var_dump($DB); exit; 154 rc_bugs::raise_error(array( 155 'code' => 666, 156 'type' => 'db', 157 'message' => 'No connection.'), FALSE, TRUE 158 ); 159 } 160 if ($err_str = $DB->is_error()) { 161 rc_bugs::raise_error(array( 114 rcube_error::raise(array( 162 115 'code' => 603, 163 116 'type' => 'db', 164 'message' => $err_str), FALSE, TRUE117 'message' => 'No connection.'), false, true 165 118 ); 166 167 //rc_main::tfk_debug('// DB ERROR'); 168 } 169 170 //rc_main::tfk_debug('// NO DB ERROR'); 119 } 120 if ($err_str = $DB->is_error()) { 121 rcube_error::raise(array( 122 'code' => 603, 123 'type' => 'db', 124 'message' => $err_str), false, true 125 ); 126 } 127 128 //rcube::tfk_debug('// NO DB ERROR'); 171 129 172 130 // error steps 173 131 if ($_action=='error' && !empty($_GET['_code'])) { 174 rc _bugs::raise_error(array('code' => hexdec($_GET['_code'])), FALSE, TRUE);175 } 176 177 //rc _main::tfk_debug('// going');178 179 //rc _main::tfk_debug("task {$_task} / action {$_action}");132 rcube_error::raise(array('code' => hexdec($_GET['_code'])), false, true); 133 } 134 135 //rcube::tfk_debug('// going'); 136 137 //rcube::tfk_debug("task {$_task} / action {$_action}"); 180 138 181 139 // try to log in 182 140 if ($_action=='login' && $_task=='mail') { 183 141 184 //rc _main::tfk_debug('Here we go, a login.');185 186 $host = rc _main::rcmail_autoselect_host();187 188 //rc _main::tfk_debug('Selected host: ' . $host);142 //rcube::tfk_debug('Here we go, a login.'); 143 144 $host = rcube::autoselect_host(); 145 146 //rcube::tfk_debug('Selected host: ' . $host); 189 147 190 148 // check if client supports cookies … … 192 150 $OUTPUT->show_message("cookiesdisabled", 'warning'); 193 151 } 194 else if (152 else if ( 195 153 $_SESSION['temp'] 196 154 && !empty($_POST['_user']) 197 155 && isset($_POST['_pass']) 198 && rc _main::rcmail_login(199 rc _main::get_input_value('_user', RCUBE_INPUT_POST),200 rc _main::get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'),156 && rcube::login( 157 rcube::get_input_value('_user', rcube::INPUT_POST), 158 rcube::get_input_value('_pass', rcube::INPUT_POST, true, 'ISO-8859-1'), 201 159 $host 202 160 ) … … 206 164 sess_regenerate_id(); 207 165 208 //rc _main::tfk_debug('Yay, we log in.');166 //rcube::tfk_debug('Yay, we log in.'); 209 167 210 168 // send auth cookie if necessary 211 rc _main::rcmail_authenticate_session();169 rcube::authenticate_session(); 212 170 213 171 // send redirect … … 217 175 else { 218 176 219 //rc _main::tfk_debug('Oops, failed.');177 //rcube::tfk_debug('Oops, failed.'); 220 178 if (empty($_POST['_user']) === true) { 221 //rc _main::tfk_debug('Login: no _user');179 //rcube::tfk_debug('Login: no _user'); 222 180 } 223 181 if (isset($_POST['_pass']) === false) { 224 //rc _main::tfk_debug('Login: no _pass');182 //rcube::tfk_debug('Login: no _pass'); 225 183 } 226 $status = rc _main::rcmail_login(227 rc _main::get_input_value('_user', RCUBE_INPUT_POST),228 rc _main::get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'),184 $status = rcube::login( 185 rcube::get_input_value('_user', rcube::INPUT_POST), 186 rcube::get_input_value('_pass', rcube::INPUT_POST, true, 'ISO-8859-1'), 229 187 $host 230 188 ); 231 //rc _main::tfk_debug('Login: status: ' . $status);232 233 //rc _main::tfk_debug(var_export($_SESSION['temp'], true));234 //rc _main::tfk_debug(date('Y-m-d H:i:s', $_SESSION['auth_time']));189 //rcube::tfk_debug('Login: status: ' . $status); 190 191 //rcube::tfk_debug(var_export($_SESSION['temp'], true)); 192 //rcube::tfk_debug(date('Y-m-d H:i:s', $_SESSION['auth_time'])); 235 193 236 194 $OUTPUT->show_message("loginfailed", 'warning'); … … 241 199 // end session 242 200 else if (($_task=='logout' || $_action=='logout') && isset($_SESSION['user_id'])) { 243 $CONFIG = $registry->get('CONFIG', 'core'); 244 if (isset($CONFIG['external_logout']) && empty($CONFIG['external_logout']) === false) { 245 rc_main::rcmail_kill_session(); 246 //session_destroy(); 247 header('Location:' . $CONFIG['external_logout']); 201 $external_logout = $registry->get('external_logout', 'config'); 202 if (empty($external_logout) === false) { 203 rcube::kill_session(); 204 header('Location:' . $external_logout); 248 205 exit; 249 206 } 207 250 208 $OUTPUT->show_message('loggedout'); 251 rc _main::rcmail_kill_session();209 rcube::kill_session(); 252 210 } 253 211 254 212 // check session and auth cookie 255 213 else if ($_action != 'login' && $_SESSION['user_id'] && $_action != 'send') { 256 if (!rc _main::rcmail_authenticate_session()) {214 if (!rcube::authenticate_session()) { 257 215 $OUTPUT->show_message('sessionerror', 'error'); 258 rc _main::rcmail_kill_session();259 } 260 } 261 262 //rc _main::tfk_debug('// going #2');216 rcube::kill_session(); 217 } 218 } 219 220 //rcube::tfk_debug('// going #2'); 263 221 264 222 $IMAP = $registry->get('IMAP', 'core'); 265 //rc _main::tfk_debug(var_export($IMAP, true) . "\n\nIMAP LOADED.");223 //rcube::tfk_debug(var_export($IMAP, true) . "\n\nIMAP LOADED."); 266 224 267 225 // log in to imap server 268 if (!empty($_SESSION['user_id']) && $_task =='mail') {269 270 //rc _main::tfk_debug('// trying to login');226 if (!empty($_SESSION['user_id']) && $_task == 'mail') { 227 228 //rcube::tfk_debug('// trying to login'); 271 229 272 230 $conn = $IMAP->connect( 273 $_SESSION['imap_host'],274 $_SESSION['username'],275 rc_main::decrypt_passwd($_SESSION['password']),276 $_SESSION['imap_port'],277 $_SESSION['imap_ssl']231 $_SESSION['imap_host'], 232 $_SESSION['username'], 233 rcube::decrypt_passwd($_SESSION['password']), 234 $_SESSION['imap_port'], 235 $_SESSION['imap_ssl'] 278 236 ); 279 237 if (!$conn) { … … 282 240 } 283 241 else { 284 rc _main::rcmail_set_imap_prop();242 rcube::set_imap_prop(); 285 243 } 286 244 } … … 290 248 if (empty($_SESSION['user_id'])) { 291 249 292 //rc _main::tfk_debug('// we need a login');250 //rcube::tfk_debug('// we need a login'); 293 251 294 252 if ($OUTPUT->ajax_call){ 253 $OUTPUT->reset(); 295 254 $OUTPUT->remote_response("setTimeout(\"location.href='\"+this.env.comm_path+\"'\", 2000);"); 296 255 } … … 298 257 } 299 258 300 //rc _main::tfk_debug("// task {$_task} action {$_action}");259 //rcube::tfk_debug("// task {$_task} action {$_action}"); 301 260 302 261 // check client X-header to verify request origin 303 262 if ($OUTPUT->ajax_call) { 304 if ( empty($CONFIG['devel_mode']) && !rc_request_header('X-RoundCube-Referer')) {263 if (!$registry->get('devel_mode', 'config') && !rcube::get_request_header('X-RoundCube-Referer')) { 305 264 header('HTTP/1.1 404 Not Found'); 306 265 die("Invalid Request"); … … 314 273 } 315 274 316 317 275 // not logged in -> show login page 318 276 if (!$_SESSION['user_id']) { 319 277 320 //rc_main::tfk_debug('// finally: login');278 rcube::tfk_debug('// finally: login'); 321 279 322 280 $OUTPUT->task = 'login'; … … 341 299 $_name = ''; 342 300 343 //rc _main::tfk_debug("testing: $_task / $_action");301 //rcube::tfk_debug("testing: $_task / $_action"); 344 302 345 303 // include task specific files … … 354 312 case 'check-recent': 355 313 $_name.= 'check_recent'; 356 //rc _main::tfk_debug('We check recent!');314 //rcube::tfk_debug('We check recent!'); 357 315 break; 358 316 … … 386 344 } 387 345 388 //rc _main::tfk_debug('Mail: ' . $_name);346 //rcube::tfk_debug('Mail: ' . $_name); 389 347 390 348 // make sure the message count is refreshed 391 349 $IMAP->messagecount($_SESSION['mbox'], 'ALL', TRUE); 392 $registry->set('IMAP', $IMAP, 'core');393 350 } 394 351 … … 441 398 } 442 399 443 //rc _main::tfk_debug($_task);400 //rcube::tfk_debug($_task); 444 401 445 402 /** … … 450 407 $_plugin = dirname(__FILE__) . '/plugins/' . $_action; 451 408 if (file_exists($_plugin) !== TRUE) { 452 //rc _main::tfk_debug("$_plugin does not exist.");409 //rcube::tfk_debug("$_plugin does not exist."); 453 410 $_plugin = ''; 454 411 } … … 457 414 $path_len = strlen(dirname(__FILE__) . '/plugins/'); 458 415 if (substr($_plugin, 0, $path_len) != dirname(__FILE__). '/plugins/') { 459 rc _bugs::raise_error(416 rcube_error::raise( 460 417 array( 461 418 'code' => 500, … … 468 425 TRUE 469 426 ); 470 //rc _main::tfk_debug('Possible hack.');427 //rcube::tfk_debug('Possible hack.'); 471 428 exit; 472 429 } 473 430 $status = @include $_plugin; 474 431 if ($status === FALSE) { 475 //rc _main::tfk_debug("Could not include: $_plugin");432 //rcube::tfk_debug("Could not include: $_plugin"); 476 433 } 477 434 exit; … … 487 444 } 488 445 else { 489 //rc _main::tfk_debug('Does not exist: ' . $_file);446 //rcube::tfk_debug('Does not exist: ' . $_file); 490 447 } 491 448 } … … 495 452 496 453 // if we arrive here, something went wrong 497 rc _bugs::raise_error(454 rcube_error::raise( 498 455 array( 499 456 'code' => 404, -
branches/devel-vnext/plugins/addressbook/rcube_contacts_macbay.inc
r703 r806 25 25 require_once 'Zend/XmlRpc/Client.php'; 26 26 27 /**28 * Include rcube_result_set29 * @ignore30 */31 require_once 'include/rcube/result_set.php';32 27 33 28 /** … … 73 68 * @uses self::$username 74 69 * @uses self::$password 75 * @uses rc _main::tfk_debug()70 * @uses rcube::tfk_debug() 76 71 * @todo Check for Zend_Xmlrpc_Client (instead of is_null()) 77 * @todo Replace call to rc _main::tfk_debug() with RC's logger72 * @todo Replace call to rcube::tfk_debug() with RC's logger 78 73 */ 79 74 public function __construct($username, $password, $xmlrpc_client = null) … … 92 87 } 93 88 catch (Zend_Exception $e) { 94 rc _main::tfk_debug('Addressbook Exception: ' . var_export($e, true));89 rcube::tfk_debug('Addressbook Exception: ' . var_export($e, true)); 95 90 } 96 91 } … … 162 157 * @uses self::$username 163 158 * @uses self::$password 164 * @uses rc _main::decrypt_passwd()159 * @uses rcube::decrypt_passwd() 165 160 */ 166 161 public function list_records($cols=null, $subset=0) … … 172 167 $params = array(); 173 168 array_push($params, $this->username); 174 array_push($params, rc _main::decrypt_passwd($this->password));169 array_push($params, rcube::decrypt_passwd($this->password)); 175 170 array_push($params, 'sort2'); 176 171 177 //rc _main::tfk_debug(var_export($params, true));172 //rcube::tfk_debug(var_export($params, true)); 178 173 179 174 try { 180 175 $resp = $this->xmlrpc_client->call('Addressbook.listContacts', $params); 181 176 if (isset($resp['error'])) { 182 rc _main::tfk_debug('Adressbook Exception: '.var_export($resp,true));177 rcube::tfk_debug('Adressbook Exception: '.var_export($resp,true)); 183 178 throw new Zend_Exception($resp['error'], $resp['resultcode']); 184 179 } 185 //rc _main::tfk_debug(var_export($resp, true));180 //rcube::tfk_debug(var_export($resp, true)); 186 181 if (isset($resp['result']) === false) { 187 182 throw new Zend_Exception('Unknown response.'); … … 191 186 foreach ($resp AS $foo=>$_contact) { 192 187 193 //rc _main::tfk_debug("CONTACT: " . var_export($_contact, true));188 //rcube::tfk_debug("CONTACT: " . var_export($_contact, true)); 194 189 195 190 if (isset($_contact['Email']['values']) === false) { … … 225 220 } 226 221 catch(Zend_Exception $e) { 227 rc _main::tfk_debug('Addressbook Exception: ' . var_export($e, true));222 rcube::tfk_debug('Addressbook Exception: ' . var_export($e, true)); 228 223 //$resp = array(); 229 224 } 230 //rc _main::tfk_debug(var_export($this->result, true));225 //rcube::tfk_debug(var_export($this->result, true)); 231 226 return $this->result; 232 227 } … … 293 288 public function insert($save_data, $check=false) 294 289 { 295 //rc _main::tfk_debug(var_export($save_data, true));290 //rcube::tfk_debug(var_export($save_data, true)); 296 291 297 292 $params = array(); 298 293 array_push($params, $this->username); 299 array_push($params, rc _main::decrypt_passwd($this->password));294 array_push($params, rcube::decrypt_passwd($this->password)); 300 295 301 296 $Email = array( … … 337 332 array_push($params, $contact_data); 338 333 339 //rc _main::tfk_debug(var_export($params, true));334 //rcube::tfk_debug(var_export($params, true)); 340 335 try { 341 336 $resp = $this->xmlrpc_client->call( … … 345 340 } 346 341 catch (Zend_Exception $e) { 347 rc _main::tfk_debug('Addressbook Exception: ' . var_export($e, true));342 rcube::tfk_debug('Addressbook Exception: ' . var_export($e, true)); 348 343 return false; 349 344 } … … 351 346 return true; 352 347 } 353 //rc _main::tfk_debug(var_export($resp, true));348 //rcube::tfk_debug(var_export($resp, true)); 354 349 return false; 355 350 } -
branches/devel-vnext/plugins/macbay_filter/bin/plugin_action.php
r775 r806 19 19 $status = $macbay_filter->saveRules($_POST); 20 20 if ($status !== true) { 21 rc _main::tfk_debug('Response: ' . $status);21 rcube::tfk_debug('Response: ' . $status); 22 22 array_push($error_msg, 'Ihre Änderungen konnten leider nicht gespeichert werden.'); 23 23 } … … 25 25 26 26 default: 27 rc _bugs::raise_error(27 rcube_error::raise( 28 28 array( 29 29 'code' => 666, -
branches/devel-vnext/plugins/macbay_filter/bootstrap.php
r700 r806 31 31 $params = array(); 32 32 array_push($params, $_SESSION['username']); 33 array_push($params, rc _main::decrypt_passwd($_SESSION['password']));33 array_push($params, rcube::decrypt_passwd($_SESSION['password'])); 34 34 $macbay_filter = new macbay_filter($mb_client, $params); 35 35 -
branches/devel-vnext/plugins/macbay_filter/delete.php
r640 r806 11 11 $params = array(); 12 12 array_push($params, $_SESSION['username']); 13 array_push($params, rc _main::decrypt_passwd($_SESSION['password']));13 array_push($params, rcube::decrypt_passwd($_SESSION['password'])); 14 14 array_push($params, $_POST['filterName']); 15 15 $status = $mb_client->call('cli.deleteRule', $params); … … 20 20 } 21 21 catch (Zend_Exception $e) { 22 rc _main::tfk_debug(var_export($e, true));22 rcube::tfk_debug(var_export($e, true)); 23 23 die($e->getMessage()); 24 24 } -
branches/devel-vnext/plugins/macbay_filter/form.php
r775 r806 22 22 require dirname(__FILE__) . '/bin/get.php'; 23 23 24 $registry = rc _registry::getInstance();24 $registry = rcube_registry::get_instance(); 25 25 $OUTPUT = $registry->get('OUTPUT', 'core'); 26 26 27 echo $OUTPUT-> parse('header_small', false);27 echo $OUTPUT->send('header_small', false); 28 28 ?> 29 29 <!-- #content needed to make CSS work - we override inline --> … … 47 47 </div> 48 48 <div id="newFormWrapper" style="padding-top:20px;"> 49 <form action="<?php echo $ RC_URI; ?>?_task=plugin&_action=macbay_filter/form.php" id="newRule" method="post" style="margin:0 0 0 10px;width:760px;">49 <form action="<?php echo $BASE_URI; ?>?_task=plugin&_action=macbay_filter/form.php" id="newRule" method="post" style="margin:0 0 0 10px;width:760px;"> 50 50 <?php require dirname(__FILE__) . '/ajax/filter_neu.php'; ?> 51 51 <input type="hidden" name="_plugin_action" value="add" /> … … 53 53 </div><br clear="left" /> 54 54 <div class="rpop_txt"> 55 <form id="currentRules" method="post" action="<?php echo $ RC_URI; ?>?_task=plugin&_action=macbay_filter/form.php" style="margin:0 0 0 0 !important;width:760px;">55 <form id="currentRules" method="post" action="<?php echo $BASE_URI; ?>?_task=plugin&_action=macbay_filter/form.php" style="margin:0 0 0 0 !important;width:760px;"> 56 56 <fieldset> 57 57 <h2>Filter und Regeln konfigurieren</h2> … … 141 141 var wrapper = new String(ruleType + '_' + filterId + '_add'); 142 142 $.post( 143 '<?php echo $ RC_URI; ?>?_task=plugin&_action=macbay_filter/ajax/new_' + ruleType + '.php',143 '<?php echo $BASE_URI; ?>?_task=plugin&_action=macbay_filter/ajax/new_' + ruleType + '.php', 144 144 {id: wrapper}, 145 145 function(data) { … … 157 157 $('#content_' + formId).slideUp('slow').ready(function(){ 158 158 $.post( 159 '<?php echo $registry->get(' RC_URI', 'core'); ?>?_task=plugin&_action=macbay_filter/delete.php',159 '<?php echo $registry->get('BASE_URI', 'core'); ?>?_task=plugin&_action=macbay_filter/delete.php', 160 160 {filterName: filterName }, 161 161 function(data) { -
branches/devel-vnext/plugins/macbay_filter/lib/macbay_filter.class.php
r775 r806 246 246 * @param Exception $e 247 247 * @param int $line 248 * @uses rc _bugs::raise_error()248 * @uses rcube_error::raise() 249 249 * @return void 250 250 */ 251 251 static function handleError($e, $line) 252 252 { 253 rc _main::tfk_debug($e->getMessage());254 rc _bugs::raise_error(253 rcube::tfk_debug($e->getMessage()); 254 rcube_error::raise( 255 255 array( 256 256 'code' => $e->getCode(), -
branches/devel-vnext/plugins/macbay_pop3/ajax/new_rpop.php
r649 r806 1 <form action="<?php echo $ RC_URI; ?>?_task=plugin&_action=macbay_pop3/form.php" id="form_rpop_new" method="post">1 <form action="<?php echo $BASE_URI; ?>?_task=plugin&_action=macbay_pop3/form.php" id="form_rpop_new" method="post"> 2 2 <p>Sie können noch <?php echo (($rpop_left > 1)?$rpop_left . ' Sammeldienste':' einen Sammeldienst'); ?> anlegen.</p> 3 3 <p>Bitte beachten Sie, dass wir die Einstellungen nicht für Sie überprüfen.</p><br /> -
branches/devel-vnext/plugins/macbay_pop3/bin/plugin_action.php
r775 r806 21 21 22 22 default: 23 rc _bugs::raise_error(23 rcube_error::raise( 24 24 array( 25 25 'code' => 666, -
branches/devel-vnext/plugins/macbay_pop3/bootstrap.php
r699 r806 31 31 $params = array(); 32 32 array_push($params, $_SESSION['username']); 33 array_push($params, rc _main::decrypt_passwd($_SESSION['password']));33 array_push($params, rcube::decrypt_passwd($_SESSION['password'])); 34 34 $macbay_pop3 = new macbay_pop3($mb_client, $params); 35 35 -
branches/devel-vnext/plugins/macbay_pop3/form.php
r775 r806 20 20 $rpop_left = (intval($rpops['maxRpop'])-count($rpops['rpop'])); 21 21 22 $registry = rc _registry::getInstance();22 $registry = rcube_registry::get_instance(); 23 23 $OUTPUT = $registry->get('OUTPUT', 'core'); 24 $ RC_URI = $registry->get('RC_URI', 'core');24 $BASE_URI = $registry->get('BASE_URI', 'core'); 25 25 26 echo $OUTPUT-> parse('header_small', false);26 echo $OUTPUT->send('header_small', false); 27 27 ?> 28 28 <!-- #content needed to make CSS work - we override inline --> -
branches/devel-vnext/plugins/macbay_pop3/lib/macbay_pop3.class.php
r699 r806 128 128 * @param Exception $e 129 129 * @param int $line 130 * @uses rc _bugs::raise_error()130 * @uses rcube_error::raise() 131 131 * @return void 132 132 */ 133 133 static function handleError($e, $line) 134 134 { 135 rc _bugs::raise_error(135 rcube_error::raise( 136 136 array( 137 137 'code' => $e->getCode(), -
branches/devel-vnext/program/include/bootstrap.php
r771 r806 1 1 <?php 2 3 /* 4 +-----------------------------------------------------------------------+ 5 | program/include/bootstrap.php | 6 | | 7 | This file is part of the RoundCube Webmail client | 8 | Copyright (C) 2007, RoundCube Dev, - Switzerland | 9 | Licensed under the GNU GPL | 10 | | 11 | PURPOSE: | 12 | Setup the application envoronment required to process | 13 | any request. | 14 +-----------------------------------------------------------------------+ 15 | Author: Tll Klampaeckel <till@php.net> | 16 | Thomas Bruederli <roundcube@gmail.com> | 17 +-----------------------------------------------------------------------+ 18 19 $Id: cache.inc 88 2005-12-03 16:54:12Z roundcube $ 20 21 */ 22 23 2 24 // application constants 3 25 define('RCMAIL_VERSION', 'devel-vnext (0.1-rc1)'); … … 5 27 define('JS_OBJECT_NAME', 'rcmail'); 6 28 7 // define global vars 8 $OUTPUT_TYPE = 'html'; 9 $MAIN_TASKS = array( 10 'mail', 11 'settings', 12 'logout', 13 'plugin', 14 'addressbook' 15 ); 16 17 if (isset($INSTALL_PATH) === false || empty($INSTALL_PATH) === true) { 18 $INSTALL_PATH = './'; 19 } 20 else { 21 if (substr($INSTALL_PATH, -16) == '/program/include') { 22 $INSTALL_PATH = str_replace('/program/include', '', $INSTALL_PATH); 23 } 24 $INSTALL_PATH.= '/'; 25 } 29 if (!defined('INSTALL_PATH')) 30 define('INSTALL_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/'); 26 31 27 32 // make sure path_separator is defined … … 33 38 // possible not compatible libraries (i.e PEAR) to be included 34 39 // instead the ones provided by RC 35 $include_path = $INSTALL_PATH . PATH_SEPARATOR; 36 $include_path.= $INSTALL_PATH . 'program' . PATH_SEPARATOR; 37 $include_path.= $INSTALL_PATH . 'program/lib' . PATH_SEPARATOR; 38 // $include_path.= '/usr/share/Zend-SVN/library' . PATH_SEPARATOR; 40 $include_path = INSTALL_PATH . PATH_SEPARATOR; 41 $include_path.= INSTALL_PATH . 'program' . PATH_SEPARATOR; 42 $include_path.= INSTALL_PATH . 'program/lib' . PATH_SEPARATOR; 39 43 $include_path.= ini_get('include_path'); 40 44 41 //echo 'Before: ' . $include_path; 42 //$status = ini_set('include_path', $include_path); 43 $status = set_include_path($include_path); 44 if ($status === false) { 45 if (set_include_path($include_path) === false) { 45 46 die('Fatal error: ini_set/set_include_path does not work.'); 46 47 } … … 50 51 ini_set('session.gc_maxlifetime', 21600); 51 52 ini_set('session.gc_divisor', 500); 52 ini_set('error_reporting', E_ALL ); // &~E_NOTICE53 ini_set('error_reporting', E_ALL&~E_NOTICE); 53 54 set_magic_quotes_runtime(0); 54 55 … … 59 60 } 60 61 61 require_once 'rcube/registry.php'; 62 ?> 62 63 /** 64 * Use PHP5 autoload for dynamic class loading 65 */ 66 function __autoload($classname) 67 { 68 $filename = preg_replace( 69 array('/MDB2_(.+)/', '/Mail_(.+)/', '/^html_.+/'), 70 array("MDB2/\\1", "Mail/\\1", "html"), 71 $classname 72 ); 73 74 @include_once($filename. ".php"); 75 } 76 77 78 // include global functions 79 require_once 'globals.php'; 80 81 82 /** 83 * Local callback function for PEAR errors 84 */ 85 function rcube_pear_error($err) 86 { 87 error_log(sprintf("%s (%s): %s", 88 $err->getMessage(), 89 $err->getCode(), 90 $err->getUserinfo()), 0); 91 } 92 93 94 // set PEAR error handling 95 PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'rcube_pear_error'); 96 97 98 // create registry and set some global properties 99 $registry = rcube_registry::get_instance(); 100 $registry->set('mbstring_loaded', null, 'core'); 101 102 -
branches/devel-vnext/program/include/rcube/rcmail_compose.php
r697 r806 7 7 function rcmail_compose_headers($attrib) 8 8 { 9 $registry = rc _registry::getInstance();9 $registry = rcube_registry::get_instance(); 10 10 $IMAP = $registry->get('IMAP', 'core'); 11 11 $MESSAGE = $registry->get('MESSAGE', 'core'); … … 33 33 // we have a set of recipients stored is session 34 34 if ( 35 ($mailto_id = rc _main::get_input_value('_mailto', RCUBE_INPUT_GET))35 ($mailto_id = rcube::get_input_value('_mailto', rcube::INPUT_GET)) 36 36 && $_SESSION['mailto'][$mailto_id] 37 37 ) { … … 39 39 } 40 40 elseif (!empty($_GET['_to'])) { 41 $fvalue = rc _main::get_input_value('_to', RCUBE_INPUT_GET);41 $fvalue = rcube::get_input_value('_to', rcube::INPUT_GET); 42 42 } 43 43 … … 53 53 } 54 54 $allow_attrib = array('id', 'class', 'style', 'cols', 'rows', 'wrap', 'tabindex'); 55 $field_type = ' textarea';55 $field_type = 'html_textarea'; 56 56 break; 57 57 … … 60 60 $fname = '_replyto'; 61 61 $allow_attrib = array('id', 'class', 'style', 'size', 'tabindex'); 62 $field_type = ' textfield';62 $field_type = 'html_inputfield'; 63 63 break; 64 64 } … … 75 75 76 76 if ($fname && !empty($_POST[$fname])) { 77 $fvalue = rc _main::get_input_value($fname, RCUBE_INPUT_POST, TRUE);77 $fvalue = rcube::get_input_value($fname, rcube::INPUT_POST, TRUE); 78 78 } 79 79 else if ($header && $compose_mode == RCUBE_COMPOSE_REPLY) { … … 100 100 $fvalue = ''; 101 101 102 //rc _main::tfk_debug("/ test: " . var_export($sa_recipients, true));102 //rcube::tfk_debug("/ test: " . var_export($sa_recipients, true)); 103 103 104 104 foreach ($to_addresses as $addr_part) { … … 155 155 function rcmail_compose_header_from($attrib) 156 156 { 157 $registry = rc _registry::getInstance();157 $registry = rcube_registry::get_instance(); 158 158 $MESSAGE = $registry->get('MESSAGE', 'core'); 159 159 $DB = $registry->get('DB', 'core'); … … 192 192 // get this user's identities 193 193 $_query = "SELECT identity_id, name, email, signature, html_signature"; 194 $_query.= " FROM " . rc _main::get_table_name('identities');194 $_query.= " FROM " . rcube::get_table_name('identities'); 195 195 $_query.= " WHERE user_id=?"; 196 196 $_query.= " AND del<>1"; 197 197 $_query.= " ORDER BY " . $DB->quoteIdentifier('standard')." DESC, name ASC"; 198 198 199 //rc _main::tfk_debug($_query);199 //rcube::tfk_debug($_query); 200 200 201 201 $sql_result = $DB->query($_query, $_SESSION['user_id']); … … 203 203 204 204 if ($DB->num_rows($sql_result) == 0) { 205 $input_from = new textfield($field_attrib);205 $input_from = new html_inputfield($field_attrib); 206 206 $out = $input_from->show($_POST['_from']); 207 207 … … 217 217 218 218 $field_attrib['onchange'] = JS_OBJECT_NAME.".change_identity(this)"; 219 $select_from = new select($field_attrib);219 $select_from = new html_select($field_attrib); 220 220 221 221 while ($sql_arr = $DB->fetch_assoc($sql_result)) { 222 222 $identity_id = $sql_arr['identity_id']; 223 223 $select_from->add( 224 rc _main::format_email_recipient(224 rcube::format_email_recipient( 225 225 $sql_arr['email'], 226 226 $sql_arr['name'] … … 254 254 // overwrite identity selection with post parameter 255 255 if (isset($_POST['_from'])) { 256 $from_id = rc _main::get_input_value('_from', RCUBE_INPUT_POST);256 $from_id = rcube::get_input_value('_from', rcube::INPUT_POST); 257 257 } 258 258 $out = $select_from->show($from_id); … … 269 269 function rcmail_compose_body($attrib) 270 270 { 271 $registry = rc _registry::getInstance();272 $CONFIG = $registry->get ('CONFIG', 'core');271 $registry = rcube_registry::get_instance(); 272 $CONFIG = $registry->get_all('config'); 273 273 $MESSAGE = $registry->get('MESSAGE', 'core'); 274 274 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 294 294 // use posted message body 295 295 if (!empty($_POST['_message'])) { 296 $body = rc _main::get_input_value('_message', RCUBE_INPUT_POST, TRUE);296 $body = rcube::get_input_value('_message', rcube::INPUT_POST, TRUE); 297 297 } 298 298 // compose reply-body … … 338 338 //tfk_debug($MESSAGE['headers']); 339 339 340 $saveid = new h iddenfield(340 $saveid = new html_hiddenfield( 341 341 array( 342 342 'name' => '_draft_saveid', … … 348 348 $out .= $saveid->show(); 349 349 350 $drafttoggle = new h iddenfield(array('name' => '_draft', 'value' => 'yes'));350 $drafttoggle = new html_hiddenfield(array('name' => '_draft', 'value' => 'yes')); 351 351 $out .= $drafttoggle->show(); 352 352 353 $msgtype = new h iddenfield(array('name' => '_is_html', 'value' => ($isHtml?"1":"0")));353 $msgtype = new html_hiddenfield(array('name' => '_is_html', 'value' => ($isHtml?"1":"0"))); 354 354 $out .= $msgtype->show(); 355 355 … … 358 358 $attrib['mce_editable'] = "true"; 359 359 } 360 $textarea = new textarea($attrib);360 $textarea = new html_textarea($attrib); 361 361 $out .= $textarea->show($body); 362 362 $out .= $form_end ? "\n$form_end" : ''; … … 381 381 "%s.set_env('spellcheck', googie);", 382 382 $COMM_PATH, 383 rc_main::JQ(rc_main::Q(rcube_label('checkspelling'))),384 rc_main::JQ(rc_main::Q(rcube_label('resumeediting'))),385 rc_main::JQ(rc_main::Q(rcube_label('close'))),386 rc_main::JQ(rc_main::Q(rcube_label('revertto'))),387 rc_main::JQ(rc_main::Q(rcube_label('nospellerrors'))),383 JQ(Q(rcube::gettext('checkspelling'))), 384 JQ(Q(rcube::gettext('resumeediting'))), 385 JQ(Q(rcube::gettext('close'))), 386 JQ(Q(rcube::gettext('revertto'))), 387 JQ(Q(rcube::gettext('nospellerrors'))), 388 388 $lang_set, 389 389 substr($_SESSION['user_lang'], 0, 2), … … 391 391 JS_OBJECT_NAME), 'foot' 392 392 ); 393 rc_main::rcube_add_label('checking');393 $OUTPUT->add_label('checking'); 394 394 } 395 395 $out .= "\n".'<iframe name="savetarget" src="program/blank.gif" style="width:0;height:0;visibility:hidden;"></iframe>'; … … 408 408 function rcmail_create_reply_body($body, $bodyIsHtml) 409 409 { 410 $registry = rc _registry::getInstance();410 $registry = rcube_registry::get_instance(); 411 411 $IMAP = $registry->get('IMAP', 'core'); 412 412 $MESSAGE = $registry->get('MESSAGE', 'core'); … … 468 468 function rcmail_create_forward_body($body, $bodyIsHtml) 469 469 { 470 $registry = rc _registry::getInstance();470 $registry = rcube_registry::get_instance(); 471 471 $IMAP = $registry->get('IMAP', 'core'); 472 472 $MESSAGE = $registry->get('MESSAGE', 'core'); … … 499 499 "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">To: </th><td>%s</td></tr>" . 500 500 "</tbody></table><br>", 501 rc_main::Q($_subject),502 rc_main::Q($_date),503 rc_main::Q($IMAP->decode_header($_from)),504 rc_main::Q($IMAP->decode_header($_to))501 Q($_subject), 502 Q($_date), 503 Q($IMAP->decode_header($_from)), 504 Q($IMAP->decode_header($_to)) 505 505 ); 506 506 } … … 516 516 function rcmail_create_draft_body($body, $bodyIsHtml) 517 517 { 518 $registry = rc _registry::getInstance();518 $registry = rcube_registry::get_instance(); 519 519 $IMAP = $registry->get('IMAP', 'core'); 520 520 $MESSAGE = $registry->get('MESSAGE', 'core'); … … 534 534 function rcmail_write_compose_attachments(&$message) 535 535 { 536 $registry = rc _registry::getInstance();537 $CONFIG = $registry->get ('CONFIG', 'core');536 $registry = rcube_registry::get_instance(); 537 $CONFIG = $registry->get_all('config'); 538 538 $IMAP = $registry->get('IMAP', 'core'); 539 539 … … 584 584 function rcmail_compose_subject($attrib) 585 585 { 586 $registry = rc _registry::getInstance();587 $CONFIG = $registry->get ('CONFIG', 'core');586 $registry = rcube_registry::get_instance(); 587 $CONFIG = $registry->get_all('config'); 588 588 $MESSAGE = $registry->get('MESSAGE', 'core'); 589 589 $compose_mode = $registry->get('compose_mode', 'core'); … … 594 594 595 595 $attrib['name'] = '_subject'; 596 $ textfield = new textfield($attrib);596 $inputfield = new html_inputfield($attrib); 597 597 598 598 $subject = ''; … … 603 603 // use subject from post 604 604 if (isset($_POST['_subject'])) { 605 $subject = rc _main::get_input_value('_subject', RCUBE_INPUT_POST, TRUE);605 $subject = rcube::get_input_value('_subject', rcube::INPUT_POST, TRUE); 606 606 } 607 607 // create a reply-subject … … 628 628 } 629 629 $out = $form_start ? "$form_start\n" : ''; 630 $out .= $ textfield->show($subject);630 $out .= $inputfield->show($subject); 631 631 $out .= $form_end ? "\n$form_end" : ''; 632 632 … … 644 644 function rcmail_compose_attachment_list($attrib) 645 645 { 646 $registry = rc _registry::getInstance();647 $CONFIG = $registry->get ('CONFIG', 'core');646 $registry = rcube_registry::get_instance(); 647 $CONFIG = $registry->get_all('config'); 648 648 $OUTPUT = $registry->get('OUTPUT', 'core'); 649 649 … … 653 653 } 654 654 // allow the following attributes to be added to the <ul> tag 655 $attrib_str = rc _main::create_attrib_string($attrib, array('id', 'class', 'style'));655 $attrib_str = rcube::create_attrib_string($attrib, array('id', 'class', 'style')); 656 656 657 657 $out = '<ul'. $attrib_str . ">\n"; … … 663 663 $CONFIG['skin_path'], 664 664 $attrib['deleteicon'], 665 rcube _label('delete')665 rcube::gettext('delete') 666 666 ); 667 667 } 668 668 else { 669 $button = rcube _label('delete');669 $button = rcube::gettext('delete'); 670 670 } 671 671 foreach ($_SESSION['compose']['attachments'] as $id => $a_prop) { … … 675 675 JS_OBJECT_NAME, 676 676 $id, 677 rc_main::Q(rcube_label('delete')),677 Q(rcube::gettext('delete')), 678 678 $button, 679 rc_main::Q($a_prop['name'])679 Q($a_prop['name']) 680 680 ); 681 681 } … … 695 695 function rcmail_compose_attachment_form($attrib) 696 696 { 697 $registry = rc _registry::getInstance();697 $registry = rcube_registry::get_instance(); 698 698 $OUTPUT = $registry->get('OUTPUT', 'core'); 699 699 $SESS_HIDDEN_FIELD = $registry->get('SESS_HIDDEN_FIELD', 'core'); … … 704 704 } 705 705 // allow the following attributes to be added to the <div> tag 706 $attrib_str = rc _main::create_attrib_string($attrib, array('id', 'class', 'style'));706 $attrib_str = rcube::create_attrib_string($attrib, array('id', 'class', 'style')); 707 707 $input_field = rcmail_compose_attachment_field(array('style="height:15px;"')); 708 $label_send = rcube _label('upload');709 $label_close = rcube _label('close');708 $label_send = rcube::gettext('upload'); 709 $label_close = rcube::gettext('close'); 710 710 $js_instance = JS_OBJECT_NAME; 711 711 … … 735 735 { 736 736 // allow the following attributes to be added to the <input> tag 737 $attrib_str = rc _main::create_attrib_string($attrib, array('id', 'class', 'style', 'size'));737 $attrib_str = rcube::create_attrib_string($attrib, array('id', 'class', 'style', 'size')); 738 738 739 739 $out = '<input type="file" name="_attachments[]"'. $attrib_str . " />"; … … 748 748 749 749 $attrib['name'] = '_priority'; 750 $selector = new select($attrib);750 $selector = new html_select($attrib); 751 751 752 752 $selector->add( 753 753 array( 754 rcube _label('lowest'),755 rcube _label('low'),756 rcube _label('normal'),757 rcube _label('high'),758 rcube _label('highest')754 rcube::gettext('lowest'), 755 rcube::gettext('low'), 756 rcube::gettext('normal'), 757 rcube::gettext('high'), 758 rcube::gettext('highest') 759 759 ), 760 760 array(5, 4, 0, 2, 1) … … 781 781 $attrib['name'] = '_receipt'; 782 782 $attrib['value'] = '1'; 783 $checkbox = new checkbox($attrib);783 $checkbox = new html_checkbox($attrib); 784 784 785 785 $out = $form_start ? "$form_start\n" : ''; … … 793 793 function rcmail_editor_selector($attrib) 794 794 { 795 $registry = rc _registry::getInstance();796 $CONFIG = $registry->get ('CONFIG', 'core');795 $registry = rcube_registry::get_instance(); 796 $CONFIG = $registry->get_all('config'); 797 797 $MESSAGE = $registry->get('MESSAGE', 'core'); 798 798 $compose_mode = $registry->get('compose_mode', 'core'); … … 831 831 } 832 832 $attrib['id'] = '_' . $value; 833 $rb = new radiobutton($attrib);833 $rb = new html_radiobutton($attrib); 834 834 $selector .= sprintf( 835 835 "%s<label for=\"%s\">%s</label>", 836 836 $rb->show($value), 837 837 $attrib['id'], 838 rcube _label($text)838 rcube::gettext($text) 839 839 ); 840 840 } … … 844 844 function get_form_tags($attrib) 845 845 { 846 $registry = rc _registry::getInstance();847 $CONFIG = $registry->get ('CONFIG', 'core');846 $registry = rcube_registry::get_instance(); 847 $CONFIG = $registry->get_all('config'); 848 848 $MESSAGE_FORM = $registry->get('MESSAGE_FORM', 'core'); 849 849 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 852 852 $form_start = ''; 853 853 if (!strlen($MESSAGE_FORM)) { 854 $hiddenfields = new h iddenfield(array('name' => '_task', 'value' => $GLOBALS['_task']));854 $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $registry->get('task', 'core'))); 855 855 $hiddenfields->add(array('name' => '_action', 'value' => 'send')); 856 856 -
branches/devel-vnext/program/include/rcube/rcmail_send.php
r624 r806 17 17 function get_identity($id) 18 18 { 19 $registry = rc _registry::getInstance();19 $registry = rcube_registry::get_instance(); 20 20 $DB = $registry->get('DB', 'core'); 21 21 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 23 23 // get identity record 24 24 $_query = "SELECT *, email AS mailto"; 25 $_query.= " FROM " . rc _main::get_table_name('identities');25 $_query.= " FROM " . rcube::get_table_name('identities'); 26 26 $_query.= " WHERE identity_id=?"; 27 27 $_query.= " AND user_id=?"; 28 28 $_query.= " AND del<>1"; 29 29 30 //rc _main::tfk_debug('Identity: ' . $_query);30 //rcube::tfk_debug('Identity: ' . $_query); 31 31 32 32 $sql_result = $DB->query($_query, $id, $_SESSION['user_id']); … … 40 40 $out['string'] = sprintf( 41 41 '%s <%s>', 42 rc _main::rcube_charset_convert($name, RCMAIL_CHARSET, $OUTPUT->get_charset()),42 rcube::charset_convert($name, RCMAIL_CHARSET, $OUTPUT->get_charset()), 43 43 $sql_arr['mailto'] 44 44 ); … … 63 63 function attach_emoticons(&$mime_message) 64 64 { 65 $registry = rc_registry::getInstance(); 66 $INSTALL_PATH = $registry->get('INSTALL_PATH', 'core'); 67 $CONFIG = $registry->get('CONFIG', 'core'); 65 $registry = rcube_registry::get_instance(); 66 $CONFIG = $registry->get_all('config'); 68 67 69 68 $htmlContents = $mime_message->getHtmlBody(); … … 95 94 if (! in_array($image_name, $included_images)) { 96 95 // add the image to the MIME message 97 $img_file = $INSTALL_PATH . '/' . $searchstr . $image_name;96 $img_file = INSTALL_PATH . '/' . $searchstr . $image_name; 98 97 $status = $mime_message->addHTMLImage( 99 98 $img_file, -
branches/devel-vnext/program/include/rcube_db.php
r799 r806 97 97 $this->db_error_msg = $dbh->getMessage(); 98 98 99 rc _bugs::raise_error(99 rcube_error::raise( 100 100 array( 101 101 'code' => 603, … … 308 308 $result = &$this->db_handle->getOne("SELECT CURRVAL('$sequence')"); 309 309 if (DB::isError($result)) { 310 rc _bugs::raise_error(310 rcube_error::raise( 311 311 array( 312 312 'code' => 500, … … 323 323 $result = &$this->db_handle->getOne("SELECT @@IDENTITY"); 324 324 if (DB::isError($result)) { 325 rc _bugs::raise_error(325 rcube_error::raise( 326 326 array( 327 327 'code' => 500, … … 392 392 { 393 393 if (!$result || DB::isError($result)) { 394 rc _bugs::raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__,394 rcube_error::raise(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__, 395 395 'message' => $this->db_link->getMessage()), TRUE, FALSE); 396 396 return FALSE; … … 528 528 // sql error occured 529 529 if (DB::isError($res)) { 530 rc _bugs::raise_error(530 rcube_error::raise( 531 531 array( 532 532 'code' => 500, -
branches/devel-vnext/program/include/rcube_mdb2.php
r799 r806 106 106 } 107 107 108 rc _bugs::raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__,108 rcube_error::raise(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__, 109 109 'message' => $this->db_error_msg), TRUE, FALSE); 110 110 } … … 247 247 $this->db_error_msg = $q->userinfo . "\n" . $q->getDebugInfo(); 248 248 249 rc _bugs::raise_error(249 rcube_error::raise( 250 250 array( 251 251 'code' => 500, … … 362 362 if (PEAR::isError($result)) 363 363 { 364 rc _bugs::raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__,364 rcube_error::raise(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__, 365 365 'message' => $this->db_link->getMessage()), TRUE, FALSE); 366 366 return FALSE; … … 500 500 if (PEAR::isError($res)) 501 501 { 502 rc _bugs::raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__,502 rcube_error::raise(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__, 503 503 'message' => $res->getMessage() . " Query: " . substr(preg_replace('/[\r\n]+\s*/', ' ', $res->userinfo), 0, 512)), TRUE, FALSE); 504 504 return FALSE; -
branches/devel-vnext/program/include/rcube_sqlite.inc
r589 r806 66 66 function rcube_sqlite_debug($str) 67 67 { 68 // console($str);68 //rcube::console($str); 69 69 } 70 70 -
branches/devel-vnext/program/include/session.inc
r630 r806 6 6 | | 7 7 | This file is part of the RoundCube Webmail client | 8 | Copyright (C) 2005 , RoundCube Dev, - Switzerland|8 | Copyright (C) 2005-2007, RoundCube Dev, - Switzerland | 9 9 | Licensed under the GNU GPL | 10 10 | | … … 23 23 function sess_open($save_path, $session_name) 24 24 { 25 return TRUE;25 return true; 26 26 } 27 28 27 29 28 30 29 function sess_close() 31 30 { 32 return TRUE;31 return true; 33 32 } 34 33 … … 37 36 function sess_read($key) 38 37 { 39 $registry = rc _registry::getInstance();38 $registry = rcube_registry::get_instance(); 40 39 $DB = $registry->get('DB', 'core'); 41 40 $SESS_CHANGED = $registry->get('SESS_CHANGED', 'core', null); … … 43 42 44 43 if ($DB->is_error()) { 45 return FALSE;44 return false; 46 45 } 47 46 $_query = "SELECT vars, ip, ".$DB->unixtimestamp('changed')." AS changed"; 48 $_query.= " FROM " . rc _main::get_table_name('session');47 $_query.= " FROM " . rcube::get_table_name('session'); 49 48 $_query.= " WHERE sess_id=?"; 50 49 $sql_result = $DB->query($_query, $key); … … 61 60 } 62 61 } 63 return FALSE; 62 63 return false; 64 64 } 65 65 … … 68 68 function sess_write($key, $vars) 69 69 { 70 $registry = rc_registry::getInstance(); 71 $DB = $registry->get('DB', 'core'); 70 $DB = rcube_registry::get_instance()->get('DB', 'core'); 72 71 73 if ( $DB->is_error())74 return FALSE;72 if (!is_object($DB) || $DB->is_error()) 73 return false; 75 74 76 $sql_result = $DB->query("SELECT 1 77 FROM " . rc_main::get_table_name('session') . " 78 WHERE sess_id=?", 79 $key); 75 $sql_result = $DB->query( 76 "SELECT 1 77 FROM " . rcube::get_table_name('session') . " 78 WHERE sess_id=?", 79 $key); 80 80 81 81 if ($DB->num_rows($sql_result)) { 82 82 session_decode($vars); 83 $DB->query("UPDATE " . rc_main::get_table_name('session') . " 84 SET vars=?, 85 changed=".$DB->now()." 86 WHERE sess_id=?", 87 $vars, 88 $key); 83 $DB->query( 84 "UPDATE " . rcube::get_table_name('session') . " 85 SET vars=?, 86 changed=".$DB->now()." 87 WHERE sess_id=?", 88 $vars, 89 $key); 89 90 } 90 91 else { 91 $DB->query("INSERT INTO " . rc_main::get_table_name('session') . " 92 (sess_id, vars, ip, created, changed) 93 VALUES (?, ?, ?, ".$DB->now().", ".$DB->now().")", 94 $key, 95 $vars, 96 $_SERVER['REMOTE_ADDR']); 97 98 92 $DB->query( 93 "INSERT INTO " . rcube::get_table_name('session') . " 94 (sess_id, vars, ip, created, changed) 95 VALUES (?, ?, ?, ".$DB->now().", ".$DB->now().")", 96 $key, 97 $vars, 98 $_SERVER['REMOTE_ADDR']); 99 99 } 100 return TRUE; 100 101 return true; 101 102 } 102 103 … … 105 106 function sess_destroy($key) 106 107 { 107 $registry = rc_registry::getInstance(); 108 $DB = $registry->get('DB', 'core'); 108 $DB = rcube_registry::get_instance()->get('DB', 'core'); 109 109 110 if ($DB->is_error())111 return FALSE;110 if (!is_object($DB) || $DB->is_error()) 111 return false; 112 112 113 113 // delete session entries in cache table 114 $DB->query("DELETE FROM ".rc_main::get_table_name('cache')." 115 WHERE session_id=?", 116 $key); 114 $DB->query( 115 "DELETE FROM " . rcube::get_table_name('cache') . " 116 WHERE session_id=?", 117 $key); 117 118 118 $DB->query("DELETE FROM ".rc_main::get_table_name('session')." 119 WHERE sess_id=?", 120 $key); 119 $DB->query( 120 "DELETE FROM " . rcube::get_table_name('session') . " 121 WHERE sess_id=?", 122 $key); 121 123 122 return TRUE;124 return true; 123 125 } 124 126 … … 127 129 function sess_gc($maxlifetime) 128 130 { 129 $registry = rc_registry::getInstance(); 130 $DB = $registry->get('DB', 'core'); 131 $DB = rcube_registry::get_instance()->get('DB', 'core'); 131 132 132 if ( $DB->is_error()) {133 if (!is_object($DB) || $DB->is_error()) 133 134 return FALSE; 134 } 135 135 136 // get all expired sessions 136 137 $_query = "SELECT sess_id"; 137 $_query.= " FROM " . rc _main::get_table_name('session');138 $_query.= " FROM " . rcube::get_table_name('session'); 138 139 $_query.= " WHERE " . $DB->unixtimestamp($DB->now()); 139 140 $_query.= "-" . $DB->unixtimestamp('changed')." > ?"; … … 147 148 if (sizeof($a_exp_sessions)) { 148 149 // delete session cache records 149 $_query = "DELETE FROM " . rc _main::get_table_name('cache');150 $_query = "DELETE FROM " . rcube::get_table_name('cache'); 150 151 $_query.= " WHERE session_id IN ('" . join("','", $a_exp_sessions) . "')"; 151 152 $DB->query($_query); 152 153 153 154 // delete session records 154 $_query = "DELETE FROM " . rc _main::get_table_name('session');155 $_query = "DELETE FROM " . rcube::get_table_name('session'); 155 156 $_query.= " WHERE sess_id IN ('" . join("','", $a_exp_sessions) . "')"; 156 157 $DB->query($_query); … … 158 159 159 160 // also run message cache GC 160 rc _main::rcmail_message_cache_gc();161 rc _main::rcmail_temp_gc();161 rcube::message_cache_gc(); 162 rcube::temp_gc(); 162 163 return TRUE; 163 164 } -
branches/devel-vnext/program/lib/imap.inc
r770 r806 1577 1577 fputs($fp, "cpy1 COPY $messages \"$to\"\r\n"); 1578 1578 $line=iil_ReadReply($fp); 1579 //rc _main::tfk_debug($line);1579 //rcube::tfk_debug($line); 1580 1580 1581 1581 return iil_ParseResult($line); … … 1680 1680 1681 1681 if (!$from || !$to) { 1682 rc _main::tfk_debug('No from or to: ' . $from . '/' . $to);1682 rcube::tfk_debug('No from or to: ' . $from . '/' . $to); 1683 1683 return -1; 1684 1684 } -
branches/devel-vnext/program/lib/utf8.class.php
r645 r806 112 112 function onError($err_code,$err_text){ 113 113 //print($err_code . " : " . $err_text . "<hr>\n"); 114 rc _bugs::raise_error(array('code' => 500,114 rcube_error::raise(array('code' => 500, 115 115 'file' => __FILE__, 116 116 'message' => $err_text), TRUE, FALSE); -
branches/devel-vnext/program/steps/addressbook/copy.inc
r710 r806 20 20 */ 21 21 22 $registry = rc _registry::getInstance();22 $registry = rcube_registry::get_instance(); 23 23 $OUTPUT = $registry->get('OUTPUT', 'core'); 24 24 $CONTACTS = $registry->get('CONTACTS', 'core'); 25 25 26 $cid = rc _main::get_input_value('_cid', RCUBE_INPUT_POST);27 $target = rc _main::get_input_value('_to', RCUBE_INPUT_POST);26 $cid = rcube::get_input_value('_cid', rcube::INPUT_POST); 27 $target = rcube::get_input_value('_to', rcube::INPUT_POST); 28 28 if ( 29 29 $cid -
branches/devel-vnext/program/steps/addressbook/delete.inc
r631 r806 19 19 20 20 */ 21 $registry = rc _registry::getInstance();21 $registry = rcube_registry::get_instance(); 22 22 $CONTACTS = $registry->get('CONTACTS', 'core'); 23 23 $OUTPUT = $registry->get('OUTPUT', 'core'); 24 24 25 if (($cid = get_input_value('_cid', RCUBE_INPUT_POST)) && preg_match('/^[0-9]+(,[0-9]+)*$/', $cid)) {25 if (($cid = get_input_value('_cid', rcube::INPUT_POST)) && preg_match('/^[0-9]+(,[0-9]+)*$/', $cid)) { 26 26 $deleted = $CONTACTS->delete($cid); 27 27 if (!$deleted) { -
branches/devel-vnext/program/steps/addressbook/edit.inc
r631 r806 20 20 */ 21 21 22 $registry = rc _registry::getInstance();22 $registry = rcube_registry::get_instance(); 23 23 $CONTACTS = $registry->get('CONTACTS', 'core'); 24 24 $OUTPUT = $registry->get('OUTPUT', 'core'); 25 25 26 if (($cid = rc _main::get_input_value('_cid', RCUBE_INPUT_GPC)) && ($record = $CONTACTS->get_record($cid, true))) {26 if (($cid = rcube::get_input_value('_cid', rcube::INPUT_GPC)) && ($record = $CONTACTS->get_record($cid, true))) { 27 27 $OUTPUT->set_env('cid', $record['ID']); 28 28 } … … 30 30 if ($CONTACTS->readonly) { 31 31 $OUTPUT->show_message('sourceisreadonly'); 32 rcmail_overwrite_action('show');32 override_action('show'); 33 33 return; 34 34 } … … 36 36 function rcmail_contact_editform($attrib) 37 37 { 38 $registry = rc _registry::getInstance();38 $registry = rcube_registry::get_instance(); 39 39 $CONTACTS = $registry->get('CONTACTS', 'core'); 40 40 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 48 48 49 49 // add some labels to client 50 rcube_add_label('noemailwarning');51 rcube_add_label('nonamewarning');50 $OUTPUT->add_label('noemailwarning'); 51 $OUTPUT->add_label('nonamewarning'); 52 52 53 53 list($form_start, $form_end) = get_form_tags($attrib); … … 57 57 if ($attrib['part']) { 58 58 $out = $form_start; 59 $out .= rc mail_get_edit_field($attrib['part'], $record[$attrib['part']], $attrib);59 $out .= rcube::get_edit_field($attrib['part'], $record[$attrib['part']], $attrib); 60 60 return $out; 61 61 } … … 68 68 foreach ($a_show_cols as $col) { 69 69 $attrib['id'] = 'rcmfd_'.$col; 70 $value = rc mail_get_edit_field($col, $record[$col], $attrib);70 $value = rcube::get_edit_field($col, $record[$col], $attrib); 71 71 $out .= sprintf( 72 72 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 73 73 $attrib['id'], 74 rc_main::Q(rcube_label($col)),74 Q(rcube::gettext($col)), 75 75 $value 76 76 ); … … 86 86 function get_form_tags($attrib) 87 87 { 88 $registry = rc _registry::getInstance();88 $registry = rcube_registry::get_instance(); 89 89 $CONTACTS = $registry->get('CONTACTS', 'core'); 90 90 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 95 95 $form_start = ''; 96 96 if (!strlen($EDIT_FORM)) { 97 $hiddenfields = new h iddenfield(array('name' => '_task', 'value' => $GLOBALS['_task']));97 $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $registry->get('task', 'core'))); 98 98 $hiddenfields->add( 99 99 array( 100 100 'name' => '_action', 101 101 'value' => 'save', 102 'source' => rc _main::get_input_value('_source', RCUBE_INPUT_GPC)102 'source' => rcube::get_input_value('_source', rcube::INPUT_GPC) 103 103 ) 104 104 ); … … 125 125 126 126 if (!$CONTACTS->get_result() && template_exists('addcontact')) { 127 rc _main::parse_template('addcontact');127 rcube::parse_template('addcontact'); 128 128 } 129 129 // this will be executed if no template for addcontact exists 130 rc _main::parse_template('editcontact');130 rcube::parse_template('editcontact'); 131 131 ?> -
branches/devel-vnext/program/steps/addressbook/func.inc
r706 r806 19 19 */ 20 20 21 /** 22 * rcube_contacts 23 * @ignore 24 */ 25 require_once 'include/rcube_contacts.inc'; 26 27 /** 28 * rcube_ldap 29 * @ignore 30 */ 31 require_once 'include/rcube_ldap.inc'; 32 33 $registry = rc_registry::getInstance(); 34 $CONFIG = $registry->get('CONFIG', 'core'); 21 22 $registry = rcube_registry::get_instance(); 23 $CONFIG = $registry->get_all('config'); 35 24 $OUTPUT = $registry->get('OUTPUT', 'core'); 36 25 … … 40 29 */ 41 30 42 //rc _main::tfk_debug("ABOOK PLUGIN? " . $CONFIG['addressbook_plugin']);31 //rcube::tfk_debug("ABOOK PLUGIN? " . $CONFIG['addressbook_plugin']); 43 32 44 33 // instantiate a contacts object according to the given source 45 34 if ( 46 ($source = rc _main::get_input_value('_source', RCUBE_INPUT_GPC))35 ($source = rcube::get_input_value('_source', rcube::INPUT_GPC)) 47 36 && isset($CONFIG['ldap_public'][$source]) 48 37 ) { … … 100 89 function rcmail_directory_list($attrib) 101 90 { 102 $registry = rc _registry::getInstance();103 $CONFIG = $registry->get ('CONFIG', 'core');91 $registry = rcube_registry::get_instance(); 92 $CONFIG = $registry->get_all('config'); 104 93 $OUTPUT = $registry->get('OUTPUT', 'core'); 105 94 … … 109 98 110 99 $local_id = '0'; 111 $current = rc _main::get_input_value('_source', RCUBE_INPUT_GPC);100 $current = rcube::get_input_value('_source', rcube::INPUT_GPC); 112 101 113 102 $line_templ = '<li id="%s" class="%s"><a href="%s"'; … … 119 108 120 109 // allow the following attributes to be added to the <ul> tag 121 $out = '<ul' . rc _main::create_attrib_string($attrib, array('style', 'class', 'id')) . ">\n";122 123 //rc _main::tfk_debug($out);110 $out = '<ul' . rcube::create_attrib_string($attrib, array('style', 'class', 'id')) . ">\n"; 111 112 //rcube::tfk_debug($out); 124 113 125 114 $out.= sprintf( … … 127 116 'rcmli'.$local_id, 128 117 !$current ? 'selected' : '', 129 rc_main::Q(rc_main::rcmail_url('list', array('_source' => 0))),118 Q(rcube::url('list', array('_source' => 0))), 130 119 JS_OBJECT_NAME, 131 120 $local_id, … … 136 125 JS_OBJECT_NAME, 137 126 $local_id, 138 rcube _label('personaladrbook')127 rcube::gettext('personaladrbook') 139 128 ); 140 129 141 130 foreach ((array)$CONFIG['ldap_public'] as $id => $prop) { 142 $js_id = rc_main_::JQ($id);131 $js_id = JQ($id); 143 132 $dom_id = preg_replace('/[^a-z0-9\-_]/i', '', $id); 144 133 $out .= sprintf( … … 146 135 'rcmli'.$dom_id, 147 136 $current == $id ? 'selected' : '', 148 rc_main::Q(rc_main::rcmail_url('list', array('_source' => $id))),137 Q(rcube::url('list', array('_source' => $id))), 149 138 JS_OBJECT_NAME, 150 139 $js_id, … … 155 144 JS_OBJECT_NAME, 156 145 $js_id, 157 !empty($prop['name']) ? rc_main::Q($prop['name']) : rc_main::Q($id)146 !empty($prop['name']) ? Q($prop['name']) : Q($id) 158 147 ); 159 148 } … … 173 162 * @param array $attrib 174 163 * @return string 175 * @uses rc _registry::getInstance()176 * @uses rc _main::rcube_table_output()177 * @uses rc _main::rcube_add_label()164 * @uses rcube_registry::get_instance() 165 * @uses rcube::table_output() 166 * @uses rcube_template::add_label() 178 167 */ 179 function rc mail_contacts_list($attrib)180 { 181 $registry = rc _registry::getInstance();168 function rcube_contacts_list($attrib) 169 { 170 $registry = rcube_registry::get_instance(); 182 171 $CONTACTS = $registry->get('CONTACTS', 'core'); 183 172 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 194 183 195 184 // create XHTML table 196 $out = rc _main::rcube_table_output(185 $out = rcube::table_output( 197 186 $attrib, 198 187 $result->records, … … 208 197 209 198 // add some labels to client 210 rc_main::rcube_add_label('deletecontactconfirm');199 $OUTPUT->add_label('deletecontactconfirm'); 211 200 212 201 return $out; … … 216 205 function rcmail_js_contacts_list($result, $prefix='') 217 206 { 218 $registry = rc _registry::getInstance();207 $registry = rcube_registry::get_instance(); 219 208 $OUTPUT = $registry->get('OUTPUT', 'core'); 220 209 … … 247 236 function rcmail_contact_frame($attrib) 248 237 { 249 $registry = rc _registry::getInstance();238 $registry = rcube_registry::get_instance(); 250 239 $OUTPUT = $registry->get('OUTPUT', 'core'); 251 240 … … 254 243 } 255 244 $attrib['name'] = $attrib['id']; 256 $attrib_str = rc _main::create_attrib_string(245 $attrib_str = rcube::create_attrib_string( 257 246 $attrib, 258 247 array( … … 276 265 function rcmail_rowcount_display($attrib) 277 266 { 278 $registry = rc _registry::getInstance();267 $registry = rcube_registry::get_instance(); 279 268 $OUTPUT = $registry->get('OUTPUT', 'core'); 280 269 … … 285 274 286 275 // allow the following attributes to be added to the <span> tag 287 $attrib_str = rc _main::create_attrib_string($attrib, array('style', 'class', 'id'));276 $attrib_str = rcube::create_attrib_string($attrib, array('style', 'class', 'id')); 288 277 289 278 $out = '<span' . $attrib_str . '>'; … … 297 286 function rcmail_get_rowcount_text() 298 287 { 299 $registry = rc _registry::getInstance();288 $registry = rcube_registry::get_instance(); 300 289 $CONTACTS = $registry->get('CONTACTS', 'core'); 301 290 … … 306 295 } 307 296 if ($result->count == 0) { 308 $out = rcube _label('nocontactsfound');297 $out = rcube::gettext('nocontactsfound'); 309 298 } 310 299 else { 311 $out = rcube _label(array(300 $out = rcube::gettext(array( 312 301 'name' => 'contactsfromto', 313 302 'vars' => array( … … 326 315 array( 327 316 'directorylist' => 'rcmail_directory_list', 328 'addresslist' => 'rc mail_contacts_list',317 'addresslist' => 'rcube_contacts_list', 329 318 'addressframe' => 'rcmail_contact_frame', 330 319 'recordscountdisplay' => 'rcmail_rowcount_display', 331 'searchform' => 'rcmail_search_form'320 'searchform' => array($OUTPUT, 'search_form'), 332 321 ) 333 322 ); -
branches/devel-vnext/program/steps/addressbook/list.inc
r710 r806 20 20 */ 21 21 22 $registry = rc _registry::getInstance();22 $registry = rcube_registry::get_instance(); 23 23 $OUTPUT = $registry->get('OUTPUT', 'core'); 24 24 $CONTACTS = $registry->get('CONTACTS', 'core'); -
branches/devel-vnext/program/steps/addressbook/mailto.inc
r710 r806 20 20 */ 21 21 22 $registry = rc _registry::getInstance();22 $registry = rcube_registry::get_instance(); 23 23 $OUTPUT = $registry->get('OUTPUT', 'core'); 24 24 $CONTACTS = $registry->get('CONTACTS', 'core'); 25 25 26 $cid = rc _main::get_input_value('_cid', RCUBE_INPUT_GET);26 $cid = rcube::get_input_value('_cid', rcube::INPUT_GET); 27 27 $recipients = null; 28 28 $mailto = array(); … … 32 32 33 33 while (is_object($recipients) && ($rec = $recipients->iterate())) { 34 $mailto[] = rc _main::format_email_recipient($rec['email'], $rec['name']);34 $mailto[] = rcube::format_email_recipient($rec['email'], $rec['name']); 35 35 } 36 36 } … … 40 40 $mailto_id = substr(md5($mailto_str), 0, 16); 41 41 $_SESSION['mailto'][$mailto_id] = $mailto_str; 42 $OUTPUT->command('redirect', rc _main::rcmail_url('compose', array('_mailto' => $mailto_id), 'mail'));42 $OUTPUT->command('redirect', rcube::url('compose', array('_mailto' => $mailto_id), 'mail')); 43 43 } 44 44 else { -
branches/devel-vnext/program/steps/addressbook/save.inc
r710 r806 20 20 */ 21 21 22 $registry = rc _registry::getInstance();22 $registry = rcube_registry::get_instance(); 23 23 $OUTPUT = $registry->get('OUTPUT', 'core'); 24 24 $CONTACTS = $registry->get('CONTACTS', 'core'); … … 27 27 if ($CONTACTS->readonly) { 28 28 $OUTPUT->show_message('contactreadonly', 'error'); 29 rc _main::rcmail_overwrite_action(empty($_POST['_cid']) ? 'add' : 'show');29 rcube::override_action(empty($_POST['_cid']) ? 'add' : 'show'); 30 30 return; 31 31 } … … 34 34 if ( 35 35 ( 36 !rc _main::get_input_value('_name', RCUBE_INPUT_POST)37 || !rc _main::get_input_value('_email', RCUBE_INPUT_POST)36 !rcube::get_input_value('_name', rcube::INPUT_POST) 37 || !rcube::get_input_value('_email', rcube::INPUT_POST) 38 38 ) 39 39 && $_framed 40 40 ) { 41 41 $OUTPUT->show_message('formincomplete', 'warning'); 42 rc _main::rcmail_overwrite_action(empty($_POST['_cid']) ? 'add' : 'show');42 rcube::override_action(empty($_POST['_cid']) ? 'add' : 'show'); 43 43 return; 44 44 } … … 48 48 $a_save_cols = array('name', 'firstname', 'surname', 'email'); 49 49 $a_record = array(); 50 $cid = rc _main::get_input_value('_cid', RCUBE_INPUT_POST);50 $cid = rcube::get_input_value('_cid', rcube::INPUT_POST); 51 51 52 52 // read POST values into hash array … … 54 54 $fname = '_'.$col; 55 55 if (isset($_POST[$fname])) { 56 $a_record[$col] = rc _main::get_input_value($fname, RCUBE_INPUT_POST);56 $a_record[$col] = rcube::get_input_value($fname, rcube::INPUT_POST); 57 57 } 58 58 } … … 76 76 // show confirmation 77 77 $OUTPUT->show_message('successfullysaved', 'confirmation'); 78 rc _main::rcmail_overwrite_action('show');78 rcube::override_action('show'); 79 79 } 80 80 else { 81 81 // show error message 82 82 $OUTPUT->show_message('errorsaving', 'error'); 83 rc _main::rcmail_overwrite_action('show');83 rcube::override_action('show'); 84 84 } 85 85 } … … 92 92 if ($existing->count) { 93 93 $OUTPUT->show_message('contactexists', 'warning'); 94 rc _main::rcmail_overwrite_action('add');94 rcube::override_action('add'); 95 95 return; 96 96 } … … 113 113 // show confirmation 114 114 $OUTPUT->show_message('successfullysaved', 'confirmation'); 115 rc _main::rcmail_overwrite_action('show');115 rcube::override_action('show'); 116 116 $_GET['_cid'] = $insert_id; 117 117 } … … 119 119 // show error message 120 120 $OUTPUT->show_message('errorsaving', 'error'); 121 rc _main::rcmail_overwrite_action('add');121 rcube::override_action('add'); 122 122 } 123 123 } -
branches/devel-vnext/program/steps/addressbook/search.inc
r631 r806 19 19 20 20 */ 21 $registry = rc _registry::getInstance();21 $registry = rcube_registry::get_instance(); 22 22 $CONTACTS = $registry->get('CONTACTS', 'core'); 23 23 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 27 27 $_SESSION['page'] = 1; 28 28 29 $search = trim(rc _main::get_input_value('_q', RCUBE_INPUT_GET));29 $search = trim(rcube::get_input_value('_q', rcube::INPUT_GET)); 30 30 $search_request = md5('addr'.$search); 31 31 -
branches/devel-vnext/program/steps/addressbook/show.inc
r709 r806 21 21 22 22 23 $registry = rc _registry::getInstance();24 $CONFIG = $registry->get ('CONFIG', 'core');23 $registry = rcube_registry::get_instance(); 24 $CONFIG = $registry->get_all('config'); 25 25 $OUTPUT = $registry->get('OUTPUT', 'core'); 26 26 … … 28 28 // read contact record 29 29 if ( 30 ($cid = rc _main::get_input_value('_cid', RCUBE_INPUT_GPC))30 ($cid = rcube::get_input_value('_cid', rcube::INPUT_GPC)) 31 31 && ($record = $CONTACTS->get_record($cid, true)) 32 32 ) { … … 37 37 function rcmail_contact_details($attrib) 38 38 { 39 $registry = rc _registry::getInstance();39 $registry = rcube_registry::get_instance(); 40 40 $CONTACTS = $registry->get('CONTACTS', 'core'); 41 41 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 49 49 // a specific part is requested 50 50 if ($attrib['part']) { 51 return rc_main::Q($record[$attrib['part']]);51 return Q($record[$attrib['part']]); 52 52 } 53 53 … … 61 61 '<a href="#compose" onclick="%s.command(\'compose\', \'%s\')" title="%s">%s</a>', 62 62 JS_OBJECT_NAME, 63 rc_main::JQ($record[$col]),64 rcube _label('composeto'),65 rc_main::Q($record[$col]));63 JQ($record[$col]), 64 rcube::gettext('composeto'), 65 Q($record[$col])); 66 66 } 67 67 else { 68 $value = rc_main::Q($record[$col]);68 $value = Q($record[$col]); 69 69 } 70 70 71 71 $out .= sprintf( 72 72 '<tr><td class="title">%s</td><td>%s</td></tr>'. "\n", 73 rc_main::Q(rcube_label($col)),73 Q(rcube::gettext($col)), 74 74 $value 75 75 ); -
branches/devel-vnext/program/steps/error.inc
r622 r806 21 21 22 22 23 // browser is not compatible with this application 24 if ($ERROR_CODE==409) 23 function rcube_error_message() 25 24 { 26 $user_agent = $GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT']; 27 $__error_title = 'Your browser does not suit the requirements for this application'; 28 $__error_text = <<<EOF 25 $registry = rcube_registry::get_instance(); 26 $ERROR_CODE = $registry->get('ERROR_CODE', 'core'); 27 $ERROR_MESSAGE = $registry->get('ERROR_MESSAGE', 'core'); 28 29 // browser is not compatible with this application 30 if ($ERROR_CODE == 409) 31 { 32 $user_agent = $GLOBALS['HTTP_SERVER_VARS']['HTTP_USER_AGENT']; 33 $__error_title = 'Your browser does not suit the requirements for this application'; 34 $__error_text = <<<EOF 29 35 <i>Supported browsers:</i><br /> 30 36 » Netscape 7+<br /> … … 40 46 $user_agent</p> 41 47 EOF; 42 }48 } 43 49 44 // authorization error45 else if ($ERROR_CODE==401)46 {47 $__error_title = "AUTHORIZATION FAILED";48 $__error_text = "Could not verify that you are authorized to access this service!<br />\n".49 "Please contact your server-administrator.";50 }50 // authorization error 51 else if ($ERROR_CODE == 401) 52 { 53 $__error_title = "AUTHORIZATION FAILED"; 54 $__error_text = "Could not verify that you are authorized to access this service!<br />\n". 55 "Please contact your server-administrator."; 56 } 51 57 52 // failed request (wrong step in URL)53 else if ($ERROR_CODE==404)54 {55 $__error_title = "REQUEST FAILED/FILE NOT FOUND";56 $request_url = htmlentities($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);57 $__error_text = <<<EOF58 // failed request (wrong step in URL) 59 else if ($ERROR_CODE == 404) 60 { 61 $__error_title = "REQUEST FAILED/FILE NOT FOUND"; 62 $request_url = htmlentities($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); 63 $__error_text = <<<EOF 58 64 The requested page was not found!<br /> 59 65 Please contact your server-administrator. … … 62 68 http://$request_url</p> 63 69 EOF; 64 }70 } 65 71 66 // database connection error 67 else if ($ERROR_CODE==603) 68 { 69 $__error_title = "DATABASE ERROR: CONNECTION FAILED!"; 70 $__error_text = <<<EOF 71 Unable to connect to the database!<br /> 72 Please contact your server-administrator. 73 EOF; 74 } 72 // database connection error 73 else if ($ERROR_CODE == 603) 74 { 75 $__error_title = "DATABASE ERROR: CONNECTION FAILED!"; 76 $__error_text = "Unable to connect to the database!<br />Please contact your server-administrator."; 77 } 75 78 76 // system error77 else78 {79 $__error_title = "SERVICE CURRENTLY NOT AVAILABLE!";80 $__error_text = "Please contact your server-administrator.";79 // system error 80 else 81 { 82 $__error_title = "SERVICE CURRENTLY NOT AVAILABLE!"; 83 $__error_text = "Please contact your server-administrator."; 81 84 82 if (($CONFIG['debug_level'] & 4) && $ERROR_MESSAGE) 83 $__error_text = $ERROR_MESSAGE; 84 else 85 $__error_text = sprintf('Error No. [0x%04X]', $ERROR_CODE); 85 $debug_level = rcube_registry::get_instance()->get('debug_level', 'config'); 86 if (($debug_level & 4) && $ERROR_MESSAGE) 87 $__error_text = $ERROR_MESSAGE; 88 else 89 $__error_text = sprintf('Error No. [0x%04X]', $ERROR_CODE); 90 } 91 92 93 // compose page content 94 return html::div(null, html::tag('h3', array('class' => "error-title"), $__error_title) . html::p('error-text', $__error_text)); 86 95 } 87 96 88 97 89 // compose page content 90 91 $__page_content = <<<EOF 92 <div> 93 <h3 class="error-title">$__error_title</h3> 94 <p class="error-text">$__error_text</p> 95 </div> 96 EOF; 97 98 99 100 if (rc_main::template_exists('error')) 98 if (rcube::template_exists('error')) 101 99 { 102 $OUTPUT->scripts = array(); 103 $OUTPUT->script_files = array(); 104 rc_main::parse_template('error'); 100 $OUTPUT = rcube_registry::get_instance()->get('OUTPUT', 'core'); 101 $OUTPUT->reset(); 102 $OUTPUT->add_handler('errormessage', 'rcube_error_message'); 103 $OUTPUT->send('error'); 105 104 } 106 105 107 106 108 107 // print system error page 108 $__page_content = rcube_error_message(); 109 109 print <<<EOF 110 110 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 111 111 <html xmlns="http://www.w3.org/1999/xhtml"><head> 112 <title>RoundCube|Mail : ERROR $ERROR_CODE</title> 113 <link rel="stylesheet" type="text/css" href="program/style.css" /> 112 <title>RoundCube Webmail : ERROR $ERROR_CODE</title> 114 113 </head> 115 114 <body> -
branches/devel-vnext/program/steps/mail/addcontact.inc
r632 r806 20 20 */ 21 21 22 require_once 'include/rcube_contacts.inc'; 23 24 $registry = rc_registry::getInstance(); 22 $registry = rcube_registry::get_instance(); 25 23 $IMAP = $registry->get('IMAP', 'core'); 26 24 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 42 40 } 43 41 $contact_arr = $IMAP->decode_address_list( 44 rc _main::get_input_value(42 rcube::get_input_value( 45 43 '_address', 46 RCUBE_INPUT_POST,44 rcube::INPUT_POST, 47 45 true 48 46 ), -
branches/devel-vnext/program/steps/mail/check_recent.inc
r686 r806 19 19 */ 20 20 21 //rc _main::tfk_debug('recent!');21 //rcube::tfk_debug('recent!'); 22 22 23 $registry = rc _registry::getInstance();23 $registry = rcube_registry::get_instance(); 24 24 $IMAP = $registry->get('IMAP', 'core'); 25 25 $OUTPUT = $registry->get('OUTPUT', 'core'); 26 26 $a_mailboxes = $IMAP->list_mailboxes(); 27 27 28 //rc _main::tfk_debug('About to get some mailboxes.');29 //rc _main::tfk_debug('Mailboxes: ' . var_export($a_mailboxes, true));28 //rcube::tfk_debug('About to get some mailboxes.'); 29 //rcube::tfk_debug('Mailboxes: ' . var_export($a_mailboxes, true)); 30 30 31 31 foreach ($a_mailboxes as $mbox_name) { -
branches/devel-vnext/program/steps/mail/compose.inc
r745 r806 28 28 define('RCUBE_COMPOSE_DRAFT', 0x0108); 29 29 30 $registry = rc _registry::getInstance();31 $CONFIG = $registry->get ('CONFIG', 'core');30 $registry = rcube_registry::get_instance(); 31 $CONFIG = $registry->get_all('config'); 32 32 33 33 // remove an attachment … … 37 37 $status = @unlink($_SESSION['compose']['attachments'][$id]['path']); 38 38 if ($status === false) { 39 //rc _main::tfk_debug('Could not delete attachment.');39 //rcube::tfk_debug('Could not delete attachment.'); 40 40 } 41 41 $_SESSION['compose']['attachments'][$id] = NULL; … … 61 61 if ( 62 62 !is_array($_SESSION['compose']) 63 || $_SESSION['compose']['id'] != rc _main::get_input_value('_id', RCUBE_INPUT_GET)63 || $_SESSION['compose']['id'] != rcube::get_input_value('_id', rcube::INPUT_GET) 64 64 ) { 65 65 rcmail_compose_cleanup(); … … 68 68 69 69 // add some labels to client 70 rc_main::rcube_add_label(70 $OUTPUT->add_label( 71 71 'nosubject', 72 72 'norecipientwarning', … … 88 88 89 89 // get reference message and set compose mode 90 if ($msg_uid = rc _main::get_input_value('_reply_uid', RCUBE_INPUT_GET)) {90 if ($msg_uid = rcube::get_input_value('_reply_uid', rcube::INPUT_GET)) { 91 91 $compose_mode = RCUBE_COMPOSE_REPLY; 92 92 } 93 elseif ($msg_uid = rc _main::get_input_value('_forward_uid', RCUBE_INPUT_GET)) {93 elseif ($msg_uid = rcube::get_input_value('_forward_uid', rcube::INPUT_GET)) { 94 94 $compose_mode = RCUBE_COMPOSE_FORWARD; 95 95 } 96 elseif ($msg_uid = rc _main::get_input_value('_draft_uid', RCUBE_INPUT_GET)) {96 elseif ($msg_uid = rcube::get_input_value('_draft_uid', rcube::INPUT_GET)) { 97 97 $compose_mode = RCUBE_COMPOSE_DRAFT; 98 98 } … … 101 101 if (empty($msg_uid) === false) { 102 102 103 //rc _main::tfk_debug('We got uid: ' . $msg_uid);104 //rc _main::tfk_debug('Compose mode: ' . $compose_mode);103 //rcube::tfk_debug('We got uid: ' . $msg_uid); 104 //rcube::tfk_debug('Compose mode: ' . $compose_mode); 105 105 106 106 // similar as in program/steps/mail/show.inc … … 112 112 113 113 114 //rc _main::tfk_debug('Reference message: ' . var_export($MESSAGE, true));114 //rcube::tfk_debug('Reference message: ' . var_export($MESSAGE, true)); 115 115 116 116 if ($compose_mode == RCUBE_COMPOSE_REPLY) { … … 137 137 require_once 'include/rcube/rcmail_compose.php'; 138 138 139 //rc _main::tfk_debug('Passed require for rcmail_compose functions.');139 //rcube::tfk_debug('Passed require for rcmail_compose functions.'); 140 140 141 141 // register UI objects … … 155 155 156 156 /****** get contacts for this user and add them to client scripts ********/ 157 require_once 'include/rcube_contacts.inc';158 157 159 158 if (isset($CONFIG['addressbook_plugin']) && !empty($CONFIG['addressbook_plugin'])) { … … 175 174 while ($sql_arr = $result->iterate()) { 176 175 if ($sql_arr['email']) { 177 $a_contacts[] = rc _main::format_email_recipient(176 $a_contacts[] = rcube::format_email_recipient( 178 177 $sql_arr['email'], 179 rc_main::JQ($sql_arr['name'])178 JQ($sql_arr['name']) 180 179 ); 181 180 } … … 183 182 $OUTPUT->set_env('contacts', $a_contacts); 184 183 } 185 $OUTPUT-> parse('compose', true);184 $OUTPUT->send('compose', true); 186 185 ?> -
branches/devel-vnext/program/steps/mail/folders.inc
r662 r806 18 18 $Id: folders.inc 573 2007-05-18 11:29:25Z thomasb $ 19 19 */ 20 $registry = rc _registry::getInstance();20 $registry = rcube_registry::get_instance(); 21 21 $IMAP = $registry->get('IMAP', 'core'); 22 22 $mbox_name = $IMAP->get_mailbox_name(); 23 23 24 24 // send EXPUNGE command 25 if ($_action=='expunge' && ($mbox = rc _main::get_input_value('_mbox', RCUBE_INPUT_POST))) {25 if ($_action=='expunge' && ($mbox = rcube::get_input_value('_mbox', rcube::INPUT_POST))) { 26 26 $success = $IMAP->expunge($mbox); 27 27 28 //rc _main::tfk_debug('Expung: ' . $mbox);28 //rcube::tfk_debug('Expung: ' . $mbox); 29 29 30 30 // reload message list if current mailbox … … 33 33 $_action = 'list'; 34 34 35 //rc _main::tfk_debug('Trying to reload list.');35 //rcube::tfk_debug('Trying to reload list.'); 36 36 37 37 $_file = dirname(__FILE__); … … 48 48 } 49 49 // clear mailbox 50 elseif ($_action=='purge' && ($mbox = rc _main::get_input_value('_mbox', RCUBE_INPUT_POST))) {50 elseif ($_action=='purge' && ($mbox = rcube::get_input_value('_mbox', rcube::INPUT_POST))) { 51 51 $success = $IMAP->clear_mailbox($mbox); 52 52 -
branches/devel-vnext/program/steps/mail/func.inc
r772 r806 25 25 26 26 $EMAIL_ADDRESS_PATTERN = '/([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9]([a-z0-9\-][.]?)*[a-z0-9]\\.[a-z]{2,5})/i'; 27 $registry = rc _registry::getInstance();27 $registry = rcube_registry::get_instance(); 28 28 $registry->set('EMAIL_ADDRESS_PATTERN', $EMAIL_ADDRESS_PATTERN, 'core'); 29 $CONFIG = $registry->get ('CONFIG', 'core');29 $CONFIG = $registry->get_all('config'); 30 30 $IMAP = $registry->get('IMAP', 'core'); 31 31 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 35 35 } 36 36 // set imap properties and session vars 37 if ($mbox = rc _main::get_input_value('_mbox', RCUBE_INPUT_GPC)) {37 if ($mbox = rcube::get_input_value('_mbox', rcube::INPUT_GPC)) { 38 38 $IMAP->set_mailbox($mbox); 39 39 $_SESSION['mbox'] = $mbox; … … 66 66 // define url for getting message parts 67 67 if (strlen($_GET['_uid'])) { 68 $GET_URL = rc _main::rcmail_url(68 $GET_URL = rcube::url( 69 69 'get', 70 70 array( 71 71 '_mbox' => $IMAP->get_mailbox_name(), 72 '_uid' => rc _main::get_input_value('_uid', RCUBE_INPUT_GET)72 '_uid' => rcube::get_input_value('_uid', rcube::INPUT_GET) 73 73 ) 74 74 ); … … 90 90 } 91 91 if (!$OUTPUT->ajax_call) { 92 rc_main::rcube_add_label('checkingmail');92 $OUTPUT->add_label('checkingmail'); 93 93 } 94 94 … … 96 96 function rcmail_mailbox_list($attrib) 97 97 { 98 $registry = rc _registry::getInstance();98 $registry = rcube_registry::get_instance(); 99 99 $IMAP = $registry->get('IMAP', 'core'); 100 $CONFIG = $registry->get ('CONFIG', 'core');100 $CONFIG = $registry->get_all('config'); 101 101 $OUTPUT = $registry->get('OUTPUT', 'core'); 102 102 $COMM_PATH = $registry->get('COMM_PATH', 'core'); … … 110 110 111 111 // add some labels to client 112 rc_main::rcube_add_label('purgefolderconfirm');113 rc_main::rcube_add_label('deletemessagesconfirm');112 $OUTPUT->add_label('purgefolderconfirm'); 113 $OUTPUT->add_label('deletemessagesconfirm'); 114 114 115 115 // $mboxlist_start = rcube_timer(); … … 123 123 } 124 124 // allow the following attributes to be added to the <ul> tag 125 $attrib_str = rc _main::create_attrib_string($attrib, $add_attrib);125 $attrib_str = rcube::create_attrib_string($attrib, $add_attrib); 126 126 127 127 $out = '<' . $type . $attrib_str . ">\n"; … … 131 131 $out .= sprintf( 132 132 '<option value="0">%s</option>'."\n", 133 rcube _label($attrib['noselection'])133 rcube::gettext($attrib['noselection']) 134 134 ); 135 135 } … … 204 204 $arrFolders[$currentFolder] = array( 205 205 'id' => $path, 206 'name' => rc _main::rcube_charset_convert($currentFolder, 'UTF-7'),206 'name' => rcube::charset_convert($currentFolder, 'UTF-7'), 207 207 'folders' => array() 208 208 ); … … 225 225 function rcmail_render_folder_tree_html(&$arrFolders, &$special, &$mbox_name, $maxlength, $nestLevel=0) 226 226 { 227 $registry = rc _registry::getInstance();227 $registry = rcube_registry::get_instance(); 228 228 $IMAP = $registry->get('IMAP', 'core'); 229 $CONFIG = $registry->get ('CONFIG', 'core');229 $CONFIG = $registry->get_all('config'); 230 230 $OUTPUT = $registry->get('OUTPUT', 'core'); 231 231 $COMM_PATH = $registry->get('COMM_PATH', 'core'); … … 240 240 $folder_lc = strtolower($folder['id']); 241 241 if (in_array($folder_lc, $special)) 242 $foldername = rcube _label($folder_lc);242 $foldername = rcube::gettext($folder_lc); 243 243 else { 244 244 $foldername = $folder['name']; … … 248 248 $fname = abbrevate_string($foldername, $maxlength); 249 249 if ($fname != $foldername) 250 $title = ' title="'. rc_main::Q($foldername).'"';250 $title = ' title="'.Q($foldername).'"'; 251 251 $foldername = $fname; 252 252 } … … 275 275 } 276 276 277 $js_name = htmlspecialchars( rc_main::JQ($folder['id']));277 $js_name = htmlspecialchars(JQ($folder['id'])); 278 278 279 279 $_string_out = '<li id="rcmli%s" class="mailbox %s %s%s%s"><a href="%s"'; … … 290 290 $unread_count ? ' unread' : '', 291 291 $folder['id']==$mbox_name ? ' selected' : '', 292 rc_main::Q(rc_main::rcmail_url('', array('_mbox' => $folder['id']))),292 Q(rcube::url('', array('_mbox' => $folder['id']))), 293 293 JS_OBJECT_NAME, 294 294 $js_name, … … 300 300 $js_name, 301 301 $title, 302 rc_main::Q($foldername)302 Q($foldername) 303 303 ); 304 304 /** … … 332 332 function rcmail_render_folder_tree_select(&$arrFolders, &$special, &$mbox_name, $maxlength, $nestLevel=0) 333 333 { 334 $registry = rc _registry::getInstance();334 $registry = rcube_registry::get_instance(); 335 335 $IMAP = $registry->get('IMAP', 'core'); 336 336 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 341 341 $folder_lc = strtolower($folder['id']); 342 342 if (in_array($folder_lc, $special)) 343 $foldername = rcube _label($folder_lc);343 $foldername = rcube::gettext($folder_lc); 344 344 else { 345 345 $foldername = $folder['name']; … … 354 354 htmlspecialchars($folder['id']), 355 355 str_repeat(' ', $nestLevel*4), 356 rc_main::Q($foldername));356 Q($foldername)); 357 357 358 358 if (!empty($folder['folders'])) … … 378 378 function rcmail_message_list($attrib) 379 379 { 380 $registry = rc _registry::getInstance();380 $registry = rcube_registry::get_instance(); 381 381 $IMAP = $registry->get('IMAP', 'core'); 382 $CONFIG = $registry->get ('CONFIG', 'core');382 $CONFIG = $registry->get_all('config'); 383 383 $COMM_PATH = $registry->get('COMM_PATH', 'core'); 384 384 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 392 392 393 393 // add some labels to client 394 rc_main::rcube_add_label('from', 'to');394 $OUTPUT->add_label('from', 'to'); 395 395 396 396 // get message headers … … 403 403 404 404 // allow the following attributes to be added to the <table> tag 405 $attrib_str = rc _main::create_attrib_string(405 $attrib_str = rcube::create_attrib_string( 406 406 $attrib, 407 407 array( … … 448 448 foreach ($a_show_cols as $col) { 449 449 // get column name 450 $col_name = rc_main::Q(rcube_label($col));450 $col_name = Q(rcube::gettext($col)); 451 451 452 452 // make sort links … … 489 489 JS_OBJECT_NAME, 490 490 $col, 491 rcube _label('sortby'),491 rcube::gettext('sortby'), 492 492 $col_name 493 493 ); … … 511 511 '<tr><td colspan="%d">%s</td></tr>', 512 512 sizeof($a_show_cols)+2, 513 rc_main::Q(rcube_label('nomessagesfound')));513 Q(rcube::gettext('nomessagesfound'))); 514 514 } 515 515 … … 582 582 if ($col=='from' || $col=='to') { 583 583 $cont_normalized.= $header->$col; 584 $cont .= rc_main::Q(584 $cont .= Q( 585 585 rcmail_address_string( 586 586 $header->$col, … … 594 594 $action = $mbox==$CONFIG['drafts_mbox'] ? 'compose' : 'show'; 595 595 $uid_param = $mbox==$CONFIG['drafts_mbox'] ? '_draf_uid' : '_uid'; 596 $cont = rc_main::Q(rcube_imap::decode_mime_string($header->$col, $header->charset));596 $cont = Q(rcube_imap::decode_mime_string($header->$col, $header->charset)); 597 597 if (empty($cont)) { 598 598 $cont_normalized.= ''; 599 $cont .= rc_main::Q(rcube_label('nosubject'));599 $cont .= Q(rcube::gettext('nosubject')); 600 600 } 601 601 else { … … 604 604 $cont = sprintf( 605 605 '<a href="%s" onclick="return rcube_event.cancel(event)">%s</a>', 606 rc_main::Q(rc_main::rcmail_url(606 Q(rcube::url( 607 607 $action, 608 608 array($uid_param=>$header->uid, '_mbox'=>$mbox) … … 617 617 else if ($col=='date') { 618 618 $cont_normalized.= @strtotime($header->date); 619 $cont = rc _main::format_date($header->date);619 $cont = rcube::format_date($header->date); 620 620 } 621 621 else { 622 622 $cont_normalized.= $header->$col; 623 $cont = rc_main::Q($header->$col);623 $cont = Q($header->$col); 624 624 } 625 625 /** … … 714 714 function rcmail_js_message_list($a_headers, $insert_top=FALSE) 715 715 { 716 $registry = rc _registry::getInstance();717 $CONFIG = $registry->get ('CONFIG', 'core');716 $registry = rcube_registry::get_instance(); 717 $CONFIG = $registry->get_all('config'); 718 718 $IMAP = $registry->get('IMAP', 'core'); 719 719 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 741 741 foreach ($a_show_cols as $col) { 742 742 if ($col=='from' || $col=='to') { 743 $cont = rc_main::Q(rcmail_address_string($header->$col, 3), 'show');743 $cont = Q(rcmail_address_string($header->$col, 3), 'show'); 744 744 } 745 745 elseif ($col=='subject') { 746 746 $action = $mbox==$CONFIG['drafts_mbox'] ? 'compose' : 'show'; 747 747 $uid_param = $mbox==$CONFIG['drafts_mbox'] ? '_draf_uid' : '_uid'; 748 $cont = rc_main::Q(rcube_imap::decode_mime_string($header->$col, $header->charset));748 $cont = Q(rcube_imap::decode_mime_string($header->$col, $header->charset)); 749 749 if (!$cont) { 750 $cont = rc_main::Q(rcube_label('nosubject'));750 $cont = Q(rcube::gettext('nosubject')); 751 751 } 752 752 $cont = sprintf( 753 753 '<a href="%s" onclick="return rcube_event.cancel(event)">%s</a>', 754 rc_main::Q(rc_main::rcmail_url(754 Q(rcube::url( 755 755 $action, 756 756 array($uid_param=>$header->uid, '_mbox'=>$mbox) … … 763 763 } 764 764 elseif ($col=='date') { 765 $cont = rc _main::format_date($header->date);765 $cont = rcube::format_date($header->date); 766 766 } 767 767 else { 768 $cont = rc_main::Q($header->$col);768 $cont = Q($header->$col); 769 769 } 770 770 $a_msg_cols[$col] = $cont; … … 789 789 function rcmail_messagecontent_frame($attrib) 790 790 { 791 $registry = rc _registry::getInstance();791 $registry = rcube_registry::get_instance(); 792 792 $OUTPUT = $registry->get('OUTPUT', 'core'); 793 793 … … 796 796 797 797 // allow the following attributes to be added to the <iframe> tag 798 $attrib_str = rc _main::create_attrib_string(798 $attrib_str = rcube::create_attrib_string( 799 799 $attrib, 800 800 array('id', 'class', 'style', 'src', 'width', 'height', 'frameborder') … … 817 817 function rcmail_messagecount_display($attrib) 818 818 { 819 $registry = rc _registry::getInstance();819 $registry = rcube_registry::get_instance(); 820 820 $IMAP = $registry->get('IMAP', 'core'); 821 821 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 827 827 828 828 // allow the following attributes to be added to the <span> tag 829 $attrib_str = rc _main::create_attrib_string($attrib, array('style', 'class', 'id'));829 $attrib_str = rcube::create_attrib_string($attrib, array('style', 'class', 'id')); 830 830 831 831 … … 839 839 function rcmail_quota_display($attrib) 840 840 { 841 $registry = rc _registry::getInstance();841 $registry = rcube_registry::get_instance(); 842 842 $COMM_PATH = $registry->get('COMM_PATH', 'core'); 843 843 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 849 849 850 850 // allow the following attributes to be added to the <span> tag 851 $attrib_str = rc _main::create_attrib_string($attrib, array('style', 'class', 'id'));851 $attrib_str = rcube::create_attrib_string($attrib, array('style', 'class', 'id')); 852 852 853 853 $out = '<span' . $attrib_str . '>'; … … 860 860 function rcmail_quota_content($display) 861 861 { 862 $registry = rc _registry::getInstance();862 $registry = rcube_registry::get_instance(); 863 863 $COMM_PATH = $registry->get('COMM_PATH', 'core'); 864 864 $IMAP = $registry->get('IMAP', 'core'); 865 865 866 866 if (!$IMAP->get_capability('QUOTA')) { 867 $quota_text = rcube _label('unknown');867 $quota_text = rcube::gettext('unknown'); 868 868 } 869 869 elseif ($quota = $IMAP->get_quota()) { … … 889 889 } 890 890 else { 891 $quota_text = rcube _label('unlimited');891 $quota_text = rcube::gettext('unlimited'); 892 892 } 893 893 return $quota_text; … … 897 897 function rcmail_get_messagecount_text($count=NULL, $page=NULL) 898 898 { 899 $registry = rc _registry::getInstance();899 $registry = rcube_registry::get_instance(); 900 900 $MESSAGE = $registry->get('MESSAGE', 'core'); 901 901 $IMAP = $registry->get('IMAP', 'core'); 902 902 903 903 if (isset($MESSAGE['index'])) { 904 return rcube _label(904 return rcube::gettext( 905 905 array( 906 906 'name' => 'messagenrof', … … 920 920 921 921 if ($max==0) { 922 $out = rcube _label('mailboxempty');922 $out = rcube::gettext('mailboxempty'); 923 923 } 924 924 else { 925 $out = rcube _label(array('name' => 'messagesfromto',925 $out = rcube::gettext(array('name' => 'messagesfromto', 926 926 'vars' => array('from' => $start_msg, 927 927 'to' => min($max, $start_msg + $IMAP->page_size - 1), 928 928 'count' => $max))); 929 929 } 930 return rc_main::Q($out);930 return Q($out); 931 931 } 932 932 … … 934 934 function rcmail_print_body($part, $safe=FALSE, $plain=FALSE) 935 935 { 936 $registry = rc _registry::getInstance();936 $registry = rcube_registry::get_instance(); 937 937 $IMAP = $registry->get('IMAP', 'core'); 938 938 … … 952 952 953 953 if ($safe !== FALSE) { 954 return rc_main::Q($body, 'show', FALSE);954 return Q($body, 'show', FALSE); 955 955 } 956 956 … … 989 989 990 990 $body = preg_replace($remote_patterns, $remote_replaces, $body); 991 return rc_main::Q($body, 'show', FALSE);991 return Q($body, 'show', FALSE); 992 992 993 993 } … … 995 995 // text/enriched 996 996 if ($part->ctype_secondary=='enriched') { 997 return rc_main::Q(enriched_to_html($body), 'show');997 return Q(enriched_to_html($body), 'show'); 998 998 } 999 999 // make links and email-addresses clickable … … 1050 1050 } 1051 1051 $quote_level = $q; 1052 $a_lines[$n] = $quotation . rc_main::Q($line, 'replace', FALSE);1052 $a_lines[$n] = $quotation . Q($line, 'replace', FALSE); 1053 1053 } 1054 1054 … … 1072 1072 function rcmail_str_replacement($str, &$rep) 1073 1073 { 1074 $registry = rc _registry::getInstance();1074 $registry = rcube_registry::get_instance(); 1075 1075 $rpl_count = $registry->get('rpl_count', 'core'); 1076 1076 … … 1089 1089 function rcmail_parse_message(&$structure, $arg=array(), $recursive=FALSE) 1090 1090 { 1091 $registry = rc _registry::getInstance();1091 $registry = rcube_registry::get_instance(); 1092 1092 $IMAP = $registry->get('IMAP', 'core'); 1093 1093 $sa_inline_objects = $registry->get('sa_inline_objects', 'core'); … … 1174 1174 $c = new stdClass; 1175 1175 $c->type = 'content'; 1176 $c->body = rcube _label('htmlmessage');1176 $c->body = rcube::gettext('htmlmessage'); 1177 1177 $c->ctype_primary = 'text'; 1178 1178 $c->ctype_secondary = 'plain'; … … 1184 1184 if ($html_part!==NULL && $structure->parts[$html_part]!==$print_part) { 1185 1185 $html_part = &$structure->parts[$html_part]; 1186 $html_part->filename = rcube _label('htmlmessage');1186 $html_part->filename = rcube::gettext('htmlmessage'); 1187 1187 $html_part->mimetype = 'text/html'; 1188 1188 … … 1300 1300 function rcmail_message_headers($attrib, $headers=NULL) 1301 1301 { 1302 $registry = rc _registry::getInstance();1302 $registry = rcube_registry::get_instance(); 1303 1303 $IMAP = $registry->get('IMAP', 'core'); 1304 1304 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 1326 1326 1327 1327 // allow the following attributes to be added to the <table> tag 1328 $attrib_str = rc _main::create_attrib_string($attrib, array('style', 'class', 'id', 'cellpadding', 'cellspacing', 'border', 'summary'));1328 $attrib_str = rcube::create_attrib_string($attrib, array('style', 'class', 'id', 'cellpadding', 'cellspacing', 'border', 'summary')); 1329 1329 $out = '<table' . $attrib_str . ">\n"; 1330 1330 … … 1337 1337 } 1338 1338 if ($hkey=='date' && empty($headers[$hkey]) === false) { 1339 $header_value = rc _main::format_date(strtotime($headers[$hkey]));1339 $header_value = rcube::format_date(strtotime($headers[$hkey])); 1340 1340 } 1341 1341 elseif(in_array($hkey, array('from', 'to', 'cc', 'bcc', 'reply-to'))) { 1342 $header_value = rc_main::Q(1342 $header_value = Q( 1343 1343 rcmail_address_string( 1344 1344 $headers[$hkey], … … 1350 1350 } 1351 1351 else { 1352 $header_value = rc_main::Q(1352 $header_value = Q( 1353 1353 rcube_imap::decode_mime_string( 1354 1354 $headers[$hkey], … … 1361 1361 } 1362 1362 $out .= "\n<tr>\n"; 1363 $out .= '<td class="header-title">' . rc_main::Q(rcube_label($hkey));1363 $out .= '<td class="header-title">' . Q(rcube::gettext($hkey)); 1364 1364 $out .= ": </td>\n"; 1365 1365 $out .= '<td class="' . $hkey . '" width="90%">' . $header_value; … … 1382 1382 function rcmail_message_body($attrib) 1383 1383 { 1384 $registry = rc _registry::getInstance();1385 $CONFIG = $registry->get ('CONFIG', 'core');1384 $registry = rcube_registry::get_instance(); 1385 $CONFIG = $registry->get_all('config'); 1386 1386 $OUTPUT = $registry->get('OUTPUT', 'core'); 1387 1387 $MESSAGE = $registry->get('MESSAGE', 'core'); … … 1396 1396 } 1397 1397 $safe_mode = (bool)$_GET['_safe']; 1398 $attrib_str = rc _main::create_attrib_string($attrib, array('style', 'class', 'id'));1398 $attrib_str = rcube::create_attrib_string($attrib, array('style', 'class', 'id')); 1399 1399 $out = '<div '. $attrib_str . ">\n"; 1400 1400 … … 1413 1413 $p->ctype_primary = 'text'; 1414 1414 $p->ctype_secondary = 'plain'; 1415 $p->body = rcube _label('encryptedmessage');1415 $p->body = rcube::gettext('encryptedmessage'); 1416 1416 $MESSAGE['parts'][0] = $p; 1417 1417 } … … 1572 1572 { 1573 1573 $in = preg_replace('/=([^("|\'|\s)]+)(\s|$)/', '="\1"', $in); 1574 $attrib = rc _main::parse_attrib_string($in);1574 $attrib = rcube::parse_attrib_string($in); 1575 1575 1576 1576 if (stristr((string)$attrib['href'], 'mailto:')) { … … 1578 1578 "return %s.command('compose','%s',this)", 1579 1579 JS_OBJECT_NAME, 1580 rc_main::JQ(substr($attrib['href'], 7))1580 JQ(substr($attrib['href'], 7)) 1581 1581 ); 1582 1582 } … … 1585 1585 } 1586 1586 $resp = '<a'; 1587 $resp.= rc _main::create_attrib_string(1587 $resp.= rcube::create_attrib_string( 1588 1588 $attrib, 1589 1589 array( … … 1655 1655 function rcmail_first_html_part($message_struct) 1656 1656 { 1657 $registry = rc _registry::getInstance();1657 $registry = rcube_registry::get_instance(); 1658 1658 $IMAP = $registry->get('IMAP', 'core'); 1659 1659 … … 1685 1685 function rcmail_first_text_part($message_struct) 1686 1686 { 1687 $registry = rc _registry::getInstance();1687 $registry = rcube_registry::get_instance(); 1688 1688 $IMAP = $registry->get('IMAP', 'core'); 1689 1689 … … 1717 1717 function rcmail_address_string($input, $max=NULL, $addicon=NULL) 1718 1718 { 1719 $registry = rc _registry::getInstance();1720 $CONFIG = $registry->get ('CONFIG', 'core');1719 $registry = rcube_registry::get_instance(); 1720 $CONFIG = $registry->get_all('config'); 1721 1721 $IMAP = $registry->get('IMAP', 'core'); 1722 1722 $PRINT_MODE = $registry->get('PRINT_MODE', 'core'); … … 1737 1737 $j++; 1738 1738 if ($PRINT_MODE) { 1739 $out .= sprintf('%s <%s>', rc_main::Q($part['name']), $part['mailto']);1739 $out .= sprintf('%s <%s>', Q($part['name']), $part['mailto']); 1740 1740 } 1741 1741 elseif (preg_match($EMAIL_ADDRESS_PATTERN, $part['mailto'])) { 1742 1742 $out .= sprintf( 1743 1743 '<a href="mailto:%s" onclick="return %s.command(\'compose\',\'%s\',this)" class="rcmContactAddress" title="%s">%s</a>', 1744 rc_main::Q($part['mailto']),1744 Q($part['mailto']), 1745 1745 JS_OBJECT_NAME, 1746 rc_main::JQ($part['mailto']),1747 rc_main::Q($part['mailto']),1748 rc_main::Q($part['name']));1746 JQ($part['mailto']), 1747 Q($part['mailto']), 1748 Q($part['name'])); 1749 1749 if ($addicon) { 1750 1750 $out .= sprintf( … … 1752 1752 JS_OBJECT_NAME, 1753 1753 urlencode($part['string']), 1754 rcube _label('addtoaddressbook'),1754 rcube::gettext('addtoaddressbook'), 1755 1755 $CONFIG['skin_path'], 1756 1756 $addicon … … 1760 1760 else { 1761 1761 if ($part['name']) { 1762 $out .= rc_main::Q($part['name']);1762 $out .= Q($part['name']); 1763 1763 } 1764 1764 if ($part['mailto']) { 1765 1765 $out .= (strlen($out) ? ' ' : ''); 1766 $out .= sprintf('<%s>', rc_main::Q($part['mailto']));1766 $out .= sprintf('<%s>', Q($part['mailto'])); 1767 1767 } 1768 1768 } … … 1782 1782 function rcmail_message_part_controls() 1783 1783 { 1784 $registry = rc _registry::getInstance();1785 $CONFIG = $registry->get ('CONFIG', 'core');1784 $registry = rcube_registry::get_instance(); 1785 $CONFIG = $registry->get_all('config'); 1786 1786 $IMAP = $registry->get('IMAP', 'core'); 1787 1787 $MESSAGE = $registry->get('MESSAGE', 'core'); … … 1797 1797 $part = &$MESSAGE['parts'][$_GET['_part']]; 1798 1798 1799 $attrib_str = rc _main::create_attrib_string(1799 $attrib_str = rcube::create_attrib_string( 1800 1800 $attrib, 1801 1801 array( … … 1814 1814 $out .= sprintf( 1815 1815 '<tr><td class="title">%s</td><td>%s</td><td>[<a href="./?%s">%s</a>]</tr>'."\n", 1816 rc_main::Q(rcube_label('filename')),1817 rc_main::Q($part->filename),1816 Q(rcube::gettext('filename')), 1817 Q($part->filename), 1818 1818 str_replace('_frame=', '_download=', $_SERVER['QUERY_STRING']), 1819 rc_main::Q(rcube_label('download')));1819 Q(rcube::gettext('download'))); 1820 1820 } 1821 1821 … … 1823 1823 $out .= sprintf( 1824 1824 '<tr><td class="title">%s</td><td>%s</td></tr>' . "\n", 1825 rc_main::Q(rcube_label('filesize')),1825 Q(rcube::gettext('filesize')), 1826 1826 show_bytes($part->size) 1827 1827 ); … … 1836 1836 function rcmail_message_part_frame($attrib) 1837 1837 { 1838 $registry = rc _registry::getInstance();1838 $registry = rcube_registry::get_instance(); 1839 1839 $MESSGAGE = $registry->get('MESSAGE', 'core'); 1840 1840 … … 1848 1848 $_SERVER['QUERY_STRING'] 1849 1849 ); 1850 $attrib_str = rc _main::create_attrib_string($attrib, array('id', 'class', 'style', 'src', 'width', 'height'));1850 $attrib_str = rcube::create_attrib_string($attrib, array('id', 'class', 'style', 'src', 'width', 'height')); 1851 1851 $out = '<iframe '. $attrib_str . "></iframe>"; 1852 1852 … … 1883 1883 'messagepartframe' => 'rcmail_message_part_frame', 1884 1884 'messagepartcontrols' => 'rcmail_message_part_controls', 1885 'searchform' => array( 'rc_main', 'rcmail_search_form')1885 'searchform' => array($OUTPUT, 'search_form') 1886 1886 )); 1887 1887 -
branches/devel-vnext/program/steps/mail/get.inc
r624 r806 20 20 */ 21 21 22 require_once 'Mail/mimeDecode.php'; 23 24 $registry = rc_registry::getInstance(); 22 $registry = rcube_registry::get_instance(); 25 23 26 24 // show loading page 27 25 if ($_GET['_preload']) { 28 26 $url = str_replace('&_preload=1', '', $_SERVER['REQUEST_URI']); 29 $message = rcube _label('loadingdata');27 $message = rcube::gettext('loadingdata'); 30 28 31 29 echo "<html>\n<head>\n"; … … 40 38 // similar code as in program/steps/mail/show.inc 41 39 if ($_GET['_uid']) { 42 $MESSAGE = array('UID' => rc _main::get_input_value('_uid', RCUBE_INPUT_GET));40 $MESSAGE = array('UID' => rcube::get_input_value('_uid', rcube::INPUT_GET)); 43 41 $MESSAGE['structure'] = $IMAP->get_structure($MESSAGE['UID']); 44 42 $MESSAGE['parts'] = $IMAP->get_mime_numbers($MESSAGE['structure']); … … 49 47 // show part page 50 48 if ($_GET['_frame']) { 51 rc _main::parse_template('messagepart');49 rcube::parse_template('messagepart'); 52 50 exit; 53 51 } 54 else if ($pid = rc _main::get_input_value('_part', RCUBE_INPUT_GET)) {52 else if ($pid = rcube::get_input_value('_part', rcube::INPUT_GET)) { 55 53 if ($part = $MESSAGE['parts'][$pid]) { 56 54 $ctype_primary = strtolower($part->ctype_primary); -
branches/devel-vnext/program/steps/mail/list.inc
r629 r806 19 19 */ 20 20 21 $registry = rc _registry::getInstance();21 $registry = rcube_registry::get_instance(); 22 22 $OUTPUT = $registry->get('OUTPUT', 'core'); 23 23 $IMAP = $registry->get('IMAP', 'core'); 24 $CONFIG = $registry->get ('CONFIG', 'core');24 $CONFIG = $registry->get_all('config'); 25 25 26 26 $OUTPUT_TYPE = 'js'; … … 28 28 29 29 // is there a sort type for this request? 30 if ($sort = rc _main::get_input_value('_sort', RCUBE_INPUT_GET)) {30 if ($sort = rcube::get_input_value('_sort', rcube::INPUT_GET)) { 31 31 // yes, so set the sort vars 32 32 list($sort_col, $sort_order) = explode('_', $sort); -
branches/devel-vnext/program/steps/mail/mark.inc
r623 r806 27 27 28 28 if ( 29 ($uids = rc _main::get_input_value('_uid', RCUBE_INPUT_POST))30 && ($flag = rc _main::get_input_value('_flag', RCUBE_INPUT_POST))29 ($uids = rcube::get_input_value('_uid', rcube::INPUT_POST)) 30 && ($flag = rcube::get_input_value('_flag', rcube::INPUT_POST)) 31 31 ) { 32 32 $flag = $a_flags_map[$flag] ? $a_flags_map[$flag] : strtoupper($flag); -
branches/devel-vnext/program/steps/mail/move_del.inc
r726 r806 19 19 */ 20 20 21 $registry = rc _registry::getInstance();21 $registry = rcube_registry::get_instance(); 22 22 $IMAP = $registry->get('IMAP', 'core'); 23 23 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 25 25 // move messages 26 26 if ($_action=='moveto' && !empty($_POST['_uid']) && !empty($_POST['_target_mbox'])) { 27 $count = sizeof(explode(',', ($uids = rc _main::get_input_value('_uid', RCUBE_INPUT_POST))));28 $target = rc _main::get_input_value('_target_mbox', RCUBE_INPUT_POST);29 $moved = $IMAP->move_message($uids, $target, rc _main::get_input_value('_mbox', RCUBE_INPUT_POST));27 $count = sizeof(explode(',', ($uids = rcube::get_input_value('_uid', rcube::INPUT_POST)))); 28 $target = rcube::get_input_value('_target_mbox', rcube::INPUT_POST); 29 $moved = $IMAP->move_message($uids, $target, rcube::get_input_value('_mbox', rcube::INPUT_POST)); 30 30 31 //rc _main::tfk_debug('Moved?: ' . $target . '/' . $uids . '/' . $moved);31 //rcube::tfk_debug('Moved?: ' . $target . '/' . $uids . '/' . $moved); 32 32 33 33 if (!$moved) { … … 41 41 // delete messages 42 42 else if ($_action=='delete' && !empty($_POST['_uid'])) { 43 $count = sizeof(explode(',', ($uids = rc _main::get_input_value('_uid', RCUBE_INPUT_POST))));44 $del = $IMAP->delete_message($uids, rc _main::get_input_value('_mbox', RCUBE_INPUT_POST));43 $count = sizeof(explode(',', ($uids = rcube::get_input_value('_uid', rcube::INPUT_POST)))); 44 $del = $IMAP->delete_message($uids, rcube::get_input_value('_mbox', rcube::INPUT_POST)); 45 45 46 46 if (!$del) { … … 54 54 // unknown action or missing query param 55 55 else { 56 //rc _main::tfk_debug('/ unknown action');56 //rcube::tfk_debug('/ unknown action'); 57 57 exit; 58 58 } … … 60 60 // refresh saved seach set after moving some messages 61 61 if ( 62 ($search_request = rc _main::get_input_value('_search', RCUBE_INPUT_GPC))62 ($search_request = rcube::get_input_value('_search', rcube::INPUT_GPC)) 63 63 && $IMAP->search_set 64 64 ) { -
branches/devel-vnext/program/steps/mail/rss.inc
r622 r806 27 27 * @access public 28 28 * @param string $string 29 * @uses rc _main::rep_specialchars_output()29 * @uses rcube::rep_specialchars_output() 30 30 * @return string 31 31 */ 32 32 function rss_encode($string) { 33 $string = rc _main::rep_specialchars_output($string, 'xml');33 $string = rcube::rep_specialchars_output($string, 'xml'); 34 34 return $string; 35 35 } … … 38 38 $OUTPUT_TYPE = 'rss'; 39 39 40 $registry = rc _registry::getInstance();40 $registry = rcube_registry::get_instance(); 41 41 $registry->set('REMOTE_REQUEST', $REMOTE_REQUEST, 'core'); 42 42 $registry->set('OUTPUT_TYPE', $OUTPUT_TYPE, 'core'); -
branches/devel-vnext/program/steps/mail/search.inc
r623 r806 26 26 27 27 // get search string 28 $str = rc _main::get_input_value('_q', RCUBE_INPUT_GET);29 $mbox = rc _main::get_input_value('_mbox', RCUBE_INPUT_GET);28 $str = rcube::get_input_value('_q', rcube::INPUT_GET); 29 $mbox = rcube::get_input_value('_mbox', rcube::INPUT_GET); 30 30 $search_request = md5($mbox.$str); 31 31 -
branches/devel-vnext/program/steps/mail/sendmail.inc
r766 r806 21 21 */ 22 22 23 //rc _main::tfk_debug('Yay, sendmail.inc reached!');24 25 26 $registry = rc _registry::getInstance();23 //rcube::tfk_debug('Yay, sendmail.inc reached!'); 24 25 26 $registry = rcube_registry::get_instance(); 27 27 $OUTPUT = $registry->get('OUTPUT', 'core'); 28 28 $MBSTRING = $registry->get('MBSTRING', 'core'); 29 $CONFIG = $registry->get ('CONFIG', 'core');29 $CONFIG = $registry->get_all('config'); 30 30 $IMAP = $registry->get('IMAP', 'core'); 31 31 32 32 //require_once('lib/smtp.inc'); 33 require_once 'include/rcube_smtp. inc';33 require_once 'include/rcube_smtp.php'; 34 34 require_once 'lib/html2text.inc'; 35 require_once 'lib/rc_mail_mime.inc';36 35 37 36 38 37 if (!isset($_SESSION['compose']['id'])) { 39 rc _main::rcmail_overwrite_action('list');38 rcube::override_action('list'); 40 39 return; 41 40 } 42 41 43 //rc _main::tfk_debug('Still here!');42 //rcube::tfk_debug('Still here!'); 44 43 45 44 /****** message sending functions ********/ 46 45 require_once 'include/rcube/rcmail_send.php'; 47 46 48 //rc _main::tfk_debug('Passed require of class rc_mail_send.');47 //rcube::tfk_debug('Passed require of class rc_mail_send.'); 49 48 50 49 if (strlen($_POST['_draft_saveid']) > 3) { 51 $olddraftmessageid = rc _main::get_input_value('_draft_saveid', RCUBE_INPUT_POST);50 $olddraftmessageid = rcube::get_input_value('_draft_saveid', rcube::INPUT_POST); 52 51 } 53 52 $message_id = sprintf( 54 53 '<%s@%s>', 55 54 md5(uniqid('rcmail' . rand(),true)), 56 rc _main::rcmail_mail_domain($_SESSION['imap_host'])55 rcube::mail_domain($_SESSION['imap_host']) 57 56 ); 58 57 $savedraft = ((empty($_POST['_draft']) === false) ? TRUE : FALSE); 59 58 60 //rc _main::tfk_debug('Draft?: ' . var_export($savedraft, true));59 //rcube::tfk_debug('Draft?: ' . var_export($savedraft, true)); 61 60 62 61 // remove all scripts and act as called in frame … … 74 73 } 75 74 76 //rc _main::tfk_debug('Passed some checks! Right before charset!');75 //rcube::tfk_debug('Passed some checks! Right before charset!'); 77 76 78 77 // set default charset … … 87 86 $mailto_regexp, 88 87 $mailto_replace, 89 rc _main::get_input_value('_to', RCUBE_INPUT_POST, TRUE, $message_charset)88 rcube::get_input_value('_to', rcube::INPUT_POST, TRUE, $message_charset) 90 89 ); 91 90 92 //rc _main::tfk_debug('We just replaced line endings.');91 //rcube::tfk_debug('We just replaced line endings.'); 93 92 94 93 // decode address strings 95 94 $to_address_arr = $IMAP->decode_address_list($mailto); 96 //rc _main::tfk_debug('To: ' . var_export($to_address_arr, true));97 98 $identity_arr = rcmail_send::get_identity(rc _main::get_input_value('_from', RCUBE_INPUT_POST));95 //rcube::tfk_debug('To: ' . var_export($to_address_arr, true)); 96 97 $identity_arr = rcmail_send::get_identity(rcube::get_input_value('_from', rcube::INPUT_POST)); 99 98 if ($identity_arr === false) { 100 99 $OUTPUT->show_message("sendingfailed", 'error'); … … 103 102 } 104 103 105 //rc _main::tfk_debug('We got identity.');104 //rcube::tfk_debug('We got identity.'); 106 105 107 106 $from = $identity_arr['mailto']; … … 114 113 $headers = array( 115 114 'Date' => date('D, j M Y H:i:s O'), 116 'From' => rc _main::rcube_charset_convert($identity_arr['string'], RCMAIL_CHARSET, $message_charset),115 'From' => rcube::charset_convert($identity_arr['string'], RCMAIL_CHARSET, $message_charset), 117 116 'To' => $mailto 118 117 ); … … 123 122 $mailto_regexp, 124 123 $mailto_replace, 125 rc _main::get_input_value(124 rcube::get_input_value( 126 125 '_cc', 127 RCUBE_INPUT_POST,126 rcube::INPUT_POST, 128 127 TRUE, $message_charset 129 128 ) … … 133 132 $headers['Bcc'] = preg_replace( 134 133 $mailto_regexp, $mailto_replace, 135 rc _main::get_input_value('_bcc', RCUBE_INPUT_POST, TRUE, $message_charset)134 rcube::get_input_value('_bcc', rcube::INPUT_POST, TRUE, $message_charset) 136 135 ); 137 136 } … … 141 140 // add subject 142 141 $headers['Subject'] = trim( 143 rc _main::get_input_value(142 rcube::get_input_value( 144 143 '_subject', 145 RCUBE_INPUT_POST,144 rcube::INPUT_POST, 146 145 FALSE, 147 146 $message_charset … … 186 185 } 187 186 // fetch message body 188 $message_body = rc _main::get_input_value(187 $message_body = rcube::get_input_value( 189 188 '_message', 190 RCUBE_INPUT_POST,189 rcube::INPUT_POST, 191 190 TRUE, 192 191 $message_charset … … 199 198 if ($footer !== FALSE) { 200 199 $message_body .= "\r\n"; 201 $message_body .= rcube _charset_convert(200 $message_body .= rcube::charset_convert( 202 201 $footer, 203 202 'UTF-8', … … 223 222 } 224 223 225 $isHtmlVal = strtolower(rc _main::get_input_value('_is_html', RCUBE_INPUT_POST));224 $isHtmlVal = strtolower(rcube::get_input_value('_is_html', rcube::INPUT_POST)); 226 225 $isHtml = ($isHtmlVal == "1"); 227 226 228 227 // create extended PEAR::Mail_mime instance 229 $MAIL_MIME = new rc _mail_mime($header_delm);228 $MAIL_MIME = new rcube_mail_mime($header_delm); 230 229 231 230 // For HTML-formatted messages, construct the MIME message with both … … 307 306 } 308 307 309 //rc _main::tfk_debug('Errors anyone?: ' . var_export($error_msg, true));308 //rcube::tfk_debug('Errors anyone?: ' . var_export($error_msg, true)); 310 309 311 310 if (count($error_msg) > 0) { 312 rc _bugs::raise_error(311 rcube_error::raise( 313 312 array( 314 313 'code' => 800, … … 353 352 } 354 353 355 //rc _main::tfk_debug('Right before sending/draft if!');354 //rcube::tfk_debug('Right before sending/draft if!'); 356 355 357 356 // Begin SMTP Delivery Block 358 357 if ($savedraft === false) { 359 358 360 //rc _main::tfk_debug('Not a draft. We try to send mail.');359 //rcube::tfk_debug('Not a draft. We try to send mail.'); 361 360 362 361 // send thru SMTP server using custom SMTP library 363 362 if ($_SESSION['smtp_server'] != 'phpMail') { 364 363 365 //rc _main::tfk_debug('Because we can: SMTP.');364 //rcube::tfk_debug('Because we can: SMTP.'); 366 365 367 366 // generate list of recipients … … 390 389 $smtp_response 391 390 ); 392 //rc _main::tfk_debug(var_export($smtp_response, true));391 //rcube::tfk_debug(var_export($smtp_response, true)); 393 392 // log error 394 393 if (!$sent) { 395 rc _bugs::raise_error(394 rcube_error::raise( 396 395 array( 397 396 'code' => 800, … … 408 407 else { // send mail using PHP's mail() function 409 408 410 //rc _main::tfk_debug('We try to send using mail().');409 //rcube::tfk_debug('We try to send using mail().'); 411 410 412 411 // unset some headers because they will be added by the mail() function … … 441 440 // return to compose page if sending failed 442 441 if ($sent === false) { 443 //rc _main::tfk_debug('mail(): failed');442 //rcube::tfk_debug('mail(): failed'); 444 443 $OUTPUT->show_message("sendingfailed", 'error'); 445 444 $OUTPUT->send('iframe'); … … 481 480 // raise error if saving failed 482 481 if (!$saved) { 483 rc _bugs::raise_error(482 rcube_error::raise( 484 483 array( 485 484 'code' => 800, … … 508 507 // raise error if deletion of old draft failed 509 508 if (!$deleted) { 510 rc _bugs::raise_error(509 rcube_error::raise( 511 510 array( 512 511 'code' => 800, … … 552 551 } 553 552 rcmail_compose_cleanup(); 554 $OUTPUT->command('sent_successfully', rcube _label('messagesent'));553 $OUTPUT->command('sent_successfully', rcube::gettext('messagesent')); 555 554 $OUTPUT->send('iframe'); 556 555 } -
branches/devel-vnext/program/steps/mail/show.inc
r751 r806 20 20 */ 21 21 22 //rc _main::tfk_debug('/ show :-)');22 //rcube::tfk_debug('/ show :-)'); 23 23 24 24 require_once 'Mail/mimeDecode.php'; … … 30 30 if ($_GET['_uid']) { 31 31 32 //rc _main::tfk_debug("/ uid: {$_GET['_uid']}");33 34 $MESSAGE = array('UID' => rc _main::get_input_value('_uid', RCUBE_INPUT_GET));32 //rcube::tfk_debug("/ uid: {$_GET['_uid']}"); 33 34 $MESSAGE = array('UID' => rcube::get_input_value('_uid', rcube::INPUT_GET)); 35 35 $MESSAGE['headers'] = $IMAP->get_headers($MESSAGE['UID']); 36 36 37 37 $registry->set('MESSAGE', $MESSAGE, 'core'); 38 38 39 //rc _main::tfk_debug(var_export($MESSAGE, true));39 //rcube::tfk_debug(var_export($MESSAGE, true)); 40 40 41 41 // go back to list if message not found (wrong UID) … … 43 43 $OUTPUT->show_message('messageopenerror', 'error'); 44 44 if ($_action=='preview' && template_exists('messagepreview')) { 45 rc _main::parse_template('messagepreview');45 rcube::parse_template('messagepreview'); 46 46 } 47 47 else { … … 55 55 56 56 // allow caching, unless remote images are present 57 if ((bool)rc _main::get_input_value('_safe', RCUBE_INPUT_GET)) {57 if ((bool)rcube::get_input_value('_safe', rcube::INPUT_GET)) { 58 58 send_nocacheing_headers(); 59 59 } … … 136 136 } 137 137 138 //rc _main::tfk_debug("/ hallo");138 //rcube::tfk_debug("/ hallo"); 139 139 140 140 function rcmail_message_attachments($attrib) 141 141 { 142 $registry = rc _registry::getInstance();143 $CONFIG = $registry->get ('CONFIG', 'core');142 $registry = rcube_registry::get_instance(); 143 $CONFIG = $registry->get_all('config'); 144 144 $OUTPUT = $registry->get('OUTPUT', 'core'); 145 145 $PRINT_MODE = $registry->get('PRINT_MODE', 'core'); … … 150 150 if (sizeof($MESSAGE['attachments'])) { 151 151 // allow the following attributes to be added to the <ul> tag 152 $attrib_str = rc _main::create_attrib_string(152 $attrib_str = rcube::create_attrib_string( 153 153 $attrib, 154 154 array('style', 'class', 'id') … … 195 195 * @param array $attrib 196 196 * @return string $out 197 * @uses rc _registry::getInstance()197 * @uses rcube_registry::get_instance() 198 198 */ 199 199 function rcmail_remote_objects_msg($attrib) 200 200 { 201 $registry = rc _registry::getInstance();202 $CONFIG = $registry->get ('CONFIG', 'core');201 $registry = rcube_registry::get_instance(); 202 $CONFIG = $registry->get_all('config'); 203 203 $OUTPUT = $registry->get('OUTPUT', 'core'); 204 204 … … 207 207 } 208 208 // allow the following attributes to be added to the <div> tag 209 $attrib_str = rc _main::create_attrib_string($attrib, array('style', 'class', 'id'));209 $attrib_str = rcube::create_attrib_string($attrib, array('style', 'class', 'id')); 210 210 211 211 $out = '<div' . $attrib_str . ">"; 212 212 $out .= sprintf( 213 213 '%s <a href="#loadimages" onclick="%s.command(\'load-images\')">%s</a>', 214 rc_main::Q(rcube_label('blockedimages')),214 Q(rcube::gettext('blockedimages')), 215 215 JS_OBJECT_NAME, 216 rc_main::Q(rcube_label('showimages'))216 Q(rcube::gettext('showimages')) 217 217 ); 218 218 $out .= '</div>'; … … 230 230 ); 231 231 232 if ($_action=='print' && rc _main::template_exists('printmessage')) {233 rc _main::parse_template('printmessage');234 } 235 elseif ($_action=='preview' && rc _main::template_exists('messagepreview')) {236 rc _main::parse_template('messagepreview');232 if ($_action=='print' && rcube::template_exists('printmessage')) { 233 rcube::parse_template('printmessage'); 234 } 235 elseif ($_action=='preview' && rcube::template_exists('messagepreview')) { 236 rcube::parse_template('messagepreview'); 237 237 } 238 238 else { 239 rc _main::parse_template('message');239 rcube::parse_template('message'); 240 240 } 241 241 ?> -
branches/devel-vnext/program/steps/mail/spell.inc
r629 r806 22 22 */ 23 23 24 $registry = rc _registry::getInstance();24 $registry = rcube_registry::get_instance(); 25 25 $REMOTE_REQUEST = $registry->set('REMOTE_REQUEST', TRUE, 'core'); 26 $CONFIG = $registry->get ('CONFIG', 'core');26 $CONFIG = $registry->get_all('config'); 27 27 28 28 // default settings 29 29 $host = "ssl://www.google.com"; 30 30 $port = 443; 31 $lang = rc _main::get_input_value('lang', RCUBE_INPUT_GET);31 $lang = rcube::get_input_value('lang', rcube::INPUT_GET); 32 32 $path = "/tbproxy/spell?lang=$lang"; 33 33 -
branches/devel-vnext/program/steps/mail/upload.inc
r623 r806 48 48 '<img src="%s/images/icons/remove-attachment.png" alt="%s" border="0" style="padding-right:2px;vertical-align:middle" />', 49 49 $CONFIG['skin_path'], 50 rc_main::Q(rcube_label('delete'))50 Q(rcube::gettext('delete')) 51 51 ); 52 52 } 53 53 else { 54 $button = rc_main::Q(rcube_label('delete'));54 $button = Q(rcube::gettext('delete')); 55 55 } 56 56 $content = sprintf( … … 58 58 JS_OBJECT_NAME, 59 59 $id, 60 rc_main::Q(rcube_label('delete')),60 Q(rcube::gettext('delete')), 61 61 $button, 62 rc_main::Q($_FILES['_attachments']['name'][$i])62 Q($_FILES['_attachments']['name'][$i]) 63 63 ); 64 64 $OUTPUT->command('add2attachment_list', "rcmfile$id", $content); … … 68 68 $err = $_FILES['_attachments']['error'][$i]; 69 69 if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { 70 $msg = rcube _label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize'))))));70 $msg = rcube::gettext(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize')))))); 71 71 } 72 72 else { 73 $msg = rcube _label('fileuploaderror');73 $msg = rcube::gettext('fileuploaderror'); 74 74 } 75 75 $OUTPUT->command('display_message', $msg, 'error'); -
branches/devel-vnext/program/steps/mail/viewsource.inc
r645 r806 22 22 23 23 // similar code as in program/steps/mail/get.inc 24 if ($uid = rc _main::get_input_value('_uid', RCUBE_INPUT_GET)) {24 if ($uid = rcube::get_input_value('_uid', rcube::INPUT_GET)) { 25 25 header('Content-Type: text/plain'); 26 26 //@ob_end_clean(); … … 28 28 } 29 29 else { 30 rc _bugs::raise_error(30 rcube_error::raise( 31 31 array( 32 32 'code' => 500, -
branches/devel-vnext/program/steps/settings/delete_identity.inc
r624 r806 21 21 22 22 if ( 23 ($ids = rc _main::get_input_value('_iid', RCUBE_INPUT_GET))23 ($ids = rcube::get_input_value('_iid', rcube::INPUT_GET)) 24 24 && preg_match('/^[0-9]+(,[0-9]+)*$/', $ids) 25 25 ) { 26 $_query = "UPDATE " . rc _main::get_table_name('identities');26 $_query = "UPDATE " . rcube::get_table_name('identities'); 27 27 $_query.= " SET del=1"; 28 28 $_query.= " WHERE user_id=?"; … … 44 44 45 45 // go to identities page 46 rc _main::rcmail_overwrite_action('identities');46 rcube::override_action('identities'); 47 47 ?> -
branches/devel-vnext/program/steps/settings/edit_identity.inc
r624 r806 20 20 21 21 if (($_GET['_iid'] || $_POST['_iid']) && $_action=='edit-identity') { 22 $_query = "SELECT * FROM " . rc _main::get_table_name('identities');22 $_query = "SELECT * FROM " . rcube::get_table_name('identities'); 23 23 $_query.= " WHERE identity_id=?"; 24 24 $_query.= " AND user_id=?"; … … 26 26 $DB->query( 27 27 $_query, 28 rc _main::get_input_value('_iid', RCUBE_INPUT_GPC),28 rcube::get_input_value('_iid', rcube::INPUT_GPC), 29 29 $_SESSION['user_id'] 30 30 ); … … 35 35 $OUTPUT->set_env('iid', $IDENTITY_RECORD['identity_id']); 36 36 } 37 $OUTPUT->set_pagetitle(rcube _label('edititem'));37 $OUTPUT->set_pagetitle(rcube::gettext('edititem')); 38 38 } 39 39 else { 40 $OUTPUT->set_pagetitle(rcube _label('newitem'));40 $OUTPUT->set_pagetitle(rcube::gettext('newitem')); 41 41 } 42 42 $OUTPUT->include_script('list.js'); … … 44 44 function rcube_identity_form($attrib) 45 45 { 46 $registry = rc _registry::getInstance();46 $registry = rcube_registry::get_instance(); 47 47 $IDENTITY_RECORD = $registry->get('IDENTITY_RECORD', 'core'); 48 48 $OUTPUT = $registry->get('OUTPUT', 'core'); … … 62 62 */ 63 63 if (!$IDENTITY_RECORD && $GLOBALS['_action']!='add-identity') { 64 return rcube _label('notfound');64 return rcube::gettext('notfound'); 65 65 } 66 66 // add some labels to client 67 rc_main::rcube_add_label('noemailwarning', 'nonamewarning');67 $OUTPUT->add_label('noemailwarning', 'nonamewarning'); 68 68 69 69 list($form_start, $form_end) = get_form_tags($attrib, 'save-identity', array('name' => '_iid', 'value' => $IDENTITY_RECORD['identity_id'])); … … 88 88 if (is_array($colprop)) { 89 89 $out = $form_start; 90 $out.= rc _main::rcmail_get_edit_field(90 $out.= rcube::get_edit_field( 91 91 $attrib['part'], 92 92 $IDENTITY_RECORD[$attrib['part']], … … 127 127 128 128 $label = strlen($colprop['label']) ? $colprop['label'] : $col; 129 $value = rc _main::rcmail_get_edit_field(129 $value = rcube::get_edit_field( 130 130 $col, 131 131 $IDENTITY_RECORD[$col], … … 137 137 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 138 138 $attrib['id'], 139 rc_main::Q(rcube_label($label)),139 Q(rcube::gettext($label)), 140 140 $value); 141 141 } … … 147 147 $OUTPUT->add_handler('identityform', 'rcube_identity_form'); 148 148 149 if ($_action=='add-identity' && rc _main::template_exists('addidentity')) {150 rc _main::parse_template('addidentity');149 if ($_action=='add-identity' && rcube::template_exists('addidentity')) { 150 rcube::parse_template('addidentity'); 151 151 } 152 rc _main::parse_template('editidentity');152 rcube::parse_template('editidentity'); 153 153 ?> -
branches/devel-vnext/program/steps/settings/func.inc
r781 r806 22 22 23 23 // get user record 24 $_query = "SELECT username, mail_host FROM " . rc _main::get_table_name('users');24 $_query = "SELECT username, mail_host FROM " . rcube::get_table_name('users'); 25 25 $_query.= " WHERE user_id=?"; 26 26 $sql_result = $DB->query($_query, $_SESSION['user_id']); … … 30 30 sprintf( 31 31 '%s %s@%s', 32 rcube _label('settingsfor'),32 rcube::gettext('settingsfor'), 33 33 $USER_DATA['username'], 34 34 $USER_DATA['mail_host'] … … 40 40 function rcmail_user_prefs_form($attrib) 41 41 { 42 $registry = rc_registry::getInstance(); 43 $DB = $registry->get('DB', 'core'); 44 $CONFIG = $registry->get('CONFIG', 'core'); 45 $sess_user_lang = $registry->get('sess_user_lang', 'core'); 42 $registry = rcube_registry::get_instance(); 43 $DB = $registry->get('DB', 'core'); 44 $OUTPUT = $registry->get('OUTPUT', 'core'); 45 $CONFIG = $registry->get_all('config'); 46 $user_lang = $registry->get('user_lang', 'core'); 46 47 47 48 $no_override = is_array($CONFIG['dont_override']) ? array_flip($CONFIG['dont_override']) : array(); 48 49 49 50 // add some labels to client 50 rc_main::rcube_add_label('nopagesizewarning');51 $OUTPUT->add_label('nopagesizewarning'); 51 52 52 53 list($form_start, $form_end) = get_form_tags($attrib, 'save-prefs'); … … 54 55 55 56 // allow the following attributes to be added to the <table> tag 56 $attrib_str = rc _main::create_attrib_string($attrib, array('style', 'class', 'id', 'cellpadding', 'cellspacing', 'border', 'summary'));57 $attrib_str = rcube::create_attrib_string($attrib, array('style', 'class', 'id', 'cellpadding', 'cellspacing', 'border', 'summary')); 57 58 58 59 // return the complete edit form as table … … 61 62 // show language selection 62 63 if (!isset($no_override['language'])) { 63 $a_lang = rc _main::rcube_list_languages();64 $a_lang = rcube::list_languages(); 64 65 asort($a_lang); 65 66 66 67 $field_id = 'rcmfd_lang'; 67 $select_lang = new select(array('name' => '_language', 'id' => $field_id));68 $select_lang = new html_select(array('name' => '_language', 'id' => $field_id)); 68 69 $select_lang->add(array_values($a_lang), array_keys($a_lang)); 69 70 … … 71 72 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 72 73 $field_id, 73 rc_main::Q(rcube_label('language')),74 $select_lang->show($ sess_user_lang)74 Q(rcube::gettext('language')), 75 $select_lang->show($user_lang) 75 76 ); 76 77 } … … 80 81 if (!isset($no_override['timezone'])) { 81 82 $field_id = 'rcmfd_timezone'; 82 $select_timezone = new select(array('name' => '_timezone', 'id' => $field_id));83 $select_timezone = new html_select(array('name' => '_timezone', 'id' => $field_id)); 83 84 $select_timezone->add('(GMT -11:00) Midway Island, Samoa', '-11'); 84 85 $select_timezone->add('(GMT -10:00) Hawaii', '-10'); … … 118 119 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 119 120 $field_id, 120 rc_main::Q(rcube_label('timezone')),121 Q(rcube::gettext('timezone')), 121 122 $select_timezone->show($CONFIG['timezone']) 122 123 ); … … 126 127 if (!isset($no_override['dst_active'])) { 127 128 $field_id = 'rcmfd_dst'; 128 $input_dst = new checkbox(array('name' => '_dst_active', 'id' => $field_id, 'value' => 1));129 $out .= sprintf( 130 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 131 $field_id, 132 rc_main::Q(rcube_label('dstactive')),129 $input_dst = new html_checkbox(array('name' => '_dst_active', 'id' => $field_id, 'value' => 1)); 130 $out .= sprintf( 131 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 132 $field_id, 133 Q(rcube::gettext('dstactive')), 133 134 $input_dst->show($CONFIG['dst_active']) 134 135 ); … … 138 139 if (!isset($no_override['pagesize'])) { 139 140 $field_id = 'rcmfd_pgsize'; 140 $input_pagesize = new textfield(array('name' => '_pagesize', 'id' => $field_id, 'size' => 5));141 142 $out .= sprintf( 143 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 144 $field_id, 145 rc_main::Q(rcube_label('pagesize')),141 $input_pagesize = new html_inputfield(array('name' => '_pagesize', 'id' => $field_id, 'size' => 5)); 142 143 $out .= sprintf( 144 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 145 $field_id, 146 Q(rcube::gettext('pagesize')), 146 147 $input_pagesize->show($CONFIG['pagesize']) 147 148 ); … … 151 152 if (!isset($no_override['prettydate'])) { 152 153 $field_id = 'rcmfd_prettydate'; 153 $input_prettydate = new checkbox(array('name' => '_pretty_date', 'id' => $field_id, 'value' => 1));154 155 $out .= sprintf( 156 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 157 $field_id, 158 rc_main::Q(rcube_label('prettydate')),154 $input_prettydate = new html_checkbox(array('name' => '_pretty_date', 'id' => $field_id, 'value' => 1)); 155 156 $out .= sprintf( 157 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 158 $field_id, 159 Q(rcube::gettext('prettydate')), 159 160 $input_prettydate->show($CONFIG['prettydate']?1:0) 160 161 ); … … 164 165 if (!isset($no_override['prefer_html'])) { 165 166 $field_id = 'rcmfd_htmlmsg'; 166 $input_pagesize = new checkbox(array('name' => '_prefer_html', 'id' => $field_id, 'value' => 1));167 168 $out .= sprintf( 169 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 170 $field_id, 171 rc_main::Q(rcube_label('preferhtml')),167 $input_pagesize = new html_checkbox(array('name' => '_prefer_html', 'id' => $field_id, 'value' => 1)); 168 169 $out .= sprintf( 170 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 171 $field_id, 172 Q(rcube::gettext('preferhtml')), 172 173 $input_pagesize->show($CONFIG['prefer_html']?1:0) 173 174 ); … … 177 178 if (false && !isset($no_override['htmleditor'])) { 178 179 $field_id = 'rcmfd_htmleditor'; 179 $input_htmleditor = new checkbox(array('name' => '_htmleditor', 'id' => $field_id, 'value' => 1));180 $out .= sprintf( 181 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 182 $field_id, 183 rc_main::Q(rcube_label('htmleditor')),180 $input_htmleditor = new html_checkbox(array('name' => '_htmleditor', 'id' => $field_id, 'value' => 1)); 181 $out .= sprintf( 182 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 183 $field_id, 184 Q(rcube::gettext('htmleditor')), 184 185 $input_htmleditor->show($CONFIG['htmleditor']?1:0) 185 186 ); … … 189 190 if (false && !isset($no_override['preview_pane'])) { 190 191 $field_id = 'rcmfd_preview'; 191 $input_preview = new checkbox(array('name' => '_preview_pane', 'id' => $field_id, 'value' => 1));192 $input_preview = new html_checkbox(array('name' => '_preview_pane', 'id' => $field_id, 'value' => 1)); 192 193 $out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 193 194 $field_id, 194 rc_main::Q(rcube_label('previewpane')),195 Q(rcube::gettext('previewpane')), 195 196 $input_preview->show($CONFIG['preview_pane']?1:0)); 196 197 } … … 198 199 if (!empty($CONFIG['drafts_mbox']) && !isset($no_override['draft_autosave'])) { 199 200 $field_id = 'rcmfd_autosave'; 200 $select_autosave = new select(array('name' => '_draft_autosave', 'id' => $field_id));201 $select_autosave->add(rcube _label('never'), 0);201 $select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => $field_id)); 202 $select_autosave->add(rcube::gettext('never'), 0); 202 203 foreach (array(3, 5, 10) as $i => $min) { 203 204 $select_autosave->add( 204 rcube _label(205 rcube::gettext( 205 206 array( 206 207 'name' => 'everynminutes', … … 214 215 "<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n", 215 216 $field_id, 216 rc_main::Q(rcube_label('autosavedraft')),217 Q(rcube::gettext('autosavedraft')), 217 218 $select_autosave->show($CONFIG['draft_autosave']) 218 219 ); … … 228 229 function rcmail_identities_list($attrib) 229 230 { 230 $registry = rc _registry::getInstance();231 $registry = rcube_registry::get_instance(); 231 232 $DB = $registry->get('DB', 'core'); 232 $CONFIG = $registry->get ('CONFIG', 'core');233 $CONFIG = $registry->get_all('config'); 233 234 $OUTPUT = $registry->get('OUTPUT', 'core'); 234 235 235 236 236 237 // get contacts from DB 237 $_query = "SELECT * FROM " . rc _main::get_table_name('identities');238 $_query = "SELECT * FROM " . rcube::get_table_name('identities'); 238 239 $_query.= " WHERE del<>1"; 239 240 $_query.= " AND user_id=?"; … … 265 266 266 267 // create XHTML table 267 $out = rc _main::rcube_table_output(268 $out = rcube::table_output( 268 269 $attrib, 269 270 $identities_data, //$sql_result, … … 283 284 function get_form_tags($attrib, $action, $add_hidden=array()) 284 285 { 285 $registry = rc _registry::getInstance();286 $registry = rcube_registry::get_instance(); 286 287 $EDIT_FORM = $registry->get('EDIT_FORM', 'core'); 287 288 $SESS_HIDDEN_FIELD = $registry->get('SESS_HIDDEN_FIELD', 'core'); … … 290 291 $form_start = ''; 291 292 if (!strlen($EDIT_FORM)) { 292 $hiddenfields = new h iddenfield(array('name' => '_task', 'value' => $GLOBALS['_task']));293 $hiddenfields = new html_hiddenfield(array('name' => '_task', 'value' => $registry->get('task', 'core'))); 293 294 $hiddenfields->add(array('name' => '_action', 'value' => $action)); 294 295 -
branches/devel-vnext/program/steps/settings/identities.inc
r697 r806 19 19 20 20 */ 21 $registry = rc _registry::getInstance();21 $registry = rcube_registry::get_instance(); 22 22 $DB = $registry->get('DB', 'core'); 23 23 $OUTPUT = $registry->get('OUTPUT', 'core'); 24 24 25 25 if ($USER_DATA = $DB->fetch_assoc($sql_result)) { 26 rc _main::tfk_debug(var_export($USER_DATA, true));26 rcube::tfk_debug(var_export($USER_DATA, true)); 27 27 $OUTPUT->set_pagetitle( 28 28 sprintf( 29 29 '%s (%s@%s)', 30 rcube _label('identities'),30 rcube::gettext('identities'), 31 31 $USER_DATA['username'], 32 32 $USER_DATA['mail_host'] … … 39 39 function rcmail_identity_frame($attrib) 40 40 { 41 $registry = rc _registry::getInstance();41 $registry = rcube_registry::get_instance(); 42 42 $OUTPUT = $registry->get('OUTPUT', 'core'); 43 43 … … 49 49 $OUTPUT->set_env('contentframe', $attrib['name']); 50 50 51 $attrib_str = rc _main::create_attrib_string(51 $attrib_str = rcube::create_attrib_string( 52 52 $attrib, 53 53 array( … … 63 63 $OUTPUT->add_handler('identityframe', 'rcmail_identity_frame'); 64 64 65 rc _main::parse_template('identities');65 rcube::parse_template('identities'); 66 66 ?> -
branches/devel-vnext/program/steps/settings/manage_folders.inc
r747 r806 21 21 22 22 // init IMAP connection 23 rc _main::rcmail_imap_init(TRUE);24 25 $registry = rc _registry::getInstance();23 rcube::imap_init(TRUE); 24 25 $registry = rcube_registry::get_instance(); 26 26 $OUTPUT = $registry->get('OUTPUT', 'core'); 27 27 $IMAP = $registry->get('IMAP', 'core'); 28 28 29 //rc _main::tfk_debug('DEBUG: ' . $_action);30 //rc _main::tfk_debug('MAILBOX: ' . $_POST['_mboxes']);31 //rc _main::tfk_debug('AJAX?: ' . $OUTPUT->ajax_call);29 //rcube::tfk_debug('DEBUG: ' . $_action); 30 //rcube::tfk_debug('MAILBOX: ' . $_POST['_mboxes']); 31 //rcube::tfk_debug('AJAX?: ' . $OUTPUT->ajax_call); 32 32 33 33 // subscribe to one or more mailboxes 34 34 if ($_action=='subscribe') { 35 if ($mboxes = rc _main::get_input_value('_mboxes', RCUBE_INPUT_POST)) {35 if ($mboxes = rcube::get_input_value('_mboxes', rcube::INPUT_POST)) { 36 36 $status = $IMAP->subscribe(array($mboxes)); 37 //rc _main::tfk_debug('Status: ' . $status);37 //rcube::tfk_debug('Status: ' . $status); 38 38 } 39 39 if ($OUTPUT->ajax_call) { … … 44 44 // unsubscribe one or more mailboxes 45 45 else if ($_action=='unsubscribe') { 46 if ($mboxes = rc _main::get_input_value('_mboxes', RCUBE_INPUT_POST)) {46 if ($mboxes = rcube::get_input_value('_mboxes', rcube::INPUT_POST)) { 47 47 $status = $IMAP->unsubscribe(array($mboxes)); 48 //rc _main::tfk_debug('Status: ' . $status);48 //rcube::tfk_debug('Status: ' . $status); 49 49 } 50 50 if ($OUTPUT->ajax_call) { … … 58 58 $create = $IMAP->create_mailbox( 59 59 trim( 60 rc _main::get_input_value('_name', RCUBE_INPUT_POST, FALSE, 'UTF-7')60 rcube::get_input_value('_name', rcube::INPUT_POST, FALSE, 'UTF-7') 61 61 ), 62 62 TRUE … … 67 67 'add_folder_row', 68 68 $create, 69 rc _main::rcube_charset_convert($create, 'UTF-7')69 rcube::charset_convert($create, 'UTF-7') 70 70 ); 71 71 $OUTPUT->send(); … … 84 84 if (!empty($_POST['_folder_oldname']) && !empty($_POST['_folder_newname'])) { 85 85 86 $oldname = rc _main::get_input_value('_folder_oldname', RCUBE_INPUT_POST);87 $_folder_newname = trim(rc _main::get_input_value('_folder_newname', RCUBE_INPUT_POST, FALSE, 'UTF-7'));86 $oldname = rcube::get_input_value('_folder_oldname', rcube::INPUT_POST); 87 $_folder_newname = trim(rcube::get_input_value('_folder_newname', rcube::INPUT_POST, FALSE, 'UTF-7')); 88 88 89 89 $rename = $IMAP->rename_mailbox( … … 97 97 $oldname, 98 98 $rename, 99 rc _main::rcube_charset_convert($rename, 'UTF-7')99 rcube::charset_convert($rename, 'UTF-7') 100 100 ); 101 101 $OUTPUT->command('reset_folder_rename'); … … 114 114 // delete an existing IMAP mailbox 115 115 elseif ($_action=='delete-folder') { 116 if ($mboxes = rc _main::get_input_value('_mboxes', RCUBE_INPUT_POST)) {116 if ($mboxes = rcube::get_input_value('_mboxes', rcube::INPUT_POST)) { 117 117 $deleted = $IMAP->delete_mailbox(array($mboxes)); 118 118 } 119 119 120 120 if ($OUTPUT->ajax_call && $deleted) { 121 $OUTPUT->command('remove_folder_row', rc _main::get_input_value('_mboxes', RCUBE_INPUT_POST));121 $OUTPUT->command('remove_folder_row', rcube::get_input_value('_mboxes', rcube::INPUT_POST)); 122 122 $OUTPUT->show_message('folderdeleted', 'confirmation'); 123 123 $OUTPUT->send(); … … 135 135 * @param array $attrib 136 136 * @return string 137 * @uses rc _registry::getInstance()138 * @uses rcube _label()137 * @uses rcube_registry::get_instance() 138 * @uses rcube::gettext() 139 139 * @uses get_form_tags() 140 140 */ 141 141 function rcube_subscription_form($attrib) 142 142 { 143 $registry = rc _registry::getInstance();143 $registry = rcube_registry::get_instance(); 144 144 $IMAP = $registry->get('IMAP', 'core'); 145 $CONFIG = $registry->get ('CONFIG', 'core');145 $CONFIG = $registry->get_all('config'); 146 146 $OUTPUT = $registry->get('OUTPUT', 'core'); 147 147 … … 155 155 156 156 // allow the following attributes to be added to the <table> tag 157 $attrib_str = rc _main::create_attrib_string(157 $attrib_str = rcube::create_attrib_string( 158 158 $attrib, 159 159 array( … … 176 176 '<td class="name">%s</td><td class="subscribed">%s</td>'. 177 177 '<td class="rename"> </td><td class="delete"> </td>', 178 rcube _label('foldername'),179 rcube _label('subscribed')178 rcube::gettext('foldername'), 179 rcube::gettext('subscribed') 180 180 ); 181 181 $out .= "\n</tr></thead>\n<tbody>\n"; … … 189 189 $a_js_folders = array(); 190 190 191 $checkbox_subscribe = new checkbox(191 $checkbox_subscribe = new html_checkbox( 192 192 array( 193 193 'name' => '_subscribed[]', … … 200 200 $CONFIG['skin_path'], 201 201 $attrib['deleteicon'], 202 rcube _label('delete')202 rcube::gettext('delete') 203 203 ); 204 204 } 205 205 else { 206 $del_button = rcube _label('delete');206 $del_button = rcube::gettext('delete'); 207 207 } 208 208 … … 212 212 $CONFIG['skin_path'], 213 213 $attrib['renameicon'], 214 rcube _label('rename')214 rcube::gettext('rename') 215 215 ); 216 216 } 217 217 else { 218 $del_button = rcube _label('rename');218 $del_button = rcube::gettext('rename'); 219 219 } 220 220 … … 224 224 $protected = ($CONFIG['protect_default_folders'] == TRUE && in_array($folder,$CONFIG['default_imap_folders'])); 225 225 $zebra_class = $i%2 ? 'even' : 'odd'; 226 $folder_js = rc_main::JQ($folder);226 $folder_js = JQ($folder); 227 227 $folder_html = ''; 228 228 if ( … … 230 230 && in_array($folder, $CONFIG['default_imap_folders']) 231 231 ) { 232 $folder_html.= rcube _label(strtolower($folder));232 $folder_html.= rcube::gettext(strtolower($folder)); 233 233 } 234 234 else { 235 $folder_html.= rc _main::rcube_charset_convert($folder, 'UTF-7');235 $folder_html.= rcube::charset_convert($folder, 'UTF-7'); 236 236 } 237 237 if (strlen($folder_html) > 40) { … … 239 239 } 240 240 if (!$protected) { 241 $a_js_folders['rcmrow'.($i+1)] = array($folder, rc _main::rcube_charset_convert($folder, 'UTF-7'));241 $a_js_folders['rcmrow'.($i+1)] = array($folder, rcube::charset_convert($folder, 'UTF-7')); 242 242 } 243 243 $out .= sprintf( … … 245 245 $i+1, 246 246 $zebra_class, 247 rc_main::Q($folder_html)247 Q($folder_html) 248 248 ); 249 249 … … 264 264 JS_OBJECT_NAME, 265 265 $folder_js, 266 rcube _label('renamefolder'),266 rcube::gettext('renamefolder'), 267 267 $edit_button, 268 268 JS_OBJECT_NAME, 269 269 $folder_js, 270 rcube _label('deletefolder'),270 rcube::gettext('deletefolder'), 271 271 $del_button 272 272 ); … … 301 301 $out = "$form_start\n"; 302 302 303 $input = new textfield(array('name' => '_folder_name'));303 $input = new html_inputfield(array('name' => '_folder_name')); 304 304 $out .= $input->show(); 305 305 … … 308 308 array( 309 309 'type' => 'button', 310 'value' => rcube _label('create'),310 'value' => rcube::gettext('create'), 311 311 'onclick' => JS_OBJECT_NAME.".command('create-folder',this.form)" 312 312 ) … … 324 324 * @param array $attrib 325 325 * @return string 326 * @uses rc _registry::getInstance()326 * @uses rcube_registry::get_instance() 327 327 */ 328 328 function rcube_rename_folder_form($attrib) 329 329 { 330 $registry = rc _registry::getInstance();331 $CONFIG = $registry->get ('CONFIG', 'core');330 $registry = rcube_registry::get_instance(); 331 $CONFIG = $registry->get_all('config'); 332 332 $IMAP = $registry->get('IMAP', 'core'); 333 333 … … 339 339 340 340 $a_unsubscribed = $IMAP->list_unsubscribed(); 341 $select_folder = new select(array('name' => '_folder_oldname', 'id' => 'rcmfd_oldfolder'));341 $select_folder = new html_select(array('name' => '_folder_oldname', 'id' => 'rcmfd_oldfolder')); 342 342 343 343 foreach ($a_unsubscribed as $i => $folder) { … … 351 351 352 352 $out .= " to "; 353 $inputtwo = new textfield(array('name' => '_folder_newname'));353 $inputtwo = new html_inputfield(array('name' => '_folder_newname')); 354 354 $out .= $inputtwo->show(); 355 355 356 356 if (get_boolean($attrib['button'])) { 357 357 $button = new input_field(array('type' => 'button', 358 'value' => rcube _label('rename'),358 'value' => rcube::gettext('rename'), 359 359 'onclick' => JS_OBJECT_NAME.".command('rename-folder',this.form)")); 360 360 $out .= $button->show(); … … 375 375 376 376 // add some labels to client 377 rc_main::rcube_add_label('deletefolderconfirm');377 $OUTPUT->add_label('deletefolderconfirm'); 378 378 379 379 $OUTPUT->send('managefolders'); -
branches/devel-vnext/program/steps/settings/save_identity.inc
r624 r806 35 35 if (empty($_POST['_name']) || empty($_POST['_email'])) { 36 36 $OUTPUT->show_message('formincomplete', 'warning'); 37 rc _main::rcmail_overwrite_action('edit-identitiy');37 rcube::override_action('edit-identitiy'); 38 38 return; 39 39 } … … 51 51 $DB->quoteIdentifier($col), 52 52 $DB->quote( 53 rc _main::get_input_value(53 rcube::get_input_value( 54 54 $fname, 55 RCUBE_INPUT_POST,55 rcube::INPUT_POST, 56 56 in_array($col, $a_html_cols) 57 57 ) … … 71 71 72 72 if (sizeof($a_write_sql)) { 73 $_query = "UPDATE " . rc _main::get_table_name('identities');73 $_query = "UPDATE " . rcube::get_table_name('identities'); 74 74 $_query.= " SET " . join(', ', $a_write_sql); 75 75 $_query.= " WHERE identity_id=?"; … … 78 78 $DB->query( 79 79 $_query, 80 rc _main::get_input_value('_iid', RCUBE_INPUT_POST),80 rcube::get_input_value('_iid', rcube::INPUT_POST), 81 81 $_SESSION['user_id'] 82 82 ); … … 89 89 90 90 if (!empty($_POST['_standard'])) { 91 $default_id = rc _main::get_input_value('_iid', RCUBE_INPUT_POST);91 $default_id = rcube::get_input_value('_iid', rcube::INPUT_POST); 92 92 } 93 93 if ($_POST['_framed']) { … … 99 99 // show error message 100 100 $OUTPUT->show_message('errorsaving', 'error'); 101 rc _main::rcmail_overwrite_action('edit-identitiy');101 rcube::override_action('edit-identitiy'); 102 102 return; 103 103 } … … 114 114 $a_insert_cols[] = $DB->quoteIdentifier($col); 115 115 $a_insert_values[] = $DB->quote( 116 rc _main::get_input_value(116 rcube::get_input_value( 117 117 $fname, 118 RCUBE_INPUT_POST,118 rcube::INPUT_POST, 119 119 in_array($col, $a_html_cols) 120 120 ) … … 122 122 } 123 123 if (sizeof($a_insert_cols)) { 124 $_query = "INSERT INTO " . rc _main::get_table_name('identities');124 $_query = "INSERT INTO " . rcube::get_table_name('identities'); 125 125 $_query.= " (user_id, " . join(', ', $a_insert_cols).")"; 126 126 $_query.= " VALUES (?, " . join(', ', $a_insert_values).")"; 127 127 $DB->query($_query, $_SESSION['user_id']); 128 128 129 $insert_id = $DB->insert_id(rc _main::get_sequence_name('identities'));129 $insert_id = $DB->insert_id(rcube::get_sequence_name('identities')); 130 130 } 131 131 … … 144 144 // show error message 145 145 $OUTPUT->show_message('errorsaving', 'error'); 146 rc _main::rcmail_overwrite_action('edit-identity');146 rcube::override_action('edit-identity'); 147 147 return; 148 148 } … … 152 152 // mark all other identities as 'not-default' 153 153 if ($default_id) { 154 $_query = "UPDATE " . rc _main::get_table_name('identities');154 $_query = "UPDATE " . rcube::get_table_name('identities'); 155 155 $_query.= " SET " . $DB->quoteIdentifier('standard') . "='0'"; 156 156 $_query.= " WHERE user_id=?"; … … 160 160 } 161 161 // go to next step 162 rc _main::rcmail_overwrite_action($_framed ? 'edit-identity' : 'identities');162 rcube::override_action($_framed ? 'edit-identity' : 'identities'); 163 163 164 164 ?> -
branches/devel-vnext/program/steps/settings/save_prefs.inc
r769 r806 20 20 */ 21 21 22 $registry = rc _registry::getInstance();23 $CONFIG = $registry->get ('CONFIG', 'core');22 $registry = rcube_registry::get_instance(); 23 $CONFIG = $registry->get_all('config'); 24 24 25 25 $a_user_prefs = array( 26 'timezone' => isset($_POST['_timezone']) ? floatval(rc _main::get_input_value('_timezone', RCUBE_INPUT_POST)) : $CONFIG['timezone'],26 'timezone' => isset($_POST['_timezone']) ? floatval(rcube::get_input_value('_timezone', rcube::INPUT_POST)) : $CONFIG['timezone'], 27 27 'dst_active' => isset($_POST['_dst_active']) ? TRUE : FALSE, 28 'pagesize' => is_numeric($_POST['_pagesize']) ? intval(rc _main::get_input_value('_pagesize', RCUBE_INPUT_POST)) : $CONFIG['pagesize'],28 'pagesize' => is_numeric($_POST['_pagesize']) ? intval(rcube::get_input_value('_pagesize', rcube::INPUT_POST)) : $CONFIG['pagesize'], 29 29 'prettydate' => isset($_POST['_pretty_date']) ? TRUE : FALSE, 30 30 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, 31 31 'htmleditor' => isset($_POST['_htmleditor']) ? TRUE : FALSE, 32 32 'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE, 33 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval(rc _main::get_input_value('_draft_autosave', RCUBE_INPUT_POST)) : 033 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval(rcube::get_input_value('_draft_autosave', rcube::INPUT_POST)) : 0 34 34 ); 35 35 … … 43 43 $a_user_prefs['pagesize'] = 10; 44 44 } 45 rc _main::tfk_debug($a_user_prefs['pagesize']);46 rc _main::tfk_debug($CONFIG['max_pagesize']);45 rcube::tfk_debug($a_user_prefs['pagesize']); 46 rcube::tfk_debug($CONFIG['max_pagesize']); 47 47 if (isset($CONFIG['max_pagesize']) && empty($CONFIG['max_pagesize']) !== TRUE) { 48 48 if ($a_user_prefs['pagesize'] > $CONFIG['max_pagesize']) { … … 53 53 // switch UI language 54 54 if (isset($_POST['_language'])) { 55 $ sess_user_lang = $_SESSION['user_lang'] = rc_main::get_input_value('_language', RCUBE_INPUT_POST);56 rc _main::rcmail_set_locale($sess_user_lang);55 $user_lang = $_SESSION['user_lang'] = rcube::get_input_value('_language', rcube::INPUT_POST); 56 rcube::set_locale($user_lang); 57 57 } 58 58 59 if (rc _main::rcmail_save_user_prefs($a_user_prefs)) {59 if (rcube::save_user_prefs($a_user_prefs)) { 60 60 $OUTPUT->show_message('successfullysaved', 'confirmation'); 61 61 } 62 62 63 63 // go to next step 64 rc _main::rcmail_overwrite_action('preferences');64 rcube::override_action('preferences'); 65 65 ?> -
branches/devel-vnext/skins/default/templates/error.html
r589 r806 10 10 11 11 <div style="width:400px; margin:60px auto;"> 12 $__page_content 12 <roundcube:object name="errormessage" /> 13 13 </div> 14 14
Note: See TracChangeset
for help on using the changeset viewer.
