From: Michael M Slusarz Date: Thu, 9 Jul 2009 08:02:22 +0000 (-0600) Subject: NLS:: -> Horde_Nls:: X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=24ed26d4f3114322bbd6e202452ece91501708b0;p=horde.git NLS:: -> Horde_Nls:: --- diff --git a/babel/lib/Display.php b/babel/lib/Display.php index 4380af25e..8d3827d9a 100644 --- a/babel/lib/Display.php +++ b/babel/lib/Display.php @@ -63,7 +63,7 @@ class Translate_Display { if (preg_match('/charset=(.*)/i', $headers, $m)) { return $m[1]; } - return NLS::getCharset(); + return Horde_Nls::getCharset(); } function convert_string($msg) { @@ -72,7 +72,7 @@ class Translate_Display { $f = array('/</', '/>/'); $t = array('<', '>'); $msg = preg_replace($f, $t, $msg); - return Horde_String::convertCharset(html_entity_decode($msg), NLS::getCharset(), Translate_Display::parseCharset($po->meta['Content-Type'])); + return Horde_String::convertCharset(html_entity_decode($msg), Horde_Nls::getCharset(), Translate_Display::parseCharset($po->meta['Content-Type'])); } function display_string($msg) { @@ -81,7 +81,7 @@ class Translate_Display { $f = array('//'); $t = array('<', '>'); $msg = preg_replace($f, $t, $msg); - return Horde_String::convertCharset($msg, Translate_Display::parseCharset($po->meta['Content-Type']), NLS::getCharset()); + return Horde_String::convertCharset($msg, Translate_Display::parseCharset($po->meta['Content-Type']), Horde_Nls::getCharset()); } function get_percent($used, $total) { diff --git a/babel/templates/common-header.inc b/babel/templates/common-header.inc index 44a765825..93c47fcf4 100644 --- a/babel/templates/common-header.inc +++ b/babel/templates/common-header.inc @@ -1,6 +1,6 @@ diff --git a/chora/annotate.php b/chora/annotate.php index 4cacd15bb..788ab7a39 100644 --- a/chora/annotate.php +++ b/chora/annotate.php @@ -41,7 +41,7 @@ try { Chora::fatal($e); } -$title = sprintf(_("Source Annotation of %s (revision %s)"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)), $rev); +$title = sprintf(_("Source Annotation of %s (revision %s)"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true)), $rev); $extraLink = sprintf('%s | %s', Chora::url('co', $where, array('r' => $rev)), _("View"), Chora::url('co', $where, array('r' => $rev, 'p' => 1)), _("Download")); @@ -72,7 +72,7 @@ while (list(,$line) = each($lines)) { } $prev = $fl->queryPreviousRevision($rev); - $line = Horde_Text_Filter::filter($line['line'], 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)); + $line = Horde_Text_Filter::filter($line['line'], 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true)); include CHORA_TEMPLATES . '/annotate/line.inc'; } diff --git a/chora/browsedir.php b/chora/browsedir.php index 18e9ae16b..79611a5b5 100644 --- a/chora/browsedir.php +++ b/chora/browsedir.php @@ -88,7 +88,7 @@ if ($dirList) { continue; } $url = Chora::url('browsedir', $where . '/' . $currentDir . '/', array('onb' => $onb)); - $currDir = Horde_Text_Filter::filter($currentDir, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)); + $currDir = Horde_Text_Filter::filter($currentDir, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true)); require CHORA_TEMPLATES . '/directory/dir.inc'; } echo ''; @@ -115,7 +115,7 @@ if ($fileList) { $log = $lg->queryLog(); $attic = $currFile->isDeleted(); $fileName = $where . ($attic ? '/' . 'Attic' : '') . '/' . $realname; - $name = Horde_Text_Filter::filter($realname, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)); + $name = Horde_Text_Filter::filter($realname, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true)); $url = Chora::url('browsefile', $fileName, array('onb' => $onb)); $readableDate = Chora::readableTime($date); if ($log) { diff --git a/chora/cvsgraph.php b/chora/cvsgraph.php index 3638749c3..4c6b53fdb 100644 --- a/chora/cvsgraph.php +++ b/chora/cvsgraph.php @@ -48,7 +48,7 @@ if (Horde_Util::getFormData('show_image')) { passthru($conf['paths']['cvsgraph'] . ' ' . $argstr . ' ' . $file); } else { // Display the wrapper page for the image. - $title = sprintf(_("Graph for %s"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true))); + $title = sprintf(_("Graph for %s"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true))); $extraLink = Chora::getFileViews($where, 'cvsgraph'); require CHORA_TEMPLATES . '/common-header.inc'; diff --git a/chora/diff.php b/chora/diff.php index 8f02517b0..df97b80e5 100644 --- a/chora/diff.php +++ b/chora/diff.php @@ -54,7 +54,7 @@ if ($type != 'colored') { $abbrev_r1 = $VC->abbrev($r1); $abbrev_r2 = $VC->abbrev($r2); $title = sprintf(_("Diff for %s between version %s and %s"), - Horde_Text_Filter::filter($where, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)), $abbrev_r1, $abbrev_r2); + Horde_Text_Filter::filter($where, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true)), $abbrev_r1, $abbrev_r2); /* Format log entries. */ $log_messages = array(); diff --git a/chora/history.php b/chora/history.php index d2ace393c..c6ccccd39 100644 --- a/chora/history.php +++ b/chora/history.php @@ -126,7 +126,7 @@ foreach ($grid as $cols) { $maxCol = max($val, $maxCol); } -$title = sprintf(_("Source Branching View for %s"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true))); +$title = sprintf(_("Source Branching View for %s"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true))); $extraLink = Chora::getFileViews($where, 'history'); require CHORA_TEMPLATES . '/common-header.inc'; diff --git a/chora/lib/Chora.php b/chora/lib/Chora.php index b2084dc15..370978dcf 100644 --- a/chora/lib/Chora.php +++ b/chora/lib/Chora.php @@ -207,7 +207,7 @@ class Chora if (!empty($onb)) { $url = Horde_Util::addParameter($url, array('onb' => $onb)); } - $bar .= '/ '. Horde_Text_Filter::filter($dir, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)) . ' '; + $bar .= '/ '. Horde_Text_Filter::filter($dir, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true)) . ' '; } } @@ -617,7 +617,7 @@ class Chora */ static public function formatLogMessage($log) { - $log = Horde_Text_Filter::filter($log, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'charset' => NLS::getCharset(), 'class' => '')); + $log = Horde_Text_Filter::filter($log, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'charset' => Horde_Nls::getCharset(), 'class' => '')); return (empty($GLOBALS['conf']['tickets']['regexp']) || empty($GLOBALS['conf']['tickets']['replacement'])) ? $log diff --git a/chora/stats.php b/chora/stats.php index b2e4792ae..cb042afbf 100644 --- a/chora/stats.php +++ b/chora/stats.php @@ -28,7 +28,7 @@ foreach ($fl->queryLogs() as $lg) { } arsort($stats); -$title = sprintf(_("Statistics for %s"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true))); +$title = sprintf(_("Statistics for %s"), Horde_Text_Filter::filter($where, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true))); Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('tables.js', 'horde', true); require CHORA_TEMPLATES . '/common-header.inc'; diff --git a/chora/templates/common-header.inc b/chora/templates/common-header.inc index 7b815fd0e..884cd39b3 100644 --- a/chora/templates/common-header.inc +++ b/chora/templates/common-header.inc @@ -1,6 +1,6 @@ ' : ''; @@ -13,7 +13,7 @@ if (!empty($refresh_time) && ($refresh_time > 0) && !empty($refresh_url)) { if (Horde_Util::nonInputVar('js_vars')) { echo '\n"; + 'var Chora = ' . Horde_Serialize::serialize($js_vars, Horde_Serialize::JSON, Horde_Nls::getCharset()) . ";\n//]]>\n"; } Horde::includeScriptFiles(); diff --git a/crumb/templates/common-header.inc b/crumb/templates/common-header.inc index 0796b6ece..481396ece 100644 --- a/crumb/templates/common-header.inc +++ b/crumb/templates/common-header.inc @@ -1,6 +1,6 @@ diff --git a/drag_n_drop_portal/block.php b/drag_n_drop_portal/block.php index 7924c681a..c6c926b32 100644 --- a/drag_n_drop_portal/block.php +++ b/drag_n_drop_portal/block.php @@ -34,4 +34,4 @@ if ($block instanceof PEAR_Error) { } } -echo Horde_Serialize::serialize($block_data, Horde_Serialize::JSON, NLS::getCharset()); +echo Horde_Serialize::serialize($block_data, Horde_Serialize::JSON, Horde_Nls::getCharset()); diff --git a/drag_n_drop_portal/lib/Block/Layout/View/js.php b/drag_n_drop_portal/lib/Block/Layout/View/js.php index 161b80acb..591265d00 100644 --- a/drag_n_drop_portal/lib/Block/Layout/View/js.php +++ b/drag_n_drop_portal/lib/Block/Layout/View/js.php @@ -95,9 +95,9 @@ class Horde_Block_Layout_View_Js extends Horde_Block_Layout_View { } } - $content = Horde_Serialize::serialize($content, Horde_Serialize::JSON, NLS::getCharset()); - $title = Horde_Serialize::serialize($title, Horde_Serialize::JSON, NLS::getCharset()); - $params = Horde_Serialize::serialize($params, Horde_Serialize::JSON, NLS::getCharset()); + $content = Horde_Serialize::serialize($content, Horde_Serialize::JSON, Horde_Nls::getCharset()); + $title = Horde_Serialize::serialize($title, Horde_Serialize::JSON, Horde_Nls::getCharset()); + $params = Horde_Serialize::serialize($params, Horde_Serialize::JSON, Horde_Nls::getCharset()); $js_init .= 'portal.add(new Xilinus.Widget().' . 'setTitle(title_' . $js_id .').' diff --git a/fima/data.php b/fima/data.php index edd552ff0..5a6127d20 100644 --- a/fima/data.php +++ b/fima/data.php @@ -90,7 +90,7 @@ case 'export': break; case 'eo': case 'desc': - $row[$key] = Horde_String::convertCharset($value, NLS::getCharset(), $params['charset']); + $row[$key] = Horde_String::convertCharset($value, Horde_Nls::getCharset(), $params['charset']); break; default: break; @@ -224,7 +224,7 @@ if ($next_step == IMPORT_FILE) { $charsets[$charset] = $charset; } } - $my_charset = NLS::getCharset(true); + $my_charset = Horde_Nls::getCharset(true); } foreach ($templates[$next_step] as $template) { diff --git a/fima/lib/Driver/sql.php b/fima/lib/Driver/sql.php index 066a2c957..a7c598cdc 100644 --- a/fima/lib/Driver/sql.php +++ b/fima/lib/Driver/sql.php @@ -542,9 +542,9 @@ class Fima_Driver_sql extends Fima_Driver { $this->_ledger, sprintf('%\'04d', $number), $type, - Horde_String::convertCharset($name, NLS::getCharset(), $this->_params['charset']), + Horde_String::convertCharset($name, Horde_Nls::getCharset(), $this->_params['charset']), (int)(bool)$eo, - Horde_String::convertCharset($desc, NLS::getCharset(), $this->_params['charset']), + Horde_String::convertCharset($desc, Horde_Nls::getCharset(), $this->_params['charset']), (int)(bool)$closed); /* Log the query at a DEBUG log level. */ @@ -587,9 +587,9 @@ class Fima_Driver_sql extends Fima_Driver { $this->_params['table_accounts']); $values = array(sprintf('%\'04d', $number), $type, - Horde_String::convertCharset($name, NLS::getCharset(), $this->_params['charset']), + Horde_String::convertCharset($name, Horde_Nls::getCharset(), $this->_params['charset']), (int)(bool)$eo, - Horde_String::convertCharset($desc, NLS::getCharset(), $this->_params['charset']), + Horde_String::convertCharset($desc, Horde_Nls::getCharset(), $this->_params['charset']), (int)(bool)$closed, $this->_ledger, $accountId); @@ -736,7 +736,7 @@ class Fima_Driver_sql extends Fima_Driver { $account, (int)(bool)$eo, (float)$amount, - Horde_String::convertCharset($desc, NLS::getCharset(), $this->_params['charset'])); + Horde_String::convertCharset($desc, Horde_Nls::getCharset(), $this->_params['charset'])); /* Log the query at a DEBUG log level. */ Horde::logMessage(sprintf('Fima_Driver_sql::_addPosting(): %s', $query), @@ -784,7 +784,7 @@ class Fima_Driver_sql extends Fima_Driver { $account, (int)(bool)$eo, (float)$amount, - Horde_String::convertCharset($desc, NLS::getCharset(), $this->_params['charset']), + Horde_String::convertCharset($desc, Horde_Nls::getCharset(), $this->_params['charset']), $this->_ledger, $postingId); diff --git a/fima/lib/base.php b/fima/lib/base.php index 571e4f3c9..fc77e3b1e 100644 --- a/fima/lib/base.php +++ b/fima/lib/base.php @@ -56,7 +56,7 @@ require_once 'Horde/History.php'; Horde::compressOutput(); // Set the timezone variable. -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); // Create a share instance. require_once 'Horde/Share.php'; diff --git a/fima/templates/common-header.inc b/fima/templates/common-header.inc index d66a0033d..d6ecab05e 100644 --- a/fima/templates/common-header.inc +++ b/fima/templates/common-header.inc @@ -1,6 +1,6 @@ diff --git a/folks/config/hooks.php.dist b/folks/config/hooks.php.dist index 985f9538e..3bb13de07 100644 --- a/folks/config/hooks.php.dist +++ b/folks/config/hooks.php.dist @@ -329,7 +329,7 @@ if (!function_exists('_horde_hook_signup_addextra')) { $value = hash('md5', $value); } $fields[] = 'user_' . Horde_String::lower($field); - $values[] = Horde_String::convertCharset($value, NLS::getCharset(), $conf['sql']['charset']); + $values[] = Horde_String::convertCharset($value, Horde_Nls::getCharset(), $conf['sql']['charset']); } $values[] = $userID; diff --git a/folks/lib/Folks.php b/folks/lib/Folks.php index dd92a5b31..0e9c5f5c8 100644 --- a/folks/lib/Folks.php +++ b/folks/lib/Folks.php @@ -46,7 +46,7 @@ class Folks { { $result = Horde::loadConfiguration('countries.php', 'countries', 'folks'); if ($result instanceof PEAR_Error) { - return NLS::getCountryISO(); + return Horde_Nls::getCountryISO(); } return $result; @@ -236,7 +236,7 @@ class Folks { */ static public function sendMail($to, $subject, $body, $attaches = array()) { - $mail = new Horde_Mime_Mail($subject, $body, $to, $GLOBALS['conf']['support'], NLS::getCharset()); + $mail = new Horde_Mime_Mail($subject, $body, $to, $GLOBALS['conf']['support'], Horde_Nls::getCharset()); require_once FOLKS_BASE . '/lib/version.php'; $mail->addHeader('User-Agent', 'Folks ' . FOLKS_VERSION); @@ -245,7 +245,7 @@ class Folks { foreach ($attaches as $file) { if (file_exists($file)) { - $mail->addAttachment($file, null, null, NLS::getCharset()); + $mail->addAttachment($file, null, null, Horde_Nls::getCharset()); } } diff --git a/folks/lib/Notification/mail.php b/folks/lib/Notification/mail.php index ab8b46916..388144788 100644 --- a/folks/lib/Notification/mail.php +++ b/folks/lib/Notification/mail.php @@ -59,7 +59,7 @@ class Folks_Notification_mail extends Folks_Notification { $mail = new Horde_Mime_Mail($subject, $body, null, $this->_params['from_addr'], - NLS::getCharset()); + Horde_Nls::getCharset()); $mail->addHeader('User-Agent', 'Folks ' . FOLKS_VERSION); $mail->addHeader('X-Originating-IP', $_SERVER['REMOTE_ADDR']); @@ -67,7 +67,7 @@ class Folks_Notification_mail extends Folks_Notification { foreach ($attachments as $file) { if (file_exists($file)) { - $mail->addAttachment($file, null, null, NLS::getCharset()); + $mail->addAttachment($file, null, null, Horde_Nls::getCharset()); } } @@ -80,7 +80,7 @@ class Folks_Notification_mail extends Folks_Notification { if (empty($to)) { continue; } - $mail->addHeader('To', $to, NLS::getCharset(), true); + $mail->addHeader('To', $to, Horde_Nls::getCharset(), true); $mail->send($mail_driver, $mail_params); } diff --git a/folks/scripts/mail-filter.php b/folks/scripts/mail-filter.php index c6534eb1d..e4020fc95 100644 --- a/folks/scripts/mail-filter.php +++ b/folks/scripts/mail-filter.php @@ -106,7 +106,7 @@ foreach (array('host', 'user', 'pass', 'port', 'protocol', 'folder') as $opt) { // Set charset to UTF-8 for most flexible conversion between email charset and // backend charset. -NLS::setCharsetEnvironment('UTF-8'); +Horde_Nls::setCharsetEnvironment('UTF-8'); // Read and parse the message. $messages = array(); diff --git a/folks/scripts/mail.php b/folks/scripts/mail.php index 1b1603beb..74eba1b39 100644 --- a/folks/scripts/mail.php +++ b/folks/scripts/mail.php @@ -128,7 +128,7 @@ while ($row =& $res->fetchRow()) { $body2 = sprintf($body, $row[0], $registry->get('name', 'horde'), Folks::getUrlFor('user', $row[0], true, -1)); // Send mail - $mail = new MIME_Mail($subject, $body2, $row[1], $conf['support'], NLS::getCharset()); + $mail = new MIME_Mail($subject, $body2, $row[1], $conf['support'], Horde_Nls::getCharset()); $mail->addHeader('User-Agent', 'Folks' . FOLKS_VERSION); $sent = $mail->send($conf['mailer']['type'], $conf['mailer']['params']); if ($sent instanceof PEAR_Error) { diff --git a/folks/templates/common-header.inc b/folks/templates/common-header.inc index 0bc17b608..d73782b55 100644 --- a/folks/templates/common-header.inc +++ b/folks/templates/common-header.inc @@ -1,6 +1,6 @@ diff --git a/folks/templates/feed/activities.php b/folks/templates/feed/activities.php index c66afd900..1be8c1bec 100644 --- a/folks/templates/feed/activities.php +++ b/folks/templates/feed/activities.php @@ -1,4 +1,4 @@ -' ?> +' ?> diff --git a/folks/templates/feed/feed.php b/folks/templates/feed/feed.php index a4d35a2e5..fdd5a88a8 100644 --- a/folks/templates/feed/feed.php +++ b/folks/templates/feed/feed.php @@ -1,4 +1,4 @@ -' ?> +' ?> diff --git a/framework/Model/lib/Horde/Form.php b/framework/Model/lib/Horde/Form.php index 45d2eed21..89b9f6ccb 100644 --- a/framework/Model/lib/Horde/Form.php +++ b/framework/Model/lib/Horde/Form.php @@ -659,7 +659,7 @@ class Horde_Form_Type_number extends Horde_Form_Type { } /* Get current locale information. */ - $linfo = NLS::getLocaleInfo(); + $linfo = Horde_Nls::getLocaleInfo(); /* Build the pattern. */ $pattern = '(-)?'; @@ -693,7 +693,7 @@ class Horde_Form_Type_number extends Horde_Form_Type { function getInfo($vars, $var, &$info) { $value = $vars->get($var->getVarName()); - $linfo = NLS::getLocaleInfo(); + $linfo = Horde_Nls::getLocaleInfo(); $value = str_replace($linfo['mon_thousands_sep'], '', $value); $info = str_replace($linfo['mon_decimal_point'], '.', $value); } diff --git a/framework/Model/lib/Horde/Form/Renderer/Xhtml.php b/framework/Model/lib/Horde/Form/Renderer/Xhtml.php index 218ce81fd..f989bb73b 100644 --- a/framework/Model/lib/Horde/Form/Renderer/Xhtml.php +++ b/framework/Model/lib/Horde/Form/Renderer/Xhtml.php @@ -130,9 +130,8 @@ if (document.getElementById(%1$s)){ } } } - require_once 'Horde/NLS.php'; echo ''; } diff --git a/framework/Model/lib/Horde/Form/Type/Number.php b/framework/Model/lib/Horde/Form/Type/Number.php index 6b58fd6bd..d4a3a9dd3 100644 --- a/framework/Model/lib/Horde/Form/Type/Number.php +++ b/framework/Model/lib/Horde/Form/Type/Number.php @@ -31,7 +31,7 @@ class Horde_Form_Type_Number extends Horde_Form_Type { public function getInfo($vars, $var, &$info) { $value = $vars->get($var->name); - $linfo = NLS::getLocaleInfo(); + $linfo = Horde_Nls::getLocaleInfo(); $value = str_replace($linfo['mon_thousands_sep'], '', $value); $info = str_replace($linfo['mon_decimal_point'], '.', $value); } @@ -46,7 +46,7 @@ class Horde_Form_Type_Number extends Horde_Form_Type { } /* Get current locale information. */ - $linfo = NLS::getLocaleInfo(); + $linfo = Horde_Nls::getLocaleInfo(); /* Build the pattern. */ $pattern = '(-)?'; diff --git a/framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php b/framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php index 4d0ea7ba5..e0f2453bb 100644 --- a/framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php +++ b/framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php @@ -46,7 +46,7 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer { if ($var->type->fraction) { $value = sprintf('%01.' . $var->type->fraction . 'f', $value); } - $linfo = NLS::getLocaleInfo(); + $linfo = Horde_Nls::getLocaleInfo(); /* Only if there is a mon_decimal_point do the * substitution. */ if (!empty($linfo['mon_decimal_point'])) { @@ -93,7 +93,7 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer { . 'id="%2$s" value="%3$s"%4$s%5$s%6$s />', ($var->isDisabled() ? ' form-input-disabled" ' : ''), $var->getVarName(), - htmlspecialchars($var->getValue($vars), ENT_QUOTES, NLS::getCharset()), + htmlspecialchars($var->getValue($vars), ENT_QUOTES, Horde_Nls::getCharset()), ($var->isDisabled() ? ' disabled="disabled" ' : ''), ($var->type->maxlength ? ' maxlength="' . $var->type->maxlength . '"' : ''), $this->_getActionScripts($form, $var) @@ -115,7 +115,7 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer { return sprintf( '', $var->getVarName(), - htmlspecialchars($var->getValue($vars), ENT_QUOTES, NLS::getCharset()), + htmlspecialchars($var->getValue($vars), ENT_QUOTES, Horde_Nls::getCharset()), ($var->isDisabled() ? ' disabled="disabled" ' : ''), $this->_getActionScripts($form, $var) ); @@ -130,7 +130,7 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer { { return sprintf(' ', $var->getVarName(), - htmlspecialchars($var->getValue($vars), ENT_QUOTES, NLS::getCharset()), + htmlspecialchars($var->getValue($vars), ENT_QUOTES, Horde_Nls::getCharset()), $var->isDisabled() ? ' disabled="disabled" ' : '', $this->_getActionScripts($form, $var) ); @@ -166,7 +166,7 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer { /* Hidden tag to store the preview image filename. */ $html = sprintf(' ', $varname . '[img]', - htmlspecialchars($image['img'], ENT_QUOTES, NLS::getCharset())); + htmlspecialchars($image['img'], ENT_QUOTES, Horde_Nls::getCharset())); /* Unserialize the img information to get the full array. */ $image['img'] = @unserialize($image['img']); @@ -597,7 +597,7 @@ if (tmp) { $prompt = $var->type->prompt; $htmlchars = $var->getOption('htmlchars'); if ($prompt) { - $prompt = ''; + $prompt = ''; } return sprintf(' ', $var->getVarName(), @@ -626,7 +626,7 @@ if (tmp) { /* Hidden tag to store the current first level. */ $html = sprintf(' ', $varname, - htmlspecialchars($selected['1'], ENT_QUOTES, NLS::getCharset())); + htmlspecialchars($selected['1'], ENT_QUOTES, Horde_Nls::getCharset())); /* First level. */ $values_1 = Horde_Array::valuesToKeys(array_keys($values)); @@ -635,7 +635,7 @@ if (tmp) { 'if (this.value) { document.' . $form->getName() . '.formname.value=\'\';' . 'document.' . $form->getName() . '.submit() }', ($var->hasAction() ? ' ' . $this->_genActionScript($form, $var->_action, $varname) : '')); if (!empty($prompts)) { - $html .= ''; + $html .= ''; } $html .= $this->_selectOptions($values_1, $selected['1']); $html .= ' '; @@ -645,7 +645,7 @@ if (tmp) { $varname, ($var->hasAction() ? ' ' . $this->_genActionScript($form, $var->_action, $varname) : '')); if (!empty($prompts)) { - $html .= ''; + $html .= ''; } $values_2 = array(); if (!empty($selected['1'])) { @@ -919,7 +919,7 @@ EOT; function _renderVarDisplayDefault($form, $var, $vars) { return nl2br(htmlspecialchars($var->getValue($vars), ENT_QUOTES, - NLS::getCharset())); + Horde_Nls::getCharset())); } function _renderVarDisplay_html($form, $var, $vars) @@ -962,7 +962,7 @@ EOT; return Horde::link($mail_link, $email_val) . htmlspecialchars($display_email) . ''; } else { - return nl2br(htmlspecialchars($display_email, ENT_QUOTES, NLS::getCharset())); + return nl2br(htmlspecialchars($display_email, ENT_QUOTES, Horde_Nls::getCharset())); } } @@ -993,7 +993,7 @@ EOT; if (count($values) == 0) { return _("No values"); } elseif (isset($values[$value]) && $value != '') { - return htmlspecialchars($values[$value], ENT_QUOTES, NLS::getCharset()); + return htmlspecialchars($values[$value], ENT_QUOTES, Horde_Nls::getCharset()); } } @@ -1003,7 +1003,7 @@ EOT; if (count($values) == 0) { return _("No values"); } elseif (isset($values[$var->getValue($vars)])) { - return htmlspecialchars($values[$var->getValue($vars)], ENT_QUOTES, NLS::getCharset()); + return htmlspecialchars($values[$var->getValue($vars)], ENT_QUOTES, Horde_Nls::getCharset()); } } @@ -1020,7 +1020,7 @@ EOT; $display[] = $name; } } - return htmlspecialchars(implode(', ', $display), ENT_QUOTES, NLS::getCharset()); + return htmlspecialchars(implode(', ', $display), ENT_QUOTES, Horde_Nls::getCharset()); } } @@ -1037,7 +1037,7 @@ EOT; $display[] = $name; } } - return htmlspecialchars(implode(', ', $display), ENT_QUOTES, NLS::getCharset()); + return htmlspecialchars(implode(', ', $display), ENT_QUOTES, Horde_Nls::getCharset()); } } @@ -1217,7 +1217,7 @@ EOT; } } - $html = nl2br(htmlspecialchars($var->getValue($vars), ENT_QUOTES, NLS::getCharset())); + $html = nl2br(htmlspecialchars($var->getValue($vars), ENT_QUOTES, Horde_Nls::getCharset())); if (!empty($mapurl)) { $html .= '  ' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc, '', $registry->getImageDir('horde')) . ''; } @@ -1255,7 +1255,7 @@ EOT; function _renderVarDisplay_invalid($form, $var, $vars) { return '

' - . htmlspecialchars($var->type->message, ENT_QUOTES, NLS::getCharset()) + . htmlspecialchars($var->type->message, ENT_QUOTES, Horde_Nls::getCharset()) . '

'; } @@ -1374,7 +1374,7 @@ EOT; $selected = ''; } $result .= ' \n"; @@ -1394,7 +1394,7 @@ EOT; $selected = ''; } $result .= " \n"; } diff --git a/imp/ajax.php b/imp/ajax.php index e319fd295..0acd370e0 100644 --- a/imp/ajax.php +++ b/imp/ajax.php @@ -184,7 +184,7 @@ case 'CreateFolder': $imp_folder = IMP_Folder::singleton(); - $new = Horde_String::convertCharset($mbox, NLS::getCharset(), 'UTF7-IMAP'); + $new = Horde_String::convertCharset($mbox, Horde_Nls::getCharset(), 'UTF7-IMAP'); try { $new = $imptree->createMailboxName(Horde_Util::getPost('parent'), $new); $result = $imp_folder->create($new, $prefs->getValue('subscribe')); @@ -228,7 +228,7 @@ case 'RenameFolder': try { $new = $imptree->createMailboxName($new_parent, $new); - $new = Horde_String::convertCharset($new, NLS::getCharset(), 'UTF7-IMAP'); + $new = Horde_String::convertCharset($new, Horde_Nls::getCharset(), 'UTF7-IMAP'); if ($old != $new) { $result = $imp_folder->rename($old, $new); if ($result) { diff --git a/imp/attachment.php b/imp/attachment.php index cd40dae0f..7c90c6fb4 100644 --- a/imp/attachment.php +++ b/imp/attachment.php @@ -84,8 +84,8 @@ if ($conf['compose']['link_attachments_notify']) { /* Ignore missing addresses, which are returned as <>. */ if (strlen($mail_address) > 2) { $mail_address_full = $mail_identity->getDefaultFromAddress(true); - NLS::setTimeZone(); - NLS::setLanguageEnvironment(); + Horde_Nls::setTimeZone(); + Horde_Nls::setLanguageEnvironment(); /* Set up the mail headers and read the log file. */ $msg_headers = new Horde_Mime_Headers(); @@ -99,7 +99,7 @@ if ($conf['compose']['link_attachments_notify']) { $msg = new Horde_Mime_Part(); $msg->setType('text/plain'); - $msg->setCharset(NLS::getCharset()); + $msg->setCharset(Horde_Nls::getCharset()); $msg->setContents(Horde_String::wrap(sprintf(_("Your linked attachment has been downloaded by at least one user.\n\nAttachment name: %s\nAttachment date: %s\n\nClick on the following link to permanently delete the attachment:\n%s"), $file_name, date('r', $time_stamp), Horde_Util::addParameter(Horde::selfUrl(true, false, true), 'd', $id)))); $msg->send($mail_address, $msg_headers); diff --git a/imp/compose-dimp.php b/imp/compose-dimp.php index 2f76226f8..930580f2f 100644 --- a/imp/compose-dimp.php +++ b/imp/compose-dimp.php @@ -51,7 +51,7 @@ if (!$prefs->isLocked('default_identity')) { } /* Set the current time zone. */ -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); /* Initialize the IMP_Compose:: object. */ $imp_compose = IMP_Compose::singleton(Horde_Util::getFormData('composeCache')); @@ -78,7 +78,7 @@ if (count($_POST)) { } /* Set the default charset. */ - $charset = NLS::getEmailCharset(); + $charset = Horde_Nls::getEmailCharset(); if (!$prefs->isLocked('sending_charset')) { $charset = Horde_Util::getFormData('charset', $charset); } @@ -99,7 +99,7 @@ if (count($_POST)) { try { $old_index = $imp_compose->getMetadata('draft_index'); - $res = $imp_compose->saveDraft($header, Horde_Util::getFormData('message', ''), NLS::getCharset(), Horde_Util::getFormData('html')); + $res = $imp_compose->saveDraft($header, Horde_Util::getFormData('message', ''), Horde_Nls::getCharset(), Horde_Util::getFormData('html')); $result->success = 1; /* Delete existing draft. */ diff --git a/imp/compose-mimp.php b/imp/compose-mimp.php index 7ef725377..4c32b49b2 100644 --- a/imp/compose-mimp.php +++ b/imp/compose-mimp.php @@ -60,7 +60,7 @@ $compose_disable = !empty($conf['hooks']['disable_compose']) && Horde::callHook('_imp_hook_disable_compose', array(), 'imp'); /* Set the current time zone. */ -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); /* Initialize the IMP_Compose:: object. */ $imp_compose = IMP_Compose::singleton(Horde_Util::getFormData('composeCache')); @@ -141,7 +141,7 @@ case _("Redirect"): $f_to = $imp_ui->getAddressList(Horde_Util::getFormData('to')); try { - $imp_ui->redirectMessage($f_to, $imp_compose, $imp_contents, NLS::getEmailCharset()); + $imp_ui->redirectMessage($f_to, $imp_compose, $imp_contents, Horde_Nls::getEmailCharset()); if ($prefs->getValue('compose_confirm')) { $notification->push(_("Message redirected successfully."), 'horde.success'); } @@ -216,7 +216,7 @@ case _("Send"): ); try { - if ($imp_compose->buildAndSendMessage($message, $header, NLS::getEmailCharset(), false, $options)) { + if ($imp_compose->buildAndSendMessage($message, $header, Horde_Nls::getEmailCharset(), false, $options)) { $imp_compose->destroy(); if (Horde_Util::getFormData('resume_draft') && diff --git a/imp/compose.php b/imp/compose.php index a9dcf1d79..7cbde34ff 100644 --- a/imp/compose.php +++ b/imp/compose.php @@ -135,7 +135,7 @@ if ($token = Horde_Util::getFormData('compose_formToken')) { } /* Set the current time zone. */ -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); /* Determine if compose mode is disabled. */ $compose_disable = !empty($conf['hooks']['disable_compose']) && @@ -170,8 +170,8 @@ $imp_ui = new IMP_UI_Compose(); * $charset - charset to use when sending messages * $encoding - best guessed charset offered to the user as the default value * in the charset dropdown list. */ -$charset = $prefs->isLocked('sending_charset') ? NLS::getEmailCharset() : Horde_Util::getFormData('charset'); -$encoding = empty($charset) ? NLS::getEmailCharset() : $charset; +$charset = $prefs->isLocked('sending_charset') ? Horde_Nls::getEmailCharset() : Horde_Util::getFormData('charset'); +$encoding = empty($charset) ? Horde_Nls::getEmailCharset() : $charset; /* Is this a popup window? */ $has_js = $browser->hasFeature('javascript'); @@ -494,7 +494,7 @@ case 'save_draft': /* Save the draft. */ try { - $result = $imp_compose->saveDraft($header, $message, NLS::getCharset(), $rtemode); + $result = $imp_compose->saveDraft($header, $message, Horde_Nls::getCharset(), $rtemode); $imp_compose->destroy(); /* Closing draft if requested by preferences. */ @@ -802,7 +802,7 @@ if (!$redirect) { Horde_Mime_Address::addrArray2String($identity->getBccAddresses($ident)) ); } - $js_code[] = 'ImpCompose.identities = ' . Horde_Serialize::serialize($js_ident, Horde_Serialize::JSON, NLS::getCharset()); + $js_code[] = 'ImpCompose.identities = ' . Horde_Serialize::serialize($js_ident, Horde_Serialize::JSON, Horde_Nls::getCharset()); } @@ -1150,7 +1150,7 @@ if ($redirect) { $t->set('attach_vcard', Horde_Util::getFormData('vcard')); } if ($_SESSION['imp']['file_upload']) { - $localeinfo = NLS::getLocaleInfo(); + $localeinfo = Horde_Nls::getLocaleInfo(); if ($GLOBALS['registry']->hasMethod('files/selectlistLink')) { $res = $GLOBALS['registry']->call('files/selectlistLink', array(_("Attach Files"), 'widget', 'compose', true)); $t->set('selectlistlink', (is_a($res, 'PEAR_Error')) ? null : $res); diff --git a/imp/contacts.php b/imp/contacts.php index 0376e457e..1d2db1e06 100644 --- a/imp/contacts.php +++ b/imp/contacts.php @@ -57,7 +57,7 @@ if (Horde_Util::getFormData('searched') || $prefs->getValue('display_contact')) $selected_addresses = array(); foreach (explode('|', Horde_Util::getFormData('sa')) as $addr) { if (strlen(trim($addr))) { - $selected_addresses[] = @htmlspecialchars($addr, ENT_QUOTES, NLS::getCharset()); + $selected_addresses[] = @htmlspecialchars($addr, ENT_QUOTES, Horde_Nls::getCharset()); } } @@ -84,11 +84,11 @@ $a_list = array(); foreach ($addresses as $addr) { if (!empty($addr['email'])) { if (strpos($addr['email'], ',') !== false) { - $a_list[] = @htmlspecialchars(Horde_Mime_Address::encode($addr['name'], 'personal') . ': ' . $addr['email'] . ';', ENT_QUOTES, NLS::getCharset()); + $a_list[] = @htmlspecialchars(Horde_Mime_Address::encode($addr['name'], 'personal') . ': ' . $addr['email'] . ';', ENT_QUOTES, Horde_Nls::getCharset()); } else { $mbox_host = explode('@', $addr['email']); if (isset($mbox_host[1])) { - $a_list[] = @htmlspecialchars(Horde_Mime_Address::writeAddress($mbox_host[0], $mbox_host[1], $addr['name']), ENT_QUOTES, NLS::getCharset()); + $a_list[] = @htmlspecialchars(Horde_Mime_Address::writeAddress($mbox_host[0], $mbox_host[1], $addr['name']), ENT_QUOTES, Horde_Nls::getCharset()); } } } diff --git a/imp/fetchmailprefs.php b/imp/fetchmailprefs.php index 974a47c5e..f8286c4dc 100644 --- a/imp/fetchmailprefs.php +++ b/imp/fetchmailprefs.php @@ -188,7 +188,7 @@ Prefs_UI::generateHeader(null, $chunk); Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('fetchmailprefs.js', 'imp', true); -$charset = NLS::getCharset(); +$charset = Horde_Nls::getCharset(); IMP::addInlineScript(array( 'ImpFetchmailprefs.fetchurl = ' . Horde_Serialize($fetch_url, Horde_Serialize::JSON, $charset), 'ImpFetchmailprefs.prefsurl = ' . Horde_Serialize($prefs_url, Horde_Serialize::JSON, $charset) diff --git a/imp/folders.php b/imp/folders.php index c14500415..3d2839b7d 100644 --- a/imp/folders.php +++ b/imp/folders.php @@ -49,7 +49,7 @@ if (!$conf['user']['allow_folders']) { $subscribe = $prefs->getValue('subscribe'); $showAll = (!$subscribe || $_SESSION['imp']['showunsub']); -$charset = NLS::getCharset(); +$charset = Horde_Nls::getCharset(); /* Get the base URL for this page. */ $folders_url = Horde::selfUrl(); diff --git a/imp/lib/Block/Newmail.php b/imp/lib/Block/Newmail.php index 672d1340b..a88d92245 100644 --- a/imp/lib/Block/Newmail.php +++ b/imp/lib/Block/Newmail.php @@ -37,7 +37,7 @@ class IMP_Block_Newmail extends Horde_Block } else { require_once 'Horde/Identity.php'; - $charset = NLS::getCharset(); + $charset = Horde_Nls::getCharset(); $imp_ui = new IMP_UI_Mailbox('INBOX'); $shown = empty($this->_params['msgs_shown']) ? 3 : $this->_params['msgs_shown']; diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index 9d8b5e74b..267066602 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -454,7 +454,7 @@ class IMP_Compose $mdn->addMDNRequestHeaders($headers, $barefrom); } - $browser_charset = NLS::getCharset(); + $browser_charset = Horde_Nls::getCharset(); $headers->addHeader('From', Horde_String::convertCharset($header['from'], $browser_charset, $charset)); @@ -496,7 +496,7 @@ class IMP_Compose $headers_result = Horde::loadConfiguration('header.php', '_header'); if (!is_a($headers_result, 'PEAR_Error')) { foreach ($headers_result as $key => $val) { - $headers->addHeader(trim($key), Horde_String::convertCharset(trim($val), NLS::getCharset(), $charset)); + $headers->addHeader(trim($key), Horde_String::convertCharset(trim($val), Horde_Nls::getCharset(), $charset)); } } @@ -604,7 +604,7 @@ class IMP_Compose } try { - $GLOBALS['imp_imap']->ob->append(Horde_String::convertCharset($opts['sent_folder'], NLS::getCharset(), 'UTF-8'), array(array('data' => $fcc, 'flags' => $flags))); + $GLOBALS['imp_imap']->ob->append(Horde_String::convertCharset($opts['sent_folder'], Horde_Nls::getCharset(), 'UTF-8'), array(array('data' => $fcc, 'flags' => $flags))); } catch (Horde_Imap_Client_Exception $e) { $notification->push(sprintf(_("Message sent successfully, but not saved to %s"), IMP::displayFolder($opts['sent_folder']))); $sent_saved = false; @@ -668,7 +668,7 @@ class IMP_Compose $recipients += isset($address['grounpname']) ? count($address['addresses']) : 1; } if ($recipients > $timelimit) { - $error = @htmlspecialchars(sprintf(_("You are not allowed to send messages to more than %d recipients within %d hours."), $timelimit, $conf['sentmail']['params']['limit_period']), ENT_COMPAT, NLS::getCharset()); + $error = @htmlspecialchars(sprintf(_("You are not allowed to send messages to more than %d recipients within %d hours."), $timelimit, $conf['sentmail']['params']['limit_period']), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($conf['hooks']['permsdenied'])) { $error = Horde::callHook('_perms_hook_denied', array('imp:max_timelimit'), 'horde', $error); } @@ -862,7 +862,7 @@ class IMP_Compose $num_recipients += count(explode(',', $recipient)); } if ($num_recipients > $max_recipients) { - $message = @htmlspecialchars(sprintf(_("You are not allowed to send messages to more than %d recipients."), $max_recipients), ENT_COMPAT, NLS::getCharset()); + $message = @htmlspecialchars(sprintf(_("You are not allowed to send messages to more than %d recipients."), $max_recipients), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('imp:max_recipients'), 'horde', $message); } @@ -888,7 +888,7 @@ class IMP_Compose // Convert IDN hosts to ASCII. if (Horde_Util::extensionExists('idn')) { $old_error = error_reporting(0); - $host = idn_to_ascii(Horde_String::convertCharset($host, NLS::getCharset(), 'UTF-8')); + $host = idn_to_ascii(Horde_String::convertCharset($host, Horde_Nls::getCharset(), 'UTF-8')); error_reporting($old_error); } elseif (Horde_Mime::is8bit($ob['mailbox'])) { throw new IMP_Compose_Exception(sprintf(_("Invalid character in e-mail address: %s."), $email)); @@ -919,7 +919,7 @@ class IMP_Compose protected function _createMimeMessage($to, $body, $charset, $options = array()) { - $nls_charset = NLS::getCharset(); + $nls_charset = Horde_Nls::getCharset(); $body = Horde_String::convertCharset($body, $nls_charset, $charset); if (!empty($options['html'])) { @@ -1406,7 +1406,7 @@ class IMP_Compose return array( 'body' => $msg, - 'encoding' => isset($msg_text) ? $msg_text['encoding'] : NLS::getCharset(), + 'encoding' => isset($msg_text) ? $msg_text['encoding'] : Horde_Nls::getCharset(), 'format' => $format, 'headers' => $header, 'identity' => $this->_getMatchingIdentity($h) @@ -1454,7 +1454,7 @@ class IMP_Compose $headerob = $contents->getHeaderOb(); $part = new Horde_Mime_Part(); - $part->setCharset(NLS::getCharset()); + $part->setCharset(Horde_Nls::getCharset()); $part->setType('message/rfc822'); $part->setName(_("Forwarded Message")); $part->setContents($contents->fullMessageText(array('stream' => true))); @@ -1571,7 +1571,7 @@ class IMP_Compose } $part = new Horde_Mime_Part(); $part->setType($type); - $part->setCharset(NLS::getCharset()); + $part->setCharset(Horde_Nls::getCharset()); $part->setName($filename); $part->setBytes($_FILES[$name]['size']); $part->setDisposition('attachment'); @@ -1909,13 +1909,13 @@ class IMP_Compose '/%r/' => $h->getValue('date'), /* Date as ddd, dd mmm yyyy. */ - '/%d/' => Horde_String::convertCharset(strftime("%a, %d %b %Y", $udate), NLS::getExternalCharset()), + '/%d/' => Horde_String::convertCharset(strftime("%a, %d %b %Y", $udate), Horde_Nls::getExternalCharset()), /* Date in locale's default. */ - '/%x/' => Horde_String::convertCharset(strftime("%x", $udate), NLS::getExternalCharset()), + '/%x/' => Horde_String::convertCharset(strftime("%x", $udate), Horde_Nls::getExternalCharset()), /* Date and time in locale's default. */ - '/%c/' => Horde_String::convertCharset(strftime("%c", $udate), NLS::getExternalCharset()), + '/%c/' => Horde_String::convertCharset(strftime("%c", $udate), Horde_Nls::getExternalCharset()), /* Message-ID. */ '/%m/' => $message_id, @@ -2107,14 +2107,14 @@ class IMP_Compose $fullpath = sprintf('%s/%s/%d', self::VFS_LINK_ATTACH_PATH, $auth, $ts); $charset = $part->getCharset(); - $trailer = Horde_String::convertCharset(_("Attachments"), NLS::getCharset(), $charset); + $trailer = Horde_String::convertCharset(_("Attachments"), Horde_Nls::getCharset(), $charset); if ($prefs->getValue('delete_attachments_monthly')) { /* Determine the first day of the month in which the current * attachments will be ripe for deletion, then subtract 1 second * to obtain the last day of the previous month. */ $del_time = mktime(0, 0, 0, date('n') + $prefs->getValue('delete_attachments_monthly_keep') + 1, 1, date('Y')) - 1; - $trailer .= Horde_String::convertCharset(' (' . sprintf(_("Links will expire on %s"), strftime('%x', $del_time)) . ')', NLS::getCharset(), $charset); + $trailer .= Horde_String::convertCharset(' (' . sprintf(_("Links will expire on %s"), strftime('%x', $del_time)) . ')', Horde_Nls::getCharset(), $charset); } foreach ($this->getAttachments() as $att) { @@ -2197,7 +2197,7 @@ class IMP_Compose $part = $contents->getMIMEPart($body_id); $type = $part->getType(); $part_charset = $part->getCharset(); - $charset = NLS::getCharset(); + $charset = Horde_Nls::getCharset(); $msg = Horde_String::convertCharset($part->getContents(), $part_charset); /* Enforce reply limits. */ @@ -2243,7 +2243,7 @@ class IMP_Compose } /* Determine default encoding. */ - $encoding = NLS::getEmailCharset(); + $encoding = Horde_Nls::getEmailCharset(); if (($charset == 'UTF-8') && (strcasecmp($part_charset, 'US-ASCII') !== 0) && (strcasecmp($part_charset, $encoding) !== 0)) { @@ -2290,7 +2290,7 @@ class IMP_Compose $part = new Horde_Mime_Part(); $part->setType('text/x-vcard'); - $part->setCharset(NLS::getCharset()); + $part->setCharset(Horde_Nls::getCharset()); $part->setContents($vcard); $part->setName((strlen($name) ? $name : 'vcard') . '.vcf'); $this->_attachVCard = $part; diff --git a/imp/lib/Contents.php b/imp/lib/Contents.php index 4dbeb3cc3..108e1cd86 100644 --- a/imp/lib/Contents.php +++ b/imp/lib/Contents.php @@ -411,7 +411,7 @@ class IMP_Contents ) ) ), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } @@ -442,7 +442,7 @@ class IMP_Contents * give the user a link to open the part in a new window with the * correct character set. */ if (($mode != 'full') && ($mime_part->getPrimaryType() == 'text')) { - $default_charset = Horde_String::upper(NLS::getCharset()); + $default_charset = Horde_String::upper(Horde_Nls::getCharset()); if ($default_charset !== 'UTF-8') { $charset_upper = Horde_String::upper($mime_part->getCharset()); if (($charset_upper != 'US-ASCII') && @@ -507,7 +507,7 @@ class IMP_Contents $ptext = $pmime->getContents(); $ptext = Horde_String::convertCharset($ptext, $pmime->getCharset()); if ($pmime->getType() == 'text/html') { - $ptext = Horde_Text_Filter::filter($ptext, 'html2text', array('charset' => NLS::getCharset())); + $ptext = Horde_Text_Filter::filter($ptext, 'html2text', array('charset' => Horde_Nls::getCharset())); } $this->_build = $oldbuild; diff --git a/imp/lib/DIMP.php b/imp/lib/DIMP.php index 807ad5cf7..786e3d737 100644 --- a/imp/lib/DIMP.php +++ b/imp/lib/DIMP.php @@ -33,7 +33,7 @@ class DIMP if (empty($params['title'])) { $old_error = error_reporting(0); - $tooltip = nl2br(htmlspecialchars($tooltip, ENT_QUOTES, NLS::getCharset())); + $tooltip = nl2br(htmlspecialchars($tooltip, ENT_QUOTES, Horde_Nls::getCharset())); $title = $ak = ''; } else { $title = $params['title']; @@ -91,7 +91,7 @@ class DIMP } if (isset($GLOBALS['language'])) { - header('Content-type: text/html; charset=' . NLS::getCharset()); + header('Content-type: text/html; charset=' . Horde_Nls::getCharset()); header('Vary: Accept-Language'); } diff --git a/imp/lib/Folder.php b/imp/lib/Folder.php index 0063c6059..3be1009fd 100644 --- a/imp/lib/Folder.php +++ b/imp/lib/Folder.php @@ -241,7 +241,7 @@ class IMP_Folder /* Check permissions. */ if (!IMP::hasPermission('create_folders')) { $old_error = error_reporting(0); - $message = htmlspecialchars(_("You are not allowed to create folders."), ENT_COMPAT, NLS::getCharset()); + $message = htmlspecialchars(_("You are not allowed to create folders."), ENT_COMPAT, Horde_Nls::getCharset()); error_reporting($old_error); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('imp:create_folders'), 'horde', $message); @@ -250,7 +250,7 @@ class IMP_Folder return false; } elseif (!IMP::hasPermission('max_folders')) { $old_error = error_reporting(0); - $message = htmlspecialchars(sprintf(_("You are not allowed to create more than %d folders."), IMP::hasPermission('max_folders', true)), ENT_COMPAT, NLS::getCharset()); + $message = htmlspecialchars(sprintf(_("You are not allowed to create more than %d folders."), IMP::hasPermission('max_folders', true)), ENT_COMPAT, Horde_Nls::getCharset()); error_reporting($old_error); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('imp:max_folders'), 'horde', $message); diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index fffd83b49..ce7dc6ef3 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -137,7 +137,7 @@ class IMP $contact_link = $registry->link('contacts/show', array('uid' => $result, 'source' => $prefs->getValue('add_source'))); $old_error = error_reporting(0); - $escapeName = htmlspecialchars($newName, ENT_COMPAT, NLS::getCharset()); + $escapeName = htmlspecialchars($newName, ENT_COMPAT, Horde_Nls::getCharset()); error_reporting($old_error); return (!empty($contact_link) && !is_a($contact_link, 'PEAR_Error')) @@ -212,7 +212,7 @@ class IMP $val = isset($filter[$mbox['val']]) ? '' : htmlspecialchars($mbox['val']); $sel = ($mbox['val'] && !empty($options['selected']) && ($mbox['val'] === $options['selected'])) ? ' selected="selected"' : ''; $label = empty($options['abbrev']) ? $mbox['label'] : $mbox['abbrev']; - $text .= sprintf('%s', $val, $sel, Horde_Text_Filter::filter($label, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), "\n"); + $text .= sprintf('%s', $val, $sel, Horde_Text_Filter::filter($label, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)), "\n"); } /* Add the list of virtual folders to the list. */ @@ -222,7 +222,7 @@ class IMP $vfolder_sel = $GLOBALS['imp_search']->searchMboxID(); $text .= '' . "\n"; foreach ($vfolders as $id => $val) { - $text .= sprintf('%s', $GLOBALS['imp_search']->createSearchID($id), ($vfolder_sel == $id) ? ' selected="selected"' : '', Horde_Text_Filter::filter($val, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), "\n"); + $text .= sprintf('%s', $GLOBALS['imp_search']->createSearchID($id), ($vfolder_sel == $id) ? ' selected="selected"' : '', Horde_Text_Filter::filter($val, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)), "\n"); } } } @@ -239,7 +239,7 @@ class IMP foreach ($tasklists as $id => $tasklist) { $text .= sprintf('%s', '_tasklist_' . $id, - Horde_Text_Filter::filter($tasklist->get('name'), 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), + Horde_Text_Filter::filter($tasklist->get('name'), 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)), "\n"); } } @@ -257,7 +257,7 @@ class IMP foreach ($notepads as $id => $notepad) { $text .= sprintf('%s', '_notepad_' . $id, - Horde_Text_Filter::filter($notepad->get('name'), 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), + Horde_Text_Filter::filter($notepad->get('name'), 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)), "\n"); } } @@ -452,7 +452,7 @@ class IMP if (stripos($out, $key) === 0) { $len = strlen($key); if ((strlen($out) == $len) || ($out[$len + 1] == $delimiter)) { - $out = substr_replace($out, Horde_String::convertCharset($val, NLS::getCharset(), 'UTF7-IMAP'), 0, $len); + $out = substr_replace($out, Horde_String::convertCharset($val, Horde_Nls::getCharset(), 'UTF7-IMAP'), 0, $len); break; } } @@ -1332,7 +1332,7 @@ class IMP */ static public function escapeJSON($json) { - return '/*-secure-' . rawurlencode(Horde_Serialize::serialize($json, Horde_Serialize::JSON, NLS::getCharset())) . '*/'; + return '/*-secure-' . rawurlencode(Horde_Serialize::serialize($json, Horde_Serialize::JSON, Horde_Nls::getCharset())) . '*/'; } /** diff --git a/imp/lib/Imple/ContactAutoCompleter.php b/imp/lib/Imple/ContactAutoCompleter.php index 1c32fe26a..3960b3c9b 100644 --- a/imp/lib/Imple/ContactAutoCompleter.php +++ b/imp/lib/Imple/ContactAutoCompleter.php @@ -96,7 +96,7 @@ class IMP_Imple_ContactAutoCompleter extends IMP_Imple if (!isset($addrlist)) { $addrlist = IMP_Compose::getAddressList(); } - IMP::addInlineScript('if (!IMP) { var IMP = {}; } IMP.ac_list = '. Horde_Serialize::serialize(array_map('htmlspecialchars', $addrlist), Horde_Serialize::JSON, NLS::getCharset())); + IMP::addInlineScript('if (!IMP) { var IMP = {}; } IMP.ac_list = '. Horde_Serialize::serialize(array_map('htmlspecialchars', $addrlist), Horde_Serialize::JSON, Horde_Nls::getCharset())); self::$_listOutput = true; } $func = 'Autocompleter.Local'; diff --git a/imp/lib/Imple/SpellChecker.php b/imp/lib/Imple/SpellChecker.php index 384fcc720..ba05a51d7 100644 --- a/imp/lib/Imple/SpellChecker.php +++ b/imp/lib/Imple/SpellChecker.php @@ -36,7 +36,7 @@ class IMP_Imple_SpellChecker extends IMP_Imple if (empty($params['states'])) { $params['states'] = '""'; } else { - $params['states'] = Horde_Serialize::serialize($params['states'], Horde_Serialize::JSON, NLS::getCharset()); + $params['states'] = Horde_Serialize::serialize($params['states'], Horde_Serialize::JSON, Horde_Nls::getCharset()); } if (empty($params['locales'])) { $params['locales'] = array(); @@ -45,7 +45,7 @@ class IMP_Imple_SpellChecker extends IMP_Imple } } asort($params['locales'], SORT_LOCALE_STRING); - $params['locales'] = Horde_Serialize::serialize($params['locales'], Horde_Serialize::JSON, NLS::getCharset()); + $params['locales'] = Horde_Serialize::serialize($params['locales'], Horde_Serialize::JSON, Horde_Nls::getCharset()); parent::__construct($params); } diff --git a/imp/lib/LoginTasks/Task/DeleteSentmailMonthly.php b/imp/lib/LoginTasks/Task/DeleteSentmailMonthly.php index c0985ecaa..1374425bb 100644 --- a/imp/lib/LoginTasks/Task/DeleteSentmailMonthly.php +++ b/imp/lib/LoginTasks/Task/DeleteSentmailMonthly.php @@ -45,7 +45,7 @@ class IMP_LoginTasks_Task_DeleteSentmailMonthly extends Horde_LoginTasks_Task foreach (array_keys($old_folders) as $k) { foreach ($sent_mail_folders as $folder) { if (preg_match('/^' . str_replace('/', '\/', $folder) . '-([^-]+)-([0-9]{4})$/i', $k, $regs)) { - $folder_array[$k] = Horde_String::convertCharset((is_numeric($regs[1])) ? mktime(0, 0, 0,$regs[1], 1, $regs[2]) : strtotime("$regs[1] 1, $regs[2]"), NLS::getCharset(), 'UTF7-IMAP'); + $folder_array[$k] = Horde_String::convertCharset((is_numeric($regs[1])) ? mktime(0, 0, 0,$regs[1], 1, $regs[2]) : strtotime("$regs[1] 1, $regs[2]"), Horde_Nls::getCharset(), 'UTF7-IMAP'); } } } diff --git a/imp/lib/LoginTasks/Task/RenameSentmailMonthly.php b/imp/lib/LoginTasks/Task/RenameSentmailMonthly.php index 00cc5b5a0..edefdc30d 100644 --- a/imp/lib/LoginTasks/Task/RenameSentmailMonthly.php +++ b/imp/lib/LoginTasks/Task/RenameSentmailMonthly.php @@ -102,7 +102,7 @@ class IMP_LoginTasks_Task_RenameSentmailMonthly extends Horde_LoginTasks_Task $text = (substr($GLOBALS['language'], 0, 2) == 'en') ? strtolower(strftime('-%b-%Y', $last_maintenance)) : strftime('-%m-%Y', $last_maintenance); - return $folder . Horde_String::convertCharset($text, NLS::getExternalCharset(), 'UTF7-IMAP'); + return $folder . Horde_String::convertCharset($text, Horde_Nls::getExternalCharset(), 'UTF7-IMAP'); } } diff --git a/imp/lib/Message.php b/imp/lib/Message.php index 47f03fa62..f9ae2f8b9 100644 --- a/imp/lib/Message.php +++ b/imp/lib/Message.php @@ -361,7 +361,7 @@ class IMP_Message /* TODO: When Horde_iCalendar supports setting of charsets * we need to set it there instead of relying on the fact * that both Nag and IMP use the same charset. */ - $body = Horde_String::convertCharset($body, $body_part->getCharset(), NLS::getCharset()); + $body = Horde_String::convertCharset($body, $body_part->getCharset(), Horde_Nls::getCharset()); /* Create a new iCalendar. */ $vCal = new Horde_iCalendar(); @@ -515,7 +515,7 @@ class IMP_Message $newPart->setDisposition('attachment'); /* We need to make sure all text is in the correct charset. */ - $newPart->setCharset(NLS::getCharset()); + $newPart->setCharset(Horde_Nls::getCharset()); $newPart->setContents(sprintf(_("[Attachment stripped: Original attachment type: %s, name: %s]"), $oldPart->getType(), $oldPart->getName(true))); $message->alterPart($partid, $newPart); } diff --git a/imp/lib/Mime/Viewer/Alternative.php b/imp/lib/Mime/Viewer/Alternative.php index 94148a2cd..cc34d4f6c 100644 --- a/imp/lib/Mime/Viewer/Alternative.php +++ b/imp/lib/Mime/Viewer/Alternative.php @@ -84,7 +84,7 @@ class IMP_Horde_Mime_Viewer_Alternative extends Horde_Mime_Viewer_Driver 'type' => 'info' ) ), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ); return $ret; } diff --git a/imp/lib/Mime/Viewer/Appledouble.php b/imp/lib/Mime/Viewer/Appledouble.php index 19f1eb24b..06dad0d6b 100644 --- a/imp/lib/Mime/Viewer/Appledouble.php +++ b/imp/lib/Mime/Viewer/Appledouble.php @@ -99,7 +99,7 @@ class IMP_Horde_Mime_Viewer_Appledouble extends Horde_Mime_Viewer_Driver ? array( 'data' => '', 'status' => array($status), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) : null; } diff --git a/imp/lib/Mime/Viewer/Html.php b/imp/lib/Mime/Viewer/Html.php index 62313f0cd..37abc5c0e 100644 --- a/imp/lib/Mime/Viewer/Html.php +++ b/imp/lib/Mime/Viewer/Html.php @@ -93,7 +93,7 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html $this->_mimepart->getMimeId() => array( 'data' => $render['html'], 'status' => $render['status'], - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } @@ -108,7 +108,7 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html protected function _IMPrender($inline) { $data = $this->_mimepart->getContents(); - $charset = NLS::getCharset(); + $charset = Horde_Nls::getCharset(); $msg_charset = $this->_mimepart->getCharset(); if ($inline) { @@ -231,7 +231,7 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html */ protected function _mailtoCallback($m) { - return 'href="' . $GLOBALS['registry']->call('mail/compose', array(Horde_String::convertCharset(html_entity_decode($m[2]), 'ISO-8859-1', NLS::getCharset()))) . '"'; + return 'href="' . $GLOBALS['registry']->call('mail/compose', array(Horde_String::convertCharset(html_entity_decode($m[2]), 'ISO-8859-1', Horde_Nls::getCharset()))) . '"'; } /** diff --git a/imp/lib/Mime/Viewer/Images.php b/imp/lib/Mime/Viewer/Images.php index f330e66d5..9ebe86fb1 100644 --- a/imp/lib/Mime/Viewer/Images.php +++ b/imp/lib/Mime/Viewer/Images.php @@ -91,7 +91,7 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images $this->_mimepart->getMimeId() => array( 'data' => $this->_outputImgTag('data', $this->_mimepart->getName(true)), 'status' => array(), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } else { @@ -121,7 +121,7 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images 'text' => $status ) ), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } @@ -159,7 +159,7 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images 'text' => $status ) ), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } @@ -200,7 +200,7 @@ EOD; $this->_mimepart->getMimeId() => array( 'data' => $str, 'status' => array(), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } @@ -284,7 +284,7 @@ EOD; */ protected function _outputImgTag($type, $alt) { - return '' . htmlspecialchars($alt, ENT_COMPAT, NLS::getCharset()) . ''; + return '' . htmlspecialchars($alt, ENT_COMPAT, Horde_Nls::getCharset()) . ''; } } diff --git a/imp/lib/Mime/Viewer/Itip.php b/imp/lib/Mime/Viewer/Itip.php index 853c02d16..701e5322c 100644 --- a/imp/lib/Mime/Viewer/Itip.php +++ b/imp/lib/Mime/Viewer/Itip.php @@ -60,7 +60,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver { global $registry; - $charset = NLS::getCharset(); + $charset = Horde_Nls::getCharset(); $data = $this->_mimepart->getContents(); $mime_id = $this->_mimepart->getMimeId(); diff --git a/imp/lib/Mime/Viewer/Mdn.php b/imp/lib/Mime/Viewer/Mdn.php index 5755bfbd2..ddd73d1aa 100644 --- a/imp/lib/Mime/Viewer/Mdn.php +++ b/imp/lib/Mime/Viewer/Mdn.php @@ -97,7 +97,7 @@ class IMP_Horde_Mime_Viewer_Mdn extends Horde_Mime_Viewer_Driver $ret[$mdn_id] = array( 'data' => $data, 'status' => $status, - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ); return $ret; diff --git a/imp/lib/Mime/Viewer/Partial.php b/imp/lib/Mime/Viewer/Partial.php index 3a7b236d4..bdd3fb0b5 100644 --- a/imp/lib/Mime/Viewer/Partial.php +++ b/imp/lib/Mime/Viewer/Partial.php @@ -55,7 +55,7 @@ class IMP_Horde_Mime_Viewer_Partial extends Horde_Mime_Viewer_Driver if (count($indices) != $total) { $mime_part = new Horde_Mime_Part(); $mime_part->setType('text/plain'); - $mime_part->setCharset(NLS::getCharset()); + $mime_part->setCharset(Horde_Nls::getCharset()); $mime_part->setContents(sprintf(_("[Cannot display message - found only %s of %s parts of this message in the current mailbox.]"), count($indices), $total)); return array($this->_mimepart->getMimeId() => $mime_part); } diff --git a/imp/lib/Mime/Viewer/Pdf.php b/imp/lib/Mime/Viewer/Pdf.php index 9b2835b27..b0a2080a2 100644 --- a/imp/lib/Mime/Viewer/Pdf.php +++ b/imp/lib/Mime/Viewer/Pdf.php @@ -96,7 +96,7 @@ class IMP_Horde_Mime_Viewer_Pdf extends Horde_Mime_Viewer_Pdf 'text' => $status ) ), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } @@ -137,7 +137,7 @@ class IMP_Horde_Mime_Viewer_Pdf extends Horde_Mime_Viewer_Pdf */ protected function _outputImgTag() { - return '' . htmlspecialchars(_('; + return '' . htmlspecialchars(_('; } } diff --git a/imp/lib/Mime/Viewer/Pgp.php b/imp/lib/Mime/Viewer/Pgp.php index df92b1ca2..fe5fc1f6c 100644 --- a/imp/lib/Mime/Viewer/Pgp.php +++ b/imp/lib/Mime/Viewer/Pgp.php @@ -131,7 +131,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver 'text' => $resymmetric ? self::$_inlinecache[$base_id][$base_id]['status'][0]['text'] : array() ) ), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ), $version_id => null, $data_id => null @@ -293,7 +293,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver $mime_id => array( 'data' => $data, 'status' => array($status), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } @@ -319,7 +319,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver 'text' => array() ) ), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ), $sig_id => null ); diff --git a/imp/lib/Mime/Viewer/Plain.php b/imp/lib/Mime/Viewer/Plain.php index 864300252..0742903ac 100644 --- a/imp/lib/Mime/Viewer/Plain.php +++ b/imp/lib/Mime/Viewer/Plain.php @@ -24,7 +24,7 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain global $conf, $prefs; $mime_id = $this->_mimepart->getMimeId(); - $type = 'text/html; charset=' . NLS::getCharset(); + $type = 'text/html; charset=' . Horde_Nls::getCharset(); // Trim extra whitespace in the text. $text = trim($this->_mimepart->getContents()); @@ -70,7 +70,7 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain $filters = array( 'text2html' => array( 'parselevel' => Horde_Text_Filter_Text2html::MICRO, - 'charset' => NLS::getCharset() + 'charset' => Horde_Nls::getCharset() ), 'tabs2spaces' => array(), ); @@ -270,7 +270,7 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain $text_part = new Horde_Mime_Part(); $text_part->setType('text/plain'); - $text_part->setCharset(NLS::getCharset()); + $text_part->setCharset(Horde_Nls::getCharset()); $text_part->setContents(preg_replace("/begin [0-7]{3} .+\r?\n.+\r?\nend/Us", "\n", $text)); $new_part->addPart($text_part); diff --git a/imp/lib/Mime/Viewer/Smime.php b/imp/lib/Mime/Viewer/Smime.php index 1a642ef09..c18b8bac2 100644 --- a/imp/lib/Mime/Viewer/Smime.php +++ b/imp/lib/Mime/Viewer/Smime.php @@ -118,7 +118,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver 'text' => array(_("This message has been encrypted via S/MIME.")) ) ), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); $status = &self::$_inlinecache[$base_id][$base_id]['status'][0]['text']; @@ -185,7 +185,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver $this->_mimepart->getMimeId() => array( 'data' => $this->_impsmime->certToHTML($sig_result->cert), 'status' => array(), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } @@ -226,7 +226,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver 'text' => array(_("This message has been digitally signed via S/MIME.")) ) ), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ), $sig_id => null ); @@ -309,7 +309,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver if (!empty($subject) && $GLOBALS['registry']->hasMethod('contacts/addField') && $GLOBALS['prefs']->getValue('add_source')) { - $status[] = sprintf(_("The S/MIME certificate of %s: "), @htmlspecialchars($subject, ENT_COMPAT, NLS::getCharset())) . $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("View"), array('params' => array('mode' => IMP_Contents::RENDER_INLINE, 'view_smime_key' => 1))) . '/' . Horde::link('#', '', null, null, $this->_impsmime->savePublicKeyURL($sig_result->cert, $this->_params['contents']->getIndex(), $sig_id) . ' return false;') . _("Save in your Address Book") . ''; + $status[] = sprintf(_("The S/MIME certificate of %s: "), @htmlspecialchars($subject, ENT_COMPAT, Horde_Nls::getCharset())) . $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', _("View"), array('params' => array('mode' => IMP_Contents::RENDER_INLINE, 'view_smime_key' => 1))) . '/' . Horde::link('#', '', null, null, $this->_impsmime->savePublicKeyURL($sig_result->cert, $this->_params['contents']->getIndex(), $sig_id) . ' return false;') . _("Save in your Address Book") . ''; } } diff --git a/imp/lib/Mime/Viewer/Status.php b/imp/lib/Mime/Viewer/Status.php index 2516df4bd..c4fe0a6d3 100644 --- a/imp/lib/Mime/Viewer/Status.php +++ b/imp/lib/Mime/Viewer/Status.php @@ -140,7 +140,7 @@ class IMP_Horde_Mime_Viewer_Status extends Horde_Mime_Viewer_Driver $ret[$this->_mimepart->getMimeId()] = array( 'data' => $data, 'status' => $status, - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ); return $ret; diff --git a/imp/lib/Mime/Viewer/Tnef.php b/imp/lib/Mime/Viewer/Tnef.php index c5348788d..a4bb982ca 100644 --- a/imp/lib/Mime/Viewer/Tnef.php +++ b/imp/lib/Mime/Viewer/Tnef.php @@ -117,7 +117,7 @@ class IMP_Horde_Mime_Viewer_Tnef extends Horde_Mime_Viewer_Tnef $this->_mimepart->getMimeId() => array( 'data' => $text, 'status' => array($status), - 'type' => 'text/html; charset=' . NLS::getCharset() + 'type' => 'text/html; charset=' . Horde_Nls::getCharset() ) ); } diff --git a/imp/lib/Spam.php b/imp/lib/Spam.php index 6bb4edca8..cc6c2e913 100644 --- a/imp/lib/Spam.php +++ b/imp/lib/Spam.php @@ -131,7 +131,7 @@ class IMP_Spam /* Send the message. */ try { - $imp_compose->sendMessage($to, $spam_headers, $mime, NLS::getCharset()); + $imp_compose->sendMessage($to, $spam_headers, $mime, Horde_Nls::getCharset()); $report_flag = true; } catch (IMP_Compose_Exception $e) { Horde::logMessage($e, __FILE__, __LINE__, PEAR_LOG_ERR); diff --git a/imp/lib/UI/Mailbox.php b/imp/lib/UI/Mailbox.php index 76603cb5b..0a3925925 100644 --- a/imp/lib/UI/Mailbox.php +++ b/imp/lib/UI/Mailbox.php @@ -148,7 +148,7 @@ class IMP_UI_Mailbox } if (!isset($this->_cache['localeinfo'])) { - $this->_cache['localeinfo'] = NLS::getLocaleInfo(); + $this->_cache['localeinfo'] = Horde_Nls::getLocaleInfo(); } $size = $size / 1024; @@ -247,7 +247,7 @@ class IMP_UI_Mailbox $new_subject = $subject = IMP::filterText(preg_replace("/\s+/", ' ', $subject)); if ($htmlspaces) { - $new_subject = Horde_Text_Filter::filter($subject, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)); + $new_subject = Horde_Text_Filter::filter($subject, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)); if (empty($new_subject)) { $new_subject = htmlspecialchars($subject); } diff --git a/imp/lib/Views/ListMessages.php b/imp/lib/Views/ListMessages.php index a808a3904..3ededb29a 100644 --- a/imp/lib/Views/ListMessages.php +++ b/imp/lib/Views/ListMessages.php @@ -41,7 +41,7 @@ class IMP_Views_ListMessages $label = IMP::getLabel($mbox); /* Set the current time zone. */ - NLS::setTimeZone(); + Horde_Nls::setTimeZone(); /* Run filters now. */ if (!empty($_SESSION['imp']['filteravail']) && @@ -233,7 +233,7 @@ class IMP_Views_ListMessages /* Get mailbox information. */ $overview = $imp_mailbox->getMailboxArray($msglist, array('headers' => array('list-post', 'x-priority'), 'structure' => $GLOBALS['prefs']->getValue('atc_flag'))); - $charset = NLS::getCharset(); + $charset = Horde_Nls::getCharset(); $imp_ui = new IMP_UI_Mailbox($folder); /* Display message information. */ diff --git a/imp/lib/Views/ShowMessage.php b/imp/lib/Views/ShowMessage.php index 381cac478..2ca98eace 100644 --- a/imp/lib/Views/ShowMessage.php +++ b/imp/lib/Views/ShowMessage.php @@ -101,7 +101,7 @@ class IMP_Views_ShowMessage ); /* Set the current time zone. */ - NLS::setTimeZone(); + Horde_Nls::setTimeZone(); /* Get envelope/header information. We don't use flags in this * view. */ diff --git a/imp/lib/api.php b/imp/lib/api.php index ce8efeae4..ef8f07d5a 100644 --- a/imp/lib/api.php +++ b/imp/lib/api.php @@ -543,10 +543,10 @@ function _imp_adminDo($task, $params) switch ($task) { case 'add': - return $imap->addMailbox(Horde_String::convertCharset($params[0], NLS::getCharset(), 'utf7-imap')); + return $imap->addMailbox(Horde_String::convertCharset($params[0], Horde_Nls::getCharset(), 'utf7-imap')); case 'remove': - return $imap->removeMailbox(Horde_String::convertCharset($params[0], NLS::getCharset(), 'utf7-imap')); + return $imap->removeMailbox(Horde_String::convertCharset($params[0], Horde_Nls::getCharset(), 'utf7-imap')); case 'list': return $imap->listMailboxes(); diff --git a/imp/lib/prefs.php b/imp/lib/prefs.php index 960784898..928e90888 100644 --- a/imp/lib/prefs.php +++ b/imp/lib/prefs.php @@ -18,7 +18,7 @@ function handle_sentmailselect($updated) if ($conf['user']['allow_folders'] && !$prefs->isLocked('sent_mail_folder')) { $sent_mail_folder = Horde_Util::getFormData('sent_mail_folder'); - $sent_mail_new = Horde_String::convertCharset(Horde_Util::getFormData('sent_mail_new'), NLS::getCharset(), 'UTF7-IMAP'); + $sent_mail_new = Horde_String::convertCharset(Horde_Util::getFormData('sent_mail_new'), Horde_Nls::getCharset(), 'UTF7-IMAP'); $sent_mail_default = $prefs->getValue('sent_mail_folder'); if (empty($sent_mail_folder) && !empty($sent_mail_new)) { $sent_mail_folder = IMP::appendNamespace($sent_mail_new); @@ -45,7 +45,7 @@ function handlefolders($updated, $pref, $folder, $new) if ($conf['user']['allow_folders']) { $folder = Horde_Util::getFormData($folder); if (isset($folder) && !$prefs->isLocked($pref)) { - $new = Horde_String::convertCharset(Horde_Util::getFormData($new), NLS::getCharset(), 'UTF7-IMAP'); + $new = Horde_String::convertCharset(Horde_Util::getFormData($new), Horde_Nls::getCharset(), 'UTF7-IMAP'); if ($folder == IMP_PREF_NO_FOLDER) { $prefs->setValue($pref, ''); } else { @@ -256,7 +256,7 @@ case 'flags': Horde::addScriptFile('flagmanagement.js', 'imp', true); IMP::addInlineScript(array( - 'ImpFlagmanagement.new_prompt = ' . Horde_Serialize::serialize(_("Please enter the label for the new flag:"), Horde_Serialize::JSON, NLS::getCharset()) + 'ImpFlagmanagement.new_prompt = ' . Horde_Serialize::serialize(_("Please enter the label for the new flag:"), Horde_Serialize::JSON, Horde_Nls::getCharset()) )); break; } diff --git a/imp/login.php b/imp/login.php index 3df76bf82..eb3852d53 100644 --- a/imp/login.php +++ b/imp/login.php @@ -43,7 +43,7 @@ if (!empty($_SESSION['imp']) && is_array($_SESSION['imp'])) { Horde::logMessage($_SERVER['REMOTE_ADDR'] . ' ' . Horde_Auth::getLogoutReasonString(), __FILE__, __LINE__, PEAR_LOG_NOTICE); } - $language = (isset($prefs)) ? $prefs->getValue('language') : NLS::select(); + $language = (isset($prefs)) ? $prefs->getValue('language') : Horde_Nls::select(); unset($_SESSION['imp']); @@ -59,7 +59,7 @@ if (!empty($_SESSION['imp']) && is_array($_SESSION['imp'])) { @session_start(); } - NLS::setLang($language); + Horde_Nls::setLang($language); /* Hook to preselect the correct language in the widget. */ $_GET['new_lang'] = $language; @@ -172,7 +172,7 @@ if ($show_list) { $lang_url = null; $choose_language = ($imp_auth && !$prefs->isLocked('language')); if ($choose_language) { - $_SESSION['horde_language'] = NLS::select(); + $_SESSION['horde_language'] = Horde_Nls::select(); $langs = array(); foreach ($nls['languages'] as $key => $val) { $langs[] = array( @@ -330,7 +330,7 @@ Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('login.js', 'imp', true); require IMP_TEMPLATES . '/common-header.inc'; -$charset = NLS::getCharset(); +$charset = Horde_Nls::getCharset(); $login_params = $autologin ? array('autologin' => $autologin, 'server_key' => '') : array('server_key' => ''); diff --git a/imp/mailbox-mimp.php b/imp/mailbox-mimp.php index 9beafc161..da836afcd 100644 --- a/imp/mailbox-mimp.php +++ b/imp/mailbox-mimp.php @@ -25,7 +25,7 @@ require_once dirname(__FILE__) . '/lib/base.php'; $readonly = $imp_imap->isReadOnly($imp_mbox['mailbox']); /* Set the current time zone. */ -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); /* Run through the action handlers */ $actionID = Horde_Util::getFormData('a'); diff --git a/imp/mailbox.php b/imp/mailbox.php index 092163f6a..5fd7d8653 100644 --- a/imp/mailbox.php +++ b/imp/mailbox.php @@ -76,7 +76,7 @@ if (!is_array(($indices = Horde_Util::getFormData('indices')))) { } /* Set the current time zone. */ -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); $do_filter = false; $open_compose_window = null; @@ -813,7 +813,7 @@ while (list(,$ob) = each($mbox_info['overview'])) { } /* Format the From: Header. */ - $getfrom = $imp_ui->getFrom($ob['envelope'], array('fullfrom' => true, 'specialchars' => NLS::getCharset())); + $getfrom = $imp_ui->getFrom($ob['envelope'], array('fullfrom' => true, 'specialchars' => Horde_Nls::getCharset())); $msg['from'] = $getfrom['from']; $msg['fullfrom'] = $getfrom['fullfrom']; switch ($fromlinkstyle) { diff --git a/imp/message-mimp.php b/imp/message-mimp.php index d8f47fc6c..e7f2c3530 100644 --- a/imp/message-mimp.php +++ b/imp/message-mimp.php @@ -34,7 +34,7 @@ $imp_message = IMP_Message::singleton(); $readonly = $imp_imap->isReadOnly($imp_mbox['mailbox']); /* Set the current time zone. */ -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); /* Run through action handlers */ $actionID = Horde_Util::getFormData('a'); diff --git a/imp/message.php b/imp/message.php index e15bddde8..b71c3a698 100644 --- a/imp/message.php +++ b/imp/message.php @@ -47,7 +47,7 @@ if (!$imp_mailbox->isValidIndex(false)) { $imp_message = IMP_Message::singleton(); /* Set the current time zone. */ -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); /* Initialize the user's identities. */ require_once 'Horde/Identity.php'; @@ -262,14 +262,14 @@ if (!IMP::$printMode) { $origin_host = array($origin_host); } foreach ($origin_host as $host) { - $from_img .= NLS::generateFlagImageByHost($host) . ' '; + $from_img .= Horde_Nls::generateFlagImageByHost($host) . ' '; } trim($from_img); } if (empty($from_img) && !empty($envelope['from'])) { $from_ob = reset($envelope['from']); - $from_img = NLS::generateFlagImageByHost($from_ob['host']); + $from_img = Horde_Nls::generateFlagImageByHost($from_ob['host']); } if (!empty($from_img)) { diff --git a/imp/pgp.php b/imp/pgp.php index 97c979ff4..9b93c1805 100644 --- a/imp/pgp.php +++ b/imp/pgp.php @@ -57,7 +57,7 @@ function _getImportKey() function _textWindowOutput($filename, $msg) { - $GLOBALS['browser']->downloadHeaders($filename, 'text/plain; charset=' . NLS::getCharset(), true, strlen($msg)); + $GLOBALS['browser']->downloadHeaders($filename, 'text/plain; charset=' . Horde_Nls::getCharset(), true, strlen($msg)); echo $msg; } diff --git a/imp/rss.php b/imp/rss.php index 23085c60d..d619ae7fd 100644 --- a/imp/rss.php +++ b/imp/rss.php @@ -82,7 +82,7 @@ $description = ($total_num == 0) : sprintf(_("%u of %u messages in %s unread."), $unseen_num, $total_num, IMP::getLabel($mailbox)); $t = new IMP_Template(); -$t->set('charset', NLS::getCharset()); +$t->set('charset', Horde_Nls::getCharset()); $t->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl'); $t->set('pubDate', htmlspecialchars(date('r'))); $t->set('desc', htmlspecialchars($description)); diff --git a/imp/search.php b/imp/search.php index 7caa1f54b..08ba910ae 100644 --- a/imp/search.php +++ b/imp/search.php @@ -32,7 +32,7 @@ $search_mailbox = Horde_Util::getFormData('search_mailbox'); $imp_search_fields = $imp_search->searchFields(); -$charset = NLS::getCharset(); +$charset = Horde_Nls::getCharset(); /* Get URL parameter data. */ $search = array(); diff --git a/imp/smime.php b/imp/smime.php index 3d9d7b641..f1239d2a3 100644 --- a/imp/smime.php +++ b/imp/smime.php @@ -62,7 +62,7 @@ function _reloadWindow() function _textWindowOutput($filename, $msg, $html = false) { - $type = ($html ? 'text/html' : 'text/plain') . '; charset=' . NLS::getCharset(); + $type = ($html ? 'text/html' : 'text/plain') . '; charset=' . Horde_Nls::getCharset(); $GLOBALS['browser']->downloadHeaders($filename, $type, true, strlen($msg)); echo $msg; } diff --git a/imp/stationery.php b/imp/stationery.php index ad708b62b..efd354266 100644 --- a/imp/stationery.php +++ b/imp/stationery.php @@ -85,7 +85,7 @@ case 'update': } if ($updated) { - $prefs->setValue('stationery', serialize(Horde_String::convertCharset($stationery_list, NLS::getCharset(), $prefs->getCharset())), false); + $prefs->setValue('stationery', serialize(Horde_String::convertCharset($stationery_list, Horde_Nls::getCharset(), $prefs->getCharset())), false); $notification->push($updated, 'horde.success'); } @@ -130,7 +130,7 @@ $t->set('html', $stationery['t'] == 'html'); $t->set('content_label', Horde::label('content', _("Stationery:"))); $t->set('content', $stationery['c']); $t->set('button_href', Horde_Util::addParameter($compose_url, 'group', 'compose')); -$t->set('button_val', htmlspecialchars(_("Return to Message Composition"), ENT_COMPAT, NLS::getCharset())); +$t->set('button_val', htmlspecialchars(_("Return to Message Composition"), ENT_COMPAT, Horde_Nls::getCharset())); echo $t->fetch(IMP_TEMPLATES . '/stationery/stationery.html'); if (!$chunk) { diff --git a/imp/templates/common-header.inc b/imp/templates/common-header.inc index 3eab01bdf..968594f17 100644 --- a/imp/templates/common-header.inc +++ b/imp/templates/common-header.inc @@ -1,6 +1,6 @@ diff --git a/imp/templates/javascript_defs.php b/imp/templates/javascript_defs.php index 7123bc536..810b31db1 100644 --- a/imp/templates/javascript_defs.php +++ b/imp/templates/javascript_defs.php @@ -73,4 +73,4 @@ $code = array( ) ); -echo IMP::wrapInlineScript(array('var IMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, NLS::getCharset()) . ';')); +echo IMP::wrapInlineScript(array('var IMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, Horde_Nls::getCharset()) . ';')); diff --git a/imp/templates/javascript_defs_dimp.php b/imp/templates/javascript_defs_dimp.php index 995c45180..8f249ad78 100644 --- a/imp/templates/javascript_defs_dimp.php +++ b/imp/templates/javascript_defs_dimp.php @@ -157,4 +157,4 @@ if ($compose_mode) { ); } -echo IMP::wrapInlineScript(array('var DIMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, NLS::getCharset()))); +echo IMP::wrapInlineScript(array('var DIMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, Horde_Nls::getCharset()))); diff --git a/imp/thread.php b/imp/thread.php index 1e2fc67e6..d58e8131d 100644 --- a/imp/thread.php +++ b/imp/thread.php @@ -42,7 +42,7 @@ if ($error) { } /* Set the current time zone. */ -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); /* Run through action handlers. */ $actionID = Horde_Util::getFormData('actionID'); @@ -75,7 +75,7 @@ if ($mode == 'thread') { $loop_array = IMP::parseIndicesList($msglist); } -$charset = NLS::getCharset(); +$charset = Horde_Nls::getCharset(); $imp_ui = new IMP_UI_Message(); foreach ($loop_array as $mbox => $idxlist) { diff --git a/imp/view.php b/imp/view.php index 0f1f8af7b..4b593da06 100644 --- a/imp/view.php +++ b/imp/view.php @@ -33,7 +33,7 @@ function _sanitizeName($name) { - $name = Horde_String::convertCharset($name, NLS::getCharset(), 'UTF-8'); + $name = Horde_String::convertCharset($name, Horde_Nls::getCharset(), 'UTF-8'); return Horde_String::convertCharset(trim(preg_replace('/[^\pL\pN-+_. ]/u', '_', $name), ' _'), 'UTF-8'); } diff --git a/ingo/filters.php b/ingo/filters.php index bb89d4f20..284a56b6c 100644 --- a/ingo/filters.php +++ b/ingo/filters.php @@ -61,7 +61,7 @@ case 'rule_enable': case 'rule_copy': if (!Ingo::hasPermission('allow_rules')) { - $message = @htmlspecialchars(_("You are not allowed to create or edit custom rules."), ENT_COMPAT, NLS::getCharset()); + $message = @htmlspecialchars(_("You are not allowed to create or edit custom rules."), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('ingo:allow_rules'), 'horde', $message); } @@ -69,7 +69,7 @@ case 'rule_enable': break 2; } elseif (Ingo::hasPermission('max_rules') !== true && Ingo::hasPermission('max_rules') <= count($filters->getFilterList())) { - $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d rules."), Ingo::hasPermission('max_rules')), ENT_COMPAT, NLS::getCharset()); + $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d rules."), Ingo::hasPermission('max_rules')), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('ingo:max_rules'), 'horde', $message); } @@ -213,7 +213,7 @@ if (count($filter_list) == 0) { /* Create description. */ if (!$edit_allowed) { - $entry['descriplink'] = @htmlspecialchars($name, ENT_COMPAT, NLS::getCharset()); + $entry['descriplink'] = @htmlspecialchars($name, ENT_COMPAT, Horde_Nls::getCharset()); } elseif (!empty($filter['conditions'])) { $descrip = ''; $condition_size = count($filter['conditions']) - 1; @@ -242,9 +242,9 @@ if (count($filter_list) == 0) { $descrip .= "\n[stop]"; } - $entry['descriplink'] = Horde::linkTooltip($editurl, sprintf(_("Edit %s"), $name), null, null, null, $descrip) . @htmlspecialchars($name, ENT_COMPAT, NLS::getCharset()) . ''; + $entry['descriplink'] = Horde::linkTooltip($editurl, sprintf(_("Edit %s"), $name), null, null, null, $descrip) . @htmlspecialchars($name, ENT_COMPAT, Horde_Nls::getCharset()) . ''; } else { - $entry['descriplink'] = Horde::link($editurl, sprintf(_("Edit %s"), $name)) . @htmlspecialchars($name, ENT_COMPAT, NLS::getCharset()) . ''; + $entry['descriplink'] = Horde::link($editurl, sprintf(_("Edit %s"), $name)) . @htmlspecialchars($name, ENT_COMPAT, Horde_Nls::getCharset()) . ''; } /* Create edit link. */ diff --git a/ingo/lib/Ingo.php b/ingo/lib/Ingo.php index 335f8050f..00bc3b0f2 100644 --- a/ingo/lib/Ingo.php +++ b/ingo/lib/Ingo.php @@ -73,7 +73,7 @@ class Ingo $label = $mbox['abbrev']; $text .= sprintf('%s%s', $disabled, $val, $sel, - Horde_Text_Filter::filter($label, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), "\n"); + Horde_Text_Filter::filter($label, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)), "\n"); } $text .= ''; @@ -95,7 +95,7 @@ class Ingo static public function createFolder($folder) { return $GLOBALS['registry']->hasMethod('mail/createFolder') - ? $GLOBALS['registry']->call('mail/createFolder', array('folder' => Horde_String::convertCharset($folder, NLS::getCharset(), 'UTF7-IMAP'))) + ? $GLOBALS['registry']->call('mail/createFolder', array('folder' => Horde_String::convertCharset($folder, Horde_Nls::getCharset(), 'UTF7-IMAP'))) : false; } diff --git a/ingo/lib/Script/imap.php b/ingo/lib/Script/imap.php index 145d29353..aff92dedf 100644 --- a/ingo/lib/Script/imap.php +++ b/ingo/lib/Script/imap.php @@ -277,15 +277,15 @@ class Ingo_Script_imap extends Ingo_Script foreach ($overview as $msg) { $GLOBALS['notification']->push( sprintf(_("Filter activity: The message \"%s\" from \"%s\" has been moved to the folder \"%s\"."), - !empty($msg['envelope']['subject']) ? Horde_Mime::decode($msg['envelope']['subject'], NLS::getCharset()) : _("[No Subject]"), - !empty($msg['envelope']['from']) ? Horde_Mime::decode(Horde_Mime_Address::addrArray2String($msg['envelope']['from']), NLS::getCharset()) : _("[No Sender]"), - Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())), + !empty($msg['envelope']['subject']) ? Horde_Mime::decode($msg['envelope']['subject'], Horde_Nls::getCharset()) : _("[No Subject]"), + !empty($msg['envelope']['from']) ? Horde_Mime::decode(Horde_Mime_Address::addrArray2String($msg['envelope']['from']), Horde_Nls::getCharset()) : _("[No Sender]"), + Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', Horde_Nls::getCharset())), 'horde.message'); } } else { $GLOBALS['notification']->push(sprintf(_("Filter activity: %s message(s) have been moved to the folder \"%s\"."), count($indices), - Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())), 'horde.message'); + Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', Horde_Nls::getCharset())), 'horde.message'); } } elseif ($rule['action'] == Ingo_Storage::ACTION_DISCARD) { /* We need to grab the overview first. */ @@ -301,8 +301,8 @@ class Ingo_Script_imap extends Ingo_Script foreach ($overview as $msg) { $GLOBALS['notification']->push( sprintf(_("Filter activity: The message \"%s\" from \"%s\" has been deleted."), - !empty($msg['envelope']['subject']) ? Horde_Mime::decode($msg['envelope']['subject'], NLS::getCharset()) : _("[No Subject]"), - !empty($msg['envelope']['from']) ? Horde_Mime::decode($msg['envelope']['from'], NLS::getCharset()) : _("[No Sender]")), + !empty($msg['envelope']['subject']) ? Horde_Mime::decode($msg['envelope']['subject'], Horde_Nls::getCharset()) : _("[No Subject]"), + !empty($msg['envelope']['from']) ? Horde_Mime::decode($msg['envelope']['from'], Horde_Nls::getCharset()) : _("[No Sender]")), 'horde.message'); } } else { @@ -319,13 +319,13 @@ class Ingo_Script_imap extends Ingo_Script foreach ($overview as $msg) { $GLOBALS['notification']->push( sprintf(_("Filter activity: The message \"%s\" from \"%s\" has been copied to the folder \"%s\"."), - !empty($msg['envelope']['subject']) ? Horde_Mime::decode($msg['envelope']['subject'], NLS::getCharset()) : _("[No Subject]"), - !empty($msg['envelope']['from']) ? Horde_Mime::decode($msg['envelope']['from'], NLS::getCharset()) : _("[No Sender]"), - Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())), + !empty($msg['envelope']['subject']) ? Horde_Mime::decode($msg['envelope']['subject'], Horde_Nls::getCharset()) : _("[No Subject]"), + !empty($msg['envelope']['from']) ? Horde_Mime::decode($msg['envelope']['from'], Horde_Nls::getCharset()) : _("[No Sender]"), + Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', Horde_Nls::getCharset())), 'horde.message'); } } else { - $GLOBALS['notification']->push(sprintf(_("Filter activity: %s message(s) have been copied to the folder \"%s\"."), count($indices), Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())), 'horde.message'); + $GLOBALS['notification']->push(sprintf(_("Filter activity: %s message(s) have been copied to the folder \"%s\"."), count($indices), Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', Horde_Nls::getCharset())), 'horde.message'); } } } diff --git a/ingo/lib/Script/maildrop.php b/ingo/lib/Script/maildrop.php index 6df006a94..2c3b4483b 100644 --- a/ingo/lib/Script/maildrop.php +++ b/ingo/lib/Script/maildrop.php @@ -481,7 +481,7 @@ class Maildrop_Recipe { } // Writing vacation.msg file - $reason = Horde_Mime::encode($params['action-value']['reason'], NLS::getCharset()); + $reason = Horde_Mime::encode($params['action-value']['reason'], Horde_Nls::getCharset()); $driver = Ingo::getDriver(); $driver->_connect(); $result = $driver->_vfs->writeData($driver->_params['vfs_path'], 'vacation.msg', $reason, true); @@ -515,7 +515,7 @@ class Maildrop_Recipe { $this->_action[] = ' ($current_time <= ' . $end . ')) '; $this->_action[] = ' {'; } - $this->_action[] = " cc \"| mailbot -D " . $params['action-value']['days'] . " -c '" . NLS::getCharset() . "' -t \$HOME/vacation.msg -d \$HOME/vacation -A 'From: $from' -s '" . Horde_Mime::encode($params['action-value']['subject'], NLS::getCharset()) . "' /usr/sbin/sendmail -t \""; + $this->_action[] = " cc \"| mailbot -D " . $params['action-value']['days'] . " -c '" . Horde_Nls::getCharset() . "' -t \$HOME/vacation.msg -d \$HOME/vacation -A 'From: $from' -s '" . Horde_Mime::encode($params['action-value']['subject'], Horde_Nls::getCharset()) . "' /usr/sbin/sendmail -t \""; if (($start != 0) && ($end !== 0)) { $this->_action[] = ' }'; $this->_action[] = ' }'; diff --git a/ingo/lib/Script/procmail.php b/ingo/lib/Script/procmail.php index 5a980de07..494cfd260 100644 --- a/ingo/lib/Script/procmail.php +++ b/ingo/lib/Script/procmail.php @@ -507,12 +507,12 @@ class Procmail_Recipe { $this->_action[] = ' -a"From: <' . $address . '>" \\'; $this->_action[] = ' -A"X-Loop: ' . $address . '" \\'; if (Horde_Mime::is8bit($params['action-value']['reason'])) { - $this->_action[] = ' -i"Subject: ' . Horde_Mime::encode($params['action-value']['subject'] . ' (Re: $SUBJECT)', NLS::getCharset()) . '" \\'; + $this->_action[] = ' -i"Subject: ' . Horde_Mime::encode($params['action-value']['subject'] . ' (Re: $SUBJECT)', Horde_Nls::getCharset()) . '" \\'; $this->_action[] = ' -i"Content-Transfer-Encoding: quoted-printable" \\'; - $this->_action[] = ' -i"Content-Type: text/plain; charset=' . NLS::getCharset() . '" ; \\'; + $this->_action[] = ' -i"Content-Type: text/plain; charset=' . Horde_Nls::getCharset() . '" ; \\'; $reason = Horde_Mime::quotedPrintableEncode($params['action-value']['reason'], "\n"); } else { - $this->_action[] = ' -i"Subject: ' . Horde_Mime::encode($params['action-value']['subject'] . ' (Re: $SUBJECT)', NLS::getCharset()) . '" ; \\'; + $this->_action[] = ' -i"Subject: ' . Horde_Mime::encode($params['action-value']['subject'] . ' (Re: $SUBJECT)', Horde_Nls::getCharset()) . '" ; \\'; $reason = $params['action-value']['reason']; } $reason = addcslashes($reason, "\\\n\r\t\"`"); diff --git a/ingo/lib/Script/sieve.php b/ingo/lib/Script/sieve.php index b2bb75208..75395424d 100644 --- a/ingo/lib/Script/sieve.php +++ b/ingo/lib/Script/sieve.php @@ -121,7 +121,7 @@ class Ingo_Script_sieve extends Ingo_Script { . _("Generated by Ingo (http://www.horde.org/ingo/)") . ' (' . trim(strftime($date_format . ', ' . $time_format)) . ")\n\n"; - $code = Horde_String::convertCharset($code, NLS::getCharset(), 'UTF-8'); + $code = Horde_String::convertCharset($code, Horde_Nls::getCharset(), 'UTF-8'); $requires = $this->requires(); if (count($requires) > 1) { @@ -356,7 +356,7 @@ class Ingo_Script_sieve extends Ingo_Script { } $vals = array( - 'subject' => Horde_String::convertCharset($vacation->getVacationSubject(), NLS::getCharset(), 'UTF-8'), + 'subject' => Horde_String::convertCharset($vacation->getVacationSubject(), Horde_Nls::getCharset(), 'UTF-8'), 'days' => $vacation->getVacationDays(), 'addresses' => $vacation_addr, 'start' => $vacation->getVacationStart(), @@ -367,7 +367,7 @@ class Ingo_Script_sieve extends Ingo_Script { 'end_year' => $vacation->getVacationEndYear(), 'end_month' => $vacation->getVacationEndMonth(), 'end_day' => $vacation->getVacationEndDay(), - 'reason' => Horde_String::convertCharset($vacation->getVacationReason(), NLS::getCharset(), 'UTF-8'), + 'reason' => Horde_String::convertCharset($vacation->getVacationReason(), Horde_Nls::getCharset(), 'UTF-8'), ); $action = $tests = array(); @@ -2219,7 +2219,7 @@ class Sieve_Comment { $code .= (empty($code) ? '' : "\n") . '# ' . $line; } } - return Horde_String::convertCharset($code, NLS::getCharset(), 'UTF-8'); + return Horde_String::convertCharset($code, Horde_Nls::getCharset(), 'UTF-8'); } /** diff --git a/ingo/lib/Storage/prefs.php b/ingo/lib/Storage/prefs.php index 23fe70d2d..3c61bce8b 100644 --- a/ingo/lib/Storage/prefs.php +++ b/ingo/lib/Storage/prefs.php @@ -63,7 +63,7 @@ class Ingo_Storage_prefs extends Ingo_Storage /* Convert rules from the old format. */ $data = @unserialize($prefs->getValue('rules')); } else { - $data = Horde_String::convertCharset($data, $prefs->getCharset(), NLS::getCharset()); + $data = Horde_String::convertCharset($data, $prefs->getCharset(), Horde_Nls::getCharset()); } if ($data) { $ob->setFilterlist($data); @@ -86,7 +86,7 @@ class Ingo_Storage_prefs extends Ingo_Storage /* Convert vacation from the old format. */ $data = unserialize($prefs->getValue('vacation')); } elseif (is_array($data)) { - $data = $prefs->convertFromDriver($data, NLS::getCharset()); + $data = $prefs->convertFromDriver($data, Horde_Nls::getCharset()); } if ($data) { $ob->setVacationAddresses($data['addresses'], false); @@ -144,7 +144,7 @@ class Ingo_Storage_prefs extends Ingo_Storage return $prefs->setValue('blacklist', serialize($data)); case self::ACTION_FILTERS: - return $prefs->setValue('rules', serialize(Horde_String::convertCharset($ob->getFilterList(), NLS::getCharset(), $prefs->getCharset())), false); + return $prefs->setValue('rules', serialize(Horde_String::convertCharset($ob->getFilterList(), Horde_Nls::getCharset(), $prefs->getCharset())), false); case self::ACTION_FORWARD: $data = array( @@ -164,7 +164,7 @@ class Ingo_Storage_prefs extends Ingo_Storage 'start' => $ob->getVacationStart(), 'end' => $ob->getVacationEnd(), ); - return $prefs->setValue('vacation', serialize($prefs->convertToDriver($data, NLS::getCharset())), false); + return $prefs->setValue('vacation', serialize($prefs->convertToDriver($data, Horde_Nls::getCharset())), false); case self::ACTION_WHITELIST: return $prefs->setValue('whitelist', serialize($ob->getWhitelist())); diff --git a/ingo/lib/Storage/sql.php b/ingo/lib/Storage/sql.php index 740b9f80f..ceb515713 100644 --- a/ingo/lib/Storage/sql.php +++ b/ingo/lib/Storage/sql.php @@ -343,10 +343,10 @@ class Ingo_Storage_sql extends Ingo_Storage $values = array( implode("\n", $ob->getVacationAddresses()), Horde_String::convertCharset($ob->getVacationSubject(), - NLS::getCharset(), + Horde_Nls::getCharset(), $this->_params['charset']), Horde_String::convertCharset($ob->getVacationReason(), - NLS::getCharset(), + Horde_Nls::getCharset(), $this->_params['charset']), (int)$ob->getVacationDays(), (int)$ob->getVacationStart(), @@ -516,11 +516,11 @@ class Ingo_Storage_filters_sql extends Ingo_Storage_filters { */ protected function _ruleToBackend($rule) { - return array(Horde_String::convertCharset($rule['name'], NLS::getCharset(), $this->_params['charset']), + return array(Horde_String::convertCharset($rule['name'], Horde_Nls::getCharset(), $this->_params['charset']), (int)$rule['action'], - isset($rule['action-value']) ? Horde_String::convertCharset($rule['action-value'], NLS::getCharset(), $this->_params['charset']) : null, + isset($rule['action-value']) ? Horde_String::convertCharset($rule['action-value'], Horde_Nls::getCharset(), $this->_params['charset']) : null, isset($rule['flags']) ? (int)$rule['flags'] : null, - isset($rule['conditions']) ? serialize(Horde_String::convertCharset($rule['conditions'], NLS::getCharset(), $this->_params['charset'])) : null, + isset($rule['conditions']) ? serialize(Horde_String::convertCharset($rule['conditions'], Horde_Nls::getCharset(), $this->_params['charset'])) : null, isset($rule['combine']) ? (int)$rule['combine'] : null, isset($rule['stop']) ? (int)$rule['stop'] : null, isset($rule['disable']) ? (int)(!$rule['disable']) : 1); diff --git a/ingo/rule.php b/ingo/rule.php index fb27a4676..423e51ce4 100644 --- a/ingo/rule.php +++ b/ingo/rule.php @@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/lib/base.php'; /* Check rule permissions. */ if (!Ingo::hasPermission('allow_rules')) { - $message = @htmlspecialchars(_("You are not allowed to create or edit custom rules."), ENT_COMPAT, NLS::getCharset()); + $message = @htmlspecialchars(_("You are not allowed to create or edit custom rules."), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('ingo:allow_rules'), 'horde', $message); } @@ -166,7 +166,7 @@ default: if (is_null($edit_number)) { if (Ingo::hasPermission('max_rules') !== true && Ingo::hasPermission('max_rules') <= count($filters->getFilterList())) { - $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d rules."), Ingo::hasPermission('max_rules')), ENT_COMPAT, NLS::getCharset()); + $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d rules."), Ingo::hasPermission('max_rules')), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('ingo:max_rules'), 'horde', $message); } diff --git a/ingo/templates/common-header.inc b/ingo/templates/common-header.inc index 6e5d52054..3b67ad6a9 100644 --- a/ingo/templates/common-header.inc +++ b/ingo/templates/common-header.inc @@ -1,6 +1,6 @@ get('name'); diff --git a/ingo/templates/rule/header.inc b/ingo/templates/rule/header.inc index 73a2f37b0..bac9a58c8 100644 --- a/ingo/templates/rule/header.inc +++ b/ingo/templates/rule/header.inc @@ -30,7 +30,7 @@ function delete_condition(num) getValue('week_start_monday'), $c = $i + 7; $i < $c; $i++): ?> - + diff --git a/kronolith/templates/index/month.inc b/kronolith/templates/index/month.inc index d68e27530..53cf28a79 100644 --- a/kronolith/templates/index/month.inc +++ b/kronolith/templates/index/month.inc @@ -11,7 +11,7 @@ getValue('week_start_monday'), $i = $w, $c = $i + 7; $i < $c; $i++): ?> - +
- +   diff --git a/jeta/templates/common-header.inc b/jeta/templates/common-header.inc index c4bdaa148..a9870df3b 100644 --- a/jeta/templates/common-header.inc +++ b/jeta/templates/common-header.inc @@ -1,6 +1,6 @@ diff --git a/kastalia/templates/common-header.inc b/kastalia/templates/common-header.inc index 42411868b..bfcf5a024 100755 --- a/kastalia/templates/common-header.inc +++ b/kastalia/templates/common-header.inc @@ -1,6 +1,6 @@ diff --git a/koward/lib/Koward.php b/koward/lib/Koward.php index dfe6abefc..ba4195d13 100644 --- a/koward/lib/Koward.php +++ b/koward/lib/Koward.php @@ -53,7 +53,6 @@ class Koward { global $registry, $notification, $browser; /* Horde core classes that aren't autoloaded. */ - include_once 'Horde/NLS.php'; include_once 'Horde/Perms.php'; $registry = Horde_Registry::singleton(); diff --git a/koward/lib/Koward/View/shared/_header.html.php b/koward/lib/Koward/View/shared/_header.html.php index dc72ba84e..3d742b164 100644 --- a/koward/lib/Koward/View/shared/_header.html.php +++ b/koward/lib/Koward/View/shared/_header.html.php @@ -1,6 +1,6 @@ diff --git a/kronolith/data.php b/kronolith/data.php index 05ca83c05..b2300daa7 100644 --- a/kronolith/data.php +++ b/kronolith/data.php @@ -35,7 +35,7 @@ $templates = array( ); if (Kronolith::hasPermission('max_events') !== true && Kronolith::hasPermission('max_events') <= Kronolith::countEvents()) { - $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), Kronolith::hasPermission('max_events')), ENT_COMPAT, NLS::getCharset()); + $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), Kronolith::hasPermission('max_events')), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('kronolith:max_events'), 'horde', $message); } @@ -168,7 +168,7 @@ case 'export': } } - $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset(implode(', ', $calNames), NLS::getCharset(), 'utf-8')); + $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset(implode(', ', $calNames), Horde_Nls::getCharset(), 'utf-8')); $data = $iCal->exportvCalendar(); $browser->downloadHeaders(_("events.ics"), 'text/calendar', false, strlen($data)); echo $data; @@ -241,7 +241,7 @@ if (is_array($next_step)) { foreach ($next_step as $row) { if ($max_events !== true && $num_events >= $max_events) { - $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), Kronolith::hasPermission('max_events')), ENT_COMPAT, NLS::getCharset()); + $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), Kronolith::hasPermission('max_events')), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('kronolith:max_events'), 'horde', $message); } diff --git a/kronolith/edit.php b/kronolith/edit.php index e2b4b13eb..28c6ab85b 100644 --- a/kronolith/edit.php +++ b/kronolith/edit.php @@ -25,7 +25,7 @@ function _check_max() { if (Kronolith::hasPermission('max_events') !== true && Kronolith::hasPermission('max_events') <= Kronolith::countEvents()) { - $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), Kronolith::hasPermission('max_events')), ENT_COMPAT, NLS::getCharset()); + $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), Kronolith::hasPermission('max_events')), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($GLOBALS['conf']['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('kronolith:max_events'), 'horde', $message); } diff --git a/kronolith/fb.php b/kronolith/fb.php index 7b2e85f40..6e51be4d6 100644 --- a/kronolith/fb.php +++ b/kronolith/fb.php @@ -14,7 +14,7 @@ $session_control = 'none'; require_once dirname(__FILE__) . '/lib/base.php'; // We want to always generate UTF-8 iCalendar data. -NLS::setCharset('UTF-8'); +Horde_Nls::setCharset('UTF-8'); // Determine the username to show free/busy time for. $cal = Horde_Util::getFormData('c'); @@ -34,7 +34,7 @@ if (!$fb) { if ($user) { $prefs = &Prefs::singleton($conf['prefs']['driver'], 'kronolith', $user, '', null, false); $prefs->retrieve(); - NLS::setTimeZone(); + Horde_Nls::setTimeZone(); $cal = @unserialize($prefs->getValue('fb_cals')); if (is_array($cal)) { $cal = implode('|', $cal); @@ -60,7 +60,7 @@ if (!$fb) { } $browser->downloadHeaders(($user ? $user : $cal) . '.vfb', - 'text/calendar; charset=' . NLS::getCharset(), + 'text/calendar; charset=' . Horde_Nls::getCharset(), true, strlen($fb)); echo $fb; diff --git a/kronolith/feed/index.php b/kronolith/feed/index.php index dec9f52a3..1031276a7 100644 --- a/kronolith/feed/index.php +++ b/kronolith/feed/index.php @@ -96,17 +96,17 @@ $history = &Horde_History::singleton(); $now = new Horde_Date(time()); $template = new Horde_Template(); -$template->set('charset', NLS::getCharset()); +$template->set('charset', Horde_Nls::getCharset()); $template->set('updated', $now->format(DATE_ATOM)); $template->set('kronolith_name', 'Kronolith'); $template->set('kronolith_version', KRONOLITH_VERSION); $template->set('kronolith_uri', 'http://www.horde.org/kronolith/'); $template->set('kronolith_icon', Horde::url($registry->getImageDir() . '/kronolith.png', true, -1)); $template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl'); -$template->set('calendar_name', @htmlspecialchars($share->get('name'), ENT_COMPAT, NLS::getCharset())); -$template->set('calendar_desc', @htmlspecialchars($share->get('desc'), ENT_COMPAT, NLS::getCharset()), true); -$template->set('calendar_owner', @htmlspecialchars($identity->getValue('fullname'), ENT_COMPAT, NLS::getCharset())); -$template->set('calendar_email', @htmlspecialchars($identity->getValue('from_addr'), ENT_COMPAT, NLS::getCharset()), true); +$template->set('calendar_name', @htmlspecialchars($share->get('name'), ENT_COMPAT, Horde_Nls::getCharset())); +$template->set('calendar_desc', @htmlspecialchars($share->get('desc'), ENT_COMPAT, Horde_Nls::getCharset()), true); +$template->set('calendar_owner', @htmlspecialchars($identity->getValue('fullname'), ENT_COMPAT, Horde_Nls::getCharset())); +$template->set('calendar_email', @htmlspecialchars($identity->getValue('from_addr'), ENT_COMPAT, Horde_Nls::getCharset()), true); $template->set('self_url', $self_url); $twentyFour = $prefs->getValue('twentyFor'); @@ -122,7 +122,7 @@ foreach ($events as $day_events) { } $modified = new Horde_Date($modified); /* Description. */ - $desc = @htmlspecialchars($event->getDescription(), ENT_COMPAT, NLS::getCharset()); + $desc = @htmlspecialchars($event->getDescription(), ENT_COMPAT, Horde_Nls::getCharset()); if (strlen($desc)) { $desc .= '

'; } @@ -139,15 +139,15 @@ foreach ($events as $day_events) { $attendees[] = empty($status['name']) ? $attendee : Horde_Mime_Address::trimAddress($status['name'] . (strpos($attendee, '@') === false ? '' : ' <' . $attendee . '>')); } if (count($attendees)) { - $desc .= '
' . _("Who:") . ' ' . @htmlspecialchars(implode(', ', $attendees), ENT_COMPAT, NLS::getCharset()); + $desc .= '
' . _("Who:") . ' ' . @htmlspecialchars(implode(', ', $attendees), ENT_COMPAT, Horde_Nls::getCharset()); } if (strlen($event->getLocation())) { - $desc .= '
' . _("Where:") . ' ' . @htmlspecialchars($event->getLocation(), ENT_COMPAT, NLS::getCharset()); + $desc .= '
' . _("Where:") . ' ' . @htmlspecialchars($event->getLocation(), ENT_COMPAT, Horde_Nls::getCharset()); } $desc .= '
' . _("Event Status:") . ' ' . Kronolith::statusToString($event->getStatus()); - $entries[$id]['title'] = @htmlspecialchars($event->getTitle(), ENT_COMPAT, NLS::getCharset()); - $entries[$id]['desc'] = @htmlspecialchars($desc, ENT_COMPAT, NLS::getCharset()); + $entries[$id]['title'] = @htmlspecialchars($event->getTitle(), ENT_COMPAT, Horde_Nls::getCharset()); + $entries[$id]['desc'] = @htmlspecialchars($desc, ENT_COMPAT, Horde_Nls::getCharset()); $entries[$id]['url'] = htmlspecialchars(Horde::url($event->getViewUrl(), true, -1)); $entries[$id]['modified'] = $modified->format(DATE_ATOM); } diff --git a/kronolith/imple.php b/kronolith/imple.php index 99c438aa8..42e680e60 100644 --- a/kronolith/imple.php +++ b/kronolith/imple.php @@ -47,7 +47,7 @@ if (!empty($_SERVER['Content-Type'])) { switch ($ct) { case 'json': header('Content-Type: application/json'); - echo Horde_Serialize::serialize($result, Horde_Serialize::JSON, NLS::getCharset()); + echo Horde_Serialize::serialize($result, Horde_Serialize::JSON, Horde_Nls::getCharset()); break; case 'plain': diff --git a/kronolith/lib/Driver/Sql.php b/kronolith/lib/Driver/Sql.php index aa92bb4b5..fb0c1d7ee 100644 --- a/kronolith/lib/Driver/Sql.php +++ b/kronolith/lib/Driver/Sql.php @@ -877,7 +877,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver */ public function convertToDriver($value) { - return Horde_String::convertCharset($value, NLS::getCharset(), $this->_params['charset']); + return Horde_String::convertCharset($value, Horde_Nls::getCharset(), $this->_params['charset']); } /** diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index eca5654ed..06d002c3a 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -379,17 +379,17 @@ abstract class Kronolith_Event $vEvent->setAttribute('LAST-MODIFIED', $modified); } - $vEvent->setAttribute('SUMMARY', $v1 ? $this->getTitle() : Horde_String::convertCharset($this->getTitle(), NLS::getCharset(), 'utf-8')); + $vEvent->setAttribute('SUMMARY', $v1 ? $this->getTitle() : Horde_String::convertCharset($this->getTitle(), Horde_Nls::getCharset(), 'utf-8')); $name = Kronolith::getUserName($this->getCreatorId()); if (!$v1) { - $name = Horde_String::convertCharset($name, NLS::getCharset(), 'utf-8'); + $name = Horde_String::convertCharset($name, Horde_Nls::getCharset(), 'utf-8'); } $vEvent->setAttribute('ORGANIZER', 'mailto:' . Kronolith::getUserEmail($this->getCreatorId()), array('CN' => $name)); if (!$this->isPrivate() || $this->getCreatorId() == Horde_Auth::getAuth()) { if (!empty($this->description)) { - $vEvent->setAttribute('DESCRIPTION', $v1 ? $this->description : Horde_String::convertCharset($this->description, NLS::getCharset(), 'utf-8')); + $vEvent->setAttribute('DESCRIPTION', $v1 ? $this->description : Horde_String::convertCharset($this->description, Horde_Nls::getCharset(), 'utf-8')); } // Tags @@ -398,12 +398,12 @@ abstract class Kronolith_Event $tags = implode(', ', $tags); } if (!empty($tags)) { - $vEvent->setAttribute('CATEGORIES', $v1 ? $tags : Horde_String::convertCharset($tags, NLS::getCharset(), 'utf-8')); + $vEvent->setAttribute('CATEGORIES', $v1 ? $tags : Horde_String::convertCharset($tags, Horde_Nls::getCharset(), 'utf-8')); } // Location if (!empty($this->location)) { - $vEvent->setAttribute('LOCATION', $v1 ? $this->location : Horde_String::convertCharset($this->location, NLS::getCharset(), 'utf-8')); + $vEvent->setAttribute('LOCATION', $v1 ? $this->location : Horde_String::convertCharset($this->location, Horde_Nls::getCharset(), 'utf-8')); } } $vEvent->setAttribute('CLASS', $this->isPrivate() ? 'PRIVATE' : 'PUBLIC'); @@ -513,7 +513,7 @@ abstract class Kronolith_Event } } else { if (!empty($status['name'])) { - $params['CN'] = Horde_String::convertCharset($status['name'], NLS::getCharset(), 'utf-8'); + $params['CN'] = Horde_String::convertCharset($status['name'], Horde_Nls::getCharset(), 'utf-8'); } if (!empty($email)) { $email = 'mailto:' . $email; @@ -1583,7 +1583,7 @@ abstract class Kronolith_Event // strptime() is locale dependent, i.e. %p is not always matching // AM/PM. Set the locale to C to workaround this, but grab the // locale's D_FMT before that. - $date_format = NLS::getLangInfo(D_FMT); + $date_format = Horde_Nls::getLangInfo(D_FMT); $old_locale = setlocale(LC_TIME, 0); setlocale(LC_TIME, 'C'); @@ -2142,7 +2142,7 @@ abstract class Kronolith_Event array('style' => $this->getCSSColors(false))); } - $link .= @htmlspecialchars($event_title, ENT_QUOTES, NLS::getCharset()); + $link .= @htmlspecialchars($event_title, ENT_QUOTES, Horde_Nls::getCharset()); if ($this->hasPermission(PERMS_READ) && (isset($this->eventID) || diff --git a/kronolith/lib/Imple/TagAutoCompleter.php b/kronolith/lib/Imple/TagAutoCompleter.php index c967699b3..e10bfd5ef 100644 --- a/kronolith/lib/Imple/TagAutoCompleter.php +++ b/kronolith/lib/Imple/TagAutoCompleter.php @@ -81,7 +81,7 @@ class Kronolith_Imple_TagAutoCompleter extends Kronolith_Imple $js_vars['existing'] = $this->_params['existing']; } - $script = array('new PrettyAutocompleter(' . Horde_Serialize::serialize($js_vars, Horde_Serialize::JSON, NLS::getCharset()) . ')'); + $script = array('new PrettyAutocompleter(' . Horde_Serialize::serialize($js_vars, Horde_Serialize::JSON, Horde_Nls::getCharset()) . ')'); } else { $script = array('new Ajax.Autocompleter(' . implode(',', $params) . ')'); } diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 28203dfec..49af4c881 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -102,7 +102,7 @@ class Kronolith header('X-UA-Compatible: IE=7'); if (isset($GLOBALS['language'])) { - header('Content-type: text/html; charset=' . NLS::getCharset()); + header('Content-type: text/html; charset=' . Horde_Nls::getCharset()); header('Vary: Accept-Language'); } @@ -153,7 +153,7 @@ class Kronolith 'week_start' => (int)$prefs->getValue('week_start_monday'), 'date_format' => str_replace(array('%e', '%d', '%a', '%A', '%m', '%h', '%b', '%B', '%y', '%Y'), array('d', 'dd', 'ddd', 'dddd', 'MM', 'MMM', 'MMM', 'MMMM', 'yy', 'yyyy'), - NLS::getLangInfo(D_FMT)), + Horde_Nls::getLangInfo(D_FMT)), 'time_format' => $prefs->getValue('twentyFour') ? 'HH:mm' : 'hh:mm tt', 'status' => array('tentative' => self::STATUS_TENTATIVE, 'confirmed' => self::STATUS_CONFIRMED, @@ -210,10 +210,10 @@ class Kronolith 'allday' => _("All day"), ); for ($i = 1; $i <= 12; ++$i) { - $code['text']['month'][$i - 1] = NLS::getLangInfo(constant('MON_' . $i)); + $code['text']['month'][$i - 1] = Horde_Nls::getLangInfo(constant('MON_' . $i)); } for ($i = 1; $i <= 7; ++$i) { - $code['text']['weekday'][$i] = NLS::getLangInfo(constant('DAY_' . $i)); + $code['text']['weekday'][$i] = Horde_Nls::getLangInfo(constant('DAY_' . $i)); } foreach (array(Horde_Date_Recurrence::RECUR_DAILY, Horde_Date_Recurrence::RECUR_WEEKLY, @@ -225,7 +225,7 @@ class Kronolith $code['text']['recur'][$recurType] = self::recurToString($recurType); } - return array('var Kronolith = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, NLS::getCharset()) . ';'); + return array('var Kronolith = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, Horde_Nls::getCharset()) . ';'); } /** @@ -1628,7 +1628,7 @@ class Kronolith /* Build the iCalendar data */ $iCal = new Horde_iCalendar(); $iCal->setAttribute('METHOD', $method); - $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8')); + $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), Horde_Nls::getCharset(), 'utf-8')); $vevent = $event->toiCalendar($iCal); if ($action == self::ITIP_CANCEL && !empty($instance)) { $vevent->setAttribute('RECURRENCE-ID', $instance, array('VALUE' => 'DATE')); @@ -1641,10 +1641,10 @@ class Kronolith $ics->setContents($iCal->exportvCalendar()); $ics->setName($filename); $ics->setContentTypeParameter('METHOD', $method); - $ics->setCharset(NLS::getCharset()); + $ics->setCharset(Horde_Nls::getCharset()); $recipient = empty($status['name']) ? $email : Horde_Mime_Address::trimAddress($status['name'] . ' <' . $email . '>'); - $mail = new Horde_Mime_Mail($subject, $message, $recipient, $from, NLS::getCharset()); + $mail = new Horde_Mime_Mail($subject, $message, $recipient, $from, Horde_Nls::getCharset()); require_once KRONOLITH_BASE . '/lib/version.php'; try { $mail->addHeader('User-Agent', 'Kronolith ' . KRONOLITH_VERSION); @@ -1752,7 +1752,7 @@ class Kronolith } foreach ($addresses as $lang => $twentyFour) { - NLS::setLang($lang); + Horde_Nls::setLang($lang); switch ($action) { case 'add': @@ -1785,8 +1785,8 @@ class Kronolith null, implode(',', $df_recipients), $from, - NLS::getCharset()); - $mime_mail->setBody($message, NLS::getCharset(), true); + Horde_Nls::getCharset()); + $mime_mail->setBody($message, Horde_Nls::getCharset(), true); Horde::logMessage(sprintf('Sending event notifications for %s to %s', $event->title, implode(', ', $df_recipients)), __FILE__, __LINE__, PEAR_LOG_DEBUG); try { $mime_mail->send($mail_driver, $mail_params, false, false); diff --git a/kronolith/lib/Views/ExportEvent.php b/kronolith/lib/Views/ExportEvent.php index ff2c97f65..85857da45 100644 --- a/kronolith/lib/Views/ExportEvent.php +++ b/kronolith/lib/Views/ExportEvent.php @@ -21,7 +21,7 @@ class Kronolith_View_ExportEvent { if (!is_a($share, 'PEAR_Error')) { $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), - NLS::getCharset(), + Horde_Nls::getCharset(), 'utf-8')); } } @@ -32,7 +32,7 @@ class Kronolith_View_ExportEvent { $GLOBALS['browser']->downloadHeaders( $event->getTitle() . '.ics', - 'text/calendar; charset=' . NLS::getCharset(), + 'text/calendar; charset=' . Horde_Nls::getCharset(), true, strlen($content)); echo $content; exit; diff --git a/kronolith/lib/api.php b/kronolith/lib/api.php index 87bd09739..e8f6fd219 100644 --- a/kronolith/lib/api.php +++ b/kronolith/lib/api.php @@ -915,7 +915,7 @@ function _kronolith_export($uid, $contentType) $share = &$kronolith_shares->getShare($event->getCalendar()); $iCal = new Horde_iCalendar($version); - $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8')); + $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), Horde_Nls::getCharset(), 'utf-8')); // Create a new vEvent. $vEvent = &$event->toiCalendar($iCal); @@ -965,7 +965,7 @@ function _kronolith_exportCalendar($calendar, $contentType) $share = &$kronolith_shares->getShare($calendar); $iCal = new Horde_iCalendar($version); - $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8')); + $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), Horde_Nls::getCharset(), 'utf-8')); foreach ($events as $dayevents) { foreach ($dayevents as $event) { @@ -1359,7 +1359,7 @@ function _kronolith_listAlarms($time, $user = null) if (($reminder == 'owner' && $alarm_user == $owner) || ($reminder == 'show' && in_array($calendar, $shown_calendars)) || $reminder == 'read') { - NLS::setLanguageEnvironment($prefs->getValue('language')); + Horde_Nls::setLanguageEnvironment($prefs->getValue('language')); $alarm = $event->toAlarm($time, $alarm_user, $prefs); if ($alarm) { $alarm_list[] = $alarm; diff --git a/kronolith/lib/base.php b/kronolith/lib/base.php index 54530bcc9..64d096949 100644 --- a/kronolith/lib/base.php +++ b/kronolith/lib/base.php @@ -49,7 +49,7 @@ require_once KRONOLITH_BASE . '/lib/Driver.php'; Horde::compressOutput(); /* Set the timezone variable, if available. */ -NLS::setTimeZone(); +Horde_Nls::setTimeZone(); /* Create a share instance. */ $GLOBALS['kronolith_shares'] = &Horde_Share::singleton($registry->getApp()); diff --git a/kronolith/new.php b/kronolith/new.php index f5815a322..996467ad2 100644 --- a/kronolith/new.php +++ b/kronolith/new.php @@ -13,7 +13,7 @@ require dirname(__FILE__) . '/lib/base.php'; /* Check permissions. */ if (Kronolith::hasPermission('max_events') !== true && Kronolith::hasPermission('max_events') <= Kronolith::countEvents()) { - $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), Kronolith::hasPermission('max_events')), ENT_COMPAT, NLS::getCharset()); + $message = @htmlspecialchars(sprintf(_("You are not allowed to create more than %d events."), Kronolith::hasPermission('max_events')), ENT_COMPAT, Horde_Nls::getCharset()); if (!empty($conf['hooks']['permsdenied'])) { $message = Horde::callHook('_perms_hook_denied', array('kronolith:max_events'), 'horde', $message); } diff --git a/kronolith/scripts/agenda.php b/kronolith/scripts/agenda.php index 052a099a2..30908163c 100755 --- a/kronolith/scripts/agenda.php +++ b/kronolith/scripts/agenda.php @@ -143,12 +143,12 @@ function send_agendas() $lang = $prefs->getValue('language'); $twentyFour = $prefs->getValue('twentyFour'); $dateFormat = $prefs->getValue('date_format'); - NLS::setLanguageEnvironment($lang); + Horde_Nls::setLanguageEnvironment($lang); $mime_mail = new Horde_Mime_Mail(sprintf(_("Your daily agenda for %s"), strftime($dateFormat, $runtime)), null, $email, $GLOBALS['conf']['reminder']['from_addr'], - NLS::getCharset()); + Horde_Nls::getCharset()); $mail_driver = $GLOBALS['conf']['mailer']['type']; $mail_params = $GLOBALS['conf']['mailer']['params']; @@ -172,7 +172,7 @@ function send_agendas() $message .= $event->title . "\n"; } - $mime_mail->setBody($message, NLS::getCharset(), true); + $mime_mail->setBody($message, Horde_Nls::getCharset(), true); try { $mime_mail->addRecipients($email); } catch (Horde_Mime_Exception $e) {} diff --git a/kronolith/templates/common-header.inc b/kronolith/templates/common-header.inc index 41fe3d6a2..b03b78ba6 100644 --- a/kronolith/templates/common-header.inc +++ b/kronolith/templates/common-header.inc @@ -6,7 +6,7 @@ Horde::addScriptFile('views.js', 'kronolith', true); Horde::addScriptFile('stripe.js', 'horde', true); if (isset($language)) { - header('Content-type: text/html; charset=' . NLS::getCharset()); + header('Content-type: text/html; charset=' . Horde_Nls::getCharset()); header('Vary: Accept-Language'); } ?> diff --git a/kronolith/templates/index/index.inc b/kronolith/templates/index/index.inc index 90132b7da..5aa2087e7 100644 --- a/kronolith/templates/index/index.inc +++ b/kronolith/templates/index/index.inc @@ -87,7 +87,7 @@
 
