NLS:: -> Horde_Nls::
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 9 Jul 2009 08:02:22 +0000 (02:02 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 9 Jul 2009 08:02:22 +0000 (02:02 -0600)
132 files changed:
babel/lib/Display.php
babel/templates/common-header.inc
chora/annotate.php
chora/browsedir.php
chora/cvsgraph.php
chora/diff.php
chora/history.php
chora/lib/Chora.php
chora/stats.php
chora/templates/common-header.inc
crumb/templates/common-header.inc
drag_n_drop_portal/block.php
drag_n_drop_portal/lib/Block/Layout/View/js.php
fima/data.php
fima/lib/Driver/sql.php
fima/lib/base.php
fima/templates/common-header.inc
folks/config/hooks.php.dist
folks/lib/Folks.php
folks/lib/Notification/mail.php
folks/scripts/mail-filter.php
folks/scripts/mail.php
folks/templates/common-header.inc
folks/templates/feed/activities.php
folks/templates/feed/feed.php
framework/Model/lib/Horde/Form.php
framework/Model/lib/Horde/Form/Renderer/Xhtml.php
framework/Model/lib/Horde/Form/Type/Number.php
framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php
imp/ajax.php
imp/attachment.php
imp/compose-dimp.php
imp/compose-mimp.php
imp/compose.php
imp/contacts.php
imp/fetchmailprefs.php
imp/folders.php
imp/lib/Block/Newmail.php
imp/lib/Compose.php
imp/lib/Contents.php
imp/lib/DIMP.php
imp/lib/Folder.php
imp/lib/IMP.php
imp/lib/Imple/ContactAutoCompleter.php
imp/lib/Imple/SpellChecker.php
imp/lib/LoginTasks/Task/DeleteSentmailMonthly.php
imp/lib/LoginTasks/Task/RenameSentmailMonthly.php
imp/lib/Message.php
imp/lib/Mime/Viewer/Alternative.php
imp/lib/Mime/Viewer/Appledouble.php
imp/lib/Mime/Viewer/Html.php
imp/lib/Mime/Viewer/Images.php
imp/lib/Mime/Viewer/Itip.php
imp/lib/Mime/Viewer/Mdn.php
imp/lib/Mime/Viewer/Partial.php
imp/lib/Mime/Viewer/Pdf.php
imp/lib/Mime/Viewer/Pgp.php
imp/lib/Mime/Viewer/Plain.php
imp/lib/Mime/Viewer/Smime.php
imp/lib/Mime/Viewer/Status.php
imp/lib/Mime/Viewer/Tnef.php
imp/lib/Spam.php
imp/lib/UI/Mailbox.php
imp/lib/Views/ListMessages.php
imp/lib/Views/ShowMessage.php
imp/lib/api.php
imp/lib/prefs.php
imp/login.php
imp/mailbox-mimp.php
imp/mailbox.php
imp/message-mimp.php
imp/message.php
imp/pgp.php
imp/rss.php
imp/search.php
imp/smime.php
imp/stationery.php
imp/templates/common-header.inc
imp/templates/javascript_defs.php
imp/templates/javascript_defs_dimp.php
imp/thread.php
imp/view.php
ingo/filters.php
ingo/lib/Ingo.php
ingo/lib/Script/imap.php
ingo/lib/Script/maildrop.php
ingo/lib/Script/procmail.php
ingo/lib/Script/sieve.php
ingo/lib/Storage/prefs.php
ingo/lib/Storage/sql.php
ingo/rule.php
ingo/templates/common-header.inc
ingo/templates/rule/header.inc
jeta/templates/common-header.inc
kastalia/templates/common-header.inc
koward/lib/Koward.php
koward/lib/Koward/View/shared/_header.html.php
kronolith/data.php
kronolith/edit.php
kronolith/fb.php
kronolith/feed/index.php
kronolith/imple.php
kronolith/lib/Driver/Sql.php
kronolith/lib/Event.php
kronolith/lib/Imple/TagAutoCompleter.php
kronolith/lib/Kronolith.php
kronolith/lib/Views/ExportEvent.php
kronolith/lib/api.php
kronolith/lib/base.php
kronolith/new.php
kronolith/scripts/agenda.php
kronolith/templates/common-header.inc
kronolith/templates/index/index.inc
kronolith/templates/index/month.inc
kronolith/templates/index/year.inc
kronolith/templates/javascript_defs.php
kronolith/templates/view/view.inc
news/lib/Block/category.php
news/lib/Block/last.php
news/lib/Block/last_blogs.php
news/lib/Block/most_commented.php
news/lib/Block/most_read.php
news/lib/Driver/sql.php
news/lib/News.php
news/lib/View.php
news/mail.php
news/pdf.php
news/rss/comments.php
news/rss/index.php
news/rss/news.php
news/templates/common-header.inc
skoli/templates/common-header.inc

index 4380af2..8d3827d 100644 (file)
@@ -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('/&lt;/', '/&gt;/');
        $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('&lt;', '&gt;');
        $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) {
index 44a7658..93c47fc 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 ?>
index 4cacd15..788ab7a 100644 (file)
@@ -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('<a href="%s">%s</a> | <a href="%s">%s</a>',
                      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';
 }
 
index 18e9ae1..79611a5 100644 (file)
@@ -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 '</tbody>';
@@ -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) {
index 3638749..4c6b53f 100644 (file)
@@ -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';
index 8f02517..df97b80 100644 (file)
@@ -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();
index d2ace39..c6ccccd 100644 (file)
@@ -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';
index b2084dc..370978d 100644 (file)
@@ -207,7 +207,7 @@ class Chora
                 if (!empty($onb)) {
                     $url = Horde_Util::addParameter($url, array('onb' => $onb));
                 }
-                $bar .= '/ <a href="' . $url . '">'. Horde_Text_Filter::filter($dir, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true, 'encode_all' => true)) . '</a> ';
+                $bar .= '/ <a href="' . $url . '">'. Horde_Text_Filter::filter($dir, 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true, 'encode_all' => true)) . '</a> ';
             }
         }
 
