- Some files from /bin + spellchecking actions moved to the new 'utils' task
5 files renamed
1 files deleted
1 files copied
8 files modified
| | |
| | | CHANGELOG RoundCube Webmail |
| | | =========================== |
| | | |
| | | - Some files from /bin + spellchecking actions moved to the new 'utils' task |
| | | - Added thread tree icons |
| | | - Extend contact groups support (#1486682) |
| | | - Fix check-recent action issues and performance (#1486526) |
| | |
| | | */ |
| | | class rcmail |
| | | { |
| | | static public $main_tasks = array('mail','settings','addressbook','login','logout','dummy'); |
| | | |
| | | static public $main_tasks = array('mail','settings','addressbook','login','logout','utils','dummy'); |
| | | |
| | | static private $instance; |
| | | |
| | | |
| | | public $config; |
| | | public $user; |
| | | public $db; |
| | |
| | | public $task; |
| | | public $action = ''; |
| | | public $comm_path = './'; |
| | | |
| | | |
| | | private $texts; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * This implements the 'singleton' design pattern |
| | | * |
| | |
| | | $this->action = asciiwords(get_input_value('_action', RCUBE_INPUT_GPC)); |
| | | |
| | | // reset some session parameters when changing task |
| | | if ($this->session && $_SESSION['task'] != $this->task) |
| | | $this->session->remove('page'); |
| | | |
| | | // set current task to session |
| | | $_SESSION['task'] = $this->task; |
| | | if ($this->task != 'utils') { |
| | | if ($this->session && $_SESSION['task'] != $this->task) |
| | | $this->session->remove('page'); |
| | | // set current task to session |
| | | $_SESSION['task'] = $this->task; |
| | | } |
| | | |
| | | // init output class |
| | | if (!empty($_REQUEST['_remote'])) |
| | |
| | | |
| | | if ($result) { |
| | | $delm = $this->get_hierarchy_delimiter(); |
| | | |
| | | |
| | | // check if mailbox children are subscribed |
| | | foreach ($a_subscribed as $c_subscribed) |
| | | if (preg_match('/^'.preg_quote($mailbox.$delm, '/').'/', $c_subscribed)) { |
| | |
| | | |
| | | // clear cache |
| | | $this->clear_message_cache($mailbox.'.msg'); |
| | | $this->clear_cache('mailboxes'); |
| | | $this->clear_cache('mailboxes'); |
| | | } |
| | | |
| | | // try to subscribe it |
| | |
| | | this.env.request_timeout = 180; // seconds |
| | | this.env.draft_autosave = 0; // seconds |
| | | this.env.comm_path = './'; |
| | | this.env.bin_path = './bin/'; |
| | | this.env.blankpage = 'program/blank.gif'; |
| | | |
| | | // set jQuery ajax options |
| | |
| | | } |
| | | |
| | | // replace quota image |
| | | obj.innerHTML = ''; |
| | | $(obj).append(bar1).append(bar2).append(main); |
| | | $(obj).html('').append(bar1).append(bar2).append(main); |
| | | }; |
| | | |
| | | /********************************************************/ |
| | |
| | | this.html2plain = function(htmlText, id) |
| | | { |
| | | var rcmail = this, |
| | | url = this.env.bin_path + 'html2text.php'; |
| | | url = '?_task=utils&_action=html2text'; |
| | | |
| | | this.set_busy(true, 'converting'); |
| | | console.log('HTTP POST: ' + url); |
| | |
| | | no_spell_errors = function () { ref.checkSpellingState() }; |
| | | |
| | | var rsm = $('<span>').text(this.lang_no_error_found); |
| | | |
| | | |
| | | $(this.switch_lan_pic).hide(); |
| | | $(this.spell_span).empty().append(rsm) |
| | | $(this.spell_span).empty().append(rsm) |
| | | .removeClass().addClass('googie_check_spelling_ok'); |
| | | |
| | | window.setTimeout(no_spell_errors, 1000); |
| | |
| | | }) |
| | | .css($(this).offset()) |
| | | .appendTo(document.body); |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | |
| | |
| | | |
| | | $OUTPUT->include_script('googiespell.js'); |
| | | $OUTPUT->add_script(sprintf( |
| | | "var googie = new GoogieSpell('\$__skin_path/images/googiespell/','%s&_action=spell&lang=');\n". |
| | | "var googie = new GoogieSpell('\$__skin_path/images/googiespell/','?_task=utils&_action=spell&lang=');\n". |
| | | "googie.lang_chck_spell = \"%s\";\n". |
| | | "googie.lang_rsm_edt = \"%s\";\n". |
| | | "googie.lang_close = \"%s\";\n". |
| | |
| | | "googie.setSpellContainer('spellcheck-control');\n". |
| | | "googie.decorateTextarea('%s');\n". |
| | | "%s.set_env('spellcheck', googie);", |
| | | $RCMAIL->comm_path, |
| | | JQ(Q(rcube_label('checkspelling'))), |
| | | JQ(Q(rcube_label('resumeediting'))), |
| | | JQ(Q(rcube_label('close'))), |
| | |
| | | $EMAIL_ADDRESS_PATTERN = '([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9][a-z0-9\-\.]*\\.[a-z]{2,5})'; |
| | | |
| | | // actions that do not require imap connection |
| | | $NOIMAP_ACTIONS = array('spell', 'addcontact', 'autocomplete', 'upload', 'display-attachment', 'remove-attachment'); |
| | | $NOIMAP_ACTIONS = array('addcontact', 'autocomplete', 'upload', 'display-attachment', 'remove-attachment'); |
| | | |
| | | // always instantiate imap object (but not yet connect to server) |
| | | $RCMAIL->imap_init(); |
| | |
| | | $end = '>'; |
| | | |
| | | if ($tag == 'link' && preg_match('/^https?:\/\//i', $attrib['href'])) { |
| | | $attrib['href'] = "./bin/modcss.php?u=" . urlencode($attrib['href']) . "&c=" . urlencode($GLOBALS['rcmail_html_container_id']); |
| | | $attrib['href'] = "?_task=utils&_action=modcss&u=" . urlencode($attrib['href']) |
| | | . "&c=" . urlencode($GLOBALS['rcmail_html_container_id']); |
| | | $end = ' />'; |
| | | } |
| | | else if (preg_match('/^mailto:'.$EMAIL_ADDRESS_PATTERN.'(\?[^"\'>]+)?/i', $attrib['href'], $mailto)) { |
copy from program/steps/mail/spell.inc
copy to program/steps/utils/html2text.inc
File was copied from program/steps/mail/spell.inc |
| | |
| | | <?php |
| | | |
| | | /* |
| | | |
| | | +-----------------------------------------------------------------------+ |
| | | | program/steps/mail/spell.inc | |
| | | | program/steps/utils/html2text.inc | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Copyright (C) 2005-2010, RoundCube Dev. - Switzerland | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | | | Invoke the configured or default spell checking engine. | |
| | | | Convert HTML message to plain text | |
| | | | | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Kris Steinhoff <steinhof@umich.edu> | |
| | | | Author: Thomas Bruederli <roundcube@gmail.com> | |
| | | +-----------------------------------------------------------------------+ |
| | | |
| | | $Id$ |
| | | |
| | | */ |
| | | |
| | | if ($spell_engine = $RCMAIL->config->get('spellcheck_engine', 'googie')) { |
| | | include('spell_'.$spell_engine.'.inc'); |
| | | } |
| | | $converter = new html2text($HTTP_RAW_POST_DATA); |
| | | |
| | | header('HTTP/1.1 404 Not Found'); |
| | | header('Content-Type: text/plain; charset=UTF-8'); |
| | | print trim($converter->get_text()); |
| | | exit; |
| | | |
| | | ?> |
File was renamed from bin/killcache.php |
| | |
| | | /* |
| | | |
| | | +-----------------------------------------------------------------------+ |
| | | | bin/killcache.php | |
| | | | program/steps/utils/killcache.inc | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland | |
| | | | Copyright (C) 2005-2010, RoundCube Dev. - Switzerland | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | |
| | | |
| | | */ |
| | | |
| | | define('INSTALL_PATH', realpath(dirname(__FILE__).'/..') . '/'); |
| | | require INSTALL_PATH . 'program/include/iniset.php'; |
| | | |
| | | $config = new rcube_config(); |
| | | |
| | | // don't allow public access if not in devel_mode |
| | | if (!$config->get('devel_mode') && $_SERVER['REMOTE_ADDR']) { |
| | | if (!$RCMAIL->config->get('devel_mode')) { |
| | | header("HTTP/1.0 401 Access denied"); |
| | | die("Access denied!"); |
| | | } |
| | |
| | | 'portability' => true |
| | | ); |
| | | |
| | | $dbh = MDB2::factory($config->get('db_dsnw'), $options); |
| | | if (PEAR::isError($dbh)) { |
| | | exit($mdb2->getMessage()); |
| | | } |
| | | |
| | | //TODO: transaction here (if supported by DB) would be a good thing |
| | | $res =& $dbh->exec("DELETE FROM cache"); |
| | | // @TODO: transaction here (if supported by DB) would be a good thing |
| | | $res = $RCMAIL->db->query("DELETE FROM cache"); |
| | | if (PEAR::isError($res)) { |
| | | $dbh->disconnect(); |
| | | exit($res->getMessage()); |
| | | } |
| | | |
| | | $res =& $dbh->exec("DELETE FROM messages"); |
| | | $res = $RCMAIL->db->query("DELETE FROM messages"); |
| | | if (PEAR::isError($res)) { |
| | | $dbh->disconnect(); |
| | | exit($res->getMessage()); |
| | | } |
| | | |
| | | echo "Cache cleared\n"; |
| | | |
| | | $dbh->disconnect(); |
| | | exit; |
| | | |
| | | ?> |
File was renamed from bin/modcss.php |
| | |
| | | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | bin/modcss.php | |
| | | | program/steps/utils/modcss.inc | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Copyright (C) 2007-2009, RoundCube Dev. - Switzerland | |
| | | | Copyright (C) 2007-2010, RoundCube Dev. - Switzerland | |
| | | | Licensed under the GNU GPL | |
| | | | | |
| | | | PURPOSE: | |
| | |
| | | |
| | | */ |
| | | |
| | | define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/'); |
| | | require INSTALL_PATH . 'program/include/iniset.php'; |
| | | |
| | | $RCMAIL = rcmail::get_instance(); |
| | | |
| | | $source = ''; |
| | | $error = 'Requires a valid user session and source url'; |
| | | |
| | | if (empty($RCMAIL->user->ID)) { |
| | | header('HTTP/1.1 403 Forbidden'); |
| | | echo $error; |
| | | exit; |
| | | } |
| | | |
| | | $url = preg_replace('![^a-z0-9:./\-_?$&=%]!i', '', $_GET['u']); |
| | | if ($url === null) { |
| | |
| | | header('HTTP/1.0 404 Not Found'); |
| | | echo $error; |
| | | exit; |
| | | |
| | | ?> |
File was renamed from program/steps/mail/spell.inc |
| | |
| | | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | program/steps/mail/spell.inc | |
| | | | program/steps/utils/spell.inc | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Licensed under the GNU GPL | |
File was renamed from program/steps/mail/spell_googie.inc |
| | |
| | | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | program/steps/mail/spell.inc | |
| | | | program/steps/utils/spell.inc | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | |
| | |
| | | |
| | | // Don't use server's default Content-Type charset (#1486406) |
| | | header("Content-Type: text/xml; charset=".RCMAIL_CHARSET); |
| | | print $store; |
| | | print $store; |
| | | exit; |
| | | |
| | | ?> |
File was renamed from program/steps/mail/spell_pspell.inc |
| | |
| | | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | program/steps/mail/spell_pspell.inc | |
| | | | program/steps/utils/spell_pspell.inc | |
| | | | | |
| | | | This file is part of the RoundCube Webmail client | |
| | | | Licensed under the GNU GPL | |
| | |
| | | 'type' => 'php', |
| | | 'file' => __FILE__, 'line' => __LINE__, |
| | | 'message' => "Pspell extension not available"), true, false); |
| | | |
| | | |
| | | header('HTTP/1.1 404 Not Found'); |
| | | exit; |
| | | } |