diff --git a/kronolith/templates/index/year.inc b/kronolith/templates/index/year.inc index e70b85bca..e7e920460 100644 --- a/kronolith/templates/index/year.inc +++ b/kronolith/templates/index/year.inc @@ -31,7 +31,7 @@   getValue('week_start_monday'), $c = $i + 7; $i < $c; $i++): ?> - + diff --git a/kronolith/templates/javascript_defs.php b/kronolith/templates/javascript_defs.php index 5d2b012f2..e0515d0f7 100644 --- a/kronolith/templates/javascript_defs.php +++ b/kronolith/templates/javascript_defs.php @@ -4,7 +4,7 @@ */ require_once 'Horde/Serialize.php'; -$charset = NLS::getCharset(); +$charset = Horde_Nls::getCharset(); /* Variables used in core javascript files. */ $var = array( diff --git a/kronolith/templates/view/view.inc b/kronolith/templates/view/view.inc index e97680f56..5f3c104ea 100644 --- a/kronolith/templates/view/view.inc +++ b/kronolith/templates/view/view.inc @@ -18,7 +18,7 @@    - + @@ -66,14 +66,14 @@ if ($this->event->isInitialized() && $this->event->alarm > 0):    - strftime($dateFormat) . ' ' . $created->format($timeFormat) . ' ' . @htmlspecialchars($createdby, ENT_COMPAT, NLS::getCharset()) ?> + strftime($dateFormat) . ' ' . $created->format($timeFormat) . ' ' . @htmlspecialchars($createdby, ENT_COMPAT, Horde_Nls::getCharset()) ?>    - strftime($dateFormat) . ' ' . $modified->format($timeFormat) . ' ' . @htmlspecialchars($modifiedby, ENT_COMPAT, NLS::getCharset()) ?> + strftime($dateFormat) . ' ' . $modified->format($timeFormat) . ' ' . @htmlspecialchars($modifiedby, ENT_COMPAT, Horde_Nls::getCharset()) ?> diff --git a/news/lib/Block/category.php b/news/lib/Block/category.php index fdb5cf165..5925fb2f2 100755 --- a/news/lib/Block/category.php +++ b/news/lib/Block/category.php @@ -48,7 +48,7 @@ class Horde_Block_News_category extends Horde_Block { 'ORDER BY n.publish DESC ' . 'LIMIT 0, ' . $this->_params['limit']; - $params = array(News::CONFIRMED, $this->_params['category'], $this->_params['category'], NLS::select()); + $params = array(News::CONFIRMED, $this->_params['category'], $this->_params['category'], Horde_Nls::select()); $rows = $GLOBALS['news']->db->getAll($query, $params, DB_FETCHMODE_ASSOC); if ($rows instanceof PEAR_Error) { return $rows->getDebugInfo(); diff --git a/news/lib/Block/last.php b/news/lib/Block/last.php index fe60abe48..e731e5fe2 100755 --- a/news/lib/Block/last.php +++ b/news/lib/Block/last.php @@ -33,7 +33,7 @@ class Horde_Block_News_last extends Horde_Block { { require_once dirname(__FILE__) . '/../base.php'; - $params = array(News::CONFIRMED, NLS::select()); + $params = array(News::CONFIRMED, Horde_Nls::select()); $query = 'SELECT n.id, n.publish, n.comments, n.picture, n.category1, nl.title, nl.abbreviation ' . 'FROM ' . $GLOBALS['news']->prefix . ' AS n, ' . $GLOBALS['news']->prefix . '_body AS nl WHERE ' . 'n.status = ? AND n.publish <= NOW() ' . diff --git a/news/lib/Block/last_blogs.php b/news/lib/Block/last_blogs.php index 1998e4350..31c57d04d 100755 --- a/news/lib/Block/last_blogs.php +++ b/news/lib/Block/last_blogs.php @@ -35,7 +35,7 @@ class Horde_Block_News_last_blogs extends Horde_Block { 'ORDER BY n.publish DESC ' . 'LIMIT 0, ' . $this->_params['limit']; - $params = array(News::CONFIRMED, 0, NLS::select()); + $params = array(News::CONFIRMED, 0, Horde_Nls::select()); $rows = $GLOBALS['news']->db->getAll($query, $params, DB_FETCHMODE_ASSOC); if ($rows instanceof PEAR_Error) { return $rows->getDebugInfo(); diff --git a/news/lib/Block/most_commented.php b/news/lib/Block/most_commented.php index 5f4fdb2df..cc5fca9a7 100755 --- a/news/lib/Block/most_commented.php +++ b/news/lib/Block/most_commented.php @@ -39,7 +39,7 @@ class Horde_Block_News_most_commented extends Horde_Block { 'LIMIT 0, ' . $this->_params['limit']; $younger = $_SERVER['REQUEST_TIME'] - $this->_params['days'] * 86400; - $params = array(News::CONFIRMED, date('Y-m-d', $younger), NLS::select()); + $params = array(News::CONFIRMED, date('Y-m-d', $younger), Horde_Nls::select()); $rows = $GLOBALS['news']->db->getAll($query, $params, DB_FETCHMODE_ASSOC); if ($rows instanceof PEAR_Error) { return $rows->getDebugInfo(); diff --git a/news/lib/Block/most_read.php b/news/lib/Block/most_read.php index 38f3ea65c..2f2201cb5 100755 --- a/news/lib/Block/most_read.php +++ b/news/lib/Block/most_read.php @@ -39,7 +39,7 @@ class Horde_Block_News_most_read extends Horde_Block { 'LIMIT 0, ' . $this->_params['limit']; $younger = $_SERVER['REQUEST_TIME'] - $this->_params['days'] * 86400; - $params = array(News::CONFIRMED, date('Y-m-d', $younger), NLS::select()); + $params = array(News::CONFIRMED, date('Y-m-d', $younger), Horde_Nls::select()); $rows = $GLOBALS['news']->db->getAll($query, $params, DB_FETCHMODE_ASSOC); if ($rows instanceof PEAR_Error) { return $rows->getDebugInfo(); diff --git a/news/lib/Driver/sql.php b/news/lib/Driver/sql.php index 7c33450cc..3c6dea737 100644 --- a/news/lib/Driver/sql.php +++ b/news/lib/Driver/sql.php @@ -448,7 +448,7 @@ class News_Driver_sql extends News_Driver { $sql = 'FROM ' . $GLOBALS['news']->prefix . ' AS n, ' . $GLOBALS['news']->prefix . '_body AS l ' . ' WHERE n.id = l.id AND l.lang = ?'; - $params = array('_lang' => NLS::select()); + $params = array('_lang' => Horde_Nls::select()); if ($perms == PERMS_READ) { $sql .= ' AND n.publish <= ? '; @@ -587,7 +587,7 @@ class News_Driver_sql extends News_Driver { . $this->prefix . ' AS n WHERE l.lang = ? AND n.id = l.id AND n.status = ? ORDER BY n.publish DESC LIMIT 0, ' . ($minimize ? '100' : '500'); - $result = $this->db->query($sql, array(NLS::select(), News::CONFIRMED)); + $result = $this->db->query($sql, array(Horde_Nls::select(), News::CONFIRMED)); if ($result instanceof PEAR_Error) { return $result; } diff --git a/news/lib/News.php b/news/lib/News.php index 33f53e30a..6f601998f 100644 --- a/news/lib/News.php +++ b/news/lib/News.php @@ -32,7 +32,7 @@ class News { static $lang; if ($lang === null) { - $lang = NLS::Select(); + $lang = Horde_Nls::Select(); if (!empty($conf['attributes']['languages']) && !in_array($lang, $conf['attributes']['languages'])) { $lang = $conf['attributes']['languages'][0]; diff --git a/news/lib/View.php b/news/lib/View.php index 301272fc1..a193aae9a 100644 --- a/news/lib/View.php +++ b/news/lib/View.php @@ -21,7 +21,7 @@ class News_View extends Horde_View { { /* Set parents defualt data */ parent::__construct(array('templatePath' => NEWS_TEMPLATES, - 'encoding' => NLS::select())); + 'encoding' => Horde_Nls::select())); } /** diff --git a/news/mail.php b/news/mail.php index 132e77272..8703862b2 100644 --- a/news/mail.php +++ b/news/mail.php @@ -53,7 +53,7 @@ $body = sprintf(_("%s would you like to invite you to read the news\n Title: %s\ $row['publish'], News::getUrlFor('news', $id, true, -1)); -$mail = new Horde_Mime_Mail($row['title'], $body, $to, $from, NLS::getCharset()); +$mail = new Horde_Mime_Mail($row['title'], $body, $to, $from, Horde_Nls::getCharset()); $result = $mail->send($conf['mailer']['type'], $conf['mailer']['params']); if ($result instanceof PEAR_Error) { $notification->push($result); diff --git a/news/pdf.php b/news/pdf.php index 431e41702..b5951d692 100644 --- a/news/pdf.php +++ b/news/pdf.php @@ -55,7 +55,7 @@ $pdf->newLine(4); $pdf->write(12, _("On") . ': ' . News::dateFormat($row['publish']) . "\n"); $pdf->write(12, _("Link") . ': ' . News::getUrlFor('news', $id, true) . "\n\n", News::getUrlFor('news', $id, true)); -$pdf->multiCell(0, 12, Horde_String::convertCharset(strip_tags($row['content']), NLS::getCharset(), 'UTF-8')); +$pdf->multiCell(0, 12, Horde_String::convertCharset(strip_tags($row['content']), Horde_Nls::getCharset(), 'UTF-8')); $browser->downloadHeaders($id . '.pdf', 'application/pdf'); echo $pdf->getOutput(); diff --git a/news/rss/comments.php b/news/rss/comments.php index 685439f13..47c1da14f 100644 --- a/news/rss/comments.php +++ b/news/rss/comments.php @@ -21,11 +21,11 @@ if (!$rss) { $list = News::getLastComments(50); $title = _("Last comments"); - $rss = ' + $rss = ' ' . htmlspecialchars($title) . ' - ' . str_replace('_', '-', strtolower(NLS::select())) . ' + ' . str_replace('_', '-', strtolower(Horde_Nls::select())) . ' ' . date('r') . ' ' . htmlspecialchars($title) . ' ' . Horde::applicationUrl('index.php', true, -1) . ' @@ -49,5 +49,5 @@ if (!$rss) { $cache->set($cache_key, $rss); } -header('Content-type: text/xml; charset=' . NLS::getCharset()); +header('Content-type: text/xml; charset=' . Horde_Nls::getCharset()); echo $rss; diff --git a/news/rss/index.php b/news/rss/index.php index e5b010c54..a775ddbb2 100644 --- a/news/rss/index.php +++ b/news/rss/index.php @@ -23,11 +23,11 @@ if (!$rss) { $title = $registry->get('name', 'horde'); $read_url = Horde::applicationUrl('read.php', true, -1); - $rss = ' + $rss = ' ' . htmlspecialchars($title) . ' - ' . str_replace('_', '-', strtolower(NLS::select())) . ' + ' . str_replace('_', '-', strtolower(Horde_Nls::select())) . ' ' . date('r') . ' ' . htmlspecialchars($title) . ' ' . Horde::applicationUrl('index.php', true, -1) . ' diff --git a/news/rss/news.php b/news/rss/news.php index c7ce06631..5b98cb340 100755 --- a/news/rss/news.php +++ b/news/rss/news.php @@ -25,7 +25,7 @@ if (empty($rss)) { 'nl.title, nl.abbreviation ' . 'FROM ' . $news->prefix . ' AS n, ' . $news->prefix . '_body AS nl ' . 'WHERE n.status="' . News::CONFIRMED . '" AND n.publish<=NOW() ' . - 'AND nl.lang="' . NLS::select() . '" AND n.id=nl.id ORDER BY publish DESC'; + 'AND nl.lang="' . Horde_Nls::select() . '" AND n.id=nl.id ORDER BY publish DESC'; $rssbody = ''; $query = $news->db->modifyLimitQuery($query, 0, 10); $list = $news->db->getAssoc($query, true, array(), DB_FETCHMODE_ASSOC); @@ -54,14 +54,14 @@ if (empty($rss)) { } // Wee need the last published news time - $rssheader = ' + $rssheader = ' ' . htmlspecialchars($title) . ' - ' . str_replace('_', '-', strtolower(NLS::select())) . ' + ' . str_replace('_', '-', strtolower(Horde_Nls::select())) . ' ' . date('r', $lastnewstime) . ' ' . htmlspecialchars($title) . ' ' . Horde::applicationUrl('index.php', true, -1) . ' diff --git a/news/templates/common-header.inc b/news/templates/common-header.inc index badaa786c..6eb64594d 100644 --- a/news/templates/common-header.inc +++ b/news/templates/common-header.inc @@ -1,6 +1,6 @@ diff --git a/skoli/templates/common-header.inc b/skoli/templates/common-header.inc index fe08839f2..85c2cb599 100644 --- a/skoli/templates/common-header.inc +++ b/skoli/templates/common-header.inc @@ -1,6 +1,6 @@