@@ -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
index b2e4792..cb042af 100644 (file)
@@ -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';
index 7b815fd..884cd39 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') . '">' : '<html><head>';
@@ -13,7 +13,7 @@ if (!empty($refresh_time) && ($refresh_time > 0) && !empty($refresh_url)) {
 
 if (Horde_Util::nonInputVar('js_vars')) {
     echo '<script type="text/javascript">//<![CDATA[' . "\n" .
-       'var Chora = ' . Horde_Serialize::serialize($js_vars, Horde_Serialize::JSON, NLS::getCharset()) . ";\n//]]></script>\n";
+       'var Chora = ' . Horde_Serialize::serialize($js_vars, Horde_Serialize::JSON, Horde_Nls::getCharset()) . ";\n//]]></script>\n";
 }
 Horde::includeScriptFiles();
 
index 0796b6e..481396e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 ?>
index 7924c68..c6c926b 100644 (file)
@@ -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());
index 161b80a..591265d 100644 (file)
@@ -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 .').'
index edd552f..5a6127d 100644 (file)
@@ -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) {
index 066a2c9..a7c598c 100644 (file)
@@ -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);
 
index 571e4f3..fc77e3b 100644 (file)
@@ -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';
index d66a003..d6ecab0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 ?>
index 985f953..3bb13de 100644 (file)
@@ -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;
index dd92a5b..0e9c5f5 100644 (file)
@@ -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());
             }
         }
 
index ab8b469..3881447 100644 (file)
@@ -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);
         }
 
