commit | author | age
|
93e3ae
|
1 |
<?php |
4e17e6
|
2 |
|
T |
3 |
/* |
|
4 |
+-----------------------------------------------------------------------+ |
|
5 |
| program/include/main.inc | |
|
6 |
| | |
e019f2
|
7 |
| This file is part of the Roundcube Webmail client | |
0c2596
|
8 |
| Copyright (C) 2005-2012, The Roundcube Dev Team | |
7fe381
|
9 |
| | |
T |
10 |
| Licensed under the GNU General Public License version 3 or | |
|
11 |
| any later version with exceptions for skins & plugins. | |
|
12 |
| See the README file for a full license statement. | |
4e17e6
|
13 |
| | |
T |
14 |
| PURPOSE: | |
0c2596
|
15 |
| Provide deprecated functions aliases for backward compatibility | |
4e17e6
|
16 |
| | |
T |
17 |
+-----------------------------------------------------------------------+ |
|
18 |
| Author: Thomas Bruederli <roundcube@gmail.com> | |
|
19 |
+-----------------------------------------------------------------------+ |
|
20 |
|
|
21 |
$Id$ |
|
22 |
|
|
23 |
*/ |
|
24 |
|
6d969b
|
25 |
/** |
0c2596
|
26 |
* Roundcube Webmail deprecated functions |
6d969b
|
27 |
* |
T |
28 |
* @package Core |
|
29 |
* @author Thomas Bruederli <roundcube@gmail.com> |
|
30 |
*/ |
|
31 |
|
0c2596
|
32 |
// constants for input reading |
A |
33 |
define('RCUBE_INPUT_GET', rcube_ui::INPUT_GET); |
|
34 |
define('RCUBE_INPUT_POST', rcube_ui::INPUT_POST); |
|
35 |
define('RCUBE_INPUT_GPC', rcube_ui::INPUT_GPC); |
ea7c46
|
36 |
|
T |
37 |
|
4e17e6
|
38 |
function get_table_name($table) |
0c2596
|
39 |
{ |
A |
40 |
return rcmail::get_instance()->db->table_name($table); |
|
41 |
} |
653242
|
42 |
|
1cded8
|
43 |
function get_sequence_name($sequence) |
0c2596
|
44 |
{ |
A |
45 |
return rcmail::get_instance()->db->sequence_name($sequence); |
|
46 |
} |
1cded8
|
47 |
|
cc97ea
|
48 |
function rcube_label($p, $domain=null) |
1854c4
|
49 |
{ |
0c2596
|
50 |
return rcmail::get_instance()->gettext($p, $domain); |
1854c4
|
51 |
} |
4e17e6
|
52 |
|
8703b0
|
53 |
function rcube_label_exists($name, $domain=null, &$ref_domain = null) |
07b95d
|
54 |
{ |
0c2596
|
55 |
return rcmail::get_instance()->text_exists($name, $domain, $ref_domain); |
07b95d
|
56 |
} |
T |
57 |
|
10a699
|
58 |
function rcmail_overwrite_action($action) |
0c2596
|
59 |
{ |
A |
60 |
rcmail::get_instance()->overwrite_action($action); |
|
61 |
} |
10a699
|
62 |
|
41bece
|
63 |
function rcmail_url($action, $p=array(), $task=null) |
f11541
|
64 |
{ |
0c2596
|
65 |
return rcube_ui::url($action, $p, $task); |
f11541
|
66 |
} |
9fee0e
|
67 |
|
70d4b9
|
68 |
function rcmail_temp_gc() |
3ddca3
|
69 |
{ |
0c2596
|
70 |
$rcmail = rcmail::get_instance()->temp_gc(); |
3ddca3
|
71 |
} |
1cded8
|
72 |
|
3f9edb
|
73 |
function rcube_charset_convert($str, $from, $to=NULL) |
3ddca3
|
74 |
{ |
c321a9
|
75 |
return rcube_charset::convert($str, $from, $to); |
T |
76 |
} |
b8d8cb
|
77 |
|
c321a9
|
78 |
function rc_detect_encoding($string, $failover='') |
T |
79 |
{ |
|
80 |
return rcube_charset::detect($string, $failover); |
|
81 |
} |
65d710
|
82 |
|
c321a9
|
83 |
function rc_utf8_clean($input) |
T |
84 |
{ |
|
85 |
return rcube_charset::clean($input); |
3ddca3
|
86 |
} |
3f9edb
|
87 |
|
c321a9
|
88 |
function json_serialize($input) |
3ddca3
|
89 |
{ |
0c2596
|
90 |
return rcube_output::json_serialize($input); |
a5897a
|
91 |
} |
dbe44c
|
92 |
|
1cded8
|
93 |
function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE) |
0c2596
|
94 |
{ |
A |
95 |
return rcube_ui::rep_specialchars_output($str, $enctype, $mode, $newlines); |
|
96 |
} |
1cded8
|
97 |
|
2bca6e
|
98 |
function Q($str, $mode='strict', $newlines=TRUE) |
0c2596
|
99 |
{ |
A |
100 |
return rcube_ui::Q($str, $mode, $newlines); |
|
101 |
} |
2bca6e
|
102 |
|
18e2a3
|
103 |
function JQ($str) |
0c2596
|
104 |
{ |
A |
105 |
return rcube_ui::JQ($str); |
|
106 |
} |
ea7c46
|
107 |
|
T |
108 |
function get_input_value($fname, $source, $allow_html=FALSE, $charset=NULL) |
759696
|
109 |
{ |
0c2596
|
110 |
return rcube_ui::get_input_value($fname, $source, $allow_html, $charset); |
72b140
|
111 |
} |
A |
112 |
|
|
113 |
function parse_input_value($value, $allow_html=FALSE, $charset=NULL) |
|
114 |
{ |
0c2596
|
115 |
return rcube_ui::parse_input_value($value, $allow_html, $charset); |
759696
|
116 |
} |
T |
117 |
|
ef4998
|
118 |
function request2param($mode = RCUBE_INPUT_GPC, $ignore = 'task|action') |
759696
|
119 |
{ |
0c2596
|
120 |
return rcube_ui::request2param($mode, $ignore); |
759696
|
121 |
} |
ea7c46
|
122 |
|
fb6d86
|
123 |
function html_identifier($str, $encode=false) |
ce988a
|
124 |
{ |
0c2596
|
125 |
return rcube_ui::html_identifier($str, $encode); |
ce988a
|
126 |
} |
T |
127 |
|
d1d2c4
|
128 |
function rcube_table_output($attrib, $table_data, $a_show_cols, $id_col) |
57863c
|
129 |
{ |
0c2596
|
130 |
return rcube_ui::table_output($attrib, $table_data, $a_show_cols, $id_col); |
57863c
|
131 |
} |
4e17e6
|
132 |
|
T |
133 |
function rcmail_get_edit_field($col, $value, $attrib, $type='text') |
0501b6
|
134 |
{ |
0c2596
|
135 |
return rcube_ui::get_edit_field($col, $value, $attrib, $type); |
0501b6
|
136 |
} |
f11541
|
137 |
|
2b017e
|
138 |
function rcmail_mod_css_styles($source, $container_id, $allow_remote=false) |
0c2596
|
139 |
{ |
A |
140 |
return rcube_ui::mod_css_styles($source, $container_id, $allow_remote); |
|
141 |
} |
cb3dfd
|
142 |
|
c5ee03
|
143 |
function rcmail_xss_entity_decode($content) |
1c499a
|
144 |
{ |
0c2596
|
145 |
return rcube_ui::xss_entity_decode($content); |
1c499a
|
146 |
} |
T |
147 |
|
4e17e6
|
148 |
function create_attrib_string($attrib, $allowed_attribs=array('id', 'class', 'style')) |
312784
|
149 |
{ |
0c2596
|
150 |
return html::attrib_string($attrib, $allowed_attribs); |
312784
|
151 |
} |
T |
152 |
|
0c2596
|
153 |
function parse_attrib_string($str) |
A |
154 |
{ |
|
155 |
return html::parse_attrib_string($str); |
|
156 |
} |
312784
|
157 |
|
77153b
|
158 |
function format_date($date, $format=NULL, $convert=true) |
de3dde
|
159 |
{ |
0c2596
|
160 |
return rcube_ui::format_date($date, $format, $convert); |
de3dde
|
161 |
} |
A |
162 |
|
93be5b
|
163 |
function rcmail_mailbox_list($attrib) |
62e542
|
164 |
{ |
0c2596
|
165 |
return rcube_ui::folder_list($attrib); |
62e542
|
166 |
} |
93be5b
|
167 |
|
0c2596
|
168 |
function rcmail_mailbox_select($attrib = array()) |
cb3538
|
169 |
{ |
0c2596
|
170 |
return rcube_ui::folder_selector($attrib); |
cb3538
|
171 |
} |
93be5b
|
172 |
|
fed22f
|
173 |
function rcmail_localize_foldername($name) |
T |
174 |
{ |
0c2596
|
175 |
return rcube_ui::localize_foldername($name); |
fed22f
|
176 |
} |
T |
177 |
|
363514
|
178 |
function rcmail_localize_folderpath($path) |
A |
179 |
{ |
0c2596
|
180 |
return rcube_ui::localize_folderpath($path); |
363514
|
181 |
} |
A |
182 |
|
af3c04
|
183 |
function rcmail_quota_display($attrib) |
A |
184 |
{ |
0c2596
|
185 |
return rcube_ui::quota_display($attrib); |
af3c04
|
186 |
} |
A |
187 |
|
0c2596
|
188 |
function rcmail_quota_content($attrib = null) |
af3c04
|
189 |
{ |
0c2596
|
190 |
return rcube_ui::quota_content($attrib); |
af3c04
|
191 |
} |
A |
192 |
|
90f81a
|
193 |
function rcmail_display_server_error($fallback=null, $fallback_args=null) |
A |
194 |
{ |
0c2596
|
195 |
rcube_ui::display_server_error($fallback, $fallback_args); |
90f81a
|
196 |
} |
A |
197 |
|
f94e44
|
198 |
function rcmail_filetype2classname($mimetype, $filename) |
T |
199 |
{ |
0c2596
|
200 |
return rcube_ui::file2class($mimetype, $filename); |
f94e44
|
201 |
} |
T |
202 |
|
b8ae50
|
203 |
function rcube_html_editor($mode='') |
A |
204 |
{ |
0c2596
|
205 |
rcube_ui::html_editor($mode); |
b8ae50
|
206 |
} |
aa055c
|
207 |
|
747289
|
208 |
function rcmail_replace_emoticons($html) |
A |
209 |
{ |
0c2596
|
210 |
return rcube_ui::replace_emoticons($html); |
747289
|
211 |
} |
A |
212 |
|
95192c
|
213 |
function rcmail_deliver_message(&$message, $from, $mailto, &$smtp_error, &$body_file=null, $smtp_opts=null) |
d91778
|
214 |
{ |
0c2596
|
215 |
return rcmail::get_instance()->deliver_message($message, $from, $mailto, $smtp_error, $body_file, $smtp_opts); |
d91778
|
216 |
} |
T |
217 |
|
|
218 |
function rcmail_gen_message_id() |
|
219 |
{ |
0c2596
|
220 |
return rcmail::get_instance()->gen_message_id(); |
d91778
|
221 |
} |
T |
222 |
|
|
223 |
function rcmail_user_date() |
|
224 |
{ |
0c2596
|
225 |
return rcmail::get_instance()->user_date(); |
d91778
|
226 |
} |
T |
227 |
|
e0960f
|
228 |
function rcmail_mem_check($need) |
A |
229 |
{ |
0c2596
|
230 |
return rcube_ui::mem_check($need); |
e0960f
|
231 |
} |
A |
232 |
|
5818e4
|
233 |
function rcube_https_check($port=null, $use_https=true) |
A |
234 |
{ |
0c2596
|
235 |
return rcube_ui::https_check($port, $use_https); |
5818e4
|
236 |
} |
A |
237 |
|
929a50
|
238 |
function rcube_sess_unset($var_name=null) |
A |
239 |
{ |
0c2596
|
240 |
rcmail::get_instance()->session->remove($var_name); |
929a50
|
241 |
} |
A |
242 |
|
a76cbd
|
243 |
function rcube_parse_host($name, $host='') |
bb8721
|
244 |
{ |
0c2596
|
245 |
return rcmail::parse_host($name, $host); |
bb8721
|
246 |
} |
A |
247 |
|
1baeb6
|
248 |
function check_email($email, $dns_check=true) |
e4acbb
|
249 |
{ |
0c2596
|
250 |
return rcmail::get_instance()->check_email($email, $dns_check); |
e4acbb
|
251 |
} |
A |
252 |
|
23b495
|
253 |
function console() |
A |
254 |
{ |
0c2596
|
255 |
call_user_func_array(array('rcmail', 'console'), func_get_args()); |
23b495
|
256 |
} |
A |
257 |
|
|
258 |
function write_log($name, $line) |
|
259 |
{ |
0c2596
|
260 |
return rcmail::write_log($name, $line); |
23b495
|
261 |
} |
A |
262 |
|
|
263 |
function rcmail_log_login() |
|
264 |
{ |
0c2596
|
265 |
return rcmail::get_instance()->log_login(); |
23b495
|
266 |
} |
A |
267 |
|
|
268 |
function rcmail_remote_ip() |
|
269 |
{ |
0c2596
|
270 |
return rcmail::remote_ip(); |
23b495
|
271 |
} |
A |
272 |
|
|
273 |
function rcube_check_referer() |
|
274 |
{ |
0c2596
|
275 |
return rcmail::check_referer(); |
23b495
|
276 |
} |
A |
277 |
|
|
278 |
function rcube_timer() |
|
279 |
{ |
0c2596
|
280 |
return rcmail::timer(); |
23b495
|
281 |
} |
A |
282 |
|
|
283 |
function rcube_print_time($timer, $label='Timer', $dest='console') |
|
284 |
{ |
0c2596
|
285 |
rcmail::print_timer($timer, $label, $dest); |
23b495
|
286 |
} |
A |
287 |
|
24c91e
|
288 |
function raise_error($arg=array(), $log=false, $terminate=false) |
A |
289 |
{ |
0c2596
|
290 |
rcmail::raise_error($arg, $log, $terminate); |
874ff4
|
291 |
} |
24c91e
|
292 |
|
23b495
|
293 |
function rcube_log_bug($arg_arr) |
24c91e
|
294 |
{ |
0c2596
|
295 |
rcmail::log_bug($arg_arr); |
24c91e
|
296 |
} |
747289
|
297 |
|
4171c5
|
298 |
function rcube_upload_progress() |
A |
299 |
{ |
0c2596
|
300 |
rcube_ui::upload_progress(); |
4171c5
|
301 |
} |
A |
302 |
|
fe0cb6
|
303 |
function rcube_upload_init() |
4171c5
|
304 |
{ |
0c2596
|
305 |
return rcube_ui::upload_init(); |
4171c5
|
306 |
} |
0213f8
|
307 |
|
A |
308 |
function rcube_autocomplete_init() |
|
309 |
{ |
0c2596
|
310 |
rcube_ui::autocomplete_init(); |
0213f8
|
311 |
} |
7e263e
|
312 |
|
A |
313 |
function rcube_fontdefs($font = null) |
|
314 |
{ |
0c2596
|
315 |
return rcube_ui::font_defs($font); |
A |
316 |
} |
7e263e
|
317 |
|
0c2596
|
318 |
function send_nocacheing_headers() |
A |
319 |
{ |
|
320 |
return rcmail::get_instance()->output->nocacheing_headers(); |
|
321 |
} |
7e263e
|
322 |
|
0c2596
|
323 |
function show_bytes($bytes) |
A |
324 |
{ |
|
325 |
return rcube_ui::show_bytes($bytes); |
|
326 |
} |
|
327 |
|
|
328 |
function rc_wordwrap($string, $width=75, $break="\n", $cut=false) |
|
329 |
{ |
|
330 |
return rcube_mime::wordwrap($string, $width, $break, $cut); |
|
331 |
} |
|
332 |
|
|
333 |
function rc_request_header($name) |
|
334 |
{ |
|
335 |
return rcube_request_header($name); |
|
336 |
} |
|
337 |
|
|
338 |
function rc_mime_content_type($path, $name, $failover = 'application/octet-stream', $is_stream=false) |
|
339 |
{ |
|
340 |
return rcube_mime::file_content_type($path, $name, $failover, $is_stream); |
|
341 |
} |
|
342 |
|
|
343 |
function rc_image_content_type($data) |
|
344 |
{ |
|
345 |
return rcube_mime::image_content_type($data); |
7e263e
|
346 |
} |