index c6534eb..e4020fc 100644 (file)
@@ -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();
index 1b1603b..74eba1b 100644 (file)
@@ -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) {
index 0bc17b6..d73782b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 ?>
index c66afd9..1be8c1b 100644 (file)
@@ -1,4 +1,4 @@
-<?php echo '<?xml version="1.0" encoding="' . NLS::getCharset() . '"?>' ?>
+<?php echo '<?xml version="1.0" encoding="' . Horde_Nls::getCharset() . '"?>' ?>
 
 <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
index a4d35a2..fdd5a88 100644 (file)
@@ -1,4 +1,4 @@
-<?php echo '<?xml version="1.0" encoding="' . NLS::getCharset() . '"?>' ?>
+<?php echo '<?xml version="1.0" encoding="' . Horde_Nls::getCharset() . '"?>' ?>
 
 <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
index 45d2eed..89b9f6c 100644 (file)
@@ -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);
     }
index 218ce81..f989bb7 100644 (file)
@@ -130,9 +130,8 @@ if (document.getElementById(%1$s)){
                 }
             }
         }
-        require_once 'Horde/NLS.php';
         echo '<input type="hidden" name="_formvars" value="'
-            . htmlspecialchars(serialize($vars), ENT_QUOTES, NLS::getCharset())
+            . htmlspecialchars(serialize($vars), ENT_QUOTES, Horde_Nls::getCharset())
             . '" />';
     }
 
index 6b58fd6..d4a3a9d 100644 (file)
@@ -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 = '(-)?';
index 4d0ea7b..e0f2453 100644 (file)
@@ -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(
             '<input type="text" class="form-input-phone" name="%1$s" id="%1$s" value="%2$s" %3$s%4$s />',
             $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('    <input type="text" class="form-input-ipaddress" name="%1$s" id="%1$s" value="%2$s" %3$s%4$s />',
                        $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('    <input type="hidden" name="%1$s" id="%1$s" value="%2$s" />',
                    $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 = '<option value="">' . ($htmlchars ? htmlspecialchars($prompt, ENT_QUOTES, NLS::getCharset()) : $prompt) . '</option>';
+            $prompt = '<option value="">' . ($htmlchars ? htmlspecialchars($prompt, ENT_QUOTES, Horde_Nls::getCharset()) : $prompt) . '</option>';
         }
         return sprintf('    <select name="%1$s" id="%1$s"%2$s>%3$s%4$s    </select>',
                $var->getVarName(),
@@ -626,7 +626,7 @@ if (tmp) {
         /* Hidden tag to store the current first level. */
         $html = sprintf('    <input type="hidden" name="%1$s[old]" id="%1$s[old]" value="%2$s" />',
                         $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 .= '<option value="">' . htmlspecialchars($prompts[0], ENT_QUOTES, NLS::getCharset()) . '</option>';
+            $html .= '<option value="">' . htmlspecialchars($prompts[0], ENT_QUOTES, Horde_Nls::getCharset()) . '</option>';
         }
         $html .= $this->_selectOptions($values_1, $selected['1']);
         $html .= '    </select>';
@@ -645,7 +645,7 @@ if (tmp) {
                          $varname,
                          ($var->hasAction() ? ' ' . $this->_genActionScript($form, $var->_action, $varname) : ''));
         if (!empty($prompts)) {
-            $html .= '<option value="">' . htmlspecialchars($prompts[1], ENT_QUOTES, NLS::getCharset()) . '</option>';
+            $html .= '<option value="">' . htmlspecialchars($prompts[1], ENT_QUOTES, Horde_Nls::getCharset()) . '</option>';
         }
         $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) . '</a>';
         } 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 .= '&nbsp;&nbsp;' . Horde::link(Horde::externalUrl($mapurl), $desc, null, '_blank') . Horde::img($icon, $desc, '', $registry->getImageDir('horde')) . '</a>';
         }
@@ -1255,7 +1255,7 @@ EOT;
     function _renderVarDisplay_invalid($form, $var, $vars)
     {
         return '<p class="form-error form-inline">'
-                . htmlspecialchars($var->type->message, ENT_QUOTES, NLS::getCharset())
+                . htmlspecialchars($var->type->message, ENT_QUOTES, Horde_Nls::getCharset())
                 . '</p>';
     }
 
@@ -1374,7 +1374,7 @@ EOT;
                 $selected = '';
             }
             $result .= '        <option value="';
-            $result .= ($htmlchars) ? htmlspecialchars($value, ENT_QUOTES, NLS::getCharset()) : $value;
+            $result .= ($htmlchars) ? htmlspecialchars($value, ENT_QUOTES, Horde_Nls::getCharset()) : $value;
             $result .= '"' . $selected . '>';
             $result .= ($htmlchars) ? htmlspecialchars($display) : $display;
             $result .= "</option>\n";
@@ -1394,7 +1394,7 @@ EOT;
                 $selected = '';
             }
             $result .= " <option value=\""
-                . htmlspecialchars($value, ENT_QUOTES, NLS::getCharset())
+                . htmlspecialchars($value, ENT_QUOTES, Horde_Nls::getCharset())
                 . "\"$selected>" . htmlspecialchars($display) . "</option>\n";
         }
 
index e319fd2..0acd370 100644 (file)
@@ -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) {
index cd40dae..7c90c6f 100644 (file)
@@ -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);
index 2f76226..930580f 100644 (file)
@@ -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. */
index 7ef7253..4c32b49 100644 (file)
@@ -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') &&
index a9dcf1d..7cbde34 100644 (file)
@@ -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);
index 0376e45..1d2db1e 100644 (file)
@@ -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());
             }
         }
     }
index 974a47c..f8286c4 100644 (file)
@@ -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)
index c145004..3d2839b 100644 (file)
@@ -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();
index 672d134..a88d922 100644 (file)
@@ -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'];
 
index 9d8b5e7..2670666 100644 (file)
@@ -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;
index 4dbeb3c..108e1cd 100644 (file)
@@ -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;
index 807ad5c..786e3d7 100644 (file)
@@ -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');
         }
 
index 0063c60..3be1009 100644 (file)
@@ -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);
index fffd83b..ce7dc6e 100644 (file)
@@ -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('<option value="%s"%s>%s</option>%s', $val, $sel, Horde_Text_Filter::filter($label, 'space2html', array('charset' => NLS::getCharset(), 'encode' => true)), "\n");
+            $text .= sprintf('<option value="%s"%s>%s</option>%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 .= '<option value="" disabled="disabled">- - - - - - - - -</option>' . "\n";
                 foreach ($vfolders as $id => $val) {
-                    $text .= sprintf('<option value="%s"%s>%s</option>%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('<option value="%s"%s>%s</option>%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('<option value="%s">%s</option>%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('<option value="%s">%s</option>%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())) . '*/';
     }
 
     /**
index 1c32fe2..3960b3c 100644 (file)
@@ -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';
index 384fcc7..ba05a51 100644 (file)
@@ -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);
     }
index c0985ec..1374425 100644 (file)
@@ -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');
                 }
             }
         }
index 00cc5b5..edefdc3 100644 (file)
@@ -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');
     }
 
 }
index 47f03fa..f9ae2f8 100644 (file)
@@ -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);
         }
index 94148a2..cc34d4f 100644 (file)
@@ -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;
         }
index 19f1eb2..06dad0d 100644 (file)
@@ -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;
             }
index 62313f0..37abc5c 100644 (file)
@@ -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()))) . '"';
     }
 
     /**
index f330e66..9ebe86f 100644 (file)
@@ -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 '<img src="' . $this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('imp_img_view' => $type))) . '" alt="' . htmlspecialchars($alt, ENT_COMPAT, NLS::getCharset()) . '" />';
+        return '<img src="' . $this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('imp_img_view' => $type))) . '" alt="' . htmlspecialchars($alt, ENT_COMPAT, Horde_Nls::getCharset()) . '" />';
     }
 
 }
index 853c02d..701e532 100644 (file)
@@ -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();
 
index 5755bfb..ddd73d1 100644 (file)
@@ -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;
index 3a7b236..bdd3fb0 100644 (file)
@@ -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);
         }
index 9b2835b..b0a2080 100644 (file)
@@ -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 '<img src="' . $this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('pdf_view_thumbnail' => 1))) . '" alt="' . htmlspecialchars(_("View PDF File"), ENT_COMPAT, NLS::getCharset()) . '" />';
+        return '<img src="' . $this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('pdf_view_thumbnail' => 1))) . '" alt="' . htmlspecialchars(_("View PDF File"), ENT_COMPAT, Horde_Nls::getCharset()) . '" />';
     }
 
 }
index df92b1c..fe5fc1f 100644 (file)
@@ -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
         );
index 8643002..0742903 100644 (file)
@@ -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);
 
index 1a642ef..c18b8ba 100644 (file)
@@ -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") . '</a>';
+                $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") . '</a>';
             }
         }
 
index 2516df4..c4fe0a6 100644 (file)
@@ -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;
index c534878..a4bb982 100644 (file)
@@ -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()
             )
         );
     }
index 6bb4edc..cc6c2e9 100644 (file)
@@ -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);
index 76603cb..0a39259 100644 (file)
@@ -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);
             }
index a808a39..3ededb2 100644 (file)
@@ -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. */
index 381cac4..2ca98ea 100644 (file)
@@ -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. */
index ce8efea..ef8f07d 100644 (file)
@@ -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();
index 9607848..928e908 100644 (file)
@@ -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;
 }
index 3df76bf..eb3852d 100644 (file)
@@ -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' => '');
index 9beafc1..da836af 100644 (file)
@@ -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');
index 092163f..5fd7d86 100644 (file)
@@ -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) {
index d8f47fc..e7f2c35 100644 (file)
@@ -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');
index e15bddd..b71c3a6 100644 (file)
@@ -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)) {
index 97c979f..9b93c18 100644 (file)
@@ -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;
 }
 
index 23085c6..d619ae7 100644 (file)
@@ -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));
index 7caa1f5..08ba910 100644 (file)
@@ -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();
index 3d9d7b6..f1239d2 100644 (file)
@@ -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;
 }
index ad708b6..efd3542 100644 (file)
@@ -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) {
index 3eab01b..968594f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 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');
 }
 ?>
index 7123bc5..810b31d 100644 (file)
@@ -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()) . ';'));
index 995c451..8f249ad 100644 (file)
@@ -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())));
index 1e2fc67..d58e813 100644 (file)
@@ -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) {
index 0f1f8af..4b593da 100644 (file)
@@ -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');
 }
 
index bb89d4f..284a56b 100644 (file)
@@ -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()) . '</a>';
+            $entry['descriplink'] = Horde::linkTooltip($editurl, sprintf(_("Edit %s"), $name), null, null, null, $descrip) . @htmlspecialchars($name, ENT_COMPAT, Horde_Nls::getCharset()) . '</a>';
         } else {
-            $entry['descriplink'] = Horde::link($editurl, sprintf(_("Edit %s"), $name)) . @htmlspecialchars($name, ENT_COMPAT, NLS::getCharset()) . '</a>';
+            $entry['descriplink'] = Horde::link($editurl, sprintf(_("Edit %s"), $name)) . @htmlspecialchars($name, ENT_COMPAT, Horde_Nls::getCharset()) . '</a>';
         }
 
         /* Create edit link. */
index 335f805..00bc3b0 100644 (file)
@@ -73,7 +73,7 @@ class Ingo
                     $label = $mbox['abbrev'];
                     $text .= sprintf('<option%s value="%s"%s>%s</option>%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 .= '</select>';
@@ -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;
     }
 
index 145d293..aff92de 100644 (file)
@@ -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');
                         }
                     }
                 }
index 6df006a..2c3b448 100644 (file)
@@ -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[] = '  }';
index 5a980de..494cfd2 100644 (file)
@@ -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\"`");
index b2bb752..7539542 100644 (file)
@@ -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');
     }
 
     /**
index 23fe70d..3c61bce 100644 (file)
@@ -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()));
index 740b9f8..ceb5157 100644 (file)
@@ -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);
index fb27a46..423e51c 100644 (file)
@@ -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);
             }
index 6e5d520..3b67ad6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 $page_title = $GLOBALS['registry']->get('name');
index 73a2f37..bac9a58 100644 (file)
@@ -30,7 +30,7 @@ function delete_condition(num)
 <table width="100%" cellspacing="0">
   <tr class="control">
     <td>
-      <?php echo Horde::label('name', _("Rule Name:")) ?> <input class="input" id="name" name="name" size="50" value="<?php echo (isset($rule['name'])) ? @htmlspecialchars($rule['name'], ENT_COMPAT, NLS::getCharset()) : '' ?>" />
+      <?php echo Horde::label('name', _("Rule Name:")) ?> <input class="input" id="name" name="name" size="50" value="<?php echo (isset($rule['name'])) ? @htmlspecialchars($rule['name'], ENT_COMPAT, Horde_Nls::getCharset()) : '' ?>" />
     </td>
     <td width="40" class="rightAlign">
       <?php echo Horde_Help::link('ingo', 'rule-name') ?>&nbsp;
index c4bdaa1..a9870df 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 ?>
index 4241186..bfcf5a0 100755 (executable)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 ?>
index dfe6abe..ba4195d 100644 (file)
@@ -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();
index dc72ba8..3d742b1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 ?>
index 05ca83c..b2300da 100644 (file)
@@ -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);
             }
index e2b4b13..28c6ab8 100644 (file)
@@ -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);
         }
index 7b2e85f..6e51be4 100644 (file)
@@ -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;
index dec9f52..1031276 100644 (file)
@@ -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 .= '<br /><br />';
         }
@@ -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 .= '<br />' . _("Who:") . ' ' . @htmlspecialchars(implode(', ', $attendees), ENT_COMPAT, NLS::getCharset());
+            $desc .= '<br />' . _("Who:") . ' ' . @htmlspecialchars(implode(', ', $attendees), ENT_COMPAT, Horde_Nls::getCharset());
         }
         if (strlen($event->getLocation())) {
-            $desc .= '<br />' . _("Where:") . ' ' . @htmlspecialchars($event->getLocation(), ENT_COMPAT, NLS::getCharset());
+            $desc .= '<br />' . _("Where:") . ' ' . @htmlspecialchars($event->getLocation(), ENT_COMPAT, Horde_Nls::getCharset());
         }
         $desc .= '<br />' . _("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);
     }
index 99c438a..42e680e 100644 (file)
@@ -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':
index aa92bb4..fb0c1d7 100644 (file)
@@ -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']);
     }
 
     /**
index eca5654..06d002c 100644 (file)
@@ -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) ||
index c967699..e10bfd5 100644 (file)
@@ -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) . ')');
         }
index 28203df..49af4c8 100644 (file)
@@ -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);
index ff2c97f..85857da 100644 (file)
@@ -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;
index 87bd097..e8f6fd2 100644 (file)
@@ -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;
index 54530bc..64d0969 100644 (file)
@@ -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());
index f5815a3..996467a 100644 (file)
@@ -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);
     }
index 052a099..3090816 100755 (executable)
@@ -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) {}
index 41fe3d6..b03b78b 100644 (file)
@@ -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');
 }
 ?>
index 90132b7..5aa2087 100644 (file)
@@ -87,7 +87,7 @@
       <tr>
         <th class="kronolithMinicalEmpty">&nbsp;</th>
         <?php for ($i = $prefs->getValue('week_start_monday'), $c = $i + 7; $i < $c; $i++): ?>
-        <th title="<?php echo NLS::getLangInfo(constant('DAY_' . ($i % 7 + 1))) ?>"><?php echo substr(NLS::getLangInfo(constant('DAY_' . ($i % 7 + 1))), 0, 1) ?></th>
+        <th title="<?php echo Horde_Nls::getLangInfo(constant('DAY_' . ($i % 7 + 1))) ?>"><?php echo substr(Horde_Nls::getLangInfo(constant('DAY_' . ($i % 7 + 1))), 0, 1) ?></th>
         <?php endfor; ?>
       </tr>
     </thead>
index d68e275..53cf28a 100644 (file)
@@ -11,7 +11,7 @@
   <tr>
     <td class="kronolithFirstCol"><div id="kronolithLoadingmonth" class="kronolithLoading"></div></td>
     <?php for ($w = $prefs->getValue('week_start_monday'), $i = $w, $c = $i + 7; $i < $c; $i++): ?>
-    <td class="kronolithCol"><span><?php echo NLS::getLangInfo(constant('DAY_' . ($i % 7 + 1))) ?></span></td>
+    <td class="kronolithCol"><span><?php echo Horde_Nls::getLangInfo(constant('DAY_' . ($i % 7 + 1))) ?></span></td>
     <?php endfor; ?>
   </tr>
 </table>
index e70b85b..e7e9204 100644 (file)
@@ -31,7 +31,7 @@
   <thead><tr>
     <th class="kronolithMinicalEmpty">&nbsp;</th>
     <?php for ($i = $prefs->getValue('week_start_monday'), $c = $i + 7; $i < $c; $i++): ?>
-    <th title="<?php echo NLS::getLangInfo(constant('DAY_' . ($i % 7 + 1))) ?>"><?php echo substr(NLS::getLangInfo(constant('DAY_' . ($i % 7 + 1))), 0, 1) ?></th>
+    <th title="<?php echo Horde_Nls::getLangInfo(constant('DAY_' . ($i % 7 + 1))) ?>"><?php echo substr(Horde_Nls::getLangInfo(constant('DAY_' . ($i % 7 + 1))), 0, 1) ?></th>
     <?php endfor; ?>
   </tr></thead>
   <tbody>
index 5d2b012..e0515d0 100644 (file)
@@ -4,7 +4,7 @@
  */
 
 require_once 'Horde/Serialize.php';
-$charset = NLS::getCharset();
+$charset = Horde_Nls::getCharset();
 
 /* Variables used in core javascript files. */
 $var = array(
index e97680f..5f3c104 100644 (file)
@@ -18,7 +18,7 @@
 <!-- owner -->
 <tr>
  <td class="rightAlign"><strong><?php echo _("Owner") ?>&nbsp;&nbsp;</strong></td>
- <td><?php echo @htmlspecialchars($owner, ENT_COMPAT, NLS::getCharset()) ?> </td>
+ <td><?php echo @htmlspecialchars($owner, ENT_COMPAT, Horde_Nls::getCharset()) ?> </td>
 </tr>
 <?php endif; ?>
 
@@ -66,14 +66,14 @@ if ($this->event->isInitialized() && $this->event->alarm > 0):
 <?php if (isset($created)): ?>
 <tr>
   <td class="nowrap rightAlign"><strong><?php echo _("Created") ?></strong>&nbsp;&nbsp;</td>
-  <td class="nowrap"><?php  echo $created->strftime($dateFormat) . ' ' . $created->format($timeFormat) . ' ' . @htmlspecialchars($createdby, ENT_COMPAT, NLS::getCharset()) ?></td>
+  <td class="nowrap"><?php  echo $created->strftime($dateFormat) . ' ' . $created->format($timeFormat) . ' ' . @htmlspecialchars($createdby, ENT_COMPAT, Horde_Nls::getCharset()) ?></td>
 </tr>
 <?php endif; ?>
 
 <?php if (isset($modified)): ?>
 <tr>
   <td class="nowrap rightAlign"><strong><?php echo _("Last Modified") ?></strong>&nbsp;&nbsp;</td>
-  <td class="nowrap"><?php echo $modified->strftime($dateFormat) . ' ' . $modified->format($timeFormat) . ' ' . @htmlspecialchars($modifiedby, ENT_COMPAT, NLS::getCharset()) ?></td>
+  <td class="nowrap"><?php echo $modified->strftime($dateFormat) . ' ' . $modified->format($timeFormat) . ' ' . @htmlspecialchars($modifiedby, ENT_COMPAT, Horde_Nls::getCharset()) ?></td>
 </tr>
 <?php endif; ?>
 
index fdb5cf1..5925fb2 100755 (executable)
@@ -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();
index fe60abe..e731e5f 100755 (executable)
@@ -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() ' .
index 1998e43..31c57d0 100755 (executable)
@@ -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();
index 5f4fdb2..cc5fca9 100755 (executable)
@@ -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();
index 38f3ea6..2f2201c 100755 (executable)
@@ -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();
index 7c33450..3c6dea7 100644 (file)
@@ -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;
         }
index 33f53e3..6f60199 100644 (file)
@@ -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];
index 301272f..a193aae 100644 (file)
@@ -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()));
     }
 
     /**
index 132e772..8703862 100644 (file)
@@ -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);
index 431e417..b5951d6 100644 (file)
@@ -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();
index 685439f..47c1da1 100644 (file)
@@ -21,11 +21,11 @@ if (!$rss) {
     $list = News::getLastComments(50);
     $title = _("Last comments");
 
-    $rss = '<?xml version="1.0" encoding="' . NLS::getCharset() . '" ?>
+    $rss = '<?xml version="1.0" encoding="' . Horde_Nls::getCharset() . '" ?>
 <rss version="2.0">
 <channel>
     <title>' . htmlspecialchars($title) . '</title>
-    <language>' . str_replace('_', '-', strtolower(NLS::select())) . '</language>
+    <language>' . str_replace('_', '-', strtolower(Horde_Nls::select())) . '</language>
     <lastBuildDate>' . date('r') . '</lastBuildDate>
     <description>' . htmlspecialchars($title) . '</description>
     <link>' . Horde::applicationUrl('index.php', true, -1) . '</link>
@@ -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;
index e5b010c..a775ddb 100644 (file)
@@ -23,11 +23,11 @@ if (!$rss) {
     $title = $registry->get('name', 'horde');
 
     $read_url = Horde::applicationUrl('read.php', true, -1);
-    $rss = '<?xml version="1.0" encoding="' . NLS::getCharset() . '" ?>
+    $rss = '<?xml version="1.0" encoding="' . Horde_Nls::getCharset() . '" ?>
     <rss version="2.0">
         <channel>
         <title>' . htmlspecialchars($title) . '</title>
-        <language>' . str_replace('_', '-', strtolower(NLS::select())) . '</language>
+        <language>' . str_replace('_', '-', strtolower(Horde_Nls::select())) . '</language>
         <lastBuildDate>' . date('r') . '</lastBuildDate>
         <description>' . htmlspecialchars($title) . '</description>
         <link>' . Horde::applicationUrl('index.php', true, -1) . '</link>
index c7ce066..5b98cb3 100755 (executable)
@@ -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 = '<?xml version="1.0" encoding="' . NLS::getCharset() . '" ?>
+    $rssheader = '<?xml version="1.0" encoding="' . Horde_Nls::getCharset() . '" ?>
 <rss version="2.0"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:wfw="http://wellformedweb.org/CommentAPI/"
     xmlns:dc="http://purl.org/dc/elements/1.1/" >
 <channel>
     <title>' . htmlspecialchars($title) . '</title>
-    <language>' . str_replace('_', '-', strtolower(NLS::select())) . '</language>
+    <language>' . str_replace('_', '-', strtolower(Horde_Nls::select())) . '</language>
     <lastBuildDate>' . date('r', $lastnewstime) . '</lastBuildDate>
     <description>' . htmlspecialchars($title) . '</description>
     <link>' . Horde::applicationUrl('index.php', true, -1) . '</link>
index badaa78..6eb6459 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 ?>
index fe08839..85c2cb5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 if (isset($language)) {
-    header('Content-type: text/html; charset=' . NLS::getCharset());
+    header('Content-type: text/html; charset=' . Horde_Nls::getCharset());
     header('Vary: Accept-Language');
 }
 ?>