Convert to new Horde_Util package
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Jun 2009 23:16:59 +0000 (17:16 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Jun 2009 23:16:59 +0000 (17:16 -0600)
378 files changed:
babel/edit.php
babel/extract.php
babel/lib/Babel.php
babel/lib/Display.php
babel/lib/Translate.php
babel/lib/base.php
babel/make.php
babel/stats.php
babel/templates/common-header.inc
babel/upload.php
babel/view.php
babel/viewsource.php
chora/annotate.php
chora/browsedir.php
chora/browsefile.php
chora/co.php
chora/cvsgraph.php
chora/diff.php
chora/lib/Chora.php
chora/patchsets.php
chora/templates/checkout/checkout.inc
chora/templates/common-header.inc
chora/templates/diff/hr/header.inc
chora/templates/directory/header.inc
chora/templates/log/footer.inc
chora/templates/log/header.inc
chora/test.php
crumb/addclient.php
crumb/contactsearch.php
crumb/templates/common-header.inc
drag_n_drop_portal/block.php
drag_n_drop_portal/params.php
drag_n_drop_portal/save.php
drag_n_drop_portal/templates/portal/params.php
fima/account.php
fima/accounts.php
fima/data.php
fima/ledgers/create.php
fima/ledgers/delete.php
fima/ledgers/edit.php
fima/lib/Block/tree_menu.php
fima/lib/Driver/sql.php
fima/lib/Fima.php
fima/lib/Forms/CreateLedger.php
fima/lib/Forms/DeleteLedger.php
fima/lib/Forms/EditLedger.php
fima/lib/Forms/account.php
fima/lib/base.php
fima/lib/prefs.php
fima/postings.php
fima/report.php
fima/search.php
fima/templates/accounts/accounts.inc
fima/templates/common-header.inc
fima/templates/data/export.inc
fima/templates/data/import.inc
fima/templates/ledgers_list.php
fima/templates/postings/header.inc
fima/templates/postings/navbar.inc
fima/templates/postings/posting_headers.inc
fima/templates/reports/graph.inc
fima/templates/reports/reports.inc
fima/templates/reports/table.inc
fima/templates/search/search.inc
folks/account/approve.php
folks/account/renew.php
folks/account/resetpassword.php
folks/account/signup.php
folks/account/tabs.php
folks/account/username.php
folks/activity.php
folks/birthday.php
folks/config/hooks.php.dist
folks/edit/activity.php
folks/edit/comments.php
folks/edit/edit.php
folks/edit/friends/add.php
folks/edit/friends/approve.php
folks/edit/friends/blacklist.php
folks/edit/friends/groups.php
folks/edit/friends/reject.php
folks/edit/password.php
folks/edit/tabs.php
folks/friends.php
folks/lib/Auth/folks.php
folks/lib/Driver.php
folks/lib/Folks.php
folks/lib/Forms/Login.php
folks/lib/base.php
folks/list.php
folks/login.php
folks/new.php
folks/online.php
folks/perms.php
folks/popularity.php
folks/report.php
folks/save_search.php
folks/search.php
folks/templates/block/users.php
folks/templates/common-header.inc
folks/templates/edit/activity.php
folks/templates/edit/friends.php
folks/templates/edit/groups.php
folks/templates/edit/header.php
folks/templates/list/list.php
folks/templates/list/search.php
folks/templates/user/actions.php
folks/templates/user/authenticated.php
folks/templates/user/user.php
folks/user.php
framework/Image/lib/Horde/Image.php
framework/Image/lib/Horde/Image/Gd.php
framework/Image/lib/Horde/Image/Im.php
framework/Image/lib/Horde/Image/Imagick.php
framework/Image/tests/im.php
framework/Model/lib/Horde/Form.php
framework/Model/lib/Horde/Form/Renderer/Xhtml.php
framework/Model/lib/Horde/Form/Type/Boolean.php
framework/Model/lib/Horde/Form/Type/String.php
framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php
framework/Model/www/test.php
framework/Rdo/www/Table_Helper.php
framework/Rdo/www/crud.php
framework/Rdo/www/index.php
framework/Service_Vimeo/lib/Horde/Service/Vimeo/Simple.php
framework/Vcs/lib/Horde/Vcs/Cvs.php
framework/Vcs/lib/Horde/Vcs/Svn.php
imp/acl.php
imp/ajax.php
imp/attachment.php
imp/cache.php
imp/compose-dimp.php
imp/compose-mimp.php
imp/compose.php
imp/config/hooks.php.dist
imp/config/prefs.php.dist
imp/contacts.php
imp/fetchmailprefs.php
imp/filterprefs.php
imp/folders-mimp.php
imp/folders.php
imp/imple.php
imp/lib/Block/summary.php
imp/lib/Block/tree_folders.php
imp/lib/Compose.php
imp/lib/Contents.php
imp/lib/Fetchmail/Account.php
imp/lib/Folder.php
imp/lib/IMP.php
imp/lib/Identity/imp.php
imp/lib/Imap/Tree.php
imp/lib/Imple/ContactAutoCompleter.php
imp/lib/Imple/SpellChecker.php
imp/lib/MIMP.php
imp/lib/Maintenance/Task/delete_sentmail_monthly.php
imp/lib/Maintenance/Task/rename_sentmail_monthly.php
imp/lib/Maintenance/Task/tos_agreement.php
imp/lib/Message.php
imp/lib/Mime/Viewer/Html.php
imp/lib/Mime/Viewer/Images.php
imp/lib/Mime/Viewer/Itip.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/Tnef.php
imp/lib/Mime/Viewer/Zip.php
imp/lib/Search.php
imp/lib/Session.php
imp/lib/UI/Compose.php
imp/lib/UI/Message.php
imp/lib/Views/ShowMessage.php
imp/lib/api.php
imp/lib/base.php
imp/lib/prefs.php
imp/login.php
imp/mailbox-mimp.php
imp/mailbox.php
imp/message-dimp.php
imp/message-mimp.php
imp/message.php
imp/pgp.php
imp/redirect.php
imp/rss.php
imp/saveimage.php
imp/search.php
imp/smime.php
imp/stationery.php
imp/templates/chunks/compose.php
imp/templates/common-header.inc
imp/templates/compose/compose-mimp.inc
imp/templates/compose/redirect-mimp.inc
imp/templates/login/mobile.inc
imp/test.php
imp/thread.php
imp/view.php
ingo/blacklist.php
ingo/filters.php
ingo/forward.php
ingo/lib/Driver/ldap.php
ingo/lib/Ingo.php
ingo/lib/Script/imap.php
ingo/lib/Script/sieve.php
ingo/lib/Storage/prefs.php
ingo/lib/Storage/sql.php
ingo/lib/base.php
ingo/rule.php
ingo/script.php
ingo/spam.php
ingo/templates/blacklist/blacklist.inc
ingo/templates/common-header.inc
ingo/templates/filters/header.inc
ingo/templates/filters/settings.inc
ingo/templates/menu.inc
ingo/templates/rule/header.inc
ingo/templates/script/activate.inc
ingo/templates/whitelist/whitelist.inc
ingo/test.php
ingo/vacation.php
ingo/whitelist.php
jeta/test.php
koward/lib/Koward.php
koward/lib/Koward/Cli.php
koward/lib/Koward/Controller/IndexController.php
koward/lib/Koward/Controller/ObjectController.php
koward/lib/Koward/Form/Actions.php
koward/lib/Koward/View/Index/login.html.php
koward/lib/Koward/View/Object/delete.html.php
koward/www/horde/config/prefs.php.dist
kronolith/add.php
kronolith/ajax.php
kronolith/attend.php
kronolith/attendees.php
kronolith/calendars/create.php
kronolith/calendars/delete.php
kronolith/calendars/edit.php
kronolith/calendars/index.php
kronolith/calendars/info.php
kronolith/calendars/remote_edit.php
kronolith/calendars/remote_subscribe.php
kronolith/calendars/remote_unsubscribe.php
kronolith/contacts.php
kronolith/data.php
kronolith/day.php
kronolith/delete.php
kronolith/edit.php
kronolith/event.php
kronolith/fb.php
kronolith/feed/index.php
kronolith/imple.php
kronolith/lib/Block/month.php
kronolith/lib/Block/monthlist.php
kronolith/lib/Block/prevmonthlist.php
kronolith/lib/Block/summary.php
kronolith/lib/Driver/Sql.php
kronolith/lib/Event.php
kronolith/lib/Event/Holidays.php
kronolith/lib/Forms/CreateCalendar.php
kronolith/lib/Forms/DeleteCalendar.php
kronolith/lib/Forms/EditCalendar.php
kronolith/lib/Forms/EditRemoteCalendar.php
kronolith/lib/Forms/SubscribeRemoteCalendar.php
kronolith/lib/Forms/UnsubscribeRemoteCalendar.php
kronolith/lib/FreeBusy/View.php
kronolith/lib/Imple/ContactAutoCompleter.php
kronolith/lib/Imple/TagAutoCompleter.php
kronolith/lib/Kronolith.php
kronolith/lib/Maintenance/kronolith.php
kronolith/lib/Tagger.php
kronolith/lib/Views/Day.php
kronolith/lib/Views/DeleteEvent.php
kronolith/lib/Views/EditEvent.php
kronolith/lib/Views/Event.php
kronolith/lib/Views/ExportEvent.php
kronolith/lib/Views/Month.php
kronolith/lib/Views/Week.php
kronolith/lib/Views/Year.php
kronolith/lib/api.php
kronolith/lib/base.php
kronolith/lib/prefs.php
kronolith/lib/tests/allday.phpt
kronolith/lib/tests/bug7068.phpt
kronolith/month.php
kronolith/new.php
kronolith/perms.php
kronolith/pref_api.php
kronolith/scripts/agenda.php
kronolith/search.php
kronolith/templates/attendees/attendees.inc
kronolith/templates/calendar_list.php
kronolith/templates/common-header.inc
kronolith/templates/contacts/contacts.inc
kronolith/templates/data/export.inc
kronolith/templates/data/import.inc
kronolith/templates/delete/delete.inc
kronolith/templates/delete/one.inc
kronolith/templates/edit/edit.inc
kronolith/templates/edit/javascript.inc
kronolith/templates/panel.inc
kronolith/templates/perms/perms.inc
kronolith/templates/prefs/fb_cals_select.inc
kronolith/templates/search/search.inc
kronolith/templates/search/search_advanced.inc
kronolith/templates/week/head.inc
kronolith/test.php
kronolith/view.php
kronolith/week.php
kronolith/workweek.php
kronolith/year.php
news/add.php
news/admin/categories/delete.php
news/admin/categories/edit.php
news/admin/categories/index.php
news/admin/sources/delete.php
news/admin/sources/edit.php
news/admin/sources/index.php
news/admin/tabs.php
news/browse.php
news/content_edit.php
news/delete.php
news/delete_file.php
news/diff.php
news/edit.php
news/feed.php
news/files.php
news/lib/Block/category.php
news/lib/Block/sources.php
news/lib/Categories.php
news/lib/Driver/sql.php
news/lib/Forms/Search.php
news/lib/News.php
news/lib/Search.php
news/lib/View.php
news/lib/base.php
news/mail.php
news/news.php
news/note.php
news/pdf.php
news/print.php
news/reads.php
news/search.php
news/tags.php
news/templates/common-header.inc
news/templates/edit/info.php
news/templates/edit/row.php
news/templates/news/blog.php
news/templates/news/info.php
news/templates/news/today.php
news/templates/news/tools.php
news/templates/reads/row.inc
news/trackback.php
skoli/add.php
skoli/classes/create.php
skoli/classes/delete.php
skoli/classes/edit.php
skoli/data.php
skoli/entry.php
skoli/lib/Block/tree_menu.php
skoli/lib/Forms/CreateClass.php
skoli/lib/Forms/DeleteClass.php
skoli/lib/Forms/EditClass.php
skoli/lib/Forms/Entry.php
skoli/lib/Skoli.php
skoli/list.php
skoli/pref_api.php
skoli/search.php
skoli/templates/classes/list.php
skoli/templates/common-header.inc
skoli/templates/data/export.inc
skoli/templates/entry/delete.inc
skoli/templates/list/classes.inc
skoli/templates/list/headers.inc
skoli/templates/list/students.inc
skoli/templates/panel.inc
skoli/templates/search/entries.inc
skoli/templates/search/headers.inc
timeobjects/lib/Driver/Weatherdotcom.php
timeobjects/lib/base.php

index fa642bb..dc2ccf2 100644 (file)
@@ -26,16 +26,15 @@ require_once dirname(__FILE__) . '/lib/base.php';
 require_once BABEL_BASE . '/lib/Gettext/PO.php';
 
 require_once 'Horde/Form.php';
-require_once 'Horde/Variables.php';
 require_once 'Horde/Form/Renderer.php';
 require_once 'Horde/Form/Action.php';
 
 require_once 'Horde/UI/Tabs.php';
 
-$app = Util::getFormData('module');
+$app = Horde_Util::getFormData('module');
 
 $show = 'edit';
-$vars = &Variables::getDefaultVariables();
+$vars = &Horde_Variables::getDefaultVariables();
 
 if ($app) {
     $napp = ($app == 'horde') ? '' : $app;
@@ -46,28 +45,28 @@ if ($app) {
 
 /* Set up the template fields. */
 $template->set('menu', Babel::getMenu('string'));
-$template->set('notify', Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
+$template->set('notify', Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
 
 /* Create upload form */
 $form = &new Horde_Form($vars, _("Edit Translation"), $show);
 
 /* Validate form if submitted */
-if ($app && Util::getFormData('submitbutton') == _("Save")) {
+if ($app && Horde_Util::getFormData('submitbutton') == _("Save")) {
 
     if ($form->validate($vars, false)) {
        $form->getInfo($vars, $form_values);
        
        foreach($meta_params as $k => $v) {
-           if ($val = Util::getFormData($k)) {
+           if ($val = Horde_Util::getFormData($k)) {
                $po->meta[$k] = $val;
            }
        }
        
        $po->save($pofile);
        
-       if (Util::getFormData('url') == 'view') {
+       if (Horde_Util::getFormData('url') == 'view') {
            $url = Horde::applicationUrl('view.php');
-           $url = Util::addParameter($url, array('module' => $app));
+           $url = Horde_Util::addParameter($url, array('module' => $app));
            header('Location: ' . $url);
            exit;
        }
@@ -85,7 +84,7 @@ if (!$app) {
     $vars->set('module', $app);
     
     $form->addHidden('', 'url', 'text', false);
-    $vars->set('url', Util::getFormData('url'));
+    $vars->set('url', Horde_Util::getFormData('url'));
     
     foreach($meta_params as $k => $v) {
        $form->addVariable($k, $k, 'text', false, false);
index 1ab3aba..2c60a5c 100644 (file)
@@ -27,7 +27,7 @@ if ($app) {
 
 echo $template->fetch(BABEL_TEMPLATES . '/layout.html');
 
-$vars = &Variables::getDefaultVariables();
+$vars = &Horde_Variables::getDefaultVariables();
 
 /* Create upload form */
 $form = &new Horde_Form($vars, _("Extract Translation"), 'extract');
index 8037f02..0197732 100644 (file)
@@ -57,7 +57,7 @@ class Babel {
                continue;
            }
            
-           if (Util::getFormData('module') == $app) {
+           if (Horde_Util::getFormData('module') == $app) {
                $html .= '<option class="control" value="' . $app . '" selected>' .  '+ ' . $desc;
            } else {
                $html .= '<option value="' . $app . '">' . '&#8211; ' . $desc;
index 1cb97b8..4380af2 100644 (file)
@@ -72,7 +72,7 @@ class Translate_Display {
        $f = array('/&lt;/', '/&gt;/');
        $t = array('<', '>');
        $msg = preg_replace($f, $t, $msg);
-       return String::convertCharset(html_entity_decode($msg), NLS::getCharset(), Translate_Display::parseCharset($po->meta['Content-Type']));
+       return Horde_String::convertCharset(html_entity_decode($msg), 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 String::convertCharset($msg, Translate_Display::parseCharset($po->meta['Content-Type']), NLS::getCharset());
+       return Horde_String::convertCharset($msg, Translate_Display::parseCharset($po->meta['Content-Type']), NLS::getCharset());
     }
     
     function get_percent($used, $total) {
index ea9b246..d33382a 100644 (file)
@@ -511,7 +511,7 @@ class Translate {
            }
            if (!empty($module) && $module != $apps[$i]) { continue; }
            $package = ucfirst($apps[$i]);
-           $package_u = String::upper($apps[$i]);
+           $package_u = Horde_String::upper($apps[$i]);
            @include $dirs[$i] . '/lib/version.php';
            $version = eval('return(defined("' . $package_u . '_VERSION") ? ' . $package_u . '_VERSION : "???");');
            Translate_Display::header(sprintf(_("Initializing module %s..."), $apps[$i]));
index dd82218..800251b 100644 (file)
@@ -59,7 +59,6 @@ require_once BABEL_BASE . '/lib/Gettext/PO.php';
 
 /* Form and Variables */
 require_once 'Horde/Form.php';
-require_once 'Horde/Variables.php';
 require_once 'Horde/Form/Renderer.php';
 require_once 'Horde/Form/Action.php';
 
@@ -72,10 +71,10 @@ require_once 'Horde/Template.php';
 $template = &new Horde_Template();
 
 /* Module selection */
-$app = Util::getFormData('module');
+$app = Horde_Util::getFormData('module');
   
 /* Language selection */
-if (($lang = Util::getFormData('display_language')) !== null) {
+if (($lang = Horde_Util::getFormData('display_language')) !== null) {
     $_SESSION['babel']['language'] = $lang;
 } elseif (isset($_SESSION['babel']['language'])) {
     $lang = $_SESSION['babel']['language'];
@@ -99,7 +98,7 @@ if (($lang = Util::getFormData('display_language')) !== null) {
                                                  
 /* Set up the template fields. */
 $template->set('menu', Babel::getMenu('string'));
-$template->set('notify', Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
+$template->set('notify', Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
 $template->set('lang', Babel::displayLanguage());
 $fmenu = Babel::LanguageSelection();
 
index d31221a..cdd5b94 100644 (file)
@@ -27,7 +27,7 @@ if ($app) {
 
 echo $template->fetch(BABEL_TEMPLATES . '/layout.html');
 
-$vars = &Variables::getDefaultVariables();
+$vars = &Horde_Variables::getDefaultVariables();
 
 /* Create upload form */
 $form = &new Horde_Form($vars, _("Make Translation"), 'make');
index 2841e6a..5fa4dbb 100644 (file)
@@ -23,7 +23,7 @@ if ($app) {
 }
 echo $template->fetch(BABEL_TEMPLATES . '/layout.html');
 
-$vars = &Variables::getDefaultVariables();
+$vars = &Horde_Variables::getDefaultVariables();
 
 /* Create upload form */
 $form = &new Horde_Form($vars, _("View Statistics"), 'stats');
@@ -99,7 +99,7 @@ if (!$app) {
                echo "\n<tr class=\"item" . ($i++ % 2) . "\">";
            }
            echo "\n\t<td>" . $nls['languages'][$key] . "</td>";
-           echo "\n\t<td>" . Horde::link(Util::addParameter(Horde::applicationUrl('view.php'), array('display_language' => $key, 'module' => $_app))) . $key . '</a>' . "</td>";
+           echo "\n\t<td>" . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('view.php'), array('display_language' => $key, 'module' => $_app))) . $key . '</a>' . "</td>";
            echo "\n\t<td>" . Translate_Display::create_bargraph($value[2], $value[0]) . "</td>";
            echo "\n\t<td>" . $value[2] . "</td>";
            echo "\n\t<td>" . $value [3] . "</td>";
index 5c7c1ba..44a7658 100644 (file)
@@ -22,4 +22,4 @@ Horde::includeScriptFiles();
 <?php echo Horde::stylesheetLink('babel') ?>
 </head>
 
-<body<?php if (Util::nonInputVar('bodyClass')) echo ' class="' . $bodyClass . '"' ?>>
+<body<?php if (Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bodyClass . '"' ?>>
index a9b2971..95b87c5 100644 (file)
@@ -12,7 +12,7 @@
 @define('BABEL_BASE', dirname(__FILE__)) ;
 require_once BABEL_BASE . '/lib/base.php';
 
-$vars = &Variables::getDefaultVariables();
+$vars = &Horde_Variables::getDefaultVariables();
 
 /* Create upload form */
 $form = &new Horde_Form($vars, _("Upload new Translation"), 'upload');
@@ -22,7 +22,7 @@ $form->addVariable(_("Translations File (.PO)"), 'po_file', 'file', true, false)
 $form->addVariable('', '', 'spacer', true);
 
 /* Validate form if submitted */
-if (Util::getFormData('submitbutton') == _("Upload")) {
+if (Horde_Util::getFormData('submitbutton') == _("Upload")) {
     if ($form->validate($vars, false)) {
        $form->getInfo($vars, $form_values);
        
index 6f27bf5..4a15d08 100644 (file)
@@ -25,12 +25,12 @@ $meta_params = array(
                     "Content-Transfer-Encoding" => "8bit",
                     "Plural-Forms" => "nplurals=2; plural=(n > 1);");
 
-$app      = Util::getFormData('module');
-$editmode = Util::getFormData('editmode', 0);
-$cstring  = Util::getFormData('cstring');
-$page     = Util::getFormData('page', 0);
-$filter   = Util::getFormData('filter');
-$search   = Util::getFormData('search');
+$app      = Horde_Util::getFormData('module');
+$editmode = Horde_Util::getFormData('editmode', 0);
+$cstring  = Horde_Util::getFormData('cstring');
+$page     = Horde_Util::getFormData('page', 0);
+$filter   = Horde_Util::getFormData('filter');
+$search   = Horde_Util::getFormData('search');
 
 if ($app) {
     /* Render the page. */
@@ -50,9 +50,9 @@ if ($app) {
 
 echo $template->fetch(BABEL_TEMPLATES . '/layout.html');
 
-$app = Util::getFormData('module');
+$app = Horde_Util::getFormData('module');
 $show = 'edit';
-$vars = &Variables::getDefaultVariables();
+$vars = &Horde_Variables::getDefaultVariables();
 
 if ($app) {
     
@@ -73,8 +73,8 @@ if ($app) {
 
 //
 
-$f_cancel = Util::getFormData('cancel');
-$f_save = Util::getFormData('submit');
+$f_cancel = Horde_Util::getFormData('cancel');
+$f_save = Horde_Util::getFormData('submit');
 
 if (($f_save || $f_cancel) && $cstring) {
     if ($curlock = $locks->getLocks(md5($cstring), $lockscope)) {
@@ -89,11 +89,11 @@ if (($f_save || $f_cancel) && $cstring) {
 if ($f_save && $cstring) {
     
     $decstr = $po->encstr[$cstring];
-    $msgstr = Util::getFormData('msgstr');
+    $msgstr = Horde_Util::getFormData('msgstr');
     $comments = trim($po->comments[$decstr]);
 
-    $phpformat = Util::getFormData('phpformat');
-    $fuzzy = Util::getFormData('fuzzy');
+    $phpformat = Horde_Util::getFormData('phpformat');
+    $fuzzy = Horde_Util::getFormData('fuzzy');
     
     $status = $po->status[$decstr];
     foreach($status as $k => $v) {
@@ -143,7 +143,7 @@ if ($f_save && $cstring) {
 
 /* Set up the template fields. */
 $template->set('menu', Babel::getMenu('string'));
-$template->set('notify', Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
+$template->set('notify', Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')));
 
 /* Create upload form */
 $form = &new Horde_Form($vars, _("View Translation"), $show);
@@ -163,7 +163,7 @@ if (!$app) {
     if (Babel::hasPermission('view', 'tabs', PERMS_EDIT)) {
        $hmenu_desc = _("Edit Header");
        $url = Horde::applicationUrl('edit.php');
-       $url = Util::addParameter($url, array('module' => $app,
+       $url = Horde_Util::addParameter($url, array('module' => $app,
                                              'url'    => 'view'));
        
        $hmenu = Horde::link($url, $hmenu_desc, 'menuitem', null);
@@ -225,7 +225,7 @@ if (!$app) {
        $hmenu_desc = _("All");
     }
     $url = Horde::applicationUrl('view.php');
-    $url = Util::addParameter($url, array('module' => $app));
+    $url = Horde_Util::addParameter($url, array('module' => $app));
     $filter_html .= Horde::link($url, _("Edit Mode"), 'menuitem', null). '&nbsp;' . $hmenu_desc . '</a>&nbsp;';
     $filter_html .= '|&nbsp;';
 
@@ -235,7 +235,7 @@ if (!$app) {
        $hmenu_desc = _("Translated");
     }
     $url = Horde::applicationUrl('view.php');
-    $url = Util::addParameter($url, array('module' => $app, 'filter' => 'translated'));
+    $url = Horde_Util::addParameter($url, array('module' => $app, 'filter' => 'translated'));
     $filter_html .= Horde::link($url, $hmenu_desc, 'menuitem', null). '&nbsp;' . $hmenu_desc . '</a>&nbsp;';
     $filter_html .= '|&nbsp;';
 
@@ -246,7 +246,7 @@ if (!$app) {
        $hmenu_desc = _("Fuzzy");
     }
     $url = Horde::applicationUrl('view.php');
-    $url = Util::addParameter($url, array('module' => $app, 'filter' => 'fuzzy'));
+    $url = Horde_Util::addParameter($url, array('module' => $app, 'filter' => 'fuzzy'));
     $filter_html .= Horde::link($url, $hmenu_desc, 'menuitem', null). '&nbsp;' . $hmenu_desc . '</a>&nbsp;';
     $filter_html .= '|&nbsp;';
 
@@ -256,7 +256,7 @@ if (!$app) {
        $hmenu_desc = _("Untranslated");
     }
     $url = Horde::applicationUrl('view.php');
-    $url = Util::addParameter($url, array('module' => $app, 'filter' => 'untranslated'));
+    $url = Horde_Util::addParameter($url, array('module' => $app, 'filter' => 'untranslated'));
     $filter_html .= Horde::link($url, $hmenu_desc, 'menuitem', null). '&nbsp;' . $hmenu_desc . '</a>&nbsp;';
     $filter_html .= ']&nbsp;';
 
@@ -375,7 +375,7 @@ if (!$app) {
 
                if (Babel::hasPermission('viewsource', 'tabs', PERMS_EDIT)) {
                    $surl = Horde::applicationUrl('viewsource.php');
-                   $surl = Util::addParameter($surl, array('module' => $app,
+                   $surl = Horde_Util::addParameter($surl, array('module' => $app,
                                                            'file'   => $sfile,
                                                            'line'   => $sline));
                    
@@ -432,7 +432,7 @@ if (!$app) {
              if (Babel::hasPermission('view', 'tabs', PERMS_EDIT)) {
                  if (!$editmode || $cstring != $encstr) {
                      $surl = Horde::applicationUrl('view.php');
-                     $surl = Util::addParameter($surl, array('module' => $app, 'cstring' => $encstr, 'editmode' => 1, 'page' => $page, 'filter' => $filter, 'search' => $search));
+                     $surl = Horde_Util::addParameter($surl, array('module' => $app, 'cstring' => $encstr, 'editmode' => 1, 'page' => $page, 'filter' => $filter, 'search' => $search));
                      $surl .= "#" . md5($encstr);
                      
                      echo Horde::link($surl, _("Edit Translation")) . Horde::img('babel.png') . '&nbsp;' ._("Edit Translation") . "</a>";
@@ -484,7 +484,7 @@ if (!$app) {
 <tr><td>
 <?php
   $viewurl = Horde::applicationUrl('view.php');
-$viewurl = Util::addParameter($viewurl, array('editmode' => $editmode,
+$viewurl = Horde_Util::addParameter($viewurl, array('editmode' => $editmode,
                                              'module' => $app, 
                                              'filter' => $filter,
                                              'search' => $search));
index 49ad037..a61a4c4 100644 (file)
@@ -11,9 +11,9 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$app   = Util::getFormData('module');
-$sfile = Util::getFormData('file');
-$sline = Util::getFormData('line');
+$app   = Horde_Util::getFormData('module');
+$sfile = Horde_Util::getFormData('file');
+$sline = Horde_Util::getFormData('line');
 
 if ($app == 'horde') {
     $srcfile = realpath(sprintf("%s/%s", HORDE_BASE, $sfile));
index 3d09884..1643582 100644 (file)
@@ -19,12 +19,12 @@ try {
 }
 
 /* Retrieve the desired revision from the GET variable. */
-$rev = Util::getFormData('rev');
+$rev = Horde_Util::getFormData('rev');
 if (!$rev || !$VC->isValidRevision($rev)) {
     Chora::fatal(sprintf(_("Revision %s not found"), $rev ? $rev : _("NONE")), '404 Not Found');
 }
 
-switch (Util::getFormData('actionID')) {
+switch (Horde_Util::getFormData('actionID')) {
 case 'log':
     $log = $fl->queryLogs($rev);
     if (!is_null($log)) {
@@ -50,7 +50,7 @@ Horde::addScriptFile('prototype.js', 'chora', true);
 Horde::addScriptFile('annotate.js', 'chora', true);
 
 $js_vars = array(
-    'ANNOTATE_URL' => Util::addParameter(Horde::applicationUrl('annotate.php'), array('actionID' => 'log', 'f' => $where, 'rev' => ''), null, false),
+    'ANNOTATE_URL' => Horde_Util::addParameter(Horde::applicationUrl('annotate.php'), array('actionID' => 'log', 'f' => $where, 'rev' => ''), null, false),
     'loading_text' => _("Loading...")
 );
 
index e1fb277..2cafa41 100644 (file)
@@ -18,7 +18,7 @@ if (!$atdir) {
 }
 
 $rev = $VC->hasFeature('snapshots')
-    ? Util::getFormData('rev')
+    ? Horde_Util::getFormData('rev')
     : null;
 
 try {
index b2fb224..d4c3ea3 100644 (file)
@@ -23,7 +23,7 @@ if (!$VC->isFile($fullname)) {
     Chora::fatal(sprintf(_("$fullname: no such file or directory"), $where), '404 Not Found');
 }
 
-$onb = Util::getFormData('onb');
+$onb = Horde_Util::getFormData('onb');
 try {
     $fl = $VC->getFileObject($where, array('branch' => $onb));
 } catch (Horde_Vcs_Exception $e) {
@@ -82,7 +82,7 @@ while (list(,$lg) = each($logs)) {
 
     require CHORA_TEMPLATES . '/log/rev.inc';
 
-    if (($i++ > 100) && !Util::getFormData('all')) {
+    if (($i++ > 100) && !Horde_Util::getFormData('all')) {
         break;
     }
 }
index 5705113..d54e266 100644 (file)
@@ -18,7 +18,7 @@ if ($atdir) {
 }
 
 /* Should we pretty-print this output or not? */
-$plain = Util::getFormData('p', 0);
+$plain = Horde_Util::getFormData('p', 0);
 
 /* Create the VC_File object and populate it. */
 try {
@@ -28,7 +28,7 @@ try {
 }
 
 /* Get the revision number. */
-$r = Util::getFormData('r');
+$r = Horde_Util::getFormData('r');
 
 /* If no revision is specified, default to HEAD.  If a revision is
  * specified, it's safe to cache for a long time. */
index 09228ef..6622515 100644 (file)
@@ -27,7 +27,7 @@ if (!is_file($fullname . ',v')) {
 $root = escapeShellCmd($VC->sourceroot());
 $file = escapeShellCmd($where . ',v');
 
-if (Util::getFormData('show_image')) {
+if (Horde_Util::getFormData('show_image')) {
     // Pipe out the actual image.
     $args = array('c' => $conf['paths']['cvsgraph_conf'],
                   'r' => $root);
index cfbba8e..eb68109 100644 (file)
@@ -19,8 +19,8 @@ try {
 }
 
 /* Initialise the form variables correctly. */
-$r1 = Util::getFormData('r1');
-$r2 = Util::getFormData('r2');
+$r1 = Horde_Util::getFormData('r1');
+$r2 = Horde_Util::getFormData('r2');
 
 /* Ensure that we have valid revision numbers. */
 if (!$VC->isValidRevision($r1) || !$VC->isValidRevision($r2)) {
@@ -28,15 +28,15 @@ if (!$VC->isValidRevision($r1) || !$VC->isValidRevision($r2)) {
 }
 
 /* If no type has been specified, then default to human readable. */
-$type = Util::getFormData('t', 'colored');
-if (Util::getFormData('ty') == 'u') {
+$type = Horde_Util::getFormData('t', 'colored');
+if (Horde_Util::getFormData('ty') == 'u') {
     $type = 'unified';
 }
 
 /* Unless otherwise specified, show whitespace differences and 3 lines
  * of context. */
-$ws = Util::getFormData('ws', 1);
-$num = (int)Util::getFormData('num', 3);
+$ws = Horde_Util::getFormData('ws', 1);
+$num = (int)Horde_Util::getFormData('num', 3);
 
 /* Cache the output of the diff for a week - it can be longer, since
  * it should never change. */
index 4cc3a25..31519c7 100644 (file)
@@ -98,7 +98,7 @@ class Chora
         /* See if any have been passed as GET variables, and if so, assign
          * them into the acts array. */
         foreach ($defaultActs as $key => $default) {
-            $acts[$key] = Util::getFormData($key, $default);
+            $acts[$key] = Horde_Util::getFormData($key, $default);
         }
 
         if (!isset($sourceroots[$acts['rt']])) {
@@ -118,7 +118,7 @@ class Chora
         $GLOBALS['conf']['paths']['temp'] = Horde::getTempDir();
 
         try {
-            $GLOBALS['VC'] = Horde_Vcs::factory(String::ucfirst($sourcerootopts['type']),
+            $GLOBALS['VC'] = Horde_Vcs::factory(Horde_String::ucfirst($sourcerootopts['type']),
                 array('cache' => $cache,
                       'sourceroot' => $sourcerootopts['location'],
                       'paths' => $GLOBALS['conf']['paths'],
@@ -134,7 +134,7 @@ class Chora
         $GLOBALS['conf']['options']['introTitle'] = isset($sourcerootopts['title']) ? $sourcerootopts['title'] : '';
         $GLOBALS['conf']['options']['sourceRootName'] = $sourcerootopts['name'];
 
-        $where = Util::getFormData('f', '/');
+        $where = Horde_Util::getFormData('f', '/');
 
         /* Location relative to the sourceroot. */
         $where = preg_replace(array('|^/|', '|\.\.|'), '', $where);
@@ -267,7 +267,7 @@ class Chora
             $arglist['f'] = $uri;
         }
 
-        $url = Util::addParameter(Horde::applicationUrl($script), $arglist);
+        $url = Horde_Util::addParameter(Horde::applicationUrl($script), $arglist);
 
         return empty($anchor) ? $url : ($url . '#' . $anchor);
     }
@@ -281,7 +281,7 @@ class Chora
     {
         $arglist = self::_getArgList($GLOBALS['acts'], $GLOBALS['defaultActs'], array());
 
-        $fields = Util::formInput();
+        $fields = Horde_Util::formInput();
         foreach ($arglist as $key => $val) {
             $fields .= '<input type="hidden" name="' . htmlspecialchars($key) . '" value="' . htmlspecialchars($val) . '" />';
         }
index 7df1e59..9380659 100644 (file)
@@ -26,7 +26,7 @@ if (!$VC->isFile($fullname)) {
 }
 
 $ps_opts = array();
-if ($ps_id = Util::getFormData('ps')) {
+if ($ps_id = Horde_Util::getFormData('ps')) {
     $ps_opts['range'] = array($ps_id);
 }
 
index b05523d..948a129 100644 (file)
@@ -23,13 +23,13 @@ if (strpos($mime_type, 'text/plain') !== false) {
     $data = reset($data);
     echo '<div class="fixed">' . Text_Filter::filter($data['data'], 'text2html', array('parselevel' => TEXT_HTML_MICRO)) . '</div>';
 } elseif (strpos($mime_type, 'image/') !== false) {
-    echo Horde::img(Util::addParameter(Horde::selfUrl(true), 'p', 1), '', '', '');
+    echo Horde::img(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1), '', '', '');
 } elseif ($pretty->canRender('inline')) {
     $data = $pretty->render('inline');
     $data = reset($data);
     echo $data['data'];
 } else {
-    echo Horde::link(Util::addParameter(Horde::selfUrl(true), 'p', 1)) . Horde::img('download.png', '', '', $registry->getImageDir('horde')) . ' ' . sprintf(_("Download revision %s"), $r) . '</a>';
+    echo Horde::link(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1)) . Horde::img('download.png', '', '', $registry->getImageDir('horde')) . ' ' . sprintf(_("Download revision %s"), $r) . '</a>';
 }
 ?>
 </div>
index 77d81ec..7b815fd 100644 (file)
@@ -11,7 +11,7 @@ if (!empty($refresh_time) && ($refresh_time > 0) && !empty($refresh_url)) {
     echo "<meta http-equiv=\"refresh\" content=\"$refresh_time;url=$refresh_url\">\n";
 }
 
-if (Util::nonInputVar('js_vars')) {
+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";
 }
@@ -23,4 +23,4 @@ Horde::includeScriptFiles();
 <?php echo Horde::stylesheetLink('chora') ?>
 </head>
 
-<body<?php if ($bc = Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
+<body<?php if ($bc = Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
index 568400a..244cbe0 100644 (file)
@@ -3,9 +3,9 @@
   <td>
    <form method="get" action="diff.php">
     <?php echo Chora::formInputs() ?>
-    <input type="hidden" name="f" value="<?php echo htmlspecialchars(Util::getFormData('f')) ?>" />
-    <input type="hidden" name="r1" value="<?php echo htmlspecialchars(Util::getFormData('r1')) ?>" />
-    <input type="hidden" name="r2" value="<?php echo htmlspecialchars(Util::getFormData('r2')) ?>" />
+    <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
+    <input type="hidden" name="r1" value="<?php echo htmlspecialchars(Horde_Util::getFormData('r1')) ?>" />
+    <input type="hidden" name="r2" value="<?php echo htmlspecialchars(Horde_Util::getFormData('r2')) ?>" />
     <?php echo _("Download diff as: ") ?>
     <select name="t" onchange="this.form.submit()">
 <?php if (isset($diff_types['unified'])): ?>
index f2b6027..ccd4c33 100644 (file)
@@ -5,7 +5,7 @@
    <form method="get" action="browsedir.php">
    <?php echo _("View Branch:") ?>
     <?php echo Chora::formInputs() ?>
-    <input type="hidden" name="f" value="<?php echo htmlspecialchars(Util::getFormData('f')) ?>" />
+    <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
     <select name="rev" onchange="this.form.submit()">
 <?php foreach (array_map('htmlspecialchars', $branches) as $val): ?>
      <option value="<?php echo $val ?>"<?php echo ($val == $rev) ? ' selected="selected"' : '' ?>><?php echo $val ?></option>
index 2b92f61..b3366c6 100644 (file)
@@ -1,12 +1,12 @@
 </tbody>
 </table>
 
-<?php if ($fl->revisionCount() > 100 && !Util::getFormData('all')): ?>
+<?php if ($fl->revisionCount() > 100 && !Horde_Util::getFormData('all')): ?>
 <table class="options" cellspacing="0">
  <tr>
   <td>
    <?php printf(_("Only showing the 100 latest revisions. %sShow all revisions?</a> (may take a while)."),
-                Horde::link(Util::addParameter(Horde::selfUrl(true), 'all', 1))) ?>
+                Horde::link(Horde_Util::addParameter(Horde::selfUrl(true), 'all', 1))) ?>
   </td>
  </tr>
 </table>
index 857d288..d8580fd 100644 (file)
@@ -9,7 +9,7 @@
   <td>
    <form method="get" action="diff.php">
     <?php echo Chora::formInputs() ?>
-    <input type="hidden" name="f" value="<?php echo htmlspecialchars(Util::getFormData('f')) ?>" />
+    <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
     <?php printf(_("Show diffs between %s and %s"),
                  '<input type="text" size="6" name="r1" value="' . $diffValueLeft . '" />',
                  '<input type="text" size="6" name="r2" value="' . $diffValueRight . '" />') ?>
@@ -25,7 +25,7 @@
   <td>
    <form method="get" action="browsefile.php">
     <?php echo Chora::formInputs() ?>
-    <input type="hidden" name="f" value="<?php echo htmlspecialchars(Util::getFormData('f')) ?>" />
+    <input type="hidden" name="f" value="<?php echo htmlspecialchars(Horde_Util::getFormData('f')) ?>" />
     <?php echo _("Show Branch:") ?>
     <select name="onb" onchange="this.form.submit()">
      <option value="0"<?php if (!isset($onb) || !$onb) echo ' selected="selected"' ?>><?php echo _("All Branches") ?></option>
index fcac2cc..b375144 100644 (file)
 require_once dirname(__FILE__) . '/lib/base.load.php';
 include_once HORDE_BASE . '/lib/core.php';
 
-/* We should have loaded the String class, from the Horde_Util
-   package, in core.php. If String:: isn't defined, then we're not
+/* We should have loaded the Horde_String class, from the Horde_Util
+   package, in core.php. If Horde_String:: isn't defined, then we're not
    finding some critical libraries. */
-if (!class_exists('String')) {
+if (!class_exists('Horde_String')) {
     echo '<br /><h2 style="color:red">The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the <a href="http://cvs.horde.org/cvs.php/framework">framework</a> module from <a href="http://www.horde.org/source/">Horde CVS</a>, and install the packages in it with the install-packages.php script.</h2>';
     exit;
 }
index c8099b1..bfced6e 100644 (file)
 
 @define('CRUMB_BASE', dirname(__FILE__));
 require_once CRUMB_BASE . '/lib/base.php';
-require_once 'Horde/Variables.php';
 require_once 'Horde/Form.php';
 require_once 'Horde/Form/Renderer.php';
 require_once CRUMB_BASE . '/lib/Forms/AddClient.php';
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $formname = $vars->get('formname');
 
 $addform = new Horde_Form_AddClient($vars);
index 1a500c2..f744a0d 100644 (file)
@@ -15,9 +15,8 @@ require_once CRUMB_BASE . '/lib/base.php';
 require_once 'Horde/Form.php';
 require_once 'Horde/Form/Renderer.php';
 require_once CRUMB_BASE . '/lib/Forms/ContactSearch.php';
-require_once 'Horde/Variables.php';
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 
 $searchform = new Horde_Form_ContactSearch($vars);
 
index c91bcdd..0796b6e 100644 (file)
@@ -26,4 +26,4 @@ Horde::includeScriptFiles();
 <?php echo Horde::stylesheetLink('skeleton') ?>
 </head>
 
-<body<?php if ($bc = Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
+<body<?php if ($bc = Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
index c0bca33..7924c68 100644 (file)
@@ -15,11 +15,11 @@ require_once HORDE_BASE . '/lib/base.php';
 require_once 'Horde/Loader.php';
 
 // Block to load
-$block_id = Util::getFormData('block');
+$block_id = Horde_Util::getFormData('block');
 list($app, $name) = explode(':', $block_id);
 
 $block_data = array();
-$block = Horde_Block_Collection::getBlock($app, $name, Util::getFormData('defaults'));
+$block = Horde_Block_Collection::getBlock($app, $name, Horde_Util::getFormData('defaults'));
 if ($block instanceof PEAR_Error) {
     $block_data['title'] = $block->getMessage();
     $block_data['content'] = $block->getDebugInfo();
index 92ff914..bd6c2e1 100644 (file)
@@ -15,7 +15,7 @@ require_once HORDE_BASE . '/lib/base.php';
 require_once 'Horde/Loader.php';
 
 // Block to load
-$block_id = Util::getFormData('block');
+$block_id = Horde_Util::getFormData('block');
 list($app, $name) = explode(':', $block_id);
 
 // Load collection
@@ -25,11 +25,11 @@ $blocks = new Horde_Block_Collection(null, array($app));
 $params = $blocks->getParams($app, $name);
 if (empty($params) ||
     !$blocks->isEditable($app, $name)) {
-    echo '<script type="text/javascript">noParams("' . Util::getFormData('widget') . '", "' . _("This block has no special parameters.") . '");</script>';
+    echo '<script type="text/javascript">noParams("' . Horde_Util::getFormData('widget') . '", "' . _("This block has no special parameters.") . '");</script>';
 } else {
     $block = &$blocks->getBlock($app, $name);
 
-    $defaults = Util::getFormData('defaults');
+    $defaults = Horde_Util::getFormData('defaults');
     if (empty($defaults)) {
         foreach ($params as $key => $val) {
             $defaults[$key] = $val;
index 41057cd..46b6cbf 100644 (file)
@@ -19,7 +19,7 @@ if (!Auth::isAuthenticated()) {
 }
 
 $layout = array();
-$params = Util::getPost('params');
+$params = Horde_Util::getPost('params');
 foreach ($_POST as $column => $rows) {
     if (substr($column, 0, 11) != 'widget_col_') {
         continue;
index a917a10..0ffcbcd 100644 (file)
@@ -1,9 +1,9 @@
 <h1 class="header"><?php echo htmlspecialchars($blocks->getName($app, $name)) ?></h1>
 <form action="<?php echo Horde::selfUrl() ?>#block" method="post" id="blockform" name="blockform">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="action" value="save" />
-<input type="hidden" name="block" value="<?php echo Util::getFormData('block') ?>" />
-<input type="hidden" name="widget" value="<?php echo Util::getFormData('widget') ?>" />
+<input type="hidden" name="block" value="<?php echo Horde_Util::getFormData('block') ?>" />
+<input type="hidden" name="widget" value="<?php echo Horde_Util::getFormData('widget') ?>" />
 <table style="width: 100%; border-collapse: collapse;">
 <?php if ($block->updateable): ?>
 <tr>
index 9055758..cdfb050 100644 (file)
@@ -11,7 +11,7 @@
 @define('FIMA_BASE', dirname(__FILE__));
 require_once FIMA_BASE . '/lib/base.php';
 require_once FIMA_BASE . '/lib/Forms/account.php';
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 
 /* Redirect to the account list if no action has been requested. */
 $actionID = $vars->get('actionID');
@@ -76,7 +76,7 @@ case 'modify_account':
         if (!isset($account) || !isset($account['account_id'])) {
             $notification->push(_("Account not found."), 'horde.error');
         } else {
-            $vars = new Variables($account);
+            $vars = new Horde_Variables($account);
             $vars->set('actionID', 'save_account');
             $vars->set('number_new', $vars->get('number'));
             $form = new Fima_AccountForm($vars, sprintf(_("Edit: %s"), trim($account['number'] . ' ' . $account['name'])), $share->hasPermission(Auth::getAuth(), PERMS_DELETE));
@@ -92,7 +92,7 @@ case 'save_account':
     if ($vars->get('submitbutton') == _("Delete this account")) {
         /* Redirect to the delete form. */
         $account_id = $vars->get('account_id');
-        header('Location: ' . Util::addParameter(Horde::applicationUrl('account.php', true), array('account' => $account_id, 'actionID' => 'delete_account'), null, false));
+        header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('account.php', true), array('account' => $account_id, 'actionID' => 'delete_account'), null, false));
         exit;
     }
 
@@ -160,7 +160,7 @@ case 'save_account':
         $notification->push(sprintf(_("Saved %s."), trim($info['number_new'] . ' ' . $info['name'])), 'horde.success');
         /* Return to the accounts. */
         if ($vars->get('submitbutton') == _("Save and New")) {
-            header('Location: ' . Util::addParameter(Horde::applicationUrl('account.php', true), array('account' => $vars->get('parent_id'), 'actionID' => 'add_account'), null, false));
+            header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('account.php', true), array('account' => $vars->get('parent_id'), 'actionID' => 'add_account'), null, false));
         } else {
             header('Location: ' . Horde::applicationUrl('accounts.php', true));
         }
@@ -178,7 +178,7 @@ case 'delete_account':
         if (!isset($account) || !isset($account['account_id'])) {
             $notification->push(_("Account not found."), 'horde.error');
         } else {
-            $vars = new Variables($account);
+            $vars = new Horde_Variables($account);
             $vars->set('actionID', 'purge_account');
             $vars->set('dssubaccounts', array('type' => 'none', 'account' => $account_id));
             $vars->set('dspostings', array('type' => 'delete', 'account' => $account_id));
@@ -195,7 +195,7 @@ case 'purge_account':
     if ($vars->get('submitbutton') == _("Edit this account")) {
         /* Redirect to the edit form. */
         $account_id = $vars->get('account_id');
-        header('Location: ' . Util::addParameter(Horde::applicationUrl('account.php', true), array('account' => $account_id, 'actionID' => 'modify_account'), null, false));
+        header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('account.php', true), array('account' => $account_id, 'actionID' => 'modify_account'), null, false));
         exit;
     }
 
index d903439..011aa06 100644 (file)
@@ -22,7 +22,7 @@ if (is_a($share, 'PEAR_Error')) {
 }
 
 /* Run through the action handlers. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'delete_all':
     if (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE)) {
@@ -46,14 +46,14 @@ default:
 
 /* Prepare account folder structure */
 $account_url = Horde::applicationUrl('account.php');;
-$view_url = Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'search_postings');
+$view_url = Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'search_postings');
 
 $accounts = array();
 $accounts['root'] = array('account_id' => 'root', 'owner' => $ledger, 'number' => '', 'type' => 'root', 'name' => $share->get('name'), 'desc' => '', 'icon' => 'accounts.png', 'closed' => false, 'expanded' => true, 'parent_id' => null);
 
 $types = Fima::getAccountTypes();
 foreach ($types as $typeId => $typeLabel) {
-    $accounts[$typeId] = array('account_id' => $typeId, 'owner' => $ledger, 'number' => '', 'type' => $typeId, 'name' => $typeLabel, 'desc' => '', 'icon' => $typeId . '.png', 'closed' => false, 'expanded' => true, 'parent_id' => 'root', 'view_link' => Util::addParameter($view_url, 'search_type', $typeId), 'add_link' => Util::addParameter($account_url, array('account' => $typeId, 'actionID' => 'add_account')));
+    $accounts[$typeId] = array('account_id' => $typeId, 'owner' => $ledger, 'number' => '', 'type' => $typeId, 'name' => $typeLabel, 'desc' => '', 'icon' => $typeId . '.png', 'closed' => false, 'expanded' => true, 'parent_id' => 'root', 'view_link' => Horde_Util::addParameter($view_url, 'search_type', $typeId), 'add_link' => Horde_Util::addParameter($account_url, array('account' => $typeId, 'actionID' => 'add_account')));
 }
 
 /* Get accounts. */
@@ -61,11 +61,11 @@ $accountlist = Fima::listAccounts();
 foreach ($accountlist as $accountId => $account) {
     $accounts[$accountId] = $account;
     
-    $accounts[$accountId]['view_link'] = Util::addParameter($view_url, $account['type'] == FIMA_ACCOUNTTYPE_ASSET ? 'search_asset' : 'search_account', $account['account_id']);
-    $account_url_account = Util::addParameter($account_url, 'account', $account['account_id']);
-    $accounts[$accountId]['add_link'] = Util::addParameter($account_url_account, 'actionID', 'add_account');
-    $accounts[$accountId]['edit_link'] = Util::addParameter($account_url_account, 'actionID', 'modify_account');
-    $accounts[$accountId]['delete_link'] = Util::addParameter($account_url_account, 'actionID', 'delete_account');
+    $accounts[$accountId]['view_link'] = Horde_Util::addParameter($view_url, $account['type'] == FIMA_ACCOUNTTYPE_ASSET ? 'search_asset' : 'search_account', $account['account_id']);
+    $account_url_account = Horde_Util::addParameter($account_url, 'account', $account['account_id']);
+    $accounts[$accountId]['add_link'] = Horde_Util::addParameter($account_url_account, 'actionID', 'add_account');
+    $accounts[$accountId]['edit_link'] = Horde_Util::addParameter($account_url_account, 'actionID', 'modify_account');
+    $accounts[$accountId]['delete_link'] = Horde_Util::addParameter($account_url_account, 'actionID', 'delete_account');
     
     if ($account['parent_id'] !== null && isset($accounts[$account['parent_id']])) {
         unset($accounts[$accountId]['add_link']);
@@ -81,10 +81,10 @@ foreach ($accountlist as $accountId => $account) {
 }
 
 /* Print. */
-$print_view = (bool)Util::getFormData('print');
+$print_view = (bool)Horde_Util::getFormData('print');
 if (!$print_view) {
     Horde::addScriptFile('popup.js', 'horde', true);
-    $print_link = Horde::applicationUrl(Util::addParameter('accounts.php', array('print' => 1)));
+    $print_link = Horde::applicationUrl(Horde_Util::addParameter('accounts.php', array('print' => 1)));
 }
 
 Horde::addScriptFile('tables.js', 'horde', true);
index 3f8a5ef..edd552f 100644 (file)
@@ -48,10 +48,10 @@ $time_fields = array('date' => 'date');
 /* Initial values. */
 $param = array('time_fields' => $time_fields,
                'file_types'  => $file_types);
-$import_format = Util::getFormData('import_format', '');
-$import_step   = Util::getFormData('import_step', 0) + 1;
+$import_format = Horde_Util::getFormData('import_format', '');
+$import_step   = Horde_Util::getFormData('import_step', 0) + 1;
 $next_step     = IMPORT_FILE;
-$actionID      = Util::getFormData('actionID');
+$actionID      = Horde_Util::getFormData('actionID');
 $error         = false;
 
 /* Loop through the action handlers. */
@@ -89,8 +89,8 @@ case 'export':
                 $row[$key] = Fima::convertValueToAmount($value);
                 break;
             case 'eo':
-            case 'desc':            
-                $row[$key] = String::convertCharset($value, NLS::getCharset(), $params['charset']);
+            case 'desc':
+                $row[$key] = Horde_String::convertCharset($value, NLS::getCharset(), $params['charset']);
                 break;
             default:
                 break;
@@ -105,7 +105,7 @@ case 'export':
         break;
     }
 
-    switch (Util::getFormData('exportID')) {
+    switch (Horde_Util::getFormData('exportID')) {
     case EXPORT_CSV:
         $csv = &Horde_Data::singleton('csv');
         $csv->exportFile(_("postings.csv"), $data, true);
@@ -127,7 +127,7 @@ case IMPORT_FILE:
     }
 
     $_SESSION['import_data']['target'] = $ledger;
-    $_SESSION['import_data']['purge'] = Util::getFormData('purge');
+    $_SESSION['import_data']['purge'] = Horde_Util::getFormData('purge');
     break;
 }
 
index 6c9386a..2a61d93 100644 (file)
@@ -19,7 +19,7 @@ if (!Auth::getAuth() || $prefs->isLocked('active_ledger')) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Fima_CreateLedgerForm($vars);
 
 // Execute if the form is valid.
index 9d89f53..e561d61 100644 (file)
@@ -18,7 +18,7 @@ if (!Auth::getAuth()) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $ledger_id = $vars->get('l');
 if ($ledger_id == Auth::getAuth()) {
     $notification->push(_("This ledger cannot be deleted."), 'horde.warning');
@@ -40,7 +40,7 @@ if (is_a($ledger, 'PEAR_Error')) {
 $form = new Fima_DeleteLedgerForm($vars, $ledger);
 
 // Execute if the form is valid (must pass with POST variables only).
-if ($form->validate(new Variables($_POST))) {
+if ($form->validate(new Horde_Variables($_POST))) {
     $result = $form->execute();
     if (is_a($result, 'PEAR_Error')) {
         $notification->push($result, 'horde.error');
index 1ddc22c..d7b2ddd 100644 (file)
@@ -18,7 +18,7 @@ if (!Auth::getAuth()) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $ledger = $fima_shares->getShare($vars->get('l'));
 if (is_a($ledger, 'PEAR_Error')) {
     $notification->push($ledger, 'horde.error');
index 7325cbf..8ec8596 100644 (file)
@@ -15,7 +15,7 @@ class Horde_Block_fima_tree_menu extends Horde_Block {
         global $registry;
 
         $menus = array(
-            array('add', _("Add Postings"), 'add.png', Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings')),
+            array('add', _("Add Postings"), 'add.png', Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings')),
             array('search', _("Search"), 'search.png', Horde::applicationUrl('search.php'), $registry->getImageDir('horde')),
             array('accounts', _("Accounts"), 'accounts.png', Horde::applicationUrl('accounts.php')),
             array('reports', _("Reports"), 'report.png', Horde::applicationUrl('report.php')),
index a46a07d..066a2c9 100644 (file)
@@ -505,13 +505,13 @@ class Fima_Driver_sql extends Fima_Driver {
                      'owner' => $row['account_owner'],
                      'number' => sprintf('%\'04d', $row['account_number']),
                      'type' => $row['account_type'],
-                     'name' => String::convertCharset($row['account_name'], $this->_params['charset']),
+                     'name' => Horde_String::convertCharset($row['account_name'], $this->_params['charset']),
                      'eo' => $row['account_eo'],
-                     'desc' => String::convertCharset($row['account_desc'], $this->_params['charset']),
+                     'desc' => Horde_String::convertCharset($row['account_desc'], $this->_params['charset']),
                      'closed' => $row['account_closed'],
                      'label' => trim($row['account_number'] . ' ' .
                                 (($parent === null) ? '' : $parent['name'] . ' - ') . 
-                                String::convertCharset($row['account_name'], $this->_params['charset'])),
+                                Horde_String::convertCharset($row['account_name'], $this->_params['charset'])),
                      'parent_id' => ($parent === null) ? null : $parent['account_id'],
                      'parent_number' => ($parent === null) ? '' : $parent['number'],
                      'parent_name' => ($parent === null) ? '' : $parent['name']);
@@ -542,9 +542,9 @@ class Fima_Driver_sql extends Fima_Driver {
                         $this->_ledger,
                         sprintf('%\'04d', $number),
                         $type,
-                        String::convertCharset($name, NLS::getCharset(), $this->_params['charset']),
+                        Horde_String::convertCharset($name, NLS::getCharset(), $this->_params['charset']),
                         (int)(bool)$eo,
-                        String::convertCharset($desc, NLS::getCharset(), $this->_params['charset']),
+                        Horde_String::convertCharset($desc, 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,
-                        String::convertCharset($name, NLS::getCharset(), $this->_params['charset']),
+                        Horde_String::convertCharset($name, NLS::getCharset(), $this->_params['charset']),
                         (int)(bool)$eo,
-                        String::convertCharset($desc, NLS::getCharset(), $this->_params['charset']),
+                        Horde_String::convertCharset($desc, NLS::getCharset(), $this->_params['charset']),
                         (int)(bool)$closed,
                         $this->_ledger,
                         $accountId);
@@ -701,7 +701,7 @@ class Fima_Driver_sql extends Fima_Driver {
                      'date' => $row['posting_date'],
                      'asset' => $row['posting_asset'],
                      'account' => $row['posting_account'],
-                     'desc' => String::convertCharset($row['posting_desc'], $this->_params['charset']),
+                     'desc' => Horde_String::convertCharset($row['posting_desc'], $this->_params['charset']),
                      'amount' => $row['posting_amount'],
                      'eo' => (int)(bool)$row['posting_eo']);
     }
@@ -736,7 +736,7 @@ class Fima_Driver_sql extends Fima_Driver {
                         $account,
                         (int)(bool)$eo,
                         (float)$amount,
-                        String::convertCharset($desc, NLS::getCharset(), $this->_params['charset']));
+                        Horde_String::convertCharset($desc, 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,
-                        String::convertCharset($desc, NLS::getCharset(), $this->_params['charset']),
+                        Horde_String::convertCharset($desc, NLS::getCharset(), $this->_params['charset']),
                         $this->_ledger,
                         $postingId);
 
index 6fcdc8e..1ec296e 100644 (file)
@@ -681,7 +681,7 @@ class Fima {
         if (!$GLOBALS['display_ledgers']) {
             $GLOBALS['display_ledgers'] = array();
         }
-        if (($ledgerId = Util::getFormData('display_ledger')) !== null) {
+        if (($ledgerId = Horde_Util::getFormData('display_ledger')) !== null) {
             if (is_array($ledgerId)) {
                 $GLOBALS['display_ledgers'] = $ledgerId;
             } else {
@@ -739,7 +739,7 @@ class Fima {
         $GLOBALS['prefs']->setValue('display_ledgers', serialize($GLOBALS['display_ledgers']));
         
         /* Update active ledger. */
-        if (($changeledger = Util::getFormData('changeledger')) !== null) {
+        if (($changeledger = Horde_Util::getFormData('changeledger')) !== null) {
             $GLOBALS['prefs']->setValue('active_ledger', $changeledger);
         }
     }
@@ -751,12 +751,12 @@ class Fima {
     {
         global $conf, $registry, $browser, $print_link;
         
-        $actionID = Util::getFormData('actionID');
+        $actionID = Horde_Util::getFormData('actionID');
         
         require_once 'Horde/Menu.php';
         $menu = new Menu(HORDE_MENU_MASK_ALL);
         $menu->add(Horde::applicationUrl('postings.php'), _("_List Postings"), 'list.png', null, null, null, (basename($_SERVER['PHP_SELF']) == 'index.php' && basename(dirname($_SERVER['PHP_SELF'])) != 'ledgers') ? 'current' : ($actionID === null ? null : '__noselection'));
-        $menu->add(Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings'), _("Add _Postings"), 'add.png', null, null, null, $actionID == 'add_postings' ? 'current' : '__noselection');
+        $menu->add(Horde_Util::addParameter(Horde::applicationUrl('postings.php'), 'actionID', 'add_postings'), _("Add _Postings"), 'add.png', null, null, null, $actionID == 'add_postings' ? 'current' : '__noselection');
         $menu->add(Horde::applicationUrl('search.php'), _("Search"), 'search.png', $registry->getImageDir('horde'));
         $menu->add(Horde::applicationUrl('accounts.php'), _("_Accounts"), 'accounts.png');
         
index 6b0633a..514c2ed 100644 (file)
@@ -10,9 +10,6 @@
  * @package Fima
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index b33e770..f80fc68 100644 (file)
@@ -10,9 +10,6 @@
  * @package Fima
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index fb87995..a7595f5 100644 (file)
@@ -10,9 +10,6 @@
  * @package Fima
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index 21e29c0..b4c72f5 100644 (file)
@@ -10,9 +10,6 @@
  * @package Fima
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index 0e30244..bb9c2fb 100644 (file)
@@ -18,7 +18,7 @@ if (!defined('HORDE_BASE')) {
 require_once HORDE_BASE . '/lib/core.php';
 
 // Registry.
-$session_control = Util::nonInputVar('session_control');
+$session_control = Horde_Util::nonInputVar('session_control');
 if ($session_control == 'none') {
     $registry = &Registry::singleton(HORDE_SESSION_NONE);
 } elseif ($session_control == 'readonly') {
index 024e78e..55e0c03 100644 (file)
@@ -15,7 +15,7 @@ function handle_ledgerselect($updated)
 {
     global $prefs;
 
-    $active_ledger = Util::getFormData('active_ledger');
+    $active_ledger = Horde_Util::getFormData('active_ledger');
     if (!is_null($active_ledger)) {
         $ledgers = Fima::listLedgers();
         if (is_array($ledgers) && array_key_exists($active_ledger, $ledgers)) {
@@ -30,7 +30,7 @@ function handle_closedperiodselect($updated)
 {
     global $prefs;
     
-    $period = Util::getFormData('closedperiod');
+    $period = Horde_Util::getFormData('closedperiod');
     if ((int)$period['year'] > 0 && (int)$period['month'] > 0) {
         $period = mktime(0, 0, 0, $period['month'] + 1, 0, $period['year']);
     } else {
@@ -40,4 +40,4 @@ function handle_closedperiodselect($updated)
     $updated = true;
     
     return $updated;
-}
\ No newline at end of file
+}
index f579057..1033cce 100644 (file)
 
 @define('FIMA_BASE', dirname(__FILE__));
 require_once FIMA_BASE . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 
 /* Get the current action ID. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 
 /* Change posting type. */
-if (($postingtype = Util::getFormData('postingtype')) !== null) {
+if (($postingtype = Horde_Util::getFormData('postingtype')) !== null) {
     $postingtypeold = $prefs->getValue('active_postingtype');
     $prefs->setValue('active_postingtype', $postingtype);
 }
@@ -31,7 +30,7 @@ $closedperiod = (int)$prefs->getValue('closed_period');
 /* Create page array. */
 $pageOb = array();
 $pageOb['url'] = Horde::applicationUrl('postings.php');
-if (($pageOb['page'] = Util::getFormData('page')) === null) {
+if (($pageOb['page'] = Horde_Util::getFormData('page')) === null) {
     $pageOb['page'] = $prefs->getValue('startpage');
 }
 $pageOb['mode'] = 'list';
@@ -43,25 +42,25 @@ $filters = array();
 switch ($actionID) {
 case 'change_sort':
     /* Sort out the sorting values. */
-    if (($sortby = Util::getFormData('sortby')) !== null) {
+    if (($sortby = Horde_Util::getFormData('sortby')) !== null) {
         $prefs->setValue('sortby', $sortby);
     }
-    if (($sortdir = Util::getFormData('sortdir')) !== null) {
+    if (($sortdir = Horde_Util::getFormData('sortdir')) !== null) {
         $prefs->setValue('sortdir', $sortdir);
     }
     break;
 
 case 'search_postings':
     /* If we're searching, only list those postings that match the search result. */
-    $_SESSION['fima_search'] = array('type'         => Util::getFormData('search_type'),
-                                     'date_start'   => Util::getFormData('search_date_start'),
-                                     'date_end'     => Util::getFormData('search_date_end'),
-                                     'asset'        => Util::getFormData('search_asset'),
-                                     'account'      => Util::getFormData('search_account'),
-                                     'desc'         => Util::getFormData('search_desc'),
-                                     'amount_start' => Util::getFormData('search_amount_start'),
-                                     'amount_end'   => Util::getFormData('search_amount_end'),
-                                     'eo'           => Util::getFormData('search_eo'));
+    $_SESSION['fima_search'] = array('type'         => Horde_Util::getFormData('search_type'),
+                                     'date_start'   => Horde_Util::getFormData('search_date_start'),
+                                     'date_end'     => Horde_Util::getFormData('search_date_end'),
+                                     'asset'        => Horde_Util::getFormData('search_asset'),
+                                     'account'      => Horde_Util::getFormData('search_account'),
+                                     'desc'         => Horde_Util::getFormData('search_desc'),
+                                     'amount_start' => Horde_Util::getFormData('search_amount_start'),
+                                     'amount_end'   => Horde_Util::getFormData('search_amount_end'),
+                                     'eo'           => Horde_Util::getFormData('search_eo'));
 
     /* Build filters. */
     if ($_SESSION['fima_search']['type'] !== null) {
@@ -131,17 +130,17 @@ case 'clear_search':
 
 case 'add_postings':
     $pageOb['mode'] = 'edit';
-    $pageOb['url'] = Util::addParameter($pageOb['url'], 'actionID', 'add_postings');
+    $pageOb['url'] = Horde_Util::addParameter($pageOb['url'], 'actionID', 'add_postings');
     $actionID = 'save_postings';
     $postings = array();
     $title = _("Add Postings");
     break;
 
 case 'edit_postings':
-    $postingset = Util::getFormData('indices');
+    $postingset = Horde_Util::getFormData('indices');
     if ($postingset !== null) {
         $pageOb['mode'] = 'edit';
-        $pageOb['url'] = Util::addParameter($pageOb['url'], 'actionID', 'add_postings');
+        $pageOb['url'] = Horde_Util::addParameter($pageOb['url'], 'actionID', 'add_postings');
         $actionID = 'save_postings';
         $filters[] = array('id', $postingset);
         $title = _("Edit Postings");
@@ -149,7 +148,7 @@ case 'edit_postings':
     break;
 
 case 'shift_postings':
-    $postingset = Util::getFormData('indices');
+    $postingset = Horde_Util::getFormData('indices');
     if ($postingset !== null) {
         $pageOb['mode'] = 'shift';
         $actionID = 'update_postings';
@@ -167,7 +166,7 @@ case 'transfer_postings':
 
 case 'save_postings':
     /* Get the form values. */
-    $postingset = Util::getFormData('posting_id');
+    $postingset = Horde_Util::getFormData('posting_id');
 
     $share = &$GLOBALS['fima_shares']->getShare($ledger);
     if (!$share->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
@@ -180,12 +179,12 @@ case 'save_postings':
         $posting_owner = $ledger;
         $posting_type = $prefs->getValue('active_postingtype');
 
-        $posting_dates = Util::getFormData('date');
-        $posting_assets = Util::getFormData('asset');
-        $posting_accounts = Util::getFormData('account');
-        $posting_eos = Util::getFormData('eo');
-        $posting_amounts = Util::getFormData('amount');
-        $posting_descs = Util::getFormData('desc');
+        $posting_dates = Horde_Util::getFormData('date');
+        $posting_assets = Horde_Util::getFormData('asset');
+        $posting_accounts = Horde_Util::getFormData('account');
+        $posting_eos = Horde_Util::getFormData('eo');
+        $posting_amounts = Horde_Util::getFormData('amount');
+        $posting_descs = Horde_Util::getFormData('desc');
         
         $postings = array();
         $savecount = 0;
@@ -282,7 +281,7 @@ case 'save_postings':
 
 case 'delete_postings':
     /* Delete postings if we're provided with valid account IDs. */
-    $postingset = Util::getFormData('indices');
+    $postingset = Horde_Util::getFormData('indices');
 
     $share = &$GLOBALS['fima_shares']->getShare($ledger);
     if (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE)) {
@@ -313,7 +312,7 @@ case 'delete_postings':
 
 case 'update_postings':
     /* Get the form values. */
-    $postingset = Util::getFormData('posting_id');
+    $postingset = Horde_Util::getFormData('posting_id');
 
     $share = &$GLOBALS['fima_shares']->getShare($ledger);
     if (!$share->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
@@ -321,9 +320,9 @@ case 'update_postings':
         header('Location: ' . Horde::applicationUrl('postings.php', true));
         exit;
     } elseif ($postingset !== null) {
-        $posting_type = Util::getFormData('type');
-        $posting_asset = Util::getFormData('asset');
-        $posting_account = Util::getFormData('account');
+        $posting_type = Horde_Util::getFormData('type');
+        $posting_asset = Horde_Util::getFormData('asset');
+        $posting_account = Horde_Util::getFormData('account');
         
         if ($posting_type || $posting_asset || $posting_account) {
             $storage = &Fima_Driver::singleton($ledger);
@@ -355,19 +354,19 @@ case 'copymove_postings':
         $notification->push(sprintf(_("Access denied transfering postings in %s."), $share->get('name')), 'horde.error');
         header('Location: ' . Horde::applicationUrl('postings.php', true));
         exit;
-    } elseif (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE) && (!Util::getFormData('keep') || Util::getFormData('delete'))) {
+    } elseif (!$share->hasPermission(Auth::getAuth(), PERMS_DELETE) && (!Horde_Util::getFormData('keep') || Horde_Util::getFormData('delete'))) {
         $notification->push(sprintf(_("Access denied transfering postings in %s."), $share->get('name')), 'horde.error');
         header('Location: ' . Horde::applicationUrl('postings.php', true));
         exit;
     } else {
-        $type_from = Util::getFormData('type_from');
-        $period_from = Util::getFormData('period_from');
-        $keep = Util::getFormData('keep');
-        $summarize = Util::getFormData('summarize');
-        $summarize_account = Util::getFormData('summarize_post_account');
-        $type_to = Util::getFormData('type_to');
-        $period_to = Util::getFormData('period_to');
-        $delete = Util::getFormData('delete');
+        $type_from = Horde_Util::getFormData('type_from');
+        $period_from = Horde_Util::getFormData('period_from');
+        $keep = Horde_Util::getFormData('keep');
+        $summarize = Horde_Util::getFormData('summarize');
+        $summarize_account = Horde_Util::getFormData('summarize_post_account');
+        $type_to = Horde_Util::getFormData('type_to');
+        $period_to = Horde_Util::getFormData('period_to');
+        $delete = Horde_Util::getFormData('delete');
 
         $period_from_start = mktime(0, 0, 0, ($period_from['month'] === '') ? 1 : $period_from['month'], 1, (int)$period_from['year']);
         $period_from_end = mktime(0, 0, 0, ($period_from['month'] === '') ? 12 : $period_from['month'] + 1, ($period_from['month'] === '') ? 31 : 0, (int)$period_from['year']);
@@ -506,10 +505,10 @@ default:
 }
 
 /* Print. */
-$print_view = (bool)Util::getFormData('print');
+$print_view = (bool)Horde_Util::getFormData('print');
 if (!$print_view && $pageOb['mode'] == 'list') {
     Horde::addScriptFile('popup.js', 'horde', true);
-    $print_link = Util::addParameter(Horde::applicationUrl('postings.php'), array('print' => 1));
+    $print_link = Horde_Util::addParameter(Horde::applicationUrl('postings.php'), array('print' => 1));
 }
 
 /* Filters. */
@@ -625,7 +624,7 @@ if ($pageOb['mode'] == 'list') {
 if ($pageOb['mode'] == 'list' || $pageOb['mode'] == 'edit') {
     $sortby = $prefs->getValue('sortby');
     $sortdir = $prefs->getValue('sortdir');
-    $sorturl = Util::addParameter($pageOb['url'], 'sortdir', ($sortdir) ? 0 : 1);
+    $sorturl = Horde_Util::addParameter($pageOb['url'], 'sortdir', ($sortdir) ? 0 : 1);
 }
 
 /* Generate page links. */
@@ -635,18 +634,18 @@ if ($pageOb['mode'] == 'list') {
         $pageOb['pages_first'] = Horde::img('nav/first-grey.png', null, null, $graphicsdir);
         $pageOb['pages_prev'] = Horde::img('nav/left-grey.png', null, null, $graphicsdir);
     } else {
-        $first_url = Util::addParameter($pageOb['url'], 'page', 1);
+        $first_url = Horde_Util::addParameter($pageOb['url'], 'page', 1);
         $pageOb['pages_first'] = Horde::link($first_url, _("First Page")) . Horde::img('nav/first.png', '<<', null, $graphicsdir) . '</a>';
-        $prev_url = Util::addParameter($pageOb['url'], 'page', $pageOb['page'] - 1);
+        $prev_url = Horde_Util::addParameter($pageOb['url'], 'page', $pageOb['page'] - 1);
         $pageOb['pages_prev'] = Horde::link($prev_url, _("Previous Page"), '', '', '', '', '', array('id' => 'prev')) . Horde::img('nav/left.png', '<', null, $graphicsdir) . '</a>';
     }
     if ($pageOb['page'] == $pageOb['page_count']) {
         $pageOb['pages_last'] = Horde::img('nav/last-grey.png', null, null, $graphicsdir);
         $pageOb['pages_next'] = Horde::img('nav/right-grey.png', null, null, $graphicsdir);
     } else {
-        $next_url = Util::addParameter($pageOb['url'], 'page', $pageOb['page'] + 1);
+        $next_url = Horde_Util::addParameter($pageOb['url'], 'page', $pageOb['page'] + 1);
         $pageOb['pages_next'] = Horde::link($next_url, _("Next Page"), '', '', '', '', '', array('id' => 'next')) . Horde::img('nav/right.png', '>', null, $graphicsdir) . '</a>';
-        $last_url = Util::addParameter($pageOb['url'], 'page', $pageOb['page_count']);
+        $last_url = Horde_Util::addParameter($pageOb['url'], 'page', $pageOb['page_count']);
         $pageOb['pages_last'] = Horde::link($last_url, _("Last Page")) . Horde::img('nav/last.png', '>>', null, $graphicsdir) . '</a>';
     }
 }
index 53808a9..cbeafc7 100644 (file)
@@ -13,22 +13,22 @@ require_once FIMA_BASE . '/lib/base.php';
 require_once FIMA_BASE . '/config/report.php';
 require_once FIMA_BASE . '/lib/Report.php';
 
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 
 switch ($actionID) {
 case 'open_report':
-    $_SESSION['fima_report'] = array('report_id'       => Util::getFormData('report_id'),
-                                     'display'            => Util::getFormData('display'),
-                                     'posting_account' => Util::getFormData('posting_account'),
-                                     'period_start'    => Util::getFormData('period_start'),
-                                     'period_end'      => Util::getFormData('period_end'),
-                                     'reference_start' => Util::getFormData('reference_start'),
-                                     'reference_end'   => Util::getFormData('reference_end'),
-                                     'cumulate'        => Util::getFormData('cumulate'),
-                                     'nullrows'        => Util::getFormData('nullrows'),
-                                     'subaccounts'     => Util::getFormData('subaccounts'),
-                                     'yearly'          => Util::getFormData('yearly'),
-                                     'graph'           => Util::getFormData('graph'));
+    $_SESSION['fima_report'] = array('report_id'       => Horde_Util::getFormData('report_id'),
+                                     'display'            => Horde_Util::getFormData('display'),
+                                     'posting_account' => Horde_Util::getFormData('posting_account'),
+                                     'period_start'    => Horde_Util::getFormData('period_start'),
+                                     'period_end'      => Horde_Util::getFormData('period_end'),
+                                     'reference_start' => Horde_Util::getFormData('reference_start'),
+                                     'reference_end'   => Horde_Util::getFormData('reference_end'),
+                                     'cumulate'        => Horde_Util::getFormData('cumulate'),
+                                     'nullrows'        => Horde_Util::getFormData('nullrows'),
+                                     'subaccounts'     => Horde_Util::getFormData('subaccounts'),
+                                     'yearly'          => Horde_Util::getFormData('yearly'),
+                                     'graph'           => Horde_Util::getFormData('graph'));
     break;
 case 'clear_report':
     unset($_SESSION['fima_report']);
@@ -86,9 +86,9 @@ if (!isset($params['graph'])) {
     $params['graph'] = 0;
 }
 
-$params['out'] = Util::getFormData('out');
-$params['sortby']  = Util::getFormData('sortby');
-$params['sortdir'] = Util::getFormData('sortdir');
+$params['out'] = Horde_Util::getFormData('out');
+$params['sortby']  = Horde_Util::getFormData('sortby');
+$params['sortdir'] = Horde_Util::getFormData('sortdir');
 
 /* Get posting types and output displays. */
 $types = Fima::getPostingTypes();
@@ -118,7 +118,7 @@ case 'display_report':
         $params['title'] = $_reports[$params['report_id']];
         
         /* Build report url. */
-        $params['url'] = Util::addParameter(Horde::applicationUrl('report.php'), 'actionID', 'display_report');
+        $params['url'] = Horde_Util::addParameter(Horde::applicationUrl('report.php'), 'actionID', 'display_report');
 
         /* Add params from options. */
         $params['graphsize'] = $prefs->getValue('report_graphsize');
index 2a4c25e..404680c 100644 (file)
@@ -12,7 +12,7 @@
 require_once FIMA_BASE . '/lib/base.php';
 
 /* Get the current action ID. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 
 switch ($actionID) {
 case 'clear_search':
index f314d53..bc60f37 100644 (file)
@@ -23,7 +23,7 @@ function Submit(action)
 <h1 class="header"><?php echo htmlspecialchars($share->get('name')) ?></h1>
 
 <form method="post" name="accounts" action="accounts.php">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="" />
 
 <div id="accountList">
index f72afa2..d66a003 100644 (file)
@@ -26,4 +26,4 @@ Horde::includeScriptFiles();
 <?php echo Horde::stylesheetLink('fima', empty($print_view) ? '' : 'print') ?>
 </head>
 
-<body<?php if ($bc = Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
+<body<?php if ($bc = Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
index 4940ad9..5d109ae 100644 (file)
@@ -1,5 +1,5 @@
 <form method="post" name="export" action="<?php echo Horde::downloadUrl(_("postings.csv"), null, Horde::applicationUrl('data.php')) ?>">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
 <input type="hidden" name="actionID" value="export" />
 
 <h1 class="header">
index ca8a432..8613459 100644 (file)
@@ -1,5 +1,5 @@
 <form method="post" name="import_form" enctype="multipart/form-data" action="data.php">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="<?php echo htmlspecialchars($next_step) ?>" />
 <input type="hidden" name="import_step" value="<?php echo (int)$import_step ?>" />
 
index d77e27a..493d648 100644 (file)
@@ -4,7 +4,7 @@
 
 <div id="ledger-list-buttons">
  <form method="get" action="create.php">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
   <input type="submit" class="button" value="<?php echo _("Create a new Ledger") ?>" />
  </form>
 </div>
   <tr>
    <td><?php echo $browse_img ?></td>
    <td><?php echo htmlspecialchars($ledger->get('name')) ?></td>
-   <td><a href="<?php echo Util::addParameter($edit_url_base, 'l', $ledger->getName()) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
+   <td><a href="<?php echo Horde_Util::addParameter($edit_url_base, 'l', $ledger->getName()) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
 <?php if (empty($conf['share']['no_sharing'])): ?>
-   <td><a onclick="return !popup(this.href);" href="<?php echo Util::addParameter($perms_url_base, 'share', $ledger->getName()) ?>" target="_blank" title="<?php echo _("Change Permissions") ?>"><?php echo $perms_img ?></a></td>
+   <td><a onclick="return !popup(this.href);" href="<?php echo Horde_Util::addParameter($perms_url_base, 'share', $ledger->getName()) ?>" target="_blank" title="<?php echo _("Change Permissions") ?>"><?php echo $perms_img ?></a></td>
 <?php endif; ?>
-   <td><a href="<?php echo Util::addParameter($delete_url_base, 'l', $ledger->getName()) ?>" title="<?php echo _("Delete") ?>"><?php echo $delete_img ?></a></td>
+   <td><a href="<?php echo Horde_Util::addParameter($delete_url_base, 'l', $ledger->getName()) ?>" title="<?php echo _("Delete") ?>"><?php echo $delete_img ?></a></td>
   </tr>
 <?php endforeach; ?>
  </tbody>
index 612177b..b6c7021 100644 (file)
@@ -4,10 +4,10 @@
 <?php if ($pageOb['mode'] == 'list'): ?>
   <?php echo Horde::link($pageOb['url'], _("Refresh List")) . Horde::img('reload.png', _("Refresh List"), '', $registry->getImageDir('horde')) ?> </a>
 <?php if (!isset($_SESSION['fima_search'])): ?>
-  <?php echo Horde::link(Util::addParameter(Horde::applicationUrl('search.php'), 'search_type', $prefs->getValue('active_postingtype')), _("Search Postings")) . Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
+  <?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_type', $prefs->getValue('active_postingtype')), _("Search Postings")) . Horde::img('search.png', _("Search"), '', $registry->getImageDir('horde')) ?></a>
 <?php else: ?>
   <?php echo Horde::link(Horde::applicationUrl('search.php'), _("Edit Search Query")) . Horde::img('edit.png', _("Edit Search Query"), '', $registry->getImageDir('horde')) ?></a>
-  <?php echo Horde::link(Util::addParameter($pageOb['url'], 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query"), '', $registry->getImageDir('horde')) ?></a>
+  <?php echo Horde::link(Horde_Util::addParameter($pageOb['url'], 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query"), '', $registry->getImageDir('horde')) ?></a>
 <?php endif; ?>
 <?php endif; ?>
  </div>
@@ -34,6 +34,6 @@
 
 <?php if ($pageOb['mode'] != 'list'): ?>
 <form method="post" name="postings" action="<?php echo $pageOb['url'] ?>">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <?php endif; ?>
 
index 41e1afc..d4e0fb2 100644 (file)
@@ -21,9 +21,9 @@
    <div class="rightFloat">
 <?php if ($pageOb['page_count'] > 1): ?>
     <form method="get" name="pagenav" action="<?php echo Horde::applicationUrl('postings.php') ?>">
-    <?php Util::pformInput() ?>
+    <?php Horde_Util::pformInput() ?>
     <?php echo $pageOb['pages_first'] . '&nbsp;' . $pageOb['pages_prev'] ?>
-    <input type="text" name="page" value="<?php echo htmlspecialchars($pageOb['page']) ?>" size="<?php echo String::length($pageOb['page_count']) ?>" />
+    <input type="text" name="page" value="<?php echo htmlspecialchars($pageOb['page']) ?>" size="<?php echo Horde_String::length($pageOb['page_count']) ?>" />
     <?php echo $pageOb['pages_next'] . '&nbsp;' . $pageOb['pages_last'] ?>
     </form>
 <?php endif; ?>
index ce9379d..a605a72 100644 (file)
@@ -48,7 +48,7 @@ if ($pageOb['mode'] == 'edit') {
 ?>
 <?php if ($pageOb['mode'] == 'list'): ?>
 <form method="post" name="postings" action="<?php echo $pageOb['url'] ?>">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <?php endif; ?>
 <table class="postingList" width="100%" cellspacing="0">
  <tr class="item">
@@ -67,11 +67,11 @@ if ($pageOb['mode'] == 'edit') {
 
 <?php foreach ($headers as $key => $val): ?>
 <?php if ($pageOb['mode'] == 'list'): ?>
-  <th class="<?php echo ($sortby == $key) ? 'selected' : 'item' ?>" width="<?php echo $val['width'] ?>" onclick="document.location.href='<?php echo addslashes(Util::addParameter(($sortby == $key) ? $sorturl : $pageOb['url'], array('sortby' => $key, 'actionID' => 'change_sort'))) ?>';">
+  <th class="<?php echo ($sortby == $key) ? 'selected' : 'item' ?>" width="<?php echo $val['width'] ?>" onclick="document.location.href='<?php echo addslashes(Horde_Util::addParameter(($sortby == $key) ? $sorturl : $pageOb['url'], array('sortby' => $key, 'actionID' => 'change_sort'))) ?>';">
   <?php if ($sortby == $key): ?>
-    <?php echo Horde::link(Util::addParameter($sorturl, array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText, '', $registry->getImageDir('horde')) ?></a>
+    <?php echo Horde::link(Horde_Util::addParameter($sorturl, array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText, '', $registry->getImageDir('horde')) ?></a>
   <?php endif; ?>
-  <?php echo Horde::widget(Util::addParameter(($sortby == $key) ? $sorturl : $pageOb['url'], array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], 'widget', null, null, $val['text']) ?>
+  <?php echo Horde::widget(Horde_Util::addParameter(($sortby == $key) ? $sorturl : $pageOb['url'], array('sortby' => $key, 'actionID' => 'change_sort')), $val['stext'], 'widget', null, null, $val['text']) ?>
 <?php else: ?>
   <th class="item" width="<?php echo $val['width'] ?>">
   <?php echo str_replace('_', '', $val['text']) ?>
index 7ddbab2..5ad2d44 100644 (file)
@@ -1,3 +1,3 @@
 <br />
-<p><img class="reportImage" src="<?php echo Util::addParameter($report->getParam('url'), 'out', '1') ?>" alt="<?php echo _("Report") ?>" title="<?php echo htmlspecialchars($title) ?>" /></p>
-<?php /*<--<p><iframe src="<?php echo Util::addParameter($report->getParam('url'), 'out', '1') ?>" /></iframe></p>-->*/ ?>
+<p><img class="reportImage" src="<?php echo Horde_Util::addParameter($report->getParam('url'), 'out', '1') ?>" alt="<?php echo _("Report") ?>" title="<?php echo htmlspecialchars($title) ?>" /></p>
+<?php /*<--<p><iframe src="<?php echo Horde_Util::addParameter($report->getParam('url'), 'out', '1') ?>" /></iframe></p>-->*/ ?>
index 4eba986..2be953d 100644 (file)
@@ -1,5 +1,5 @@
 <form method="post" name="report" action="report.php">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="open_report" />
 <input type="hidden" name="sortby" value="<?php echo $params['sortby'] ?>" />
 <input type="hidden" name="sortdir" value="<?php echo $params['sortdir'] ?>" />
index fd43e2b..ffffe11 100644 (file)
@@ -8,7 +8,7 @@ $data = $report->getData();
 $reporturl = $report->getParam('url');
 $sortby = $report->getParam('sortby');
 $sortdir = $report->getParam('sortdir');
-$sorturl = Util::addParameter($reporturl, 'sortdir', ($sortdir) ? 0 : 1);
+$sorturl = Horde_Util::addParameter($reporturl, 'sortdir', ($sortdir) ? 0 : 1);
 $sortImg = ($sortdir) ? 'za.png' : 'az.png';
 $sortImgText = ($sortdir) ? '\/' : '/\\';
 
@@ -21,11 +21,11 @@ foreach ($data as $rowId => $row) {
     foreach ($row as $colId => $value) {
         if ($rowId === '__headersort__') {
             $sortText = sprintf(_("Sort by %s"), $value);
-            echo '<th class="' . (($sortby == $colId) ? 'selected' : 'item') . ' sortable" onclick="document.location.href=' . addslashes(Util::addParameter(($sortby == $colId) ? $sorturl : $reporturl, 'sortby',  $colId)) . '">';
+            echo '<th class="' . (($sortby == $colId) ? 'selected' : 'item') . ' sortable" onclick="document.location.href=' . addslashes(Horde_Util::addParameter(($sortby == $colId) ? $sorturl : $reporturl, 'sortby',  $colId)) . '">';
             if ($sortby == $colId) {
-                echo Horde::link(Util::addParameter($sorturl, 'sortby', $colId), $sortText, null, null, null, $sortText) . Horde::img($sortImg, $sortImgText, '', $registry->getImageDir('horde')) . '</a>';
+                echo Horde::link(Horde_Util::addParameter($sorturl, 'sortby', $colId), $sortText, null, null, null, $sortText) . Horde::img($sortImg, $sortImgText, '', $registry->getImageDir('horde')) . '</a>';
             }
-            echo Horde::widget(Util::addParameter(($sortby == $colId) ? $sorturl : $reporturl, 'sortby', $colId), $sortText, 'widget', null, null, $value);
+            echo Horde::widget(Horde_Util::addParameter(($sortby == $colId) ? $sorturl : $reporturl, 'sortby', $colId), $sortText, 'widget', null, null, $value);
             echo '</th>';
         } elseif ($rowId === '__header__') {
             echo '<th class="item">' . htmlspecialchars($value) . '</th>';
index a67e266..fdd919e 100644 (file)
@@ -1,11 +1,11 @@
 <form method="post" name="search" action="postings.php">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="search_postings" />
 
 <div class="header">
 <?php echo htmlspecialchars($title) ?>
 <?php if (isset($_SESSION['fima_search'])): ?>
-<?php echo Horde::link(Util::addParameter(Horde::applicationUrl('search.php'), 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query"), '', $registry->getImageDir('horde')) ?></a>
+<?php echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'actionID', 'clear_search'), _("Clear Search Query")) . Horde::img('delete.png', _("Clear Search Query"), '', $registry->getImageDir('horde')) ?></a>
 <?php endif; ?>
 </div>
 
index 3d163e1..3199f7c 100644 (file)
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/tabs.php';
 $title = _("Confirm email");
 
 // Get supplied code
-$code = Util::getGet('code');
+$code = Horde_Util::getGet('code');
 if (empty($code)) {
     $notification->push(_("You must supply a confirmation code."));
     header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
@@ -23,7 +23,7 @@ if (empty($code)) {
 }
 
 // Get supplied username
-$user = Util::getGet('user');
+$user = Horde_Util::getGet('user');
 if (empty($code)) {
     $notification->push(_("You must supply a username."));
     header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
@@ -66,4 +66,4 @@ if ($internal_code == $code) {
 }
 
 header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
-exit;
\ No newline at end of file
+exit;
index 6ca7e65..83e154b 100644 (file)
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/tabs.php';
 $title = _("Renew account");
 
 // Get supplied code
-$code = Util::getGet('code');
+$code = Horde_Util::getGet('code');
 if (empty($code)) {
     $notification->push(_("You must supply a confirmation code."));
     header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
@@ -23,7 +23,7 @@ if (empty($code)) {
 }
 
 // Get supplied username
-$user = Util::getGet('user');
+$user = Horde_Util::getGet('user');
 if (empty($code)) {
     $notification->push(_("You must supply a username."));
     header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
@@ -66,4 +66,4 @@ if ($internal_code == $code) {
 }
 
 header('Location: ' . Auth::getLoginScreen('folks', Horde::applicationUrl('edit/edit.php')));
-exit;
\ No newline at end of file
+exit;
index 816d1d2..f680ef1 100644 (file)
@@ -32,18 +32,18 @@ function _getCAPTCHA($new = false)
 $auth = Auth::singleton($conf['auth']['driver']);
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot reset password automatically, contact your administrator."), 'horde.error');
-    header('Location: ' . Auth::getLoginScreen('', Util::getFormData('url')));
+    header('Location: ' . Auth::getLoginScreen('', Horde_Util::getFormData('url')));
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 
 $title = _("Reset Your Password");
 $form = new Horde_Form($vars, $title);
 $form->setButtons(_("Continue"));
 
 // Get user security pass
-$user = Util::getFormData('username');
+$user = Horde_Util::getFormData('username');
 if ($user) {
     $u_prefs = Prefs::singleton($conf['prefs']['driver'], 'horde', Auth::addHook($user), '', null, false);
     $u_prefs->retrieve();
@@ -81,7 +81,7 @@ if ($form->validate()) {
     }
 
     /* Check the given values with the prefs stored ones. */
-    if ((!empty($answer) && String::lower($answer) == String::lower($info['security_answer'])) ||
+    if ((!empty($answer) && Horde_String::lower($answer) == Horde_String::lower($info['security_answer'])) ||
             empty($answer)) {
 
         /* Info matches, so reset the password. */
@@ -115,4 +115,4 @@ require FOLKS_TEMPLATES . '/menu.inc';
 
 require FOLKS_TEMPLATES . '/login/signup.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 5fbde3d..8858274 100644 (file)
@@ -23,7 +23,7 @@ if ($conf['signup']['allow'] !== true ||
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new HordeSignupForm($vars);
 if ($form->validate()) {
     $form->getInfo(null, $info);
@@ -64,4 +64,4 @@ require FOLKS_TEMPLATES . '/menu.inc';
 
 require FOLKS_TEMPLATES . '/login/signup.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 4149ae1..012c704 100644 (file)
 define('AUTH_HANDLER', true);
 define('FOLKS_BASE', dirname(__FILE__) . '/..');
 require_once FOLKS_BASE . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 $auth = Auth::singleton($conf['auth']['driver']);
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $tabs = new Horde_UI_Tabs('what', $vars);
 $tabs->addTab(_("Login"), Horde::applicationUrl('login.php'), 'login');
 
index 12f2119..57d405b 100644 (file)
@@ -12,7 +12,7 @@
 
 require_once dirname(__FILE__) . '/tabs.php';
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 
 $title = _("Forgot your username?");
 $form = new Horde_Form($vars, $title);
@@ -51,4 +51,4 @@ require FOLKS_TEMPLATES . '/menu.inc';
 
 require FOLKS_TEMPLATES . '/login/signup.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 41f9809..7319001 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 $title = _("Activity");
 
@@ -22,7 +21,7 @@ if ($count instanceof PEAR_Error) {
     $count = 0;
 }
 
-$page = Util::getGet('page', 0);
+$page = Horde_Util::getGet('page', 0);
 $perpage = $prefs->getValue('per_page');
 $criteria = array('sort_by' => 'activity', 'sort_dir'  => 0);
 $users = $folks_driver->getUsers($criteria, $page * $perpage, $perpage);
@@ -31,7 +30,7 @@ if ($users instanceof PEAR_Error) {
     $users = array();
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $pager = new Horde_UI_Pager('page',
                             $vars, array('num' => $count,
                                          'url' => 'activity.php',
@@ -46,4 +45,4 @@ require FOLKS_TEMPLATES . '/common-header.inc';
 require FOLKS_TEMPLATES . '/menu.inc';
 require FOLKS_TEMPLATES . '/list/list.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index be2eb15..1b9d170 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 $title = _("Birthday");
 
@@ -22,19 +21,19 @@ if ($count instanceof PEAR_Error) {
     $count = 0;
 }
 
-if (($sort_by = Util::getFormData('sort_by')) !== null) {
+if (($sort_by = Horde_Util::getFormData('sort_by')) !== null) {
     $prefs->setValue('sort_by', $sort_by);
 } else {
     $sort_by = $prefs->getValue('sort_by');
 }
 
-if (($sort_dir = Util::getFormData('sort_dir')) !== null) {
+if (($sort_dir = Horde_Util::getFormData('sort_dir')) !== null) {
     $prefs->setValue('sort_dir', $sort_dir);
 } else {
     $sort_dir = $prefs->getValue('sort_dir');
 }
 
-$page = Util::getGet('page', 0);
+$page = Horde_Util::getGet('page', 0);
 $perpage = $prefs->getValue('per_page');
 $criteria = array('birthday' => date('-m-d'), 'sort_by' => $sort_by, 'sort_dir'  => $sort_dir);
 $users = $folks_driver->getUsers($criteria, $page * $perpage, $perpage);
@@ -43,7 +42,7 @@ if ($users instanceof PEAR_Error) {
     $users = array();
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $pager = new Horde_UI_Pager('page',
                             $vars, array('num' => $count,
                                          'url' => 'birthday.php',
@@ -59,4 +58,4 @@ require FOLKS_TEMPLATES . '/menu.inc';
 
 require FOLKS_TEMPLATES . '/list/list.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 19bcbdd..52fe16d 100644 (file)
@@ -278,10 +278,10 @@ if (!function_exists('_horde_hook_signup_preprocess')) {
     function _horde_hook_signup_preprocess($info)
     {
         if (isset($info['extra']['username'])) {
-            $info['extra']['username'] = String::lower($info['extra']['username']);
+            $info['extra']['username'] = Horde_String::lower($info['extra']['username']);
             $username = $info['extra']['username'];
         } else {
-            $info['user_name'] = String::lower($info['user_name']);
+            $info['user_name'] = Horde_String::lower($info['user_name']);
             $username = $info['user_name'];
         }
 
@@ -328,8 +328,8 @@ if (!function_exists('_horde_hook_signup_addextra')) {
             if ($field == 'password') {
                 $value = hash('md5', $value);
             }
-            $fields[] = 'user_' . String::lower($field);
-            $values[] = String::convertCharset($value, NLS::getCharset(), $conf['sql']['charset']);
+            $fields[] = 'user_' . Horde_String::lower($field);
+            $values[] = Horde_String::convertCharset($value, NLS::getCharset(), $conf['sql']['charset']);
         }
 
         $values[] = $userID;
@@ -343,7 +343,7 @@ if (!function_exists('_horde_hook_signup_addextra')) {
 
         require_once $GLOBALS['registry']->get('fileroot', 'folks') . '/lib/Folks.php';
         $code = Folks::encodeString($userID, 'activate' . hash('md5', $extra['password']));
-        $link = Util::addParameter(Horde::applicationUrl('account/approve.php', true, -1),
+        $link = Horde_Util::addParameter(Horde::applicationUrl('account/approve.php', true, -1),
                                     array('user' => $userID, 'code' => $code),
                                     null, false);
 
index 0695d4b..4fd50a5 100644 (file)
@@ -18,8 +18,8 @@ require_once 'tabs.php';
 
 $title = _("Activity");
 
-$activity_scope = Util::getGet('activity_scope');
-$activity_date = Util::getGet('activity_date');
+$activity_scope = Horde_Util::getGet('activity_scope');
+$activity_date = Horde_Util::getGet('activity_date');
 if ($activity_scope && $activity_date) {
     $result = $folks_driver->deleteActivity($activity_scope, $activity_date);
     if ($result instanceof PEAR_Error) {
@@ -60,4 +60,4 @@ require FOLKS_TEMPLATES . '/menu.inc';
 echo $tabs->render('activity');
 require FOLKS_TEMPLATES . '/edit/activity.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 52fa3bd..3e07d95 100644 (file)
@@ -44,7 +44,7 @@ if (!$form->isSubmitted()) {
 
 } elseif ($form->validate()) {
 
-    if (Util::getFormData('submitbutton') == _("Delete all current comments")) {
+    if (Horde_Util::getFormData('submitbutton') == _("Delete all current comments")) {
 
         $result = $registry->call('forums/deleteForum', array('folks', Auth::getAuth()));
         if ($result instanceof PEAR_Error) {
@@ -100,4 +100,4 @@ if ($profile['user_comments'] == 'moderate') {
     }
 }
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index b563c76..e71f0da 100644 (file)
@@ -52,7 +52,7 @@ $form->addVariable(_("Picture"), 'user_picture', 'image', false);
 $form->setButtons(array(_("Save"), _("Delete picture")));
 
 if ($form->validate()) {
-    switch (Util::getFormData('submitbutton')) {
+    switch (Horde_Util::getFormData('submitbutton')) {
 
     case _("Save"):
         $form->getInfo(null, $info);
@@ -101,4 +101,4 @@ require FOLKS_TEMPLATES . '/menu.inc';
 echo $tabs->render('edit');
 $form->renderActive(null, null, null, 'post');
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 189dc34..7635e94 100644 (file)
@@ -22,7 +22,7 @@ require_once FOLKS_BASE . '/lib/Friends.php';
 $friends = Folks_Friends::singleton();
 
 // Perform action
-$user = Util::getFormData('user');
+$user = Horde_Util::getFormData('user');
 if ($user) {
     if ($friends->isFriend($user)) {
         $result = $friends->removeFriend($user);
@@ -44,8 +44,8 @@ if ($user) {
             $body = sprintf(_("User %s added you to his firends list on %s. \nTo approve, go to: %s \nTo reject, go to: %s \nTo see to his profile, go to: %s \n"),
                             Auth::getAuth(),
                             $registry->get('name', 'horde'),
-                            Util::addParameter(Horde::applicationUrl('edit/friends/approve.php', true, -1), 'user', Auth::getAuth()),
-                            Util::addParameter(Horde::applicationUrl('edit/friends/reject.php', true, -1), 'user', Auth::getAuth()),
+                            Horde_Util::addParameter(Horde::applicationUrl('edit/friends/approve.php', true, -1), 'user', Auth::getAuth()),
+                            Horde_Util::addParameter(Horde::applicationUrl('edit/friends/reject.php', true, -1), 'user', Auth::getAuth()),
                             Folks::getUrlFor('user', Auth::getAuth(), true, -1));
             $result = $friends->sendNotification($user, $title, $body);
             if ($result instanceof PEAR_Error) {
@@ -75,4 +75,4 @@ require FOLKS_TEMPLATES . '/edit/header.php';
 require FOLKS_TEMPLATES . '/edit/add.php';
 require FOLKS_TEMPLATES . '/edit/footer.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 820e286..b9d0932 100644 (file)
@@ -18,7 +18,7 @@ if (!Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
-$user = Util::getGet('user');
+$user = Horde_Util::getGet('user');
 if (empty($user)) {
     $notification->push(_("You must supply a username."));
     header('Location: ' . Horde::applicationUrl('edit/friends/index.php'));
@@ -51,4 +51,4 @@ $link = '<a href="' . Folks::getUrlFor('user', $user) . '">' . $user . '</a>';
 $folks_driver->logActivity(sprintf(_("Added user %s as a friend."), $link));
 
 header('Location: ' . Horde::applicationUrl('edit/friends/index.php'));
-exit;
\ No newline at end of file
+exit;
index a282bd9..82bf337 100644 (file)
@@ -22,7 +22,7 @@ require_once FOLKS_BASE . '/lib/Friends.php';
 $friends = Folks_Friends::singleton();
 
 // Perform action
-$user = Util::getGet('user');
+$user = Horde_Util::getGet('user');
 if ($user) {
     if ($friends->isBlacklisted($user)) {
         $result = $friends->removeBlacklisted($user);
@@ -87,4 +87,4 @@ require FOLKS_TEMPLATES . '/edit/friends.php';
 $friend_form->renderActive();
 require FOLKS_TEMPLATES . '/edit/footer.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 502ad57..60183b1 100644 (file)
@@ -29,11 +29,11 @@ if ($groups instanceof PEAR_Error) {
 }
 
 // Handle action
-$action = Util::getFormData('action');
+$action = Horde_Util::getFormData('action');
 switch ($action) {
 case 'delete':
 
-    $g = Util::getFormdata('g');
+    $g = Horde_Util::getFormdata('g');
     $result = $friends->removeGroup($g);
     if ($result instanceof PEAR_Error) {
         $notification->push($result);
@@ -48,7 +48,7 @@ break;
 
 case 'edit':
 
-    $g = Util::getFormdata('g');
+    $g = Horde_Util::getFormdata('g');
     $form = new Horde_Form($vars, _("Rename group"), 'editgroup');
     $form->addHidden('action', 'action', 'text', 'edit');
     $form->addHidden('g', 'g', 'text', 'edit');
@@ -58,12 +58,12 @@ case 'edit':
     $v = $form->addVariable(_("New name"), 'new_name', 'text', true);
     $v->setDefault($groups[$g]);
 
-    if (Util::getFormData('submitbutton') == _("Cancel")) {
+    if (Horde_Util::getFormData('submitbutton') == _("Cancel")) {
         $notification->push(sprintf(_("Group \"%s\" has not been renamed."), $groups[$g]), 'horde.warning');
         header('Location: ' . Horde::applicationUrl('edit/groups.php'));
         exit;
-    } elseif (Util::getFormData('submitbutton') == _("Rename")) {
-        $new_name = Util::getFormData('new_name');
+    } elseif (Horde_Util::getFormData('submitbutton') == _("Rename")) {
+        $new_name = Horde_Util::getFormData('new_name');
         $result = $friends->renameGroup($g, $new_name);
         if ($result instanceof PEAR_Error) {
             $notification->push($result);
@@ -109,9 +109,9 @@ default:
 break;
 }
 
-$remove_url = Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'delete');
+$remove_url = Horde_Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'delete');
 $remove_img = Horde::img('delete.png', '', '', $registry->getImageDir('horde'));
-$edit_url = Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'edit');
+$edit_url = Horde_Util::addParameter(Horde::applicationUrl('edit/friends/groups.php'), 'action', 'edit');
 $edit_img = Horde::img('edit.png', '', '', $registry->getImageDir('horde'));
 $perms_url = Horde::applicationUrl('perms.php');
 $perms_img = Horde::img('perms.png', '', '', $registry->getImageDir('horde'));
@@ -126,4 +126,4 @@ require FOLKS_TEMPLATES . '/menu.inc';
 echo $tabs->render('groups');
 require FOLKS_TEMPLATES . '/edit/groups.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 512cb26..4b814b5 100644 (file)
@@ -18,7 +18,7 @@ if (!Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
-$user = Util::getGet('user');
+$user = Horde_Util::getGet('user');
 if (empty($user)) {
     $notification->push(_("You must supply a username."));
     header('Location: ' . Horde::applicationUrl('edit/friends/index.php'));
@@ -47,4 +47,4 @@ $body = sprintf(_("User %s rejected you as a friend on %s.. \nTo see to his prof
 $friends->sendNotification($user, $title, $body);
 
 header('Location: ' . Horde::applicationUrl('edit/friends/index.php'));
-exit;
\ No newline at end of file
+exit;
index c43d4df..9ea8c44 100644 (file)
@@ -18,12 +18,12 @@ require_once 'tabs.php';
 $auth = Auth::singleton($conf['auth']['driver']);
 if (!$auth->hasCapability('resetpassword')) {
     $notification->push(_("Cannot update password, contact your administrator."), 'horde.error');
-    header('Location: ' . Auth::getLoginScreen('', Util::getFormData('url')));
+    header('Location: ' . Auth::getLoginScreen('', Horde_Util::getFormData('url')));
     exit;
 }
 
 $title = _("Change Your Password");
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Horde_Form($vars, $title, 'password');
 $form->setButtons(_("Continue"));
 $form->addVariable(_("Current password"), 'old', 'password', true);
@@ -173,13 +173,13 @@ do {
 } while (false);
 
 // update password reminder prefs
-if (Util::getPost('formname') == 'security') {
-    if ($prefs->getValue('security_question') != Util::getPost('security_question')) {
-        $prefs->setValue('security_question', Util::getPost('security_question'));
+if (Horde_Util::getPost('formname') == 'security') {
+    if ($prefs->getValue('security_question') != Horde_Util::getPost('security_question')) {
+        $prefs->setValue('security_question', Horde_Util::getPost('security_question'));
     }
 
-    if ($prefs->getValue('security_answer') != Util::getPost('security_answer')) {
-        $prefs->setValue('security_answer', Util::getPost('security_answer'));
+    if ($prefs->getValue('security_answer') != Horde_Util::getPost('security_answer')) {
+        $prefs->setValue('security_answer', Horde_Util::getPost('security_answer'));
     }
 
     $notification->push(_("Your securiy questions was updated."), 'horde.success');
@@ -202,4 +202,4 @@ echo $tabs->render('password');
 $form->renderActive(null, null, null, 'post');
 echo '<br />';
 $form_security->renderActive(null, null, null, 'post');
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 659ac96..e571cb2 100644 (file)
@@ -15,9 +15,7 @@ if (!Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
-require_once 'Horde/Variables.php';
-
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $tabs = new Horde_UI_Tabs('what', $vars);
 $tabs->addTab(_("Edit my profile"), Horde::applicationUrl('edit/edit.php'), 'edit');
 $tabs->addTab(_("Privacy"), Horde::applicationUrl('edit/privacy.php'), 'privacy');
@@ -37,4 +35,4 @@ if ($conf['facebook']['enabled']) {
 }
 
 
-Horde::addScriptFile('tables.js', 'horde', true);
\ No newline at end of file
+Horde::addScriptFile('tables.js', 'horde', true);
index 5dd8be0..ff7af18 100644 (file)
@@ -20,8 +20,7 @@ if (!Auth::isAuthenticated()) {
 
 $title = _("Friends");
 
-require_once 'Horde/Variables.php';
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Folks_Activity_Form($vars, _("What are you doing right now?"), 'short');
 if ($form->validate()) {
     $result = $form->execute();
@@ -74,4 +73,4 @@ require FOLKS_TEMPLATES . '/menu.inc';
 
 require FOLKS_TEMPLATES . '/friends/friends.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 20304f7..a32f32d 100644 (file)
@@ -59,7 +59,7 @@ class Auth_folks extends Auth_application {
 
         $login = Horde::url($webroot . '/login.php', true);
         if (!empty($url)) {
-            $login = Util::addParameter($login, 'url', $url);
+            $login = Horde_Util::addParameter($login, 'url', $url);
         }
         return $login;
     }
@@ -187,4 +187,4 @@ class Auth_folks extends Auth_application {
         }
     }
     */
-}
\ No newline at end of file
+}
index c9d1578..c76fda3 100644 (file)
@@ -337,7 +337,7 @@ class Folks_Driver {
         }
 
         $profile = $GLOBALS['cache']->get('folksProfile' . $user, $GLOBALS['conf']['cache']['default_lifetime']);
-        if ($profile || (Auth::isAdmin() && Util::getGet('debug'))) {
+        if ($profile || (Auth::isAdmin() && Horde_Util::getGet('debug'))) {
 
             $profile = unserialize($profile);
 
index fad96af..cca648e 100644 (file)
@@ -62,7 +62,7 @@ class Folks {
     static public function getImageUrl($user, $view = 'small', $full = false)
     {
         if (empty($GLOBALS['conf']['images']['direct'])) {
-            return Util::addParameter(Horde::applicationUrl('view.php', $full),
+            return Horde_Util::addParameter(Horde::applicationUrl('view.php', $full),
                                      array('view' => $view,
                                            'id' => $user),
                                      null, false);
@@ -105,7 +105,7 @@ class Folks {
 
         case 'user':
             if (empty($GLOBALS['conf']['urls']['pretty'])) {
-                return Util::addParameter(Horde::applicationUrl('user.php', $full, $append_session), 'user', $data);
+                return Horde_Util::addParameter(Horde::applicationUrl('user.php', $full, $append_session), 'user', $data);
             } else {
                 return Horde::applicationUrl('user/' . $data, $full, $append_session);
             }
index 7545c34..54b1ec3 100644 (file)
@@ -16,7 +16,7 @@ class Folks_Login_Form extends Horde_Form {
     {
         parent::__construct($vars, $title, $name);
 
-        $this->addHidden('', 'url', 'text', Util::getFormData('url', '/'));
+        $this->addHidden('', 'url', 'text', Horde_Util::getFormData('url', '/'));
         $this->setButtons(_("Login"));
 
         $this->addVariable(_("Username"), 'username', 'text', true, false,
index 9e0e751..dd4e005 100644 (file)
@@ -50,6 +50,6 @@ $GLOBALS['cache'] = Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'],
 $GLOBALS['folks_driver']->updateOnlineStatus();
 
 // Start output compression.
-if (!Util::nonInputVar('no_compress')) {
+if (!Horde_Util::nonInputVar('no_compress')) {
     Horde::compressOutput();
-}
\ No newline at end of file
+}
index c8a555c..9d0ca50 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 $title = _("List");
 
@@ -22,19 +21,19 @@ if ($count instanceof PEAR_Error) {
     $count = 0;
 }
 
-if (($sort_by = Util::getFormData('sort_by')) !== null) {
+if (($sort_by = Horde_Util::getFormData('sort_by')) !== null) {
     $prefs->setValue('sort_by', $sort_by);
 } else {
     $sort_by = $prefs->getValue('sort_by');
 }
 
-if (($sort_dir = Util::getFormData('sort_dir')) !== null) {
+if (($sort_dir = Horde_Util::getFormData('sort_dir')) !== null) {
     $prefs->setValue('sort_dir', $sort_dir);
 } else {
     $sort_dir = $prefs->getValue('sort_dir');
 }
 
-$page = Util::getGet('page', 0);
+$page = Horde_Util::getGet('page', 0);
 $perpage = $prefs->getValue('per_page');
 $criteria = array('sort_by' => $sort_by, 'sort_dir'  => $sort_dir);
 $users = $folks_driver->getUsers($criteria, $page * $perpage, $perpage);
@@ -43,7 +42,7 @@ if ($users instanceof PEAR_Error) {
     $users = array();
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $pager = new Horde_UI_Pager('page',
                             $vars, array('num' => $count,
                                          'url' => 'list.php',
@@ -58,4 +57,4 @@ require FOLKS_TEMPLATES . '/common-header.inc';
 require FOLKS_TEMPLATES . '/menu.inc';
 require FOLKS_TEMPLATES . '/list/list.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 7ed227a..f3234f5 100644 (file)
@@ -81,14 +81,14 @@ if (isset($_GET['logout_reason'])) {
  */
 if ($conf['login']['prelogin'] &&
     Auth::getAuth() &&
-   ($app = Util::getGet('app'))) {
+   ($app = Horde_Util::getGet('app'))) {
     Horde::callHook('_folks_hook_prelogin', array($app), 'folks');
 }
 
 /*
  * Login parameters
  */
-$url_param = Util::getFormData('url');
+$url_param = Horde_Util::getFormData('url');
 $login_url = Auth::getLoginScreen('folks', $url_param);
 
 /*
@@ -124,13 +124,13 @@ if (isset($_COOKIE['folks_login_code']) &&
  * Form
  */
 $title = sprintf(_("Login to %s"), $registry->get('name', 'horde'));
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Folks_Login_Form($vars, $title, 'folks_login');
 
 /*
  * Check time between one login and anther
  */
-$username = strtolower(trim(Util::getPost('username')));
+$username = strtolower(trim(Horde_Util::getPost('username')));
 if ($username && $conf['login']['diff']) {
     $last_try = $cache->get('login_last_try_' . $username, $conf['cache']['default_lifetime']);
     if ($last_try && $_SERVER['REQUEST_TIME'] - $last_try <= $conf['login']['diff']) {
index ffef1c5..c58a127 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 $title = _("New");
 
@@ -22,7 +21,7 @@ if ($count instanceof PEAR_Error) {
     $count = 0;
 }
 
-$page = Util::getGet('page', 0);
+$page = Horde_Util::getGet('page', 0);
 $perpage = $prefs->getValue('per_page');
 $criteria = array('sort_by' => 'signup_at', 'sort_dir'  => 0);
 $users = $folks_driver->getUsers($criteria, $page * $perpage, $perpage);
@@ -31,7 +30,7 @@ if ($users instanceof PEAR_Error) {
     $users = array();
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $pager = new Horde_UI_Pager('page',
                             $vars, array('num' => $count,
                                          'url' => 'new.php',
@@ -46,4 +45,4 @@ require FOLKS_TEMPLATES . '/common-header.inc';
 require FOLKS_TEMPLATES . '/menu.inc';
 require FOLKS_TEMPLATES . '/list/list.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index eac5155..77915c3 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 $title = _("Online");
 
@@ -22,19 +21,19 @@ if ($count instanceof PEAR_Error) {
     $count = 0;
 }
 
-if (($sort_by = Util::getFormData('sort_by')) !== null) {
+if (($sort_by = Horde_Util::getFormData('sort_by')) !== null) {
     $prefs->setValue('sort_by', $sort_by);
 } else {
     $sort_by = $prefs->getValue('sort_by');
 }
 
-if (($sort_dir = Util::getFormData('sort_dir')) !== null) {
+if (($sort_dir = Horde_Util::getFormData('sort_dir')) !== null) {
     $prefs->setValue('sort_dir', $sort_dir);
 } else {
     $sort_dir = $prefs->getValue('sort_dir');
 }
 
-$page = Util::getGet('page', 0);
+$page = Horde_Util::getGet('page', 0);
 $perpage = $prefs->getValue('per_page');
 $criteria = array('online' => true, 'sort_by' => $sort_by, 'sort_dir'  => $sort_dir);
 $users = $folks_driver->getUsers($criteria, $page * $perpage, $perpage);
@@ -43,7 +42,7 @@ if ($users instanceof PEAR_Error) {
     $users = array();
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $pager = new Horde_UI_Pager('page',
                             $vars, array('num' => $count,
                                          'url' => 'online.php',
@@ -59,4 +58,4 @@ require FOLKS_TEMPLATES . '/menu.inc';
 
 require FOLKS_TEMPLATES . '/list/list.php';
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index f81040a..eaa80b9 100644 (file)
@@ -17,13 +17,13 @@ $groups = &Group::singleton();
 $auth = &Auth::singleton($conf['auth']['driver']);
 
 $reload = false;
-$actionID = Util::getFormData('actionID', 'edit');
+$actionID = Horde_Util::getFormData('actionID', 'edit');
 switch ($actionID) {
 case 'edit':
-    $share = &$shares->getShareById(Util::getFormData('cid'));
+    $share = &$shares->getShareById(Horde_Util::getFormData('cid'));
     if (!is_a($share, 'PEAR_Error')) {
         $perm = &$share->getPermission();
-    } elseif (($category = Util::getFormData('share')) !== null) {
+    } elseif (($category = Horde_Util::getFormData('share')) !== null) {
         $share = &$shares->getShare($category);
         if (!is_a($share, 'PEAR_Error')) {
             $perm = &$share->getPermission();
@@ -37,7 +37,7 @@ case 'edit':
     break;
 
 case 'editform':
-    $share = &$shares->getShareById(Util::getFormData('cid'));
+    $share = &$shares->getShareById(Horde_Util::getFormData('cid'));
     if (is_a($share, 'PEAR_Error')) {
         $notification->push(_("Attempt to edit a non-existent share."), 'horde.error');
     } else {
@@ -48,7 +48,7 @@ case 'editform':
 
         // Process owner and owner permissions.
         $old_owner = $share->get('owner');
-        $new_owner = Auth::addHook(Util::getFormData('owner', $old_owner));
+        $new_owner = Auth::addHook(Horde_Util::getFormData('owner', $old_owner));
         if ($old_owner !== $new_owner && !empty($new_owner)) {
             if ($old_owner != Auth::getAuth() && !Auth::isAdmin()) {
                 $notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');
@@ -59,77 +59,77 @@ case 'editform':
         }
 
         // Process default permissions.
-        if (Util::getFormData('default_show')) {
+        if (Horde_Util::getFormData('default_show')) {
             $perm->addDefaultPermission(PERMS_SHOW, false);
         } else {
             $perm->removeDefaultPermission(PERMS_SHOW, false);
         }
-        if (Util::getFormData('default_read')) {
+        if (Horde_Util::getFormData('default_read')) {
             $perm->addDefaultPermission(PERMS_READ, false);
         } else {
             $perm->removeDefaultPermission(PERMS_READ, false);
         }
-        if (Util::getFormData('default_edit')) {
+        if (Horde_Util::getFormData('default_edit')) {
             $perm->addDefaultPermission(PERMS_EDIT, false);
         } else {
             $perm->removeDefaultPermission(PERMS_EDIT, false);
         }
-        if (Util::getFormData('default_delete')) {
+        if (Horde_Util::getFormData('default_delete')) {
             $perm->addDefaultPermission(PERMS_DELETE, false);
         } else {
             $perm->removeDefaultPermission(PERMS_DELETE, false);
         }
 
         // Process guest permissions.
-        if (Util::getFormData('guest_show')) {
+        if (Horde_Util::getFormData('guest_show')) {
             $perm->addGuestPermission(PERMS_SHOW, false);
         } else {
             $perm->removeGuestPermission(PERMS_SHOW, false);
         }
-        if (Util::getFormData('guest_read')) {
+        if (Horde_Util::getFormData('guest_read')) {
             $perm->addGuestPermission(PERMS_READ, false);
         } else {
             $perm->removeGuestPermission(PERMS_READ, false);
         }
-        if (Util::getFormData('guest_edit')) {
+        if (Horde_Util::getFormData('guest_edit')) {
             $perm->addGuestPermission(PERMS_EDIT, false);
         } else {
             $perm->removeGuestPermission(PERMS_EDIT, false);
         }
-        if (Util::getFormData('guest_delete')) {
+        if (Horde_Util::getFormData('guest_delete')) {
             $perm->addGuestPermission(PERMS_DELETE, false);
         } else {
             $perm->removeGuestPermission(PERMS_DELETE, false);
         }
 
         // Process creator permissions.
-        if (Util::getFormData('creator_show')) {
+        if (Horde_Util::getFormData('creator_show')) {
             $perm->addCreatorPermission(PERMS_SHOW, false);
         } else {
             $perm->removeCreatorPermission(PERMS_SHOW, false);
         }
-        if (Util::getFormData('creator_read')) {
+        if (Horde_Util::getFormData('creator_read')) {
             $perm->addCreatorPermission(PERMS_READ, false);
         } else {
             $perm->removeCreatorPermission(PERMS_READ, false);
         }
-        if (Util::getFormData('creator_edit')) {
+        if (Horde_Util::getFormData('creator_edit')) {
             $perm->addCreatorPermission(PERMS_EDIT, false);
         } else {
             $perm->removeCreatorPermission(PERMS_EDIT, false);
         }
-        if (Util::getFormData('creator_delete')) {
+        if (Horde_Util::getFormData('creator_delete')) {
             $perm->addCreatorPermission(PERMS_DELETE, false);
         } else {
             $perm->removeCreatorPermission(PERMS_DELETE, false);
         }
 
         // Process user permissions.
-        $u_names = Util::getFormData('u_names');
-        $u_show = Util::getFormData('u_show');
-        $u_read = Util::getFormData('u_read');
-        $u_edit = Util::getFormData('u_edit');
-        $u_delete = Util::getFormData('u_delete');
+        $u_names = Horde_Util::getFormData('u_names');
+        $u_show = Horde_Util::getFormData('u_show');
+        $u_read = Horde_Util::getFormData('u_read');
+        $u_edit = Horde_Util::getFormData('u_edit');
+        $u_delete = Horde_Util::getFormData('u_delete');
 
         foreach ($u_names as $key => $user) {
             // Apply backend hooks
@@ -163,11 +163,11 @@ case 'editform':
         }
 
         // Process group permissions.
-        $g_names = Util::getFormData('g_names');
-        $g_show = Util::getFormData('g_show');
-        $g_read = Util::getFormData('g_read');
-        $g_edit = Util::getFormData('g_edit');
-        $g_delete = Util::getFormData('g_delete');
+        $g_names = Horde_Util::getFormData('g_names');
+        $g_show = Horde_Util::getFormData('g_show');
+        $g_read = Horde_Util::getFormData('g_read');
+        $g_edit = Horde_Util::getFormData('g_edit');
+        $g_delete = Horde_Util::getFormData('g_delete');
 
         foreach ($g_names as $key => $group) {
             if (empty($group)) {
@@ -204,8 +204,8 @@ case 'editform':
             if (is_a($result, 'PEAR_Error')) {
                 $notification->push($result, 'horde.error');
             } else {
-                if (Util::getFormData('save_and_finish')) {
-                    Util::closeWindowJS();
+                if (Horde_Util::getFormData('save_and_finish')) {
+                    Horde_Util::closeWindowJS();
                     exit;
                 }
                 $notification->push(sprintf(_("Updated \"%s\"."), $share->get('name')), 'horde.success');
index 2b16d91..68990c8 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 $title = _("Popularity");
 
@@ -22,7 +21,7 @@ if ($count instanceof PEAR_Error) {
     $count = 0;
 }
 
-$page = Util::getGet('page', 0);
+$page = Horde_Util::getGet('page', 0);
 $perpage = $prefs->getValue('per_page');
 $criteria = array('sort_by' => 'popularity', 'sort_dir'  => 0);
 $users = $folks_driver->getUsers($criteria, $page * $perpage, $perpage);
@@ -31,7 +30,7 @@ if ($users instanceof PEAR_Error) {
     $users = array();
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $pager = new Horde_UI_Pager('page',
                             $vars, array('num' => $count,
                                          'url' => 'popularity.php',
@@ -44,4 +43,4 @@ Horde::addScriptFile('stripe.js', 'horde', true);
 require FOLKS_TEMPLATES . '/common-header.inc';
 require FOLKS_TEMPLATES . '/menu.inc';
 require FOLKS_TEMPLATES . '/list/list.php';
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index fee9ea1..21cf9b7 100644 (file)
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 if (!Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
-$user = Util::getFormData('user');
+$user = Horde_Util::getFormData('user');
 if (empty($user)) {
     $notification->push(_("User is not selected"), 'horde.warning');
     header('Location: ' . Folks::getUrlFor('list', 'list'));
@@ -29,7 +28,7 @@ if (empty($user)) {
 
 $title = _("Do you really want to report this user?");
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Horde_Form($vars, $title);
 $form->setButtons(array(_("Report"), _("Cancel")));
 
@@ -45,10 +44,10 @@ $form->addHidden('', 'user', 'text', true, true);
 $form->addVariable(_("Report type"), 'type', 'radio', true, false, null, array($enum));
 $form->addVariable(_("Report reason"), 'reason', 'longtext', true);
 
-$user_id = Util::getFormData('id');
+$user_id = Horde_Util::getFormData('id');
 
 if ($form->validate()) {
-    if (Util::getFormData('submitbutton') == _("Report")) {
+    if (Horde_Util::getFormData('submitbutton') == _("Report")) {
 
         $body =  _("User") . ': ' . $user . "\n"
             . _("Report type") . ': ' . $enum[$vars->get('type')] . "\n"
@@ -74,4 +73,4 @@ if ($form->validate()) {
 require FOLKS_TEMPLATES . '/common-header.inc';
 require FOLKS_TEMPLATES . '/menu.inc';
 $form->renderActive(null, null, null, 'post');
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 203e928..e307fea 100644 (file)
 
 define('FOLKS_BASE', dirname(__FILE__));
 require_once FOLKS_BASE . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
-if (Util::getFormData('submitbutton') == _("Close")) {
+if (Horde_Util::getFormData('submitbutton') == _("Close")) {
 
     echo '<script type="text/javascript">RedBox.close();</script>';
 
-} elseif (Util::getFormData('formname') == 'savesearch') {
+} elseif (Horde_Util::getFormData('formname') == 'savesearch') {
 
-    $result = $folks_driver->saveSearch(Util::getFormData('search_criteria'), Util::getFormData('search_name'));
+    $result = $folks_driver->saveSearch(Horde_Util::getFormData('search_criteria'), Horde_Util::getFormData('search_name'));
     if ($result instanceof PEAR_Error) {
         $notification->push($result);
     } else {
@@ -30,9 +29,9 @@ if (Util::getFormData('submitbutton') == _("Close")) {
         exit;
     }
 
-} elseif ((Util::getGet('delete') == 1) && Util::getGet('query')) {
+} elseif ((Horde_Util::getGet('delete') == 1) && Horde_Util::getGet('query')) {
 
-    $result = $folks_driver->deleteSavedSearch(Util::getGet('query'));
+    $result = $folks_driver->deleteSavedSearch(Horde_Util::getGet('query'));
     if ($result instanceof PEAR_Error) {
         $notification->push($result);
     } else {
@@ -43,11 +42,11 @@ if (Util::getFormData('submitbutton') == _("Close")) {
 }
 
 // Render
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $vars->set('search_criteria', $_SESSION['folks']['last_search']);
 $form = new Horde_Form($vars, '', 'savesearch');
 $form->addVariable(_("Name"), 'search_name', 'text', true);
 $form->addHidden('', 'search_criteria', 'text', true);
 $form->setButtons(array(_("Save"), _("Close")));
 $notification->notify(array('listeners' => 'status'));
-$form->renderActive(null, null, Horde::selfUrl(), 'post');
\ No newline at end of file
+$form->renderActive(null, null, Horde::selfUrl(), 'post');
index e4a43d0..b3b4c39 100644 (file)
 
 require_once dirname(__FILE__) . '/lib/base.php';
 require_once FOLKS_BASE . '/lib/Forms/Search.php';
-require_once 'Horde/Variables.php';
 
 $title = _("Search");
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Folks_Search_Form($vars, $title, 'search');
 
 if (isset($_SESSION['folks']['last_search']) && !$form->isSubmitted()) {
     $criteria = unserialize($_SESSION['folks']['last_search']);
 }
-if (Util::getGet('query') && !$form->isSubmitted()) {
-    $criteria = $folks_driver->getSearchCriteria(Util::getGet('query'));
+if (Horde_Util::getGet('query') && !$form->isSubmitted()) {
+    $criteria = $folks_driver->getSearchCriteria(Horde_Util::getGet('query'));
     if ($criteria instanceof PEAR_Error) {
         $notification->push($criteria);
         $criteria = array();
@@ -40,19 +39,19 @@ if (!empty($criteria)) {
         $count = 0;
     }
 
-    if (($sort_by = Util::getFormData('sort_by')) !== null) {
+    if (($sort_by = Horde_Util::getFormData('sort_by')) !== null) {
         $criteria['sort_by'] = $sort_by;
     } else {
         $criteria['sort_by'] = $prefs->getValue('sort_by');
     }
 
-    if (($sort_dir = Util::getFormData('sort_dir')) !== null) {
+    if (($sort_dir = Horde_Util::getFormData('sort_dir')) !== null) {
         $criteria['sort_dir'] = $sort_dir;
     } else {
         $criteria['sort_dir'] = $prefs->getValue('sort_dir');
     }
 
-    $page = Util::getGet('page', 0);
+    $page = Horde_Util::getGet('page', 0);
     $perpage = $prefs->getValue('per_page');
     $users = $folks_driver->getUsers($criteria, $page * $perpage, $perpage);
     if ($users instanceof PEAR_Error) {
@@ -60,7 +59,7 @@ if (!empty($criteria)) {
         $users = array();
     }
 
-    $vars = Variables::getDefaultVariables();
+    $vars = Horde_Variables::getDefaultVariables();
     $pager = new Horde_UI_Pager('page',
                                 $vars, array('num' => $count,
                                             'url' => 'search.php',
@@ -98,4 +97,4 @@ if (Auth::isAuthenticated()) {
     require FOLKS_TEMPLATES . '/list/search.php';
 }
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 735a883..0f8f733 100644 (file)
@@ -7,7 +7,7 @@
 <strong><?php echo $user ?></strong></a><br />
 <span class="small">
 <?php foreach ($actions as $action): ?>
-<a href="<?php echo Util::addParameter($action['url'], $action['id'], $user) ?>"><?php echo $action['name'] ?> </a>
+<a href="<?php echo Horde_Util::addParameter($action['url'], $action['id'], $user) ?>"><?php echo $action['name'] ?> </a>
 <?php endforeach; ?>
 <br />
 <?php
index d4e88e7..d4cfa80 100644 (file)
@@ -30,4 +30,4 @@ Horde::includeScriptFiles();
 <?php echo Horde::stylesheetLink('folks') ?>
 </head>
 
-<body<?php if ($bc = Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
+<body<?php if ($bc = Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
index a20a653..5fdb287 100644 (file)
@@ -28,7 +28,7 @@ if (empty($activities)) {
     </td>
     <td><?php echo Folks::format_datetime($activity['activity_date']) ?></td>
     <td><?php echo $activity['activity_message']; unset($activity['activity_message']); ?></td>
-    <td><a href="<?php echo Util::addParameter($delete_url, $activity) ?>" title="<?php echo _("Delete") ?>"/><?php echo $delete_img ?></a></td>
+    <td><a href="<?php echo Horde_Util::addParameter($delete_url, $activity) ?>" title="<?php echo _("Delete") ?>"/><?php echo $delete_img ?></a></td>
 </tr>
 <?php } ?>
 </tbody>
index a296d34..b6cb70d 100644 (file)
@@ -35,7 +35,7 @@ if (empty($list)) {
     <?php
         foreach ($actions as $action) {
             echo '<td>';
-            echo '<a href="' . Util::addParameter($action['url'], $action['id'], $user) . '">'
+            echo '<a href="' . Horde_Util::addParameter($action['url'], $action['id'], $user) . '">'
                             . $action['img']  . ' ' . $action['name'] . '</a>';
             echo '</td>';
         }
index c590649..ff4fa95 100644 (file)
@@ -21,11 +21,11 @@ foreach ($groups as $group_id => $group_name) {
     echo '<tr><td>' . $group_name . '</td>';
     $owner = $friends->getGroupOwner($group_id);
     echo '<td style="text-align: center"><a href="' . Folks::getUrlFor('user', $owner) .'"><img src="' . Folks::getImageUrl($owner) . '" class="userMiniIcon" /><br />' . $owner . '</a></td>';
-    echo '<td><a href="' . Util::addParameter($members_url, 'g', $group_id) . '">' . $members_img . ' ' . _("Members") . '</a></td>';
+    echo '<td><a href="' . Horde_Util::addParameter($members_url, 'g', $group_id) . '">' . $members_img . ' ' . _("Members") . '</a></td>';
     if ($friends->hasCapability('groups_add')) {
-        echo '<td><a href="' . Util::addParameter($edit_url, 'g', $group_id) . '">' . $edit_img . ' ' . _("Rename") . '</a></td>';
-        echo '<td><a href="#" onclick="if (confirm(\'' . _("Do you really want to delete this group?") . '\')) {window.location=\'' .  Util::addParameter($remove_url, 'g', $group_id) . '\'}">' . $remove_img . ' ' . _("Delete") . '</a></td>';
-        echo '<td><a href="#" onclick="popup(\'' . Util::addParameter($perms_url, 'cid', $group_id) . '\')">' . $perms_img . ' ' .  _("Permissions") . '</a></td>';
+        echo '<td><a href="' . Horde_Util::addParameter($edit_url, 'g', $group_id) . '">' . $edit_img . ' ' . _("Rename") . '</a></td>';
+        echo '<td><a href="#" onclick="if (confirm(\'' . _("Do you really want to delete this group?") . '\')) {window.location=\'' .  Horde_Util::addParameter($remove_url, 'g', $group_id) . '\'}">' . $remove_img . ' ' . _("Delete") . '</a></td>';
+        echo '<td><a href="#" onclick="popup(\'' . Horde_Util::addParameter($perms_url, 'cid', $group_id) . '\')">' . $perms_img . ' ' .  _("Permissions") . '</a></td>';
     }
     echo '</tr>';
 }
index 5600d16..9c14656 100644 (file)
@@ -24,7 +24,7 @@ echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/invite.php') . '"
 echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/index.php') . '">' . _("All") . '</a>';
 
 foreach ($groups as $group_id => $group_name) {
-    echo '<tr><td><a href="' . Util::addParameter(Horde::applicationUrl('edit/friends/friends.php'), $group_id) . '">' . $group_name . '</a>';
+    echo '<tr><td><a href="' . Horde_Util::addParameter(Horde::applicationUrl('edit/friends/friends.php'), $group_id) . '">' . $group_name . '</a>';
 }
 
 echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/know.php') . '">' . _("Might know") . '</a>';
@@ -48,4 +48,4 @@ echo '<tr><td><a href="' . Horde::applicationUrl('edit/friends/blacklist.php') .
 </table>
 
 </td>
-<td>
\ No newline at end of file
+<td>
index b90d7f8..3092843 100644 (file)
@@ -48,10 +48,10 @@ $sortText = _("Sort Direction");
 foreach ($headers as $key => $val) {
     echo '<th class="widget leftAlign nowrap">' . "\n";
     if ($criteria['sort_by'] == $key) {
-        echo Horde::link(Util::addParameter($list_url, 'sort_dir', ($criteria['sort_dir'] == 'DESC') ? 'ASC' : 'DESC'), $val['text'], null, null, null, $val['text']);
+        echo Horde::link(Horde_Util::addParameter($list_url, 'sort_dir', ($criteria['sort_dir'] == 'DESC') ? 'ASC' : 'DESC'), $val['text'], null, null, null, $val['text']);
         echo Horde::img($sortImg, $sortText, null, $registry->getImageDir('horde')) . '</a>&nbsp;';
     }
-    echo Horde::widget(Util::addParameter(($criteria['sort_by'] == $key) ? $list_url : $list_url, 'sort_by', $key), $val['text'], 'widget');
+    echo Horde::widget(Horde_Util::addParameter(($criteria['sort_by'] == $key) ? $list_url : $list_url, 'sort_by', $key), $val['text'], 'widget');
     echo '</th>';
 }
 ?>
@@ -83,4 +83,4 @@ foreach ($users as $user):
 <?php endforeach; ?>
 </table>
 <?php echo $pager->render() ?>
-<?php endif; ?>
\ No newline at end of file
+<?php endif; ?>
index 9b867c7..ac59f3b 100644 (file)
@@ -12,8 +12,8 @@ if (!empty($queries)):
 <?php
 foreach ($queries as $query) {
     $delete_img = Horde::img('delete.png', _("Delete"), '', $registry->getImageDir('horde'));
-    echo '<tr><td>' . Horde::link(Util::addParameter(Horde::applicationUrl('search.php'), 'query', $query), '', 'bottom') . $query . '</a></td>';
-    echo '<td>' . Horde::link(Util::addParameter(Horde::applicationUrl('save_search.php'), array('query' => $query, 'delete' => 1))) . $delete_img . '</a></td></tr>';
+    echo '<tr><td>' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'query', $query), '', 'bottom') . $query . '</a></td>';
+    echo '<td>' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('save_search.php'), array('query' => $query, 'delete' => 1))) . $delete_img . '</a></td></tr>';
 }
 ?>
 </table>
index 365852f..a24cca1 100644 (file)
 <a href="javascript: document.getElementById('message_body').focus()" title="<?php echo _("Add a comment") ?>">
 <img src="<?php echo $registry->getImageDir('agora') ?>/agora.png"> <?php echo _("Add a comment") ?></a>
 
-<a href="<?php echo Util::addParameter(Horde::applicationUrl('edit/friends/add.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s as a friend?"), $user) ?>')">
+<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/add.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s as a friend?"), $user) ?>')">
 <img src="<?php echo $registry->getImageDir('horde') ?>/user.png"> <?php echo _("Friend") ?></a>
 
-<a href="<?php echo Util::addParameter(Horde::applicationUrl('edit/friends/blacklist.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>')">
+<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/blacklist.php'), 'user', $user); ?>" title="<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>" onclick="return confirm('<?php echo sprintf(_("Add %s to you blacklist?"), $user) ?>')">
 <img src="<?php echo $registry->getImageDir('horde') ?>/locked.png"> <?php echo _("Blacklist") ?></a>
 
-<a href="<?php echo Util::addParameter(Horde::applicationUrl('report.php'), 'user', $user); ?>" title="<?php echo _("Report user") ?>">
+<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('report.php'), 'user', $user); ?>" title="<?php echo _("Report user") ?>">
 <img src="<?php echo $registry->getImageDir('horde') ?>/problem.png"> <?php echo _("Report") ?></a>
 
 <a href="<?php echo Folks::getUrlFor('list', 'list') ?>" title="<?php echo _("User list") ?>">
@@ -28,4 +28,4 @@
 
 </div>
 
-<br />
\ No newline at end of file
+<br />
index 785080b..0cdac5f 100644 (file)
@@ -5,7 +5,7 @@
 <?php
 echo '<li><img src="' . $registry->getImageDir('horde') . '/alerts/success.png">'
                 . _("Click here to login.")
-                . ' <a href="' . Auth::getLoginScreen('letter', Util::addParameter(Horde::applicationUrl('user.php'), 'user', $user))  . '">' . _("Click here to login.") . '</a>'
+                . ' <a href="' . Auth::getLoginScreen('letter', Horde_Util::addParameter(Horde::applicationUrl('user.php'), 'user', $user))  . '">' . _("Click here to login.") . '</a>'
                     . '</li>';
 ?>
 </ul>
index cb04579..ccbad1f 100644 (file)
@@ -120,7 +120,7 @@ if (!empty($friends)):
 <td class="header" colspan="2">
 <span style="float: right">
 <a href="<?php echo Horde::applicationUrl('edit/friends/index.php') ?>" title="<?php echo _("Edit my firends") ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/plus.png" /></a>
-<a href="<?php echo Util::addParameter(Horde::applicationUrl('edit/friends/index.php'), 'user', $user) ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
+<a href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('edit/friends/index.php'), 'user', $user) ?>" title="<?php echo sprintf(_("Add %s as a friend?"), $user) ?>"><img src="<?php echo $registry->getImageDir('horde') ?>/nav/right.png" /></a>
 </span>
 <?php echo _("Friends") ?> (<?php echo count($friends) ?>)
 </td>
@@ -417,4 +417,4 @@ if ($allow_comments) {
     }
 } else {
     echo $comments_reason;
-}
\ No newline at end of file
+}
index abb3593..2737f20 100644 (file)
@@ -14,7 +14,7 @@
 require_once dirname(__FILE__) . '/lib/base.php';
 
 // Load profile
-$user = Util::getFormData('user', Auth::getAuth());
+$user = Horde_Util::getFormData('user', Auth::getAuth());
 $profile = $folks_driver->getProfile($user);
 if ($profile instanceof PEAR_Error) {
     $notification->push($profile);
@@ -47,8 +47,7 @@ if ($profile['activity_log'] == 'all' ||
 // Prepare an process activity form
 if ($user == Auth::getAuth()) {
     require_once FOLKS_BASE . '/lib/Forms/Activity.php';
-    require_once 'Horde/Variables.php';
-    $vars = Variables::getDefaultVariables();
+    $vars = Horde_Variables::getDefaultVariables();
     $form = new Folks_Activity_Form($vars, _("What are you doing right now?"), 'short');
     if ($form->validate()) {
         $result = $form->execute();
@@ -104,4 +103,4 @@ default:
 break;
 }
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 7c6a4b6..ed5a37f 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-require_once 'Horde/Util.php';
 /**
  * This class defines the Horde_Image:: API, and also provides some
  * utility functions, such as generating highlights of a color.
@@ -14,7 +13,7 @@ require_once 'Horde/Util.php';
  *
  * @package Horde_Image
  *
- * @TODO: - Can we depend on the Util:: class or some other solution needed?
+ * @TODO: - Can we depend on the Horde_Util:: class or some other solution needed?
  *        - Exceptions
  */
 class Horde_Image
@@ -443,7 +442,7 @@ class Horde_Image
      */
     public function toFile($data = false)
     {
-        $tmp = Util::getTempFile('img', false, $this->_tmpdir);
+        $tmp = Horde_Util::getTempFile('img', false, $this->_tmpdir);
         $fp = @fopen($tmp, 'wb');
         fwrite($fp, $data ? $data : $this->raw());
         fclose($fp);
@@ -690,4 +689,4 @@ class Horde_Image
         return $point;
     }
 
-}
\ No newline at end of file
+}
index e2ea5a0..2841de1 100644 (file)
@@ -91,7 +91,7 @@ class Horde_Image_Gd extends Horde_Image
             return '';
         }
 
-        return Util::bufferOutput('image' . $this->_type, $this->_im);
+        return Horde_Util::bufferOutput('image' . $this->_type, $this->_im);
     }
 
     /**
index b07e9cc..7a14dcf 100644 (file)
@@ -108,7 +108,7 @@ class Horde_Image_Im extends Horde_Image
 
         // Perform convert command if needed
         if (count($this->_operations) || count($this->_postSrcOperations) || $convert) {
-            $tmpout = Util::getTempFile('img', false, $this->_tmpdir);
+            $tmpout = Horde_Util::getTempFile('img', false, $this->_tmpdir);
             $command = $this->_convert . ' ' . implode(' ', $this->_operations)
                 . ' "' . $tmpin . '"\'[0]\' '
                 . implode(' ', $this->_postSrcOperations)
@@ -472,7 +472,7 @@ class Horde_Image_Im extends Horde_Image
         }
 
         // Now an output file
-        $tmpout = Util::getTempFile('img', false, $this->_tmpdir);
+        $tmpout = Horde_Util::getTempFile('img', false, $this->_tmpdir);
 
         // Substitue them in the cmd string
         $cmd = str_replace(array('__FILEIN__', '__FILEOUT__', '__CONVERT__'),
@@ -537,4 +537,4 @@ class Horde_Image_Im extends Horde_Image
         return $this->_convert;
     }
 
-}
\ No newline at end of file
+}
index e725e21..0948275 100644 (file)
@@ -17,7 +17,7 @@ class Horde_Image_Imagick extends Horde_Image
     public function __construct($params, $context = array())
     {
         parent::__construct($params, $context);
-        if (Util::loadExtension('imagick')) {
+        if (Horde_Util::loadExtension('imagick')) {
             ini_set('imagick.locale_fix', 1);
             $this->_imagick = new Imagick();
             if (!empty($params['filename'])) {
@@ -418,4 +418,4 @@ class Horde_Image_Imagick extends Horde_Image
         $border->destroy();
     }
 
- }
\ No newline at end of file
+ }
index 594f105..17440b3 100644 (file)
@@ -13,8 +13,8 @@ require_once HORDE_BASE . '/lib/base.php';
 
 // Putting these here so they don't interfere with timing/memory data when
 // profiling.
-$driver = Util::getFormData('driver', 'Im');
-$test = Util::getFormData('test');
+$driver = Horde_Util::getFormData('driver', 'Im');
+$test = Horde_Util::getFormData('test');
 $convert = trim(`which convert`);
 $handler = new Horde_Log_Handler_Stream(fopen('/tmp/imagetest.log','a+'));
 $logger = new Horde_Log_Logger($handler);
@@ -422,4 +422,4 @@ function logThis($effect, $time, $memory)
     global $driver, $logger;
 
     $logger->debug("$driver, $effect, $time, $memory");
-}
\ No newline at end of file
+}
index 37bdd9a..45d2eed 100644 (file)
@@ -1,19 +1,10 @@
 <?php
 /**
- * @package Horde_Form
- */
-
-/** String */
-include_once 'Horde/String.php';
-
-/**
  * Horde_Form Master Class.
  *
  * The Horde_Form:: package provides form rendering, validation, and
  * other functionality for the Horde Application Framework.
  *
- * $Horde: incubator/Horde_Form/Horde/Form.php,v 1.19 2008/08/26 15:32:55 selsky Exp $
- *
  * Copyright 2001-2007 Robert E. Coyle <robertecoyle@hotmail.com>
  * Copyright 2001-2009 The Horde Project (http://www.horde.org/)
  *
@@ -22,7 +13,6 @@ include_once 'Horde/String.php';
  *
  * @author  Robert E. Coyle <robertecoyle@hotmail.com>
  * @author  Chuck Hagenbuch <chuck@horde.org>
- * @since   Horde 3.0
  * @package Horde_Form
  */
 class Horde_Form {
@@ -44,7 +34,7 @@ class Horde_Form {
     public function __construct($vars, $title = '', $name = null)
     {
         if (is_null($name)) {
-            $name = String::lower(get_class($this));
+            $name = Horde_String::lower(get_class($this));
         }
 
         $this->_vars = $vars;
@@ -835,7 +825,7 @@ class Horde_Form_Type_text extends Horde_Form_Type {
     {
         $valid = true;
 
-        if (!empty($this->_maxlength) && String::length($value) > $this->_maxlength) {
+        if (!empty($this->_maxlength) && Horde_String::length($value) > $this->_maxlength) {
             $valid = false;
             $message = sprintf(_("Value is over the maximum length of %s."), $this->_maxlength);
         } elseif ($var->isRequired() && empty($this->_regex)) {
@@ -1038,14 +1028,14 @@ class Horde_Form_Type_countedtext extends Horde_Form_Type_longtext {
     {
         $valid = true;
 
-        $length = String::length(trim($value));
+        $length = Horde_String::length(trim($value));
 
         if ($var->isRequired() && $length <= 0) {
             $valid = false;
             $message = _("This field is required.");
         } elseif ($length > $this->_chars) {
             $valid = false;
-            $message = sprintf(_("There are too many characters in this field. You have entered %s characters; you must enter less than %s."), String::length(trim($value)), $this->_chars);
+            $message = sprintf(_("There are too many characters in this field. You have entered %s characters; you must enter less than %s."), Horde_String::length(trim($value)), $this->_chars);
         }
 
         return $valid;
@@ -1434,7 +1424,7 @@ class Horde_Form_Type_boolean extends Horde_Form_Type {
 
     function getInfo($vars, $var, &$info)
     {
-        $info = String::lower($vars->get($var->getVarName())) == 'on';
+        $info = Horde_String::lower($vars->get($var->getVarName())) == 'on';
     }
 
     /**
@@ -3350,7 +3340,7 @@ class Horde_Form_Type_dblookup extends Horde_Form_Type_enum {
 
             $col = $db->getCol($sql);
             if (!is_a($col, 'PEAR_Error')) {
-                $values = Horde_Array::combine($col, $col);
+                $values = array_combine($col, $col);
             }
         }
         parent::init($values, $prompt);
@@ -3393,7 +3383,7 @@ class Horde_Form_Type_figlet extends Horde_Form_Type {
             return false;
         }
 
-        if (String::lower($value) != String::lower($this->_text)) {
+        if (Horde_String::lower($value) != Horde_String::lower($this->_text)) {
             $message = _("The text you entered did not match the text on the screen.");
             return false;
         }
index 3caac34..ff877e5 100644 (file)
@@ -144,7 +144,7 @@ if (document.getElementById(%1$s)){
             . (empty($this->_name) ? '' : ' id="' . $this->_name. '"')
             . (is_null($this->_enctype) ? '' : ' enctype="' . $this->_enctype . '"')
             . ">\n";
-        echo Util::formInput();
+        echo Horde_Util::formInput();
 
         $this->listFormVars($form);
 
index 9ae0e86..f4072ae 100644 (file)
@@ -11,7 +11,7 @@ class Horde_Form_Type_Boolean extends Horde_Form_Type {
 
     public function getInfo($vars, $var, &$info)
     {
-        $info = String::lower($vars->get($var->name)) == 'on';
+        $info = Horde_String::lower($vars->get($var->name)) == 'on';
     }
 
 }
index 276f541..66432c5 100644 (file)
@@ -24,7 +24,7 @@ class Horde_Form_Type_String extends Horde_Form_Type {
     {
         $valid = true;
 
-        if (!empty($this->_maxlength) && String::length($value) > $this->_maxlength) {
+        if (!empty($this->_maxlength) && Horde_String::length($value) > $this->_maxlength) {
             $valid = false;
             $message = sprintf(_("Value is over the maximum length of %s."), $this->_maxlength);
         } elseif ($var->required && empty($this->_regex)) {
index 312a217..4d0ea7b 100644 (file)
@@ -224,37 +224,37 @@ if (tmp) {
             $img = Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/images/view.php');
             if (isset($image['img']['vfs_id'])) {
                 /* Calling an image from VFS. */
-                $img = Util::addParameter($img, array('f' => $image['img']['vfs_id'],
+                $img = Horde_Util::addParameter($img, array('f' => $image['img']['vfs_id'],
                                                       's' => 'vfs',
                                                       'p' => $image['img']['vfs_path']));
             } else {
                 /* Calling an image from a tmp directory (uploads). */
-                $img = Util::addParameter($img, 'f', $image['img']['file']);
+                $img = Horde_Util::addParameter($img, 'f', $image['img']['file']);
             }
 
             // TODO: possible to change to unobtrusive JS?
             /* Rotate 270. */
-            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Util::addParameter($img, array('a' => 'rotate', 'v' => '270')) . '\', \'_p_' . $varname . '\', true);') . Horde::img('rotate-270.png', _("Rotate Left"), '', $img_dir) . '</a>';
+            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Horde_Util::addParameter($img, array('a' => 'rotate', 'v' => '270')) . '\', \'_p_' . $varname . '\', true);') . Horde::img('rotate-270.png', _("Rotate Left"), '', $img_dir) . '</a>';
 
             /* Rotate 180. */
-            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Util::addParameter($img, array('a' => 'rotate', 'v' => '180')) . '\', \'_p_' . $varname . '\', true);') . Horde::img('rotate-180.png', _("Rotate 180"), '', $img_dir) . '</a>';
+            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Horde_Util::addParameter($img, array('a' => 'rotate', 'v' => '180')) . '\', \'_p_' . $varname . '\', true);') . Horde::img('rotate-180.png', _("Rotate 180"), '', $img_dir) . '</a>';
 
             /* Rotate 90. */
-            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Util::addParameter($img, array('a' => 'rotate', 'v' => '90')) . '\', \'_p_' . $varname . '\', true);') . Horde::img('rotate-90.png', _("Rotate Right"), '', $img_dir) . '</a>';
+            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Horde_Util::addParameter($img, array('a' => 'rotate', 'v' => '90')) . '\', \'_p_' . $varname . '\', true);') . Horde::img('rotate-90.png', _("Rotate Right"), '', $img_dir) . '</a>';
 
             /* Flip image. */
-            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Util::addParameter($img, 'a', 'flip') . '\', \'_p_' . $varname . '\', true);') . Horde::img('flip.png', _("Flip"), '', $img_dir) . '</a>';
+            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Horde_Util::addParameter($img, 'a', 'flip') . '\', \'_p_' . $varname . '\', true);') . Horde::img('flip.png', _("Flip"), '', $img_dir) . '</a>';
 
             /* Mirror image. */
-            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Util::addParameter($img, 'a', 'mirror') . '\', \'_p_' . $varname . '\', true);') . Horde::img('mirror.png', _("Mirror"), '', $img_dir) . '</a>';
+            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Horde_Util::addParameter($img, 'a', 'mirror') . '\', \'_p_' . $varname . '\', true);') . Horde::img('mirror.png', _("Mirror"), '', $img_dir) . '</a>';
 
             /* Apply grayscale. */
-            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Util::addParameter($img, 'a', 'grayscale') . '\', \'_p_' . $varname . '\', true);') . Horde::img('grayscale.png', _("Grayscale"), '', $img_dir) . '</a>';
+            $html .= Horde::link('#', '', '', '', 'showImage(\'' . Horde_Util::addParameter($img, 'a', 'grayscale') . '\', \'_p_' . $varname . '\', true);') . Horde::img('grayscale.png', _("Grayscale"), '', $img_dir) . '</a>';
 
             /* Resize width. */
             $html .= sprintf('%s    <input type="text" class="form-input-resize" onchange="src=getResizeSrc(\'%s\', \'%s\');showImage(src, \'_p_%s\', true);" %s />',
                    _("w:"),
-                   Util::addParameter($img, 'a', 'resize'),
+                   Horde_Util::addParameter($img, 'a', 'resize'),
                    $varname,
                    $varname,
                    '_w_'. $varname);
@@ -262,13 +262,13 @@ if (tmp) {
             /* Resize height. */
             $html .= sprintf('%s    <input type="text" class="form-input-resize" onchange="src=getResizeSrc(\'%s\', \'%s\');showImage(src, \'_p_%s\', true);" %s />',
                    _("h:"),
-                   Util::addParameter($img, 'a', 'resize'),
+                   Horde_Util::addParameter($img, 'a', 'resize'),
                    $varname,
                    $varname,
                    '_h_'. $varname);
 
             /* Apply fixed ratio resize. */
-            $html .= Horde::link('#', '', '', '', 'src=getResizeSrc(\'' . Util::addParameter($img, 'a', 'resize') . '\', \'' . $varname . '\', \'1\');showImage(src, \'_p_' . $varname . '\', true);') . Horde::img('ratio.png', _("Fix ratio"), '', $img_dir) . '</a>';
+            $html .= Horde::link('#', '', '', '', 'src=getResizeSrc(\'' . Horde_Util::addParameter($img, 'a', 'resize') . '\', \'' . $varname . '\', \'1\');showImage(src, \'_p_' . $varname . '\', true);') . Horde::img('ratio.png', _("Fix ratio"), '', $img_dir) . '</a>';
 
             /* Keep also original if it has been requested. */
             if ($var->type->show_keeporig) {
@@ -1045,7 +1045,7 @@ EOT;
     {
         $img_params = $var->getValue($vars);
         $img_url = Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/images/view.php');
-        $img_url = Util::addParameter($img_url, $img_params);
+        $img_url = Horde_Util::addParameter($img_url, $img_params);
 
         return Horde::img($img_url, isset($img_params['f']) ? $img_params['f'] : '', '', '');
     }
@@ -1170,7 +1170,7 @@ EOT;
         } elseif (preg_match('/(.*?)\r?\n([A-Z]{1,3})-(\d{5})\s+(.*)/i', $address, $addressParts)) {
             /* European address style. */
             include 'Horde/NLS/carsigns.php';
-            $country = array_search(String::upper($addressParts[2]), $carsigns);
+            $country = array_search(Horde_String::upper($addressParts[2]), $carsigns);
 
             /* Map24 generated map. */
             if (in_array($country, array('al', 'ad', 'am', 'az', 'be', 'ba',
@@ -1203,7 +1203,7 @@ EOT;
             }
 
             /* Mapquest generated map. */
-            $mapurl2 = 'http://www.mapquest.com/maps/map.adp?country=' . String::upper($country);
+            $mapurl2 = 'http://www.mapquest.com/maps/map.adp?country=' . Horde_String::upper($country);
             $desc2 = _("MapQuest map");
             $icon2 = 'map_eu.png';
             if (!empty($addressParts[1])) {
@@ -1345,7 +1345,7 @@ EOT;
                     if ($GLOBALS['registry']->hasMethod('files/getViewLink')) {
                         $filename = basename($filename);
                         $url = $GLOBALS['registry']->call('files/getViewLink', array($dir, $filename));
-                        $filename = Horde::link($url, _("Preview"), null, 'form_file_view') . htmlspecialchars(Util::realPath($dir . '/' . $filename), ENT_QUOTES, $this->_charset) . '</a>';
+                        $filename = Horde::link($url, _("Preview"), null, 'form_file_view') . htmlspecialchars(Horde_Util::realPath($dir . '/' . $filename), ENT_QUOTES, $this->_charset) . '</a>';
                     } else {
                         if (!empty($dir) && ($dir != '.')) {
                             $filename = $dir . '/' . $filename;
index 8267f25..4d4c9dd 100644 (file)
 @define('INCUBATOR_BASE', dirname(__FILE__));
 
 require_once HORDE_BASE . '/lib/core.php';
-require_once 'Horde/Variables.php';
 require_once 'Horde/Autoloader.php';
 Horde_Autoloader::addClassPath(dirname(__FILE__));
 $registry = Registry::singleton();
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 
 $vars->set('example_bar', 'text with a beginning and an end');
 $form = new Horde_Form($vars, 'Horde_Form Test');
index 41a99bf..e73754d 100644 (file)
@@ -287,11 +287,11 @@ class Horde_Rdo_Table_Helper extends Horde_Template
         if ($this->_params['update'] || $this->_params['delete']) {
             $content .= '<td class="nowrap">' . "\n";
             if ($this->_params['update']) {
-                $content .= '<a class="update" href="' . Util::addParameter($url, 'action', 'update') . '&' . $keys . '">' .
+                $content .= '<a class="update" href="' . Horde_Util::addParameter($url, 'action', 'update') . '&' . $keys . '">' .
                     '<img src="<tag:img_dir />/edit.png" alt="<gettext>Edit</gettext>" title="<gettext>Edit</gettext>" /></a> ' . "\n";
             }
             if ($this->_params['delete']) {
-                $content .= '<a class="delete" href="' . Util::addParameter($url, 'action', 'delete') . '&' . $keys . '">' .
+                $content .= '<a class="delete" href="' . Horde_Util::addParameter($url, 'action', 'delete') . '&' . $keys . '">' .
                     '<img src="<tag:img_dir />/delete.png" alt="<gettext>Delete</gettext>" title="<gettext>Delete</gettext>" /></a> ' . "\n";
             }
             $content .= '</td>' . "\n";
index b48fe05..5602329 100644 (file)
@@ -21,14 +21,13 @@ if (!Auth::isAdmin()) {
     die('Permission denied');
 }
 
-require_once 'Horde/Variables.php';
 require_once 'Horde/Autoloader.php';
 require_once dirname(__FILE__) . '/Form.php';
 require_once dirname(__FILE__) . '/Table.php';
 
-$what2process = Util::getFormData('what2process', 'Rdo');
-$table = Util::getFormData('table', 'horde_user');
-$self_url = Util::addParameter(Horde::selfUrl(false), array('table' => $table, 'what2process' => $what2process), null, false);
+$what2process = Horde_Util::getFormData('what2process', 'Rdo');
+$table = Horde_Util::getFormData('table', 'horde_user');
+$self_url = Horde_Util::addParameter(Horde::selfUrl(false), array('table' => $table, 'what2process' => $what2process), null, false);
 
 if ($what2process == 'Rdo') {
 
@@ -63,12 +62,12 @@ if ($what2process == 'Rdo') {
     $mapper = $table;
 }
 
-$action = Util::getFormData('action');
+$action = Horde_Util::getFormData('action');
 
-$filter = Util::getFormData('filter', array());
+$filter = Horde_Util::getFormData('filter', array());
 $title = sprintf('%s: %s', $action, $table);
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = Horde_Form_Helper::factory($what2process, $vars, $title, null, $mapper);
 
 switch ($action) {
@@ -108,7 +107,7 @@ case 'update':
 case 'search':
 case 'search_active':
     $form->getInfo($vars, $filter);
-    $self_url = Util::addParameter($self_url, 'action', 'search');
+    $self_url = Horde_Util::addParameter($self_url, 'action', 'search');
     break;
 }
 
index 259fc8b..bb8feed 100644 (file)
@@ -23,10 +23,9 @@ if (!Auth::isAdmin()) {
 
 require_once 'Horde/Form.php';
 require_once 'Horde/Form/Renderer.php';
-require_once 'Horde/Variables.php';
 require_once 'Horde/Array.php';
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 
 $dbh = DB::connect($conf['sql']);
 $tables = $dbh->getListOf('tables');
index 478c07b..cf1fd0b 100644 (file)
@@ -112,7 +112,7 @@ class Horde_Service_Vimeo_Simple extends Horde_Service_Vimeo {
         }
 
         // We should have a url now, and possibly other options.
-        $url = Util::addParameter($this->_oembed_endpoint, $options, null, false);
+        $url = Horde_Util::addParameter($this->_oembed_endpoint, $options, null, false);
 
         try {
             $response = $this->_http_client->request('GET', $url);
index 28d2a0d..3d051d3 100644 (file)
@@ -150,7 +150,7 @@ class Horde_Vcs_Cvs extends Horde_Vcs_Rcs
     {
         $this->assertValidRevision($rev);
 
-        $tmpfile = Util::getTempFile('vc', true, $this->_paths['temp']);
+        $tmpfile = Horde_Util::getTempFile('vc', true, $this->_paths['temp']);
         $where = $fileob->queryModulePath();
 
         $pipe = popen(escapeshellcmd($this->getPath('cvs')) . ' -n server > ' . escapeshellarg($tmpfile), VC_WINDOWS ? 'wb' : 'w');
index 9590ad2..d855458 100644 (file)
@@ -65,7 +65,7 @@ class Horde_Vcs_Svn extends Horde_Vcs
         $svnPath = $this->getPath('svn');
         $tempDir = isset($this->_paths['svn_home'])
             ? $this->_paths['svn_home']
-            : Util::getTempDir();
+            : Horde_Util::getTempDir();
         $command = $svnPath . ' --non-interactive --config-dir ' . $tempDir;
 
         if ($this->_username) {
index 299d94b..ba2e209 100644 (file)
@@ -30,11 +30,11 @@ try {
     exit;
 }
 
-$acls = Util::getFormData('acl');
-$folder = Util::getFormData('folder');
-$new_user = Util::getFormData('new_user');
+$acls = Horde_Util::getFormData('acl');
+$folder = Horde_Util::getFormData('folder');
+$new_user = Horde_Util::getFormData('new_user');
 if ($new_user) {
-    $new_acl = Util::getFormData('new_acl');
+    $new_acl = Horde_Util::getFormData('new_acl');
     /* check to see if $new_user already has an acl on the folder */
     if (isset($acls[$new_user])) {
         $acls[$new_user] = $new_acl;
@@ -46,7 +46,7 @@ $protected = $ACLDriver->getProtected();
 
 /* Run through the action handlers. */
 $ok_form = true;
-switch (Util::getFormData('actionID')) {
+switch (Horde_Util::getFormData('actionID')) {
 case 'imp_acl_set':
     if (!$folder) {
         $notification->push(_("No folder selected."), 'horde.error');
@@ -141,15 +141,15 @@ if (is_a($result, 'PEAR_Error')) {
 extract($result);
 
 $app = 'imp';
-$chunk = Util::nonInputVar('chunk');
+$chunk = Horde_Util::nonInputVar('chunk');
 Prefs_UI::generateHeader(null, $chunk);
 
 /* Set up template. */
 $t = new IMP_Template();
 $t->setOption('gettext', true);
 $t->set('aclurl', Horde::applicationUrl('acl.php'));
-$t->set('forminput', Util::formInput());
-$t->set('aclnavcell', Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'acl'));
+$t->set('forminput', Horde_Util::formInput());
+$t->set('aclnavcell', Horde_Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'acl'));
 $t->set('changefolder', Horde::link('#', _("Change Folder"), 'smallheader', '', '', '', '', array('id' => 'changefolder')));
 $t->set('sharedimg', Horde::img('shared.png', _("Change Folder")));
 $t->set('options', IMP::flistSelect(array('selected' => $folder)));
index 15687bb..4263733 100644 (file)
@@ -67,17 +67,17 @@ function _changed($mbox, $compare, $rw = null)
 function _getListMessages($mbox, $change)
 {
     $args = array(
-        'cached' => Util::getPost('cached'),
-        'cacheid' => Util::getPost('cacheid'),
+        'cached' => Horde_Util::getPost('cached'),
+        'cacheid' => Horde_Util::getPost('cacheid'),
         'mbox' => $mbox,
-        'rangeslice' => Util::getPost('rangeslice'),
-        'qsearch' => Util::getPost('qsearch'),
-        'qsearchmbox' => Util::getPost('qsearchmbox'),
+        'rangeslice' => Horde_Util::getPost('rangeslice'),
+        'qsearch' => Horde_Util::getPost('qsearch'),
+        'qsearchmbox' => Horde_Util::getPost('qsearchmbox'),
     );
 
-    $search = Util::getPost('search');
+    $search = Horde_Util::getPost('search');
     if (empty($search)) {
-        list($slice_start, $slice_end) = explode(':', Util::getPost('slice'), 2);
+        list($slice_start, $slice_end) = explode(':', Horde_Util::getPost('slice'), 2);
         $args += array(
             'slice_start' => intval($slice_start),
             'slice_end' => intval($slice_end)
@@ -87,8 +87,8 @@ function _getListMessages($mbox, $change)
         $args += array(
             'search_uid' => $search->imapuid,
             'search_view' => $search->view,
-            'search_before' => intval(Util::getPost('search_before')),
-            'search_after' => intval(Util::getPost('search_after'))
+            'search_before' => intval(Horde_Util::getPost('search_before')),
+            'search_after' => intval(Horde_Util::getPost('search_after'))
         );
     }
 
@@ -97,11 +97,11 @@ function _getListMessages($mbox, $change)
 
     // TODO: This can potentially be optimized for arrival time sort - if the
     // cache ID changes, we know the changes must occur at end of mailbox.
-    if (empty($res->reset) && (Util::getPost('purge') || $change)) {
+    if (empty($res->reset) && (Horde_Util::getPost('purge') || $change)) {
         $res->update = 1;
     }
 
-    $req_id = Util::getPost('request_id');
+    $req_id = Horde_Util::getPost('request_id');
     if (!is_null($req_id)) {
         $res->request_id = intval($req_id);
     }
@@ -139,10 +139,10 @@ function _getQuota()
     return null;
 }
 
-// Need to load Util:: to give us access to Util::getPathInfo().
+// Need to load Horde_Util:: to give us access to Horde_Util::getPathInfo().
 require_once dirname(__FILE__) . '/lib/base.load.php';
 require_once HORDE_BASE . '/lib/core.php';
-$action = basename(Util::getPathInfo());
+$action = basename(Horde_Util::getPathInfo());
 if (empty($action)) {
     // This is the only case where we really don't return anything, since
     // the frontend can be presumed not to make this request on purpose.
@@ -161,9 +161,9 @@ $session_timeout = 'json';
 require_once IMP_BASE . '/lib/base.php';
 
 // Process common request variables.
-$mbox = Util::getPost('view');
-$indices = $imp_imap->ob->utils->fromSequenceString(Util::getPost('uid'));
-$cacheid = Util::getPost('cacheid');
+$mbox = Horde_Util::getPost('view');
+$indices = $imp_imap->ob->utils->fromSequenceString(Horde_Util::getPost('uid'));
+$cacheid = Horde_Util::getPost('cacheid');
 
 // Open an output buffer to ensure that we catch errors that might break JSON
 // encoding.
@@ -183,9 +183,9 @@ case 'CreateFolder':
 
     $imp_folder = IMP_Folder::singleton();
 
-    $new = String::convertCharset($mbox, NLS::getCharset(), 'UTF7-IMAP');
+    $new = Horde_String::convertCharset($mbox, NLS::getCharset(), 'UTF7-IMAP');
     try {
-        $new = $imptree->createMailboxName(Util::getPost('parent'), $new);
+        $new = $imptree->createMailboxName(Horde_Util::getPost('parent'), $new);
         $result = $imp_folder->create($new, $prefs->getValue('subscribe'));
         if ($result) {
             $result = DIMP::getFolderResponse($imptree);
@@ -212,9 +212,9 @@ case 'DeleteFolder':
     break;
 
 case 'RenameFolder':
-    $old = Util::getPost('old_name');
-    $new_parent = Util::getPost('new_parent');
-    $new = Util::getPost('new_name');
+    $old = Horde_Util::getPost('old_name');
+    $new_parent = Horde_Util::getPost('new_parent');
+    $new = Horde_Util::getPost('new_name');
     if (!$old || !$new) {
         break;
     }
@@ -227,7 +227,7 @@ case 'RenameFolder':
     try {
         $new = $imptree->createMailboxName($new_parent, $new);
 
-        $new = String::convertCharset($new, NLS::getCharset(), 'UTF7-IMAP');
+        $new = Horde_String::convertCharset($new, NLS::getCharset(), 'UTF7-IMAP');
         if ($old != $new) {
             $result = $imp_folder->rename($old, $new);
             if ($result) {
@@ -252,12 +252,12 @@ case 'EmptyFolder':
     break;
 
 case 'FlagAll':
-    $flags = Horde_Serialize::unserialize(Util::getPost('flags'), Horde_Serialize::JSON);
+    $flags = Horde_Serialize::unserialize(Horde_Util::getPost('flags'), Horde_Serialize::JSON);
     if (empty($mbox) || empty($flags)) {
         break;
     }
 
-    $set = Util::getPost('set');
+    $set = Horde_Util::getPost('set');
 
     $imp_message = &IMP_Message::singleton();
     $result = $imp_message->flagAllInMailbox($flags, array($mbox), $set);
@@ -315,8 +315,8 @@ case 'ViewPort':
     }
 
     /* Change sort preferences if necessary. */
-    $sortby = Util::getPost('sortby');
-    $sortdir = Util::getPost('sortdir');
+    $sortby = Horde_Util::getPost('sortby');
+    $sortdir = Horde_Util::getPost('sortdir');
     if (!is_null($sortby) || !is_null($sortdir)) {
         IMP::setSort($sortby, $sortdir, $mbox);
     }
@@ -324,8 +324,8 @@ case 'ViewPort':
     $result = new stdClass;
     $changed = _changed($mbox, $cacheid, false);
 
-    if (Util::getPost('rangeslice') ||
-        !Util::getPost('checkcache') ||
+    if (Horde_Util::getPost('rangeslice') ||
+        !Horde_Util::getPost('checkcache') ||
         $changed) {
         $result->ViewPort = _getListMessages($mbox, $changed);
     }
@@ -333,7 +333,7 @@ case 'ViewPort':
 
 case 'MoveMessage':
 case 'CopyMessage':
-    $to = Util::getPost('tofld');
+    $to = Horde_Util::getPost('tofld');
     if (!$to || empty($indices)) {
         break;
     }
@@ -368,7 +368,7 @@ case 'CopyMessage':
     break;
 
 case 'FlagMessage':
-    $flags = Util::getPost('flags');
+    $flags = Horde_Util::getPost('flags');
     if (!$flags || empty($indices)) {
         break;
     }
@@ -410,8 +410,8 @@ case 'DeleteMessage':
     break;
 
 case 'AddContact':
-    $email = Util::getPost('email');
-    $name = Util::getPost('name');
+    $email = Horde_Util::getPost('email');
+    $name = Horde_Util::getPost('name');
     // Allow $name to be empty.
     if (empty($email)) {
         break;
@@ -429,7 +429,7 @@ case 'AddContact':
 
 case 'ReportSpam':
     $change = _changed($mbox, $cacheid, false);
-    $spam_result = IMP_Spam::reportSpam($indices, Util::getPost('spam') ? 'spam' : 'notspam');
+    $spam_result = IMP_Spam::reportSpam($indices, Horde_Util::getPost('spam') ? 'spam' : 'notspam');
     if ($spam_result) {
         $result = _generateDeleteResult($mbox, $indices, $change);
         // If $spam_result is non-zero, then we know the message has been
@@ -444,7 +444,7 @@ case 'Blacklist':
     }
 
     $imp_filter = new IMP_Filter();
-    if (Util::getPost('blacklist')) {
+    if (Horde_Util::getPost('blacklist')) {
         $change = _changed($mbox, $cacheid, false);
         if ($imp_filter->blacklistMessage($indices, false)) {
             $result = _generateDeleteResult($mbox, $indices, $change);
@@ -475,13 +475,13 @@ case 'Html2Text':
     $result = new stdClass;
     // Need to replace line endings or else IE won't display line endings
     // properly.
-    $result->text = str_replace("\n", "\r\n", Text_Filter::filter(Util::getPost('text'), 'html2text'));
+    $result->text = str_replace("\n", "\r\n", Text_Filter::filter(Horde_Util::getPost('text'), 'html2text'));
     break;
 
 case 'Text2Html':
     require_once 'Horde/Text/Filter.php';
     $result = new stdClass;
-    $result->text = Text_Filter::filter(Util::getPost('text'), 'text2html', array('parselevel' => TEXT_HTML_MICRO_LINKURL, 'class' => null, 'callback' => null));
+    $result->text = Text_Filter::filter(Horde_Util::getPost('text'), 'text2html', array('parselevel' => TEXT_HTML_MICRO_LINKURL, 'class' => null, 'callback' => null));
     break;
 
 case 'GetForwardData':
@@ -489,7 +489,7 @@ case 'GetForwardData':
     $msg = $header = null;
     $idx_string = _getIdxString($indices);
 
-    $imp_compose = IMP_Compose::singleton(Util::getPost('imp_compose'));
+    $imp_compose = IMP_Compose::singleton(Horde_Util::getPost('imp_compose'));
     $imp_contents = IMP_Contents::singleton($idx_string);
     $imp_ui = new IMP_UI_Compose();
     $fwd_msg = $imp_ui->getForwardData($imp_compose, $imp_contents, $idx_string);
@@ -507,9 +507,9 @@ case 'GetForwardData':
     break;
 
 case 'GetReplyData':
-    $imp_compose = IMP_Compose::singleton(Util::getPost('imp_compose'));
+    $imp_compose = IMP_Compose::singleton(Horde_Util::getPost('imp_compose'));
     $imp_contents = IMP_Contents::singleton(_getIdxString($indices));
-    $reply_msg = $imp_compose->replyMessage(Util::getPost('type'), $imp_contents);
+    $reply_msg = $imp_compose->replyMessage(Horde_Util::getPost('type'), $imp_contents);
     $header = $reply_msg['headers'];
     $header['replytype'] = 'reply';
 
@@ -521,7 +521,7 @@ case 'GetReplyData':
     break;
 
 case 'DeleteDraft':
-    $index = Util::getPost('index');
+    $index = Horde_Util::getPost('index');
     if (empty($indices)) {
         break;
     }
@@ -531,9 +531,9 @@ case 'DeleteDraft':
     break;
 
 case 'DeleteAttach':
-    $atc = Util::getPost('atc_indices');
+    $atc = Horde_Util::getPost('atc_indices');
     if (!is_null($atc)) {
-        $imp_compose = IMP_Compose::singleton(Util::getPost('imp_compose'));
+        $imp_compose = IMP_Compose::singleton(Horde_Util::getPost('imp_compose'));
         foreach ($imp_compose->deleteAttachment($atc) as $val) {
             $notification->push(sprintf(_("Deleted the attachment \"%s\"."), Horde_Mime::decode($val)), 'horde.success');
         }
@@ -601,10 +601,10 @@ case 'ShowPortal':
     break;
 
 case 'chunkContent':
-    $chunk = basename(Util::getPost('chunk'));
+    $chunk = basename(Horde_Util::getPost('chunk'));
     if (!empty($chunk)) {
         $result = new stdClass;
-        $result->chunk = Util::bufferOutput('include', IMP_TEMPLATES . '/chunks/' . $chunk . '.php');
+        $result->chunk = Horde_Util::bufferOutput('include', IMP_TEMPLATES . '/chunks/' . $chunk . '.php');
     }
     break;
 
@@ -636,7 +636,7 @@ case 'ModifyPollFolder':
         break;
     }
 
-    $add = Util::getPost('add');
+    $add = Horde_Util::getPost('add');
     $display_folder = IMP::displayFolder($mbox);
 
     $imptree = IMP_Imap_Tree::singleton();
@@ -658,7 +658,7 @@ case 'ModifyPollFolder':
     break;
 
 case 'SendMDN':
-    $index = Util::getPost('index');
+    $index = Horde_Util::getPost('index');
     if (empty($mbox) || empty($index)) {
         break;
     }
@@ -682,7 +682,7 @@ case 'SMIMEPersonal':
     $result = new stdClass;
     $result->success = false;
 
-    $passphrase = Util::getFormData('dialog_input');
+    $passphrase = Horde_Util::getFormData('dialog_input');
 
     if ($action == 'SMIMEPersonal') {
         $imp_smime = Horde_Crypt::singleton(array('IMP', 'Smime'));
@@ -705,7 +705,7 @@ case 'SMIMEPersonal':
         try {
             Horde::requireSecureConnection();
             if ($passphrase) {
-                if ($imp_pgp->storePassphrase(($action == 'PGPSymmetric') ? 'symmetric' : 'personal', $passphrase, Util::getFormData('symmetricid'))) {
+                if ($imp_pgp->storePassphrase(($action == 'PGPSymmetric') ? 'symmetric' : 'personal', $passphrase, Horde_Util::getFormData('symmetricid'))) {
                     $result->success = 1;
                 } else {
                     $result->error = _("Invalid passphrase entered.");
@@ -725,7 +725,7 @@ case 'SMIMEPersonal':
     break;
 
 case 'Fetchmail':
-    $fetch_list = Util::getFormData('accounts');
+    $fetch_list = Horde_Util::getFormData('accounts');
     if (empty($fetch_list)) {
         $result->error = _("No accounts selected.");
     } else {
index aae08c6..9eac23c 100644 (file)
@@ -29,9 +29,9 @@ if (!$conf['compose']['link_attachments']) {
 }
 
 // Gather required form variables.
-$mail_user = Util::getFormData('u', null);
-$time_stamp = Util::getFormData('t', null);
-$file_name = Util::getFormData('f', null);
+$mail_user = Horde_Util::getFormData('u', null);
+$time_stamp = Horde_Util::getFormData('t', null);
+$file_name = Horde_Util::getFormData('f', null);
 if (is_null($mail_user) || is_null($time_stamp) || is_null($file_name)) {
     Horde::fatal(_("The attachment was not found."), $self_url, __LINE__);
 }
@@ -54,7 +54,7 @@ if (!$vfsroot->exists($full_path, $file_name)) {
 // Check to see if we need to send a verification message.
 if ($conf['compose']['link_attachments_notify']) {
     if ($vfsroot->exists($full_path, $file_name . '.notify')) {
-        $delete_id = Util::getFormData('d');
+        $delete_id = Horde_Util::getFormData('d');
         $read_id = $vfsroot->read($full_path, $file_name . '.notify');
         if (is_a($read_id, 'PEAR_Error')) {
             Horde::logMessage($read_id, __FILE__, __LINE__, PEAR_LOG_ERR);
@@ -100,7 +100,7 @@ if ($conf['compose']['link_attachments_notify']) {
                 $msg = new Horde_Mime_Part();
                 $msg->setType('text/plain');
                 $msg->setCharset(NLS::getCharset());
-                $msg->setContents(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), Util::addParameter(Horde::selfUrl(true, false, true), 'd', $id))));
+                $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);
             }
@@ -121,7 +121,7 @@ if ($mime_type === false) {
 
 // Prevent 'jar:' attacks on Firefox.  See Ticket #5892.
 if ($browser->isBrowser('mozilla')) {
-    if (in_array(String::lower($mime_type), array('application/java-archive', 'application/x-jar'))) {
+    if (in_array(Horde_String::lower($mime_type), array('application/java-archive', 'application/x-jar'))) {
         $mime_type = 'application/octet-stream';
     }
 }
index eb8ad95..5bd473e 100644 (file)
  * DEFAULT: 525600 = 1 year */
 $expire_time = 525600;
 
-// Need to load Util:: to give us access to Util::getPathInfo().
+// Need to load Horde_Util:: to give us access to Horde_Util::getPathInfo().
 require_once dirname(__FILE__) . '/lib/base.load.php';
 require_once HORDE_BASE . '/lib/core.php';
-$path_info = trim(Util::getPathInfo(), '/');
+$path_info = trim(Horde_Util::getPathInfo(), '/');
 if (empty($path_info)) {
     exit;
 }
index dac1f30..fe02d57 100644 (file)
@@ -34,17 +34,17 @@ $compose_disable = !empty($conf['hooks']['disable_compose']) &&
 /* The headers of the message. */
 $header = array();
 foreach (array('to', 'cc', 'bcc', 'subject', 'in_reply_to', 'references') as $v) {
-    $header[$v] = rawurldecode(Util::getFormData($v, ''));
+    $header[$v] = rawurldecode(Horde_Util::getFormData($v, ''));
 }
 
-$action = Util::getFormData('action');
+$action = Horde_Util::getFormData('action');
 $get_sig = true;
 $msg = '';
 
 require_once 'Horde/Identity.php';
 $identity = &Identity::singleton(array('imp', 'imp'));
 if (!$prefs->isLocked('default_identity')) {
-    $identity_id = Util::getFormData('identity');
+    $identity_id = Horde_Util::getFormData('identity');
     if (!is_null($identity_id)) {
         $identity->setDefault($identity_id);
     }
@@ -54,7 +54,7 @@ if (!$prefs->isLocked('default_identity')) {
 NLS::setTimeZone();
 
 /* Initialize the IMP_Compose:: object. */
-$imp_compose = &IMP_Compose::singleton(Util::getFormData('composeCache'));
+$imp_compose = &IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
 
 /* Init IMP_UI_Compose:: object. */
 $imp_ui = new IMP_UI_Compose();
@@ -80,7 +80,7 @@ if (count($_POST)) {
     /* Set the default charset. */
     $charset = NLS::getEmailCharset();
     if (!$prefs->isLocked('sending_charset')) {
-        $charset = Util::getFormData('charset', $charset);
+        $charset = Horde_Util::getFormData('charset', $charset);
     }
 
     switch ($action) {
@@ -88,7 +88,7 @@ if (count($_POST)) {
     case 'save_draft':
         /* Set up the From address based on the identity. */
         try {
-            $from = $identity->getFromLine(null, Util::getFormData('from'));
+            $from = $identity->getFromLine(null, Horde_Util::getFormData('from'));
         } catch (Horde_Exception $e) {
             $notification->push($e);
             break;
@@ -97,11 +97,11 @@ if (count($_POST)) {
 
         /* Save the draft. */
         try {
-            $res = $imp_compose->saveDraft($header, Util::getFormData('message', ''), NLS::getCharset(), Util::getFormData('html'));
+            $res = $imp_compose->saveDraft($header, Horde_Util::getFormData('message', ''), NLS::getCharset(), Horde_Util::getFormData('html'));
             $result->success = 1;
 
             /* Delete existing draft. */
-            _removeAutoSaveDraft(Util::getFormData('draft_index'));
+            _removeAutoSaveDraft(Horde_Util::getFormData('draft_index'));
 
             if ($action == 'auto_save_draft') {
                 /* Just update the last draft index so subsequent
@@ -121,7 +121,7 @@ if (count($_POST)) {
         }
 
         try {
-            $from = $identity->getFromLine(null, Util::getFormData('from'));
+            $from = $identity->getFromLine(null, Horde_Util::getFormData('from'));
         } catch (Horde_Exception $e) {
             $notification->push($e);
             break;
@@ -129,22 +129,22 @@ if (count($_POST)) {
         $header['from'] = $from;
         $header['replyto'] = $identity->getValue('replyto_addr');
 
-        $header['to'] = $imp_ui->getAddressList(Util::getFormData('to'), Util::getFormData('to_list'), Util::getFormData('to_field'), Util::getFormData('to_new'));
+        $header['to'] = $imp_ui->getAddressList(Horde_Util::getFormData('to'), Horde_Util::getFormData('to_list'), Horde_Util::getFormData('to_field'), Horde_Util::getFormData('to_new'));
         if ($prefs->getValue('compose_cc')) {
-            $header['cc'] = $imp_ui->getAddressList(Util::getFormData('cc'), Util::getFormData('cc_list'), Util::getFormData('cc_field'), Util::getFormData('cc_new'));
+            $header['cc'] = $imp_ui->getAddressList(Horde_Util::getFormData('cc'), Horde_Util::getFormData('cc_list'), Horde_Util::getFormData('cc_field'), Horde_Util::getFormData('cc_new'));
         }
         if ($prefs->getValue('compose_bcc')) {
-            $header['bcc'] = $imp_ui->getAddressList(Util::getFormData('bcc'), Util::getFormData('bcc_list'), Util::getFormData('bcc_field'), Util::getFormData('bcc_new'));
+            $header['bcc'] = $imp_ui->getAddressList(Horde_Util::getFormData('bcc'), Horde_Util::getFormData('bcc_list'), Horde_Util::getFormData('bcc_field'), Horde_Util::getFormData('bcc_new'));
         }
 
-        $message = Util::getFormData('message');
-        $html = Util::getFormData('html');
+        $message = Horde_Util::getFormData('message');
+        $html = Horde_Util::getFormData('html');
 
-        $result->index = intval(Util::getFormData('index'));
+        $result->index = intval(Horde_Util::getFormData('index'));
 
-        $reply_folder = Util::getFormData('folder');
-        if ($reply_type = Util::getFormData('reply_type')) {
-            $result->reply_folder = Util::getFormData('folder');
+        $reply_folder = Horde_Util::getFormData('folder');
+        if ($reply_type = Horde_Util::getFormData('reply_type')) {
+            $result->reply_folder = Horde_Util::getFormData('folder');
             $result->reply_type = $reply_type;
         }
 
@@ -154,13 +154,13 @@ if (count($_POST)) {
         $imptree->eltDiffStart();
 
         $options = array(
-            'readreceipt' => Util::getFormData('request_read_receipt'),
+            'readreceipt' => Horde_Util::getFormData('request_read_receipt'),
             'reply_index' => $result->index . IMP::IDX_SEP . $reply_folder,
             'reply_type' => $reply_type,
-            'save_attachments' => Util::getFormData('save_attachments_select'),
+            'save_attachments' => Horde_Util::getFormData('save_attachments_select'),
             'save_sent' => (($prefs->isLocked('save_sent_mail'))
                             ? $identity->getValue('save_sent_mail')
-                            : (bool)Util::getFormData('save_sent_mail')),
+                            : (bool)Horde_Util::getFormData('save_sent_mail')),
             'sent_folder' => $identity->getValue('sent_mail_folder'),
         );
 
@@ -175,7 +175,7 @@ if (count($_POST)) {
         /* Remove any auto-saved drafts. */
         if ($prefs->getValue('auto_save_drafts') ||
             $prefs->getValue('auto_delete_drafts')) {
-            _removeAutoSaveDraft(Util::getFormData('draft_index'));
+            _removeAutoSaveDraft(Horde_Util::getFormData('draft_index'));
             $result->draft_delete = 1;
         }
 
@@ -198,7 +198,7 @@ if (count($_POST)) {
         }
     }
 
-    Horde::sendHTTPResponse(Horde::prepareResponse($result, !$result->success || !Util::getFormData('nonotify')  ? $GLOBALS['imp_notify'] : null, false), 'json');
+    Horde::sendHTTPResponse(Horde::prepareResponse($result, !$result->success || !Horde_Util::getFormData('nonotify')  ? $GLOBALS['imp_notify'] : null, false), 'json');
     exit;
 }
 
@@ -206,9 +206,9 @@ if (count($_POST)) {
 $imp_ui->attachAutoCompleter(array('to', 'cc', 'bcc'));
 $imp_ui->attachSpellChecker('dimp');
 
-$type = Util::getFormData('type');
-$index = Util::getFormData('uid');
-$folder = Util::getFormData('folder');
+$type = Horde_Util::getFormData('type');
+$index = Horde_Util::getFormData('uid');
+$folder = Horde_Util::getFormData('folder');
 $show_editor = false;
 $title = _("New Message");
 
@@ -230,7 +230,7 @@ switch ($type) {
 case 'reply':
 case 'reply_all':
 case 'reply_list':
-    $reply_msg = $imp_compose->replyMessage($type, $imp_contents, Util::getFormData('to'));
+    $reply_msg = $imp_compose->replyMessage($type, $imp_contents, Horde_Util::getFormData('to'));
     $msg = $reply_msg['body'];
     $header = $reply_msg['headers'];
     $header['replytype'] = 'reply';
@@ -324,7 +324,7 @@ $t->set('compose_html', $compose_result['html']);
 if ($show_editor) {
     $compose_result['js'][] = 'DIMP.conf_compose.show_editor = 1';
 }
-if (Util::getFormData('popup')) {
+if (Horde_Util::getFormData('popup')) {
     $compose_result['js'][] = 'DIMP.conf_compose.popup = 1';
 }
 IMP::addInlineScript($compose_result['js']);
index 0791f47..1329cff 100644 (file)
@@ -32,14 +32,14 @@ require_once 'Horde/Identity.php';
 /* The message text and headers. */
 $msg = '';
 $header = array(
-    'in_reply_to' => Util::getFormData('in_reply_to'),
-    'references' => Util::getFormData('references')
+    'in_reply_to' => Horde_Util::getFormData('in_reply_to'),
+    'references' => Horde_Util::getFormData('references')
 );
 
 /* Set the current identity. */
 $identity = &Identity::singleton(array('imp', 'imp'));
 if (!$prefs->isLocked('default_identity')) {
-    $identity_id = Util::getFormData('identity');
+    $identity_id = Horde_Util::getFormData('identity');
     if (!is_null($identity_id)) {
         $identity->setDefault($identity_id);
     }
@@ -47,8 +47,8 @@ if (!$prefs->isLocked('default_identity')) {
 
 $save_sent_mail = $prefs->getValue('save_sent_mail');
 $sent_mail_folder = $identity->getValue('sent_mail_folder');
-$index = Util::getFormData('index');
-$thismailbox = Util::getFormData('thismailbox');
+$index = Horde_Util::getFormData('index');
+$thismailbox = Horde_Util::getFormData('thismailbox');
 $resume_draft = false;
 
 /* Determine if mailboxes are readonly. */
@@ -66,10 +66,10 @@ $compose_disable = !empty($conf['hooks']['disable_compose']) &&
 NLS::setTimeZone();
 
 /* Initialize the IMP_Compose:: object. */
-$imp_compose = &IMP_Compose::singleton(Util::getFormData('composeCache'));
+$imp_compose = &IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
 
 /* Run through the action handlers. */
-$actionID = Util::getFormData('a');
+$actionID = Horde_Util::getFormData('a');
 switch ($actionID) {
 // 'd' = draft
 case 'd':
@@ -91,15 +91,15 @@ case 'd':
     break;
 
 case _("Expand Names"):
-    $action = Util::getFormData('action');
+    $action = Horde_Util::getFormData('action');
     $imp_ui = new IMP_UI_Compose();
-    $header['to'] = $imp_ui->expandAddresses(Util::getFormData('to'), $imp_compose);
+    $header['to'] = $imp_ui->expandAddresses(Horde_Util::getFormData('to'), $imp_compose);
     if ($action !== 'rc') {
         if ($prefs->getValue('compose_cc')) {
-            $header['cc'] = $imp_ui->expandAddresses(Util::getFormData('cc'), $imp_compose);
+            $header['cc'] = $imp_ui->expandAddresses(Horde_Util::getFormData('cc'), $imp_compose);
         }
         if ($prefs->getValue('compose_bcc')) {
-            $header['bcc'] = $imp_ui->expandAddresses(Util::getFormData('bcc'), $imp_compose);
+            $header['bcc'] = $imp_ui->expandAddresses(Horde_Util::getFormData('bcc'), $imp_compose);
         }
     }
     if (!is_null($action)) {
@@ -117,7 +117,7 @@ case 'rl':
         break;
     }
     $actions = array('r' => 'reply', 'ra' => 'reply_all', 'rl' => 'reply_list');
-    $reply_msg = $imp_compose->replyMessage($actions[$actionID], $imp_contents, Util::getFormData('to'));
+    $reply_msg = $imp_compose->replyMessage($actions[$actionID], $imp_contents, Horde_Util::getFormData('to'));
     $header = $reply_msg['headers'];
     break;
 
@@ -137,7 +137,7 @@ case _("Redirect"):
 
     $imp_ui = new IMP_UI_Compose();
 
-    $f_to = $imp_ui->getAddressList(Util::getFormData('to'));
+    $f_to = $imp_ui->getAddressList(Horde_Util::getFormData('to'));
 
     try {
         $imp_ui->redirectMessage($f_to, $imp_compose, $imp_contents, NLS::getEmailCharset());
@@ -156,12 +156,12 @@ case _("Send"):
     if ($compose_disable) {
         break;
     }
-    $message = Util::getFormData('message', '');
-    $f_to = Util::getFormData('to');
+    $message = Horde_Util::getFormData('message', '');
+    $f_to = Horde_Util::getFormData('to');
     $f_cc = $f_bcc = null;
     $header = array();
 
-    if ($ctype = Util::getFormData('ctype')) {
+    if ($ctype = Horde_Util::getFormData('ctype')) {
         if (!($imp_contents = &_getIMPContents($index, $thismailbox))) {
             break;
         }
@@ -188,21 +188,21 @@ case _("Send"):
     }
 
     try {
-        $header['from'] = $identity->getFromLine(null, Util::getFormData('from'));
+        $header['from'] = $identity->getFromLine(null, Horde_Util::getFormData('from'));
     } catch (Horde_Exception $e) {
         $header['from'] = '';
     }
     $header['replyto'] = $identity->getValue('replyto_addr');
-    $header['subject'] = Util::getFormData('subject');
+    $header['subject'] = Horde_Util::getFormData('subject');
 
     $imp_ui = new IMP_UI_Compose();
 
-    $header['to'] = $imp_ui->getAddressList(Util::getFormData('to'));
+    $header['to'] = $imp_ui->getAddressList(Horde_Util::getFormData('to'));
     if ($prefs->getValue('compose_cc')) {
-        $header['cc'] = $imp_ui->getAddressList(Util::getFormData('cc'));
+        $header['cc'] = $imp_ui->getAddressList(Horde_Util::getFormData('cc'));
     }
     if ($prefs->getValue('compose_bcc')) {
-        $header['bcc'] = $imp_ui->getAddressList(Util::getFormData('bcc'));
+        $header['bcc'] = $imp_ui->getAddressList(Horde_Util::getFormData('bcc'));
     }
 
     $options = array(
@@ -210,12 +210,12 @@ case _("Send"):
         'sent_folder' => $sent_mail_folder,
         'reply_type' => $ctype,
         'reply_index' => empty($index) ? null : $index . IMP::IDX_SEP . $thismailbox,
-        'readreceipt' => Util::getFormData('request_read_receipt')
+        'readreceipt' => Horde_Util::getFormData('request_read_receipt')
     );
 
     try {
         if ($imp_compose->buildAndSendMessage($message, $header, NLS::getEmailCharset(), false, $options)) {
-            if (Util::getFormData('resume_draft') &&
+            if (Horde_Util::getFormData('resume_draft') &&
                 $prefs->getValue('auto_delete_drafts')) {
                 $imp_message = &IMP_Message::singleton();
                 $idx_array = array($index . IMP::IDX_SEP . $thismailbox);
@@ -242,11 +242,11 @@ $select_list = $identity->getSelectList();
 
 /* Grab any data that we were supplied with. */
 if (empty($msg)) {
-    $msg = Util::getFormData('message', '');
+    $msg = Horde_Util::getFormData('message', '');
 }
 foreach (array('to', 'cc', 'bcc', 'subject') as $val) {
     if (empty($header[$val])) {
-        $header[$val] = Util::getFormData($val);
+        $header[$val] = Horde_Util::getFormData($val);
     }
 }
 
index 99aaf52..3494df4 100644 (file)
@@ -19,8 +19,8 @@ function _mailboxReturnURL($encode, $url = null)
     }
 
     foreach (array('start', 'page', 'mailbox', 'thismailbox') as $key) {
-        if (($param = Util::getFormData($key))) {
-            $url = Util::addParameter($url, $key, $param, $encode);
+        if (($param = Horde_Util::getFormData($key))) {
+            $url = Horde_Util::addParameter($url, $key, $param, $encode);
         }
     }
 
@@ -69,8 +69,8 @@ $msg = '';
 
 /* The headers of the message. */
 $header = array(
-    'in_reply_to' => Util::getFormData('in_reply_to'),
-    'references' => Util::getFormData('references')
+    'in_reply_to' => Horde_Util::getFormData('in_reply_to'),
+    'references' => Horde_Util::getFormData('references')
 );
 
 $get_sig = true;
@@ -80,16 +80,16 @@ $cursor_pos = $oldrtemode = $rtemode = $siglocation = null;
 /* Set the current identity. */
 $identity = &Identity::singleton(array('imp', 'imp'));
 if (!$prefs->isLocked('default_identity')) {
-    $identity_id = Util::getFormData('identity');
+    $identity_id = Horde_Util::getFormData('identity');
     if (!is_null($identity_id)) {
         $identity->setDefault($identity_id);
     }
 }
 
 /* Catch submits if javascript is not present. */
-if (!($actionID = Util::getFormData('actionID'))) {
+if (!($actionID = Horde_Util::getFormData('actionID'))) {
     foreach (array('send_message', 'save_draft', 'cancel_compose', 'add_attachment', 'compose_expand_addr') as $val) {
-        if (Util::getFormData('btn_' . $val)) {
+        if (Horde_Util::getFormData('btn_' . $val)) {
             $actionID = $val;
             break;
         }
@@ -112,7 +112,7 @@ if ($actionID) {
 
     default:
         try {
-            IMP::checkRequestToken('imp.compose', Util::getFormData('compose_requestToken'));
+            IMP::checkRequestToken('imp.compose', Horde_Util::getFormData('compose_requestToken'));
         } catch (Horde_Exception $e) {
             $notification->push($e);
             $actionID = null;
@@ -120,14 +120,14 @@ if ($actionID) {
     }
 }
 
-$save_sent_mail = Util::getFormData('save_sent_mail');
+$save_sent_mail = Horde_Util::getFormData('save_sent_mail');
 $sent_mail_folder = $identity->getValue('sent_mail_folder');
-$index = Util::getFormData('index');
-$reply_index = Util::getFormData('reply_index');
-$thismailbox = Util::getFormData('thismailbox');
+$index = Horde_Util::getFormData('index');
+$reply_index = Horde_Util::getFormData('reply_index');
+$thismailbox = Horde_Util::getFormData('thismailbox');
 
 /* Check for duplicate submits. */
-if ($token = Util::getFormData('compose_formToken')) {
+if ($token = Horde_Util::getFormData('compose_formToken')) {
     $tokenSource = isset($conf['token'])
         ? Horde_Token::factory($conf['token']['driver'], Horde::getDriverConfig('token', $conf['token']['driver']))
         : Horde_Token::factory('file');
@@ -162,12 +162,12 @@ if ($readonly_sentmail) {
 }
 
 /* Initialize the IMP_Compose:: object. */
-$imp_compose = &IMP_Compose::singleton(Util::getFormData('composeCache'));
-$imp_compose->pgpAttachPubkey((bool) Util::getFormData('pgp_attach_pubkey'));
-$imp_compose->userLinkAttachments((bool) Util::getFormData('link_attachments'));
+$imp_compose = &IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
+$imp_compose->pgpAttachPubkey((bool) Horde_Util::getFormData('pgp_attach_pubkey'));
+$imp_compose->userLinkAttachments((bool) Horde_Util::getFormData('link_attachments'));
 
 try {
-    $imp_compose->attachVCard((bool) Util::getFormData('vcard'), $identity->getValue('fullname'));
+    $imp_compose->attachVCard((bool) Horde_Util::getFormData('vcard'), $identity->getValue('fullname'));
 } catch (IMP_Compose_Exception $e) {
     $notification->push($e);
 }
@@ -179,12 +179,12 @@ $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() : Util::getFormData('charset');
+$charset = $prefs->isLocked('sending_charset') ? NLS::getEmailCharset() : Horde_Util::getFormData('charset');
 $encoding = empty($charset) ? NLS::getEmailCharset() : $charset;
 
 /* Is this a popup window? */
 $has_js = $browser->hasFeature('javascript');
-$isPopup = (($prefs->getValue('compose_popup') || Util::getFormData('popup')) && $has_js);
+$isPopup = (($prefs->getValue('compose_popup') || Horde_Util::getFormData('popup')) && $has_js);
 
 /* Determine the composition type - text or HTML.
    $rtemode is null if browser does not support it. */
@@ -193,11 +193,11 @@ if ($_SESSION['imp']['rteavail']) {
     if ($prefs->isLocked('compose_html')) {
         $rtemode = $prefs->getValue('compose_html');
     } else {
-        $rtemode = Util::getFormData('rtemode');
+        $rtemode = Horde_Util::getFormData('rtemode');
         if (is_null($rtemode)) {
             $rtemode = $prefs->getValue('compose_html');
         } else {
-            $oldrtemode = Util::getFormData('oldrtemode');
+            $oldrtemode = Horde_Util::getFormData('oldrtemode');
             $get_sig = false;
         }
     }
@@ -209,7 +209,7 @@ if (!$prefs->isLocked('stationery')) {
     $stationery = null;
     $all_stationery = @unserialize($prefs->getValue('stationery', false));
     if (is_array($all_stationery)) {
-        $all_stationery = String::convertCharset($all_stationery, $prefs->getCharset());
+        $all_stationery = Horde_String::convertCharset($all_stationery, $prefs->getCharset());
         foreach ($all_stationery as $id => $choice) {
             if (($choice['t'] == 'plain') ||
                 (($choice['t'] == 'html') && $rtemode)) {
@@ -227,12 +227,12 @@ if ($_SESSION['imp']['file_upload']) {
     /* Only notify if we are reloading the compose screen. */
     $notify = ($actionID != 'send_message') && ($actionID != 'save_draft');
 
-    $deleteList = Util::getPost('delattachments', array());
+    $deleteList = Horde_Util::getPost('delattachments', array());
 
     /* Update the attachment information. */
     foreach (array_keys($imp_compose->getAttachments()) as $i) {
         if (!in_array($i, $deleteList)) {
-            $description = Util::getFormData('file_description_' . $i);
+            $description = Horde_Util::getFormData('file_description_' . $i);
             $imp_compose->updateAttachment($i, array('description' => $description));
         }
     }
@@ -262,7 +262,7 @@ case 'mailto':
     }
     $imp_headers = $imp_contents->getHeaderOb();
     $header['to'] = '';
-    if (Util::getFormData('mailto')) {
+    if (Horde_Util::getFormData('mailto')) {
         $header['to'] = $imp_headers->getValue('to');
     }
     if (empty($header['to'])) {
@@ -307,10 +307,10 @@ case 'draft':
 
 case 'compose_expand_addr':
 case 'redirect_expand_addr':
-    $header['to'] = $imp_ui->expandAddresses(Util::getFormData('to'), $imp_compose);
+    $header['to'] = $imp_ui->expandAddresses(Horde_Util::getFormData('to'), $imp_compose);
     if ($actionID == 'compose_expand_addr') {
-        $header['cc'] = $imp_ui->expandAddresses(Util::getFormData('cc'), $imp_compose);
-        $header['bcc'] = $imp_ui->expandAddresses(Util::getFormData('bcc'), $imp_compose);
+        $header['cc'] = $imp_ui->expandAddresses(Horde_Util::getFormData('cc'), $imp_compose);
+        $header['bcc'] = $imp_ui->expandAddresses(Horde_Util::getFormData('bcc'), $imp_compose);
     }
     $get_sig = false;
     break;
@@ -322,7 +322,7 @@ case 'reply_list':
         break;
     }
 
-    $reply_msg = $imp_compose->replyMessage($actionID, $imp_contents, Util::getFormData('to'));
+    $reply_msg = $imp_compose->replyMessage($actionID, $imp_contents, Horde_Util::getFormData('to'));
     $msg = $reply_msg['body'];
     $header = $reply_msg['headers'];
     $format = $reply_msg['format'];
@@ -367,7 +367,7 @@ case 'redirect_send':
         break;
     }
 
-    $f_to = Util::getFormData('to', $imp_ui->getAddressList(Util::getFormData('to'), Util::getFormData('to_list'), Util::getFormData('to_field'), Util::getFormData('to_new')));
+    $f_to = Horde_Util::getFormData('to', $imp_ui->getAddressList(Horde_Util::getFormData('to'), Horde_Util::getFormData('to_list'), Horde_Util::getFormData('to_field'), Horde_Util::getFormData('to_new')));
 
     try {
         $imp_ui->redirectMessage($f_to, $imp_compose, $imp_contents, $encoding);
@@ -376,7 +376,7 @@ case 'redirect_send':
                 $notification->push(_("Message redirected successfully."), 'horde.success');
                 _popupSuccess();
             } else {
-                Util::closeWindowJS();
+                Horde_Util::closeWindowJS();
             }
         } else {
             if ($prefs->getValue('compose_confirm')) {
@@ -398,7 +398,7 @@ case 'send_message':
     }
 
     try {
-        $header['from'] = $identity->getFromLine(null, Util::getFormData('from'));
+        $header['from'] = $identity->getFromLine(null, Horde_Util::getFormData('from'));
     } catch (Horde_Exception $e) {
         $header['from'] = '';
         $get_sig = false;
@@ -407,29 +407,29 @@ case 'send_message':
     }
     $header['replyto'] = $identity->getValue('replyto_addr');
 
-    $header['to'] = $imp_ui->getAddressList(Util::getFormData('to'), Util::getFormData('to_list'), Util::getFormData('to_field'), Util::getFormData('to_new'));
+    $header['to'] = $imp_ui->getAddressList(Horde_Util::getFormData('to'), Horde_Util::getFormData('to_list'), Horde_Util::getFormData('to_field'), Horde_Util::getFormData('to_new'));
     if ($prefs->getValue('compose_cc')) {
-        $header['cc'] = $imp_ui->getAddressList(Util::getFormData('cc'), Util::getFormData('cc_list'), Util::getFormData('cc_field'), Util::getFormData('cc_new'));
+        $header['cc'] = $imp_ui->getAddressList(Horde_Util::getFormData('cc'), Horde_Util::getFormData('cc_list'), Horde_Util::getFormData('cc_field'), Horde_Util::getFormData('cc_new'));
     }
     if ($prefs->getValue('compose_bcc')) {
-        $header['bcc'] = $imp_ui->getAddressList(Util::getFormData('bcc'), Util::getFormData('bcc_list'), Util::getFormData('bcc_field'), Util::getFormData('bcc_new'));
+        $header['bcc'] = $imp_ui->getAddressList(Horde_Util::getFormData('bcc'), Horde_Util::getFormData('bcc_list'), Horde_Util::getFormData('bcc_field'), Horde_Util::getFormData('bcc_new'));
     }
 
-    $message = Util::getFormData('message');
-    $header['subject'] = Util::getFormData('subject', '');
-    if ($smf = Util::getFormData('sent_mail_folder')) {
+    $message = Horde_Util::getFormData('message');
+    $header['subject'] = Horde_Util::getFormData('subject', '');
+    if ($smf = Horde_Util::getFormData('sent_mail_folder')) {
         $sent_mail_folder = $smf;
     }
 
     $options = array(
         'save_sent' => $save_sent_mail,
         'sent_folder' => $sent_mail_folder,
-        'save_attachments' => Util::getFormData('save_attachments_select'),
-        'reply_type' => Util::getFormData('reply_type'),
+        'save_attachments' => Horde_Util::getFormData('save_attachments_select'),
+        'reply_type' => Horde_Util::getFormData('reply_type'),
         'reply_index' => (empty($reply_index) ? null : $reply_index . IMP::IDX_SEP . $thismailbox),
-        'encrypt' => Util::getFormData('encrypt_options'),
-        'priority' => Util::getFormData('x_priority'),
-        'readreceipt' => Util::getFormData('request_read_receipt')
+        'encrypt' => Horde_Util::getFormData('encrypt_options'),
+        'priority' => Horde_Util::getFormData('x_priority'),
+        'readreceipt' => Horde_Util::getFormData('request_read_receipt')
     );
 
     try {
@@ -456,7 +456,7 @@ case 'send_message':
         break;
     }
 
-    if (Util::getFormData('resume_draft') &&
+    if (Horde_Util::getFormData('resume_draft') &&
         $prefs->getValue('auto_delete_drafts') &&
         ($thismailbox == IMP::folderPref($prefs->getValue('drafts_folder'), true)))  {
         $imp_message = &IMP_Message::singleton();
@@ -473,7 +473,7 @@ case 'send_message':
             }
             _popupSuccess();
         } else {
-            Util::closeWindowJS();
+            Horde_Util::closeWindowJS();
         }
     } else {
         if ($prefs->getValue('compose_confirm') && $sent) {
@@ -490,7 +490,7 @@ case 'save_draft':
 
     /* Set up the From address based on the identity. */
     try {
-        $header['from'] = $identity->getFromLine(null, Util::getFormData('from'));
+        $header['from'] = $identity->getFromLine(null, Horde_Util::getFormData('from'));
     } catch (Horde_Exception $e) {
         $header['from'] = '';
         $get_sig = false;
@@ -498,9 +498,9 @@ case 'save_draft':
         break;
     }
     foreach (array('to', 'cc', 'bcc', 'subject') as $val) {
-        $header[$val] = Util::getFormData($val);
+        $header[$val] = Horde_Util::getFormData($val);
     }
-    $message = Util::getFormData('message', '');
+    $message = Horde_Util::getFormData('message', '');
 
     /* Save the draft. */
     try {
@@ -509,7 +509,7 @@ case 'save_draft':
         /* Closing draft if requested by preferences. */
         if ($isPopup) {
             if ($prefs->getValue('close_draft')) {
-                Util::closeWindowJS();
+                Horde_Util::closeWindowJS();
                 exit;
             } else {
                 $notification->push($result, 'horde.success');
@@ -527,7 +527,7 @@ case 'save_draft':
     break;
 
 case 'fwd_digest':
-    $indices = Util::getFormData('fwddigest');
+    $indices = Horde_Util::getFormData('fwddigest');
     if (!empty($indices)) {
         $msglist = unserialize(urldecode($indices));
         $subject_header = $imp_compose->attachIMAPMessage($msglist);
@@ -542,14 +542,14 @@ case 'fwd_digest':
 case 'cancel_compose':
     $imp_compose->deleteAllAttachments();
     if ($isPopup) {
-        Util::closeWindowJS();
+        Horde_Util::closeWindowJS();
     } else {
         header('Location: ' . _mailboxReturnURL(false));
     }
     exit;
 
 case 'selectlist_process':
-    $select_id = Util::getFormData('selectlist_selectid');
+    $select_id = Horde_Util::getFormData('selectlist_selectid');
     if (!empty($select_id) &&
         $registry->hasMethod('files/selectlistResults') &&
         $registry->hasMethod('files/returnFromSelectlist')) {
@@ -577,11 +577,11 @@ case 'change_stationery':
     if (empty($stationery_list)) {
         break;
     }
-    $stationery = Util::getFormData('stationery');
+    $stationery = Horde_Util::getFormData('stationery');
     if (strlen($stationery)) {
         $stationery = (int)$stationery;
         $stationery_content = $stationery_list[$stationery]['c'];
-        $msg = Util::getFormData('message', '');
+        $msg = Horde_Util::getFormData('message', '');
         if (strpos($stationery_content, '%s') !== false) {
             $sig = $identity->getSignature();
             if ($rtemode) {
@@ -646,13 +646,13 @@ if ($isPopup) {
     /* If the attachments cache is not empty, we must reload this page
      * and delete the attachments. */
     if ($imp_compose->numberOfAttachments()) {
-        $cancel_url = Util::addParameter(Horde::selfUrl(), array('actionID' => 'cancel_compose', 'composeCache' => $composeCacheID, 'popup' => 1), null, false);
+        $cancel_url = Horde_Util::addParameter(Horde::selfUrl(), array('actionID' => 'cancel_compose', 'composeCache' => $composeCacheID, 'popup' => 1), null, false);
     }
 } else {
     /* If the attachments cache is not empty, we must reload this page and
        delete the attachments. */
     if ($imp_compose->numberOfAttachments()) {
-        $cancel_url = Util::addParameter(_mailboxReturnURL(true, Horde::selfUrl()), array('actionID' => 'cancel_compose', 'composeCache' => $composeCacheID), null, false);
+        $cancel_url = Horde_Util::addParameter(_mailboxReturnURL(true, Horde::selfUrl()), array('actionID' => 'cancel_compose', 'composeCache' => $composeCacheID), null, false);
     } else {
         $cancel_url = _mailboxReturnURL(true);
     }
@@ -661,7 +661,7 @@ if ($isPopup) {
 
 /* Grab any data that we were supplied with. */
 if (empty($msg)) {
-    $msg = Util::getFormData('message', Util::getFormData('body', ''));
+    $msg = Horde_Util::getFormData('message', Horde_Util::getFormData('body', ''));
     if ($browser->hasQuirk('double_linebreak_textarea')) {
         $msg = preg_replace('/(\r?\n){3}/', '$1', $msg);
     }
@@ -697,7 +697,7 @@ if (!$token && ($actionID != 'draft')) {
 
 foreach (array('to', 'cc', 'bcc', 'subject') as $val) {
     if (!isset($header[$val])) {
-        $header[$val] = Util::getFormData($val, $imp_ui->getAddressList(Util::getFormData($val), Util::getFormData($val . '_list'), Util::getFormData($val . '_field'), Util::getFormData($val . '_new')));
+        $header[$val] = Horde_Util::getFormData($val, $imp_ui->getAddressList(Horde_Util::getFormData($val), Horde_Util::getFormData($val . '_list'), Horde_Util::getFormData($val . '_field'), Horde_Util::getFormData($val . '_new')));
     }
 }
 
@@ -710,7 +710,7 @@ if ($get_sig && isset($msg) && !empty($sig)) {
         $siglocation = 0;
         $msg = "\n" . $sig . $msg;
     } else {
-        $siglocation = String::length($msg);
+        $siglocation = Horde_String::length($msg);
         /* We always add a line break at the beginning, so if length is 1,
            ignore that line break (i.e. the message is empty). */
         if ($siglocation == 1) {
@@ -733,7 +733,7 @@ if ($pgp_passphrase_dialog || $pgp_symmetric_passphrase_dialog) {
 
 /* If PGP encryption is set by default, and we have a recipient list on first
  * load, make sure we have public keys for all recipients. */
-$encrypt_options = Util::getFormData('encrypt_options');
+$encrypt_options = Horde_Util::getFormData('encrypt_options');
 if ($prefs->getValue('use_pgp')) {
     $default_encrypt = $prefs->getValue('default_encrypt');
     if (!$token &&
@@ -763,7 +763,7 @@ if (!$rtemode) {
         break;
 
     case 'bottom':
-        $cursor_pos = String::length($msg);
+        $cursor_pos = Horde_String::length($msg);
         break;
 
     case 'sig':
@@ -771,7 +771,7 @@ if (!$rtemode) {
             $cursor_pos = $siglocation;
         } elseif (!empty($sig)) {
             $next_pos = $pos = 0;
-            $sig_length = String::length($sig);
+            $sig_length = Horde_String::length($sig);
             do {
                 $cursor_pos = $pos;
                 $pos = strpos($msg, $sig, $next_pos);
@@ -815,20 +815,20 @@ if (!$redirect) {
 /* Set up the base template now. */
 $t = new IMP_Template();
 $t->setOption('gettext', true);
-$t->set('post_action', Util::addParameter(Horde::applicationUrl('compose.php'), 'uniq', uniqid(mt_rand())));
+$t->set('post_action', Horde_Util::addParameter(Horde::applicationUrl('compose.php'), 'uniq', uniqid(mt_rand())));
 $t->set('allow_compose', !$compose_disable);
 
 if ($redirect) {
     /* Prepare the redirect template. */
     $t->set('mailbox', htmlspecialchars($thismailbox));
     $t->set('index', htmlspecialchars($index));
-    $t->set('status', Util::bufferOutput(array('IMP', 'status')));
+    $t->set('status', Horde_Util::bufferOutput(array('IMP', 'status')));
     $t->set('title', htmlspecialchars($title));
     $t->set('token', IMP::getRequestToken('imp.compose'));
 
     if ($registry->hasMethod('contacts/search')) {
         $t->set('has_search', true);
-        $t->set('abook', Horde::link('#', _("Address Book"), 'widget', null, 'window.open(\'' . Util::addParameter(Horde::applicationUrl('contacts.php'), array('formname' => 'redirect', 'to_only' => 1)) . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;') . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>');
+        $t->set('abook', Horde::link('#', _("Address Book"), 'widget', null, 'window.open(\'' . Horde_Util::addParameter(Horde::applicationUrl('contacts.php'), array('formname' => 'redirect', 'to_only' => 1)) . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;') . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>');
         if (!$has_js) {
             $t->set('expand', Horde::link('#', _("Expand Names"), 'widget', null, "$('actionID').value='redirect_expand_addr';uniqSubmit();return false;") . Horde::img('expand.png') . '<br />' . _("Expand Names") . '</a>', true);
         }
@@ -875,7 +875,7 @@ if ($redirect) {
 
     $template_output = $t->fetch(IMP_TEMPLATES . '/compose/redirect.html');
 } else {
-    if (!($reply_type = Util::getFormData('reply_type'))) {
+    if (!($reply_type = Horde_Util::getFormData('reply_type'))) {
         switch ($actionID) {
         case 'reply':
         case 'reply_all':
@@ -893,7 +893,7 @@ if ($redirect) {
     $tabindex = 0;
 
     $t->set('file_upload', $_SESSION['imp']['file_upload']);
-    $t->set('forminput', Util::formInput());
+    $t->set('forminput', Horde_Util::formInput());
 
     $hidden = array(
         'actionID' => '',
@@ -913,7 +913,7 @@ if ($redirect) {
         $hidden['MAX_FILE_SIZE'] = $_SESSION['imp']['file_upload'];
     }
     foreach (array('page', 'start', 'popup') as $val) {
-        $hidden[$val] = htmlspecialchars(Util::getFormData($val));
+        $hidden[$val] = htmlspecialchars(Horde_Util::getFormData($val));
     }
     if ($reply_type) {
         $hidden['reply_type'] = $reply_type;
@@ -938,7 +938,7 @@ if ($redirect) {
     $t->set('hidden', $hidden_val);
 
     $t->set('title', htmlspecialchars($title));
-    $t->set('status', Util::bufferOutput(array('IMP', 'status')));
+    $t->set('status', Horde_Util::bufferOutput(array('IMP', 'status')));
     $t->set('send_msg_ak', Horde::getAccessKeyAndTitle(_("_Send Message")));
     if ($conf['user']['allow_folders'] && !$readonly_drafts) {
         $t->set('save_draft_ak', Horde::getAccessKeyAndTitle(_("Save _Draft")));
@@ -949,7 +949,7 @@ if ($redirect) {
         $t->set('help_compose-from', Help::link('imp', 'compose-from'));
         $t->set('fromaddr_locked', $prefs->isLocked('from_addr'));
         try {
-            $t->set('from', htmlspecialchars($identity->getFromLine(null, Util::getFormData('from'))));
+            $t->set('from', htmlspecialchars($identity->getFromLine(null, Horde_Util::getFormData('from'))));
         } catch (Horde_Exception $e) {
             $t->set('from', '');
         }
@@ -1053,7 +1053,7 @@ if ($redirect) {
         $t->set('priority_label', Horde::label('priority', _("_Priority")));
         $t->set('priority_tabindex', ++$tabindex);
 
-        $priority = Util::getFormData('x_priority', 3);
+        $priority = Horde_Util::getFormData('x_priority', 3);
         $priorities = array(
             1 => '1 (' . _("Highest") . ')',
             2 => '2 (' . _("High") . ')',
@@ -1120,7 +1120,7 @@ if ($redirect) {
         }
         $t->set('ssm_selected', $token ? ($save_sent_mail == 'on') : $identity->saveSentmail());
         $t->set('ssm_label', Horde::label('ssm', _("Sa_ve a copy in ")));
-        if ($smf = Util::getFormData('sent_mail_folder')) {
+        if ($smf = Horde_Util::getFormData('sent_mail_folder')) {
             $sent_mail_folder = $smf;
         }
         if (!empty($conf['user']['select_sentmail_folder']) &&
@@ -1144,7 +1144,7 @@ if ($redirect) {
     $d_read = $prefs->getValue('disposition_request_read');
     $t->set('rrr', $conf['compose']['allow_receipts'] && ($d_read != 'never'));
     if ($t->get('rrr')) {
-       $t->set('rrr_selected', ($d_read != 'ask') || (Util::getFormData('request_read_receipt') == 'on'));
+       $t->set('rrr_selected', ($d_read != 'ask') || (Horde_Util::getFormData('request_read_receipt') == 'on'));
        $t->set('rrr_label', Horde::label('rrr', _("Request a _Read Receipt")));
     }
 
@@ -1166,14 +1166,14 @@ if ($redirect) {
         $t->set('help-encrypt', Help::link('imp', 'compose-options-encrypt'));
         $t->set('pgp_options', ($prefs->getValue('use_pgp') && $prefs->getValue('pgp_public_key')));
         if ($t->get('pgp_options')) {
-            $t->set('pgp_attach_pubkey', Util::getFormData('pgp_attach_pubkey', $prefs->getValue('pgp_attach_pubkey')));
+            $t->set('pgp_attach_pubkey', Horde_Util::getFormData('pgp_attach_pubkey', $prefs->getValue('pgp_attach_pubkey')));
             $t->set('pap', Horde::label('pap', _("Attach a copy of your PGP public key to the message?")));
             $t->set('help-pubkey', Help::link('imp', 'pgp-compose-attach-pubkey'));
         }
     }
     if ($registry->hasMethod('contacts/ownVCard')) {
         $t->set('vcard', Horde::label('vcard', _("Attach your contact information to the message?")));
-        $t->set('attach_vcard', Util::getFormData('vcard'));
+        $t->set('attach_vcard', Horde_Util::getFormData('vcard'));
     }
     if ($_SESSION['imp']['file_upload']) {
         $localeinfo = NLS::getLocaleInfo();
@@ -1199,11 +1199,11 @@ if ($redirect) {
         if ($t->get('show_link_save_attach')) {
             $attach_options = array();
             if ($show_save_attach) {
-                $save_attach_val = Util::getFormData('save_attachments_select', ($save_attach == 'prompt_yes'));
+                $save_attach_val = Horde_Util::getFormData('save_attachments_select', ($save_attach == 'prompt_yes'));
                 $attach_options[] = array('label' => _("Save Attachments with message in sent-mail folder?"), 'name' => 'save_attachments_select', 'select_yes' => ($save_attach_val == 1), 'select_no' => ($save_attach_val == 0), 'help' => Help::link('imp', 'compose-save-attachments'));
             }
             if ($show_link_attach) {
-                $link_attach_val = Util::getFormData('link_attachments');
+                $link_attach_val = Horde_Util::getFormData('link_attachments');
                 $attach_options[] = array('label' => _("Link Attachments?"), 'name' => 'link_attachments', 'select_yes' => ($link_attach_val == 1), 'select_no' => ($link_attach_val == 0), 'help' => Help::link('imp', 'compose-link-attachments'));
             }
             $t->set('attach_options', $attach_options);
@@ -1226,7 +1226,7 @@ if ($redirect) {
                 );
 
                 if ($type != 'application/octet-stream') {
-                    $preview_url = Util::addParameter(Horde::applicationUrl('view.php'), array('actionID' => 'compose_attach_preview', 'id' => $atc_num, 'composeCache' => $composeCacheID));
+                    $preview_url = Horde_Util::addParameter(Horde::applicationUrl('view.php'), array('actionID' => 'compose_attach_preview', 'id' => $atc_num, 'composeCache' => $composeCacheID));
                     $entry['name'] = Horde::link($preview_url, _("Preview") . ' ' . $entry['name'], 'link', 'compose_preview_window') . $entry['name'] . '</a>';
                 }
 
index 6fcd495..dfc440a 100644 (file)
@@ -86,7 +86,7 @@
 // if (!function_exists('_imp_hook_trailer')) {
 //     function _imp_hook_trailer($trailer)
 //     {
-//         $vdomain = String::lower(preg_replace('|^.*?\.|i', '', getenv('HTTP_HOST')));
+//         $vdomain = Horde_String::lower(preg_replace('|^.*?\.|i', '', getenv('HTTP_HOST')));
 //         $ldapServer = 'localhost';
 //         $ldapPort = '389';
 //         $searchBase = 'ispmanDomain=' . $vdomain  . ",o=ispman";
 // if (!function_exists('_imp_hook_vinfo')) {
 //     function _imp_hook_vinfo($type = 'username', $data = null)
 //     {
-//         $vdomain = String::lower(preg_replace('|^mail\.|i', '', getenv('HTTP_HOST')));
+//         $vdomain = Horde_String::lower(preg_replace('|^mail\.|i', '', getenv('HTTP_HOST')));
 //
 //         switch ($type) {
 //         case 'username':
index 27fca7f..1985b25 100644 (file)
@@ -191,7 +191,7 @@ if (isset($GLOBALS['conf']['utils']['gnupg'])) {
     );
 }
 
-if (Util::extensionExists('openssl') && isset($GLOBALS['conf']['utils']['openssl_binary'])) {
+if (Horde_Util::extensionExists('openssl') && isset($GLOBALS['conf']['utils']['openssl_binary'])) {
     $prefGroups['smime'] = array(
         'column' => _("Other Options"),
         'label' => _("S/MIME Options"),
@@ -553,7 +553,7 @@ $_prefs['mailto_handler'] = array(
     'xurl' => 'javascript:if(typeof navigator.registerProtocolHandler==\'undefined\')alert(\''
         . addslashes(_("Your browser does not support this feature."))
         . '\');else navigator.registerProtocolHandler(\'mailto\',\''
-        . Util::addParameter(Horde::applicationUrl('compose.php', true),
+        . Horde_Util::addParameter(Horde::applicationUrl('compose.php', true),
                              array('actionID' => 'mailto_link', 'to' => ''), false)
         . '%s\',\'' . $GLOBALS['registry']->get('name') . '\');',
     'desc' => sprintf(_("Click here to open all mailto: links in %s."), $GLOBALS['registry']->get('name')));
index 3ff76a9..0376e45 100644 (file)
@@ -18,7 +18,7 @@ $source_list = $registry->call('contacts/sources');
 
 /* If we self-submitted, use that source. Otherwise, choose a good
  * source. */
-$source = Util::getFormData('source');
+$source = Horde_Util::getFormData('source');
 if (empty($source) || !isset($source_list[$source])) {
     /* We don't just pass the second argument to getFormData() because
      * we want to trap for invalid sources, not just no source. */
@@ -27,13 +27,13 @@ if (empty($source) || !isset($source_list[$source])) {
 }
 
 /* Get the search as submitted (defaults to '' which should list everyone). */
-$search = Util::getFormData('search');
+$search = Horde_Util::getFormData('search');
 
 /* Get the name of the calling form (Defaults to 'compose'). */
-$formname = Util::getFormData('formname', 'compose');
+$formname = Horde_Util::getFormData('formname', 'compose');
 
 /* Are we limiting to only the 'To:' field? */
-$to_only = Util::getFormData('to_only');
+$to_only = Horde_Util::getFormData('to_only');
 
 $search_params = IMP_Compose::getAddressSearchParams();
 $apiargs = array(
@@ -43,7 +43,7 @@ $apiargs = array(
 );
 
 $addresses = array();
-if (Util::getFormData('searched') || $prefs->getValue('display_contact')) {
+if (Horde_Util::getFormData('searched') || $prefs->getValue('display_contact')) {
     $results = $registry->call('contacts/search', $apiargs);
     foreach ($results as $r) {
         /* The results list returns an array for each source searched. Make
@@ -55,7 +55,7 @@ if (Util::getFormData('searched') || $prefs->getValue('display_contact')) {
 /* If self-submitted, preserve the currently selected users encoded by
  * javascript to pass as value|text. */
 $selected_addresses = array();
-foreach (explode('|', Util::getFormData('sa')) as $addr) {
+foreach (explode('|', Horde_Util::getFormData('sa')) as $addr) {
     if (strlen(trim($addr))) {
         $selected_addresses[] = @htmlspecialchars($addr, ENT_QUOTES, NLS::getCharset());
     }
@@ -65,9 +65,9 @@ foreach (explode('|', Util::getFormData('sa')) as $addr) {
 $template = new IMP_Template();
 $template->setOption('gettext', true);
 
-$template->set('action', Horde::url(Util::addParameter(Horde::applicationUrl('contacts.php'), array('uniq' => uniqid(mt_rand())))));
+$template->set('action', Horde::url(Horde_Util::addParameter(Horde::applicationUrl('contacts.php'), array('uniq' => uniqid(mt_rand())))));
 $template->set('formname', $formname);
-$template->set('formInput', Util::formInput());
+$template->set('formInput', Horde_Util::formInput());
 $template->set('search', htmlspecialchars($search));
 if (count($source_list) > 1) {
     $template->set('multiple_source', true);
index 16f2fd8..974a47c 100644 (file)
@@ -15,24 +15,24 @@ require_once dirname(__FILE__) . '/lib/base.php';
 /* Initialize Fetchmail libraries. */
 $fm_account = new IMP_Fetchmail_Account();
 
-$driver = Util::getFormData('fm_driver');
+$driver = Horde_Util::getFormData('fm_driver');
 $fetch_url = Horde::applicationUrl('fetchmailprefs.php');
-$prefs_url = Util::addParameter(IMP::prefsURL(true), 'group', 'fetchmail', false);
+$prefs_url = Horde_Util::addParameter(IMP::prefsURL(true), 'group', 'fetchmail', false);
 $to_edit = null;
 
 /* Handle clients without javascript. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 if ($actionID === null) {
-    if (Util::getPost('edit')) {
+    if (Horde_Util::getPost('edit')) {
         $actionID = 'fetchmail_prefs_edit';
-    } elseif (Util::getPost('save')) {
+    } elseif (Horde_Util::getPost('save')) {
         $actionID = 'fetchmail_prefs_save';
-    } elseif (Util::getPost('delete')) {
+    } elseif (Horde_Util::getPost('delete')) {
         $actionID = 'fetchmail_prefs_delete';
-    } elseif (Util::getPost('back')) {
+    } elseif (Horde_Util::getPost('back')) {
         header('Location: ' . $prefs_url);
         exit;
-    } elseif (Util::getPost('select')) {
+    } elseif (Horde_Util::getPost('select')) {
         header('Location: ' . $fetch_url);
         exit;
     }
@@ -47,26 +47,26 @@ case 'fetchmail_create':
     break;
 
 case 'fetchmail_prefs_edit':
-    $to_edit = Util::getFormData('account');
+    $to_edit = Horde_Util::getFormData('account');
     $driver = $fm_account->getValue('driver', $to_edit);
     $fetchmail = IMP_Fetchmail::factory($driver, array());
     break;
 
 case 'fetchmail_prefs_save':
-    $to_edit = Util::getFormData('edit_account');
+    $to_edit = Horde_Util::getFormData('edit_account');
     if ($to_edit == '') {
         $to_edit = $fm_account->add();
     }
 
     $fetchmail = IMP_Fetchmail::factory($driver, array());
 
-    $id = Util::getFormData('fm_id');
+    $id = Horde_Util::getFormData('fm_id');
     if (empty($id)) {
         $id = _("Unnamed");
     }
 
     foreach ($fetchmail->getParameterList() as $val) {
-        $fm_account->setValue($val, ($val == 'id') ? $id : Util::getFormData('fm_' . $val), $to_edit);
+        $fm_account->setValue($val, ($val == 'id') ? $id : Horde_Util::getFormData('fm_' . $val), $to_edit);
     }
 
     $prefs->setValue('fetchmail_login', (bool)array_sum($fm_account->getAll('loginfetch')));
@@ -75,7 +75,7 @@ case 'fetchmail_prefs_save':
     break;
 
 case 'fetchmail_prefs_delete':
-    $to_delete = Util::getFormData('edit_account');
+    $to_delete = Horde_Util::getFormData('edit_account');
     if ($to_delete !== null) {
         $deleted_account = $fm_account->delete($to_delete);
         $notification->push(sprintf(_("The account \"%s\" has been deleted."), $deleted_account['id']), 'horde.success');
@@ -95,15 +95,15 @@ if (is_a($result, 'PEAR_Error')) {
 extract($result);
 
 $app = 'imp';
-$chunk = Util::nonInputVar('chunk');
+$chunk = Horde_Util::nonInputVar('chunk');
 
 /* Prepare template. */
 $t = new IMP_Template();
 $t->setOption('gettext', true);
-$t->set('navcell', Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'fetchmail'));
+$t->set('navcell', Horde_Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'fetchmail'));
 $t->set('fetchurl', $fetch_url);
 $t->set('prefsurl', $prefs_url);
-$t->set('forminput', Util::formInput());
+$t->set('forminput', Horde_Util::formInput());
 
 if (empty($actionID)) {
     /* If actionID is still empty, we haven't selected an account yet. */
index 76ede1e..d10947a 100644 (file)
@@ -27,36 +27,36 @@ $anymailbox_locked = $prefs->isLocked('filter_any_mailbox') || empty($_SESSION['
 $menuitem_locked = $prefs->isLocked('filter_menuitem');
 
 /* Run through the action handlers. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'update_prefs':
     if (!$login_locked) {
-        $prefs->setValue('filter_on_login', Util::getFormData('filter_login') ? 1 : 0);
+        $prefs->setValue('filter_on_login', Horde_Util::getFormData('filter_login') ? 1 : 0);
     }
     if (!$display_locked) {
-        $prefs->setValue('filter_on_display', Util::getFormData('filter_display') ? 1 : 0);
+        $prefs->setValue('filter_on_display', Horde_Util::getFormData('filter_display') ? 1 : 0);
     }
     if (!$sidebar_locked) {
-        $prefs->setValue('filter_on_sidebar', Util::getFormData('filter_sidebar') ? 1 : 0);
+        $prefs->setValue('filter_on_sidebar', Horde_Util::getFormData('filter_sidebar') ? 1 : 0);
     }
     if (!$anymailbox_locked) {
-        $prefs->setValue('filter_any_mailbox', Util::getFormData('filter_any_mailbox') ? 1 : 0);
+        $prefs->setValue('filter_any_mailbox', Horde_Util::getFormData('filter_any_mailbox') ? 1 : 0);
     }
     if (!$menuitem_locked) {
-        $prefs->setValue('filter_menuitem', Util::getFormData('filter_menuitem') ? 1 : 0);
+        $prefs->setValue('filter_menuitem', Horde_Util::getFormData('filter_menuitem') ? 1 : 0);
     }
     $notification->push(_("Preferences successfully updated."), 'horde.success');
     break;
 }
 
 $app = 'imp';
-$chunk = Util::nonInputVar('chunk');
+$chunk = Horde_Util::nonInputVar('chunk');
 $group = 'filters';
 Prefs_UI::generateHeader(null, $chunk);
 
 $t = new IMP_Template();
 $t->setOption('gettext', true);
-$t->set('navcell', Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'filters'));
+$t->set('navcell', Horde_Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'filters'));
 $t->set('prefsurl', IMP::prefsURL(true));
 $t->set('return_text', _("Return to Options"));
 
@@ -77,7 +77,7 @@ if (!$blacklist_link && !$whitelist_link && !$filters_link) {
     $t->set('notactive', true);
 } else {
     $t->set('selfurl', Horde::applicationUrl('filterprefs.php'));
-    $t->set('forminput', Util::formInput());
+    $t->set('forminput', Horde_Util::formInput());
     $t->set('group', $group);
     $t->set('app', $app);
 
index d1366d2..b8e0b20 100644 (file)
@@ -34,7 +34,7 @@ $imptree = &IMP_Imap_Tree::singleton();
 $mask = IMP_Imap_Tree::NEXT_SHOWCLOSED;
 
 /* Toggle subscribed view, if necessary. */
-if ($subscribe && Util::getFormData('ts')) {
+if ($subscribe && Horde_Util::getFormData('ts')) {
     $showAll = !$showAll;
     $_SESSION['imp']['showunsub'] = $showAll;
     $imptree->showUnsubscribed($showAll);
@@ -56,7 +56,7 @@ foreach ($tree_ob[0] as $val) {
 $selfurl = Horde::applicationUrl('folders-mimp.php');
 if ($subscribe) {
     $sub_text = $showAll ? _("Show Subscribed Folders") : _("Show All Folders");
-    $sub_link = Util::addParameter($selfurl, 'ts', 1);
+    $sub_link = Horde_Util::addParameter($selfurl, 'ts', 1);
 }
 
 $title = _("Folders");
index 334018d..768a8e2 100644 (file)
@@ -67,7 +67,7 @@ $imp_folder = &IMP_Folder::singleton();
 $imaptree = &IMP_Imap_Tree::singleton();
 
 /* $folder_list is already encoded in UTF7-IMAP. */
-$folder_list = Util::getFormData('folder_list', array());
+$folder_list = Horde_Util::getFormData('folder_list', array());
 
 /* Set the URL to refresh the page to in the META tag */
 $refresh_url = Horde::applicationUrl('folders.php', true);
@@ -77,10 +77,10 @@ $refresh_time = $prefs->getValue('refresh_time');
 $open_compose_window = null;
 
 /* Run through the action handlers. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 if ($actionID) {
     try {
-        IMP::checkRequestToken('imp.folders', Util::getFormData('folders_token'));
+        IMP::checkRequestToken('imp.folders', Horde_Util::getFormData('folders_token'));
     } catch (Horde_Exception $e) {
         $notification->push($e);
         $actionID = null;
@@ -90,7 +90,7 @@ if ($actionID) {
 switch ($actionID) {
 case 'collapse_folder':
 case 'expand_folder':
-    $folder = Util::getFormData('folder');
+    $folder = Horde_Util::getFormData('folder');
     if (!empty($folder)) {
         ($actionID == 'expand_folder') ? $imaptree->expand($folder) : $imaptree->collapse($folder);
     }
@@ -123,7 +123,7 @@ case 'delete_folder':
     break;
 
 case 'delete_search_query':
-    $queryid = Util::getFormData('queryid');
+    $queryid = Horde_Util::getFormData('queryid');
     if (!empty($queryid)) {
         $imp_search->deleteSearchQuery($queryid);
     }
@@ -146,12 +146,12 @@ case 'download_folder_zip':
     break;
 
 case 'import_mbox':
-    $import_folder = Util::getFormData('import_folder');
+    $import_folder = Horde_Util::getFormData('import_folder');
     if (!empty($import_folder)) {
         $res = $browser->wasFileUploaded('mbox_upload', _("mailbox file"));
         if (!is_a($res, 'PEAR_Error')) {
-            $res = $imp_folder->importMbox(String::convertCharset($import_folder, $charset, 'UTF7-IMAP'), $_FILES['mbox_upload']['tmp_name']);
-            $mbox_name = basename(Util::dispelMagicQuotes($_FILES['mbox_upload']['name']));
+            $res = $imp_folder->importMbox(Horde_String::convertCharset($import_folder, $charset, 'UTF7-IMAP'), $_FILES['mbox_upload']['tmp_name']);
+            $mbox_name = basename(Horde_Util::dispelMagicQuotes($_FILES['mbox_upload']['name']));
             if ($res === false) {
                 $notification->push(sprintf(_("There was an error importing %s."), $mbox_name), 'horde.error');
             } else {
@@ -167,10 +167,10 @@ case 'import_mbox':
     break;
 
 case 'create_folder':
-    $new_mailbox = Util::getFormData('new_mailbox');
+    $new_mailbox = Horde_Util::getFormData('new_mailbox');
     if (!empty($new_mailbox)) {
         try {
-            $new_mailbox = $imaptree->createMailboxName(array_shift($folder_list), String::convertCharset($new_mailbox, $charset, 'UTF7-IMAP'));
+            $new_mailbox = $imaptree->createMailboxName(array_shift($folder_list), Horde_String::convertCharset($new_mailbox, $charset, 'UTF7-IMAP'));
             $imp_folder->create($new_mailbox, $subscribe);
         } catch (Horde_Exception $e) {
             $notification->push($e);
@@ -180,15 +180,15 @@ case 'create_folder':
 
 case 'rename_folder':
     // $old_names already in UTF7-IMAP
-    $old_names = explode("\n", Util::getFormData('old_names'));
-    $new_names = explode("\n", Util::getFormData('new_names'));
+    $old_names = explode("\n", Horde_Util::getFormData('old_names'));
+    $new_names = explode("\n", Horde_Util::getFormData('new_names'));
 
     $iMax = count($new_names);
     if (!empty($new_names) &&
         !empty($old_names) &&
         ($iMax == count($old_names))) {
         for ($i = 0; $i < $iMax; ++$i) {
-            $imp_folder->rename(trim($old_names[$i], "\r\n"), String::convertCharset(IMP::appendNamespace(trim($new_names[$i], "\r\n")), $charset, 'UTF7-IMAP'));
+            $imp_folder->rename(trim($old_names[$i], "\r\n"), Horde_String::convertCharset(IMP::appendNamespace(trim($new_names[$i], "\r\n")), $charset, 'UTF7-IMAP'));
         }
     }
     break;
@@ -329,7 +329,7 @@ case 'mbox_size':
 /* Token to use in requests */
 $folders_token = IMP::getRequestToken('imp.folders');
 
-$folders_url = Util::addParameter($folders_url, 'folders_token', $folders_token);
+$folders_url = Horde_Util::addParameter($folders_url, 'folders_token', $folders_token);
 
 if ($_SESSION['imp']['file_upload'] && ($actionID == 'import_mbox')) {
     $title = _("Folder Navigator");
@@ -343,7 +343,7 @@ if ($_SESSION['imp']['file_upload'] && ($actionID == 'import_mbox')) {
     $i_template->setOption('gettext', true);
     $i_template->set('folders_url', $folders_url);
     $i_template->set('import_folder', $folder_list[0]);
-    $i_template->set('folder_name', htmlspecialchars(String::convertCharset($folder_list[0], 'UTF7-IMAP'), ENT_COMPAT, $charset));
+    $i_template->set('folder_name', htmlspecialchars(Horde_String::convertCharset($folder_list[0], 'UTF7-IMAP'), ENT_COMPAT, $charset));
     $i_template->set('folders_token', $folders_token);
     echo $i_template->fetch(IMP_TEMPLATES . '/folders/import.html');
     require $registry->get('templates', 'horde') . '/common-footer.inc';
@@ -392,14 +392,14 @@ $a_template->set('create_folder', !empty($GLOBALS['conf']['hooks']['permsdenied'
 if ($prefs->getValue('subscribe')) {
     $a_template->set('subscribe', true);
     $subToggleText = ($showAll) ? _("Hide Unsubscribed") : _("Show Unsubscribed");
-    $a_template->set('toggle_subscribe', Horde::widget(Util::addParameter($folders_url, array('actionID' => 'toggle_subscribed_view', 'folders_token' => $folders_token)), $subToggleText, 'widget', '', '', $subToggleText, true));
+    $a_template->set('toggle_subscribe', Horde::widget(Horde_Util::addParameter($folders_url, array('actionID' => 'toggle_subscribed_view', 'folders_token' => $folders_token)), $subToggleText, 'widget', '', '', $subToggleText, true));
 }
 $a_template->set('nav_poll', !$prefs->isLocked('nav_poll') && !$prefs->getValue('nav_poll_all'));
 $a_template->set('notrash', !$prefs->getValue('use_trash'));
 $a_template->set('file_upload', $_SESSION['imp']['file_upload']);
 $a_template->set('help', Help::link('imp', 'folder-options'));
-$a_template->set('expand_all', Horde::widget(Util::addParameter($folders_url, array('actionID' => 'expand_all_folders', 'folders_token' => $folders_token)), _("Expand All Folders"), 'widget', '', '', _("Expand All"), true));
-$a_template->set('collapse_all', Horde::widget(Util::addParameter($folders_url, array('actionID' => 'collapse_all_folders', 'folders_token' => $folders_token)), _("Collapse All Folders"), 'widget', '', '', _("Collapse All"), true));
+$a_template->set('expand_all', Horde::widget(Horde_Util::addParameter($folders_url, array('actionID' => 'expand_all_folders', 'folders_token' => $folders_token)), _("Expand All Folders"), 'widget', '', '', _("Expand All"), true));
+$a_template->set('collapse_all', Horde::widget(Horde_Util::addParameter($folders_url, array('actionID' => 'collapse_all_folders', 'folders_token' => $folders_token)), _("Collapse All Folders"), 'widget', '', '', _("Collapse All"), true));
 
 /* Check to see if user wants new mail notification */
 if (!empty($newmsgs)) {
@@ -419,7 +419,7 @@ if (!empty($newmsgs)) {
 }
 
 /* Add some further information to the $raw_rows array. */
-$name_url = Util::addParameter(Horde::applicationUrl('mailbox.php'), 'no_newmail_popup', 1);
+$name_url = Horde_Util::addParameter(Horde::applicationUrl('mailbox.php'), 'no_newmail_popup', 1);
 $rowct = 0;
 $morembox = $rows = array();
 foreach ($raw_rows as $val) {
@@ -443,15 +443,15 @@ foreach ($raw_rows as $val) {
         if (!empty($val['unseen'])) {
             $val['name'] = '<strong>' . $val['name'] . '</strong>';
         }
-        $val['name'] = Horde::link(Util::addParameter($name_url, 'mailbox', $val['value']), sprintf(_("View messages in %s"), ($val['vfolder']) ? $val['base_elt']['l'] : $val['display'])) . $val['name'] . '</a>';
+        $val['name'] = Horde::link(Horde_Util::addParameter($name_url, 'mailbox', $val['value']), sprintf(_("View messages in %s"), ($val['vfolder']) ? $val['base_elt']['l'] : $val['display'])) . $val['name'] . '</a>';
     }
 
     $dir2 = _image($val, null, 'folder');
 
     if ($val['children']) {
-        $dir = Util::addParameter($folders_url, 'folder', $val['value']);
+        $dir = Horde_Util::addParameter($folders_url, 'folder', $val['value']);
         if ($imaptree->isOpen($val['base_elt'])) {
-            $dir = Util::addParameter($dir, 'actionID', 'collapse_folder');
+            $dir = Horde_Util::addParameter($dir, 'actionID', 'collapse_folder');
             if ($val['value'] == 'INBOX') {
                 $minus_img = 'minustop.png';
             } else {
@@ -462,7 +462,7 @@ foreach ($raw_rows as $val) {
             }
             $dir = Horde::link($dir, _("Collapse Folder")) . _image($minus_img, _("Collapse"), 'tree') . "</a>$dir2";
         } else {
-            $dir = Util::addParameter($dir, 'actionID', 'expand_folder');
+            $dir = Horde_Util::addParameter($dir, 'actionID', 'expand_folder');
             if ($val['value'] == 'INBOX') {
                 $plus_img = 'plustop.png';
             } else {
index 3285ff6..b1c37d7 100644 (file)
@@ -18,7 +18,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 $viewmode = $_SESSION['imp']['view'];
 
-if (!($path = Util::getFormData('imple'))) {
+if (!($path = Horde_Util::getFormData('imple'))) {
     if ($viewmode == 'dimp') {
         Horde::sendHTTPResponse(new stdClass(), 'json');
     }
index 861fb3d..e860827 100644 (file)
@@ -59,7 +59,7 @@ class Horde_Block_imp_summary extends Horde_Block
         $folders = $imaptree->getPollList(true, true);
 
         /* Quota info, if available. */
-        $quota_msg = Util::bufferOutput(array('IMP', 'quota'));
+        $quota_msg = Horde_Util::bufferOutput(array('IMP', 'quota'));
         if (!empty($quota_msg)) {
             $html .= '<tr><td colspan="3">' . $quota_msg . '</td></tr>';
         }
@@ -77,7 +77,7 @@ class Horde_Block_imp_summary extends Horde_Block
                         if (!empty($info['recent'])) {
                             $newmsgs[$folder] = $info['recent'];
                         }
-                        $url = Util::addParameter(Horde::applicationUrl('mailbox.php', true), array('no_newmail_popup' => 1, 'mailbox' => $folder));
+                        $url = Horde_Util::addParameter(Horde::applicationUrl('mailbox.php', true), array('no_newmail_popup' => 1, 'mailbox' => $folder));
                         $html .= '<tr style="cursor:pointer" class="text" onclick="self.location=\'' . $url . '\'"><td>';
                         if (!empty($info['unseen'])) {
                             $html .= '<strong>';
@@ -117,17 +117,17 @@ class Horde_Block_imp_summary extends Horde_Block
 
             if ($prefs->getValue('nav_popup')) {
                 $alert = IMP::getNewMessagePopup($newmsgs);
-                if (!Util::getFormData('httpclient')) {
+                if (!Horde_Util::getFormData('httpclient')) {
                     $alert = 'document.observe("dom:loaded", function() { ' . $alert . ' });';
                 }
                 $notification->push($alert, 'javascript');
-                $html .= Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'javascript'));
+                $html .= Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'javascript'));
             }
 
             if (($sound = $prefs->getValue('nav_audio'))) {
                 $notification->push($registry->getImageDir() .
                                     '/audio/' . $sound, 'audio');
-                $html .= Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'audio'));
+                $html .= Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'audio'));
             }
         } elseif (!empty($this->_params['show_unread'])) {
             if (count($folders) == 0) {
index 78aa181..e45a1d2 100644 (file)
@@ -52,7 +52,7 @@ class Horde_Block_imp_tree_folders extends Horde_Block
             return;
         }
 
-        $name_url = Util::addParameter(Horde::applicationUrl('mailbox.php'), 'no_newmail_popup', 1);
+        $name_url = Horde_Util::addParameter(Horde::applicationUrl('mailbox.php'), 'no_newmail_popup', 1);
 
         /* Initialize the IMP_Tree object. */
         $imaptree = &IMP_Imap_Tree::singleton();
@@ -82,7 +82,7 @@ class Horde_Block_imp_tree_folders extends Horde_Block
                 'icon' => $val['icon'],
                 'icondir' => $val['icondir'],
                 'iconopen' => $val['iconopen'],
-                'url' => ($val['container']) ? null : Util::addParameter($name_url, 'mailbox', $val['value']),
+                'url' => ($val['container']) ? null : Horde_Util::addParameter($name_url, 'mailbox', $val['value']),
             );
             $tree->addNode($parent . $val['value'],
                            ($val['level']) ? $parent . $val['parent'] : $parent,
index 0cd4bb3..0edc508 100644 (file)
@@ -446,21 +446,21 @@ class IMP_Compose
 
         $browser_charset = NLS::getCharset();
 
-        $headers->addHeader('From', String::convertCharset($header['from'], $browser_charset, $charset));
+        $headers->addHeader('From', Horde_String::convertCharset($header['from'], $browser_charset, $charset));
 
         if (!empty($header['replyto']) &&
             ($header['replyto'] != $barefrom)) {
-            $headers->addHeader('Reply-to', String::convertCharset($header['replyto'], $browser_charset, $charset));
+            $headers->addHeader('Reply-to', Horde_String::convertCharset($header['replyto'], $browser_charset, $charset));
         }
         if (!empty($header['to'])) {
-            $headers->addHeader('To', String::convertCharset($header['to'], $browser_charset, $charset));
+            $headers->addHeader('To', Horde_String::convertCharset($header['to'], $browser_charset, $charset));
         } elseif (empty($header['to']) && empty($header['cc'])) {
             $headers->addHeader('To', 'undisclosed-recipients:;');
         }
         if (!empty($header['cc'])) {
-            $headers->addHeader('Cc', String::convertCharset($header['cc'], $browser_charset, $charset));
+            $headers->addHeader('Cc', Horde_String::convertCharset($header['cc'], $browser_charset, $charset));
         }
-        $headers->addHeader('Subject', String::convertCharset($header['subject'], $browser_charset, $charset));
+        $headers->addHeader('Subject', Horde_String::convertCharset($header['subject'], $browser_charset, $charset));
 
         /* Add necessary headers for replies. */
         if (!empty($opts['reply_type']) && ($opts['reply_type'] == 'reply')) {
@@ -485,7 +485,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), String::convertCharset(trim($val), NLS::getCharset(), $charset));
+                $headers->addHeader(trim($key), Horde_String::convertCharset(trim($val), NLS::getCharset(), $charset));
             }
         }
 
@@ -597,7 +597,7 @@ class IMP_Compose
             }
 
             try {
-                $GLOBALS['imp_imap']->ob->append(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'], 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;
@@ -879,9 +879,9 @@ class IMP_Compose
         }
 
         // Convert IDN hosts to ASCII.
-        if (Util::extensionExists('idn')) {
+        if (Horde_Util::extensionExists('idn')) {
             $old_error = error_reporting(0);
-            $host = idn_to_ascii(String::convertCharset($host, NLS::getCharset(), 'UTF-8'));
+            $host = idn_to_ascii(Horde_String::convertCharset($host, 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));
@@ -913,7 +913,7 @@ class IMP_Compose
                                           $options = array())
     {
         $nls_charset = NLS::getCharset();
-        $body = String::convertCharset($body, $nls_charset, $charset);
+        $body = Horde_String::convertCharset($body, $nls_charset, $charset);
 
         if (!empty($options['html'])) {
             $body_html = $body;
@@ -969,18 +969,18 @@ class IMP_Compose
             $htmlBody->setType('text/html');
             $htmlBody->setCharset($charset);
             $htmlBody->setDisposition('inline');
-            $htmlBody->setDescription(String::convertCharset(_("HTML Version of Message"), $nls_charset, $charset));
+            $htmlBody->setDescription(Horde_String::convertCharset(_("HTML Version of Message"), $nls_charset, $charset));
 
             /* Run tidy on the HTML, if available. */
             if ($tidy_config = IMP::getTidyConfig(strlen($body_html))) {
-                $tidy = tidy_parse_string(String::convertCharset($body_html, $charset, 'UTF-8'), $tidy_config, 'utf8');
+                $tidy = tidy_parse_string(Horde_String::convertCharset($body_html, $charset, 'UTF-8'), $tidy_config, 'utf8');
                 $tidy->cleanRepair();
-                $htmlBody->setContents(String::convertCharset(tidy_get_output($tidy), 'UTF-8', $charset));
+                $htmlBody->setContents(Horde_String::convertCharset(tidy_get_output($tidy), 'UTF-8', $charset));
             } else {
                 $htmlBody->setContents($body_html);
             }
 
-            $textBody->setDescription(String::convertCharset(_("Plaintext Version of Message"), $nls_charset, $charset));
+            $textBody->setDescription(Horde_String::convertCharset(_("Plaintext Version of Message"), $nls_charset, $charset));
 
             $textpart = new Horde_Mime_Part();
             $textpart->setType('multipart/alternative');
@@ -1466,8 +1466,8 @@ class IMP_Compose
         if ($attached == 1) {
             if (!($name = $headerob->getValue('subject'))) {
                 $name = _("[No Subject]");
-            } elseif (String::length($name) > 80) {
-                $name = String::substr($name, 0, 80) . '...';
+            } elseif (Horde_String::length($name) > 80) {
+                $name = Horde_String::substr($name, 0, 80) . '...';
             }
             return 'Fwd: ' . $GLOBALS['imp_imap']->ob->utils->getBaseSubject($name, array('keepblob' => true));
         } else {
@@ -1510,11 +1510,11 @@ class IMP_Compose
             $tmp[_("Cc")] = $ob;
         }
 
-        $max = max(array_map(array('String', 'length'), array_keys($tmp))) + 2;
+        $max = max(array_map(array('Horde_String', 'length'), array_keys($tmp))) + 2;
         $text = '';
 
         foreach ($tmp as $key => $val) {
-            $text .= String::pad($key . ': ', $max, ' ', STR_PAD_LEFT) . $val . "\n";
+            $text .= Horde_String::pad($key . ': ', $max, ' ', STR_PAD_LEFT) . $val . "\n";
         }
 
         return $text;
@@ -1540,7 +1540,7 @@ class IMP_Compose
             throw new IMP_Compose_Exception($res);
         }
 
-        $filename = Util::dispelMagicQuotes($_FILES[$name]['name']);
+        $filename = Horde_Util::dispelMagicQuotes($_FILES[$name]['name']);
         $tempfile = $_FILES[$name]['tmp_name'];
 
         /* Check for filesize limitations. */
@@ -1904,13 +1904,13 @@ class IMP_Compose
             '/%r/' => $h->getValue('date'),
 
             /* Date as ddd, dd mmm yyyy. */
-            '/%d/' => String::convertCharset(strftime("%a, %d %b %Y", $udate), NLS::getExternalCharset()),
+            '/%d/' => Horde_String::convertCharset(strftime("%a, %d %b %Y", $udate), NLS::getExternalCharset()),
 
             /* Date in locale's default. */
-            '/%x/' => String::convertCharset(strftime("%x", $udate), NLS::getExternalCharset()),
+            '/%x/' => Horde_String::convertCharset(strftime("%x", $udate), NLS::getExternalCharset()),
 
             /* Date and time in locale's default. */
-            '/%c/' => String::convertCharset(strftime("%c", $udate), NLS::getExternalCharset()),
+            '/%c/' => Horde_String::convertCharset(strftime("%c", $udate), NLS::getExternalCharset()),
 
             /* Message-ID. */
             '/%m/' => $message_id,
@@ -2102,18 +2102,18 @@ class IMP_Compose
         $fullpath = sprintf('%s/%s/%d', self::VFS_LINK_ATTACH_PATH, $auth, $ts);
         $charset = $part->getCharset();
 
-        $trailer = String::convertCharset(_("Attachments"), NLS::getCharset(), $charset);
+        $trailer = Horde_String::convertCharset(_("Attachments"), 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 .= 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)) . ')', NLS::getCharset(), $charset);
         }
 
         foreach ($this->getAttachments() as $att) {
-            $trailer .= "\n" . Util::addParameter($baseurl, array('u' => $auth, 't' => $ts, 'f' => $att->getName()), null, false);
+            $trailer .= "\n" . Horde_Util::addParameter($baseurl, array('u' => $auth, 't' => $ts, 'f' => $att->getName()), null, false);
             if ($conf['compose']['use_vfs']) {
                 $res = $vfs->rename(self::VFS_ATTACH_PATH, $att->getInformation('temp_filename'), $fullpath, escapeshellcmd($att->getName()));
             } else {
@@ -2192,14 +2192,14 @@ class IMP_Compose
         $type = $part->getType();
         $part_charset = $part->getCharset();
         $charset = NLS::getCharset();
-        $msg = String::convertCharset($part->getContents(), $part_charset);
+        $msg = Horde_String::convertCharset($part->getContents(), $part_charset);
 
         /* Enforce reply limits. */
         if (!empty($options['replylimit']) &&
             !empty($GLOBALS['conf']['compose']['reply_limit'])) {
             $limit = $GLOBALS['conf']['compose']['reply_limit'];
-            if (String::length($msg) > $limit) {
-                $msg = String::substr($msg, 0, $limit) . "\n" . _("[Truncated Text]");
+            if (Horde_String::length($msg) > $limit) {
+                $msg = Horde_String::substr($msg, 0, $limit) . "\n" . _("[Truncated Text]");
             }
         }
 
@@ -2207,9 +2207,9 @@ class IMP_Compose
         if (($mode == 'html)' &&
             ($tidy_config = IMP::getTidyConfig($part->getBytes())))) {
             $tidy_config['show-body-only'] = true;
-            $tidy = tidy_parse_string(String::convertCharset($msg, $charset, 'UTF-8'), $tidy_config, 'UTF8');
+            $tidy = tidy_parse_string(Horde_String::convertCharset($msg, $charset, 'UTF-8'), $tidy_config, 'UTF8');
             $tidy->cleanRepair();
-            $msg = String::convertCharset(tidy_get_output($tidy), 'UTF-8', $charset);
+            $msg = Horde_String::convertCharset(tidy_get_output($tidy), 'UTF-8', $charset);
         }
 
         if ($mode == 'html') {
@@ -2230,7 +2230,7 @@ class IMP_Compose
 
             if ($part->getContentTypeParameter('format') == 'flowed') {
                 $flowed = new Horde_Text_Flowed($msg);
-                if (String::lower($part->getContentTypeParameter('delsp')) == 'yes') {
+                if (Horde_String::lower($part->getContentTypeParameter('delsp')) == 'yes') {
                     $flowed->setDelSp(true);
                 }
                 $flowed->setMaxLength(0);
@@ -2329,7 +2329,7 @@ class IMP_Compose
         for ($i = 1, $fcount = count($_FILES); $i <= $fcount; ++$i) {
             $key = $field . $i;
             if (isset($_FILES[$key]) && ($_FILES[$key]['error'] != 4)) {
-                $filename = Util::dispelMagicQuotes($_FILES[$key]['name']);
+                $filename = Horde_Util::dispelMagicQuotes($_FILES[$key]['name']);
                 if (!empty($_FILES[$key]['error'])) {
                     switch ($_FILES[$key]['error']) {
                     case UPLOAD_ERR_INI_SIZE:
@@ -2392,18 +2392,18 @@ class IMP_Compose
 
         $headers = array();
         foreach (array('to', 'cc', 'bcc', 'subject') as $val) {
-            $headers[$val] = $imp_ui->getAddressList(Util::getFormData($val), Util::getFormData($val . '_list'), Util::getFormData($val . '_field'), Util::getFormData($val . '_new'));
+            $headers[$val] = $imp_ui->getAddressList(Horde_Util::getFormData($val), Horde_Util::getFormData($val . '_list'), Horde_Util::getFormData($val . '_field'), Horde_Util::getFormData($val . '_new'));
         }
 
         try {
-            $body = $this->_saveDraftMsg($headers, Util::getFormData('message', ''), Util::getFormData('charset'), Util::getFormData('rtemode'), false);
+            $body = $this->_saveDraftMsg($headers, Horde_Util::getFormData('message', ''), Horde_Util::getFormData('charset'), Horde_Util::getFormData('rtemode'), false);
         } catch (IMP_Compose_Exception $e) {
             return;
         }
 
         $vfs = VFS::singleton($GLOBALS['conf']['vfs']['type'], Horde::getDriverConfig('vfs', $GLOBALS['conf']['vfs']['type']));
         // TODO: Garbage collection?
-        $result = $vfs->writeData(self::VFS_DRAFTS_PATH, hash('md5', Util::getFormData('user')), $body, true);
+        $result = $vfs->writeData(self::VFS_DRAFTS_PATH, hash('md5', Horde_Util::getFormData('user')), $body, true);
         if (is_a($result, 'PEAR_Error')) {
             return;
         }
index 67e13cd..bbc4cfa 100644 (file)
@@ -306,9 +306,9 @@ class IMP_Contents
             !$part->getContents()) {
             $contents = $this->getBodyPart($id, array('length' => empty($options['length']) ? null : $options['length']));
             if (($part->getPrimaryType() == 'text') &&
-                (String::upper($part->getCharset()) == 'US-ASCII') &&
+                (Horde_String::upper($part->getCharset()) == 'US-ASCII') &&
                 Horde_Mime::is8bit($contents)) {
-                $contents = String::convertCharset($contents, 'US-ASCII');
+                $contents = Horde_String::convertCharset($contents, 'US-ASCII');
             }
             $part->setContents($contents);
 
@@ -404,9 +404,9 @@ 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 = String::upper(NLS::getCharset());
+            $default_charset = Horde_String::upper(NLS::getCharset());
             if ($default_charset !== 'UTF-8') {
-                $charset_upper = String::upper($mime_part->getCharset());
+                $charset_upper = Horde_String::upper($mime_part->getCharset());
                 if (($charset_upper != 'US-ASCII') &&
                     ($charset_upper != $default_charset)) {
                     $ret['status'][] = array(
@@ -467,7 +467,7 @@ class IMP_Contents
         // account for any content-encoding & HTML tags.
         $pmime = $this->getMIMEPart($mimeid, array('length' => $maxlen * 3));
         $ptext = $pmime->getContents();
-        $ptext = String::convertCharset($ptext, $pmime->getCharset());
+        $ptext = Horde_String::convertCharset($ptext, $pmime->getCharset());
         if ($pmime->getType() == 'text/html') {
             require_once 'Horde/Text/Filter.php';
             $ptext = Text_Filter::filter($ptext, 'html2text',
@@ -476,8 +476,8 @@ class IMP_Contents
 
         $this->_build = $oldbuild;
 
-        if (String::length($ptext) > $maxlen) {
-            return array('cut' => true, 'text' => String::substr($ptext, 0, $maxlen) . ' ...');
+        if (Horde_String::length($ptext) > $maxlen) {
+            return array('cut' => true, 'text' => Horde_String::substr($ptext, 0, $maxlen) . ' ...');
         }
 
         return array('cut' => false, 'text' => $ptext);
@@ -524,7 +524,7 @@ class IMP_Contents
      */
     public function getSummary($id, $mask = 0)
     {
-        $download_zip = (($mask & self::SUMMARY_DOWNLOAD_ZIP) && Util::extensionExists('zlib'));
+        $download_zip = (($mask & self::SUMMARY_DOWNLOAD_ZIP) && Horde_Util::extensionExists('zlib'));
         $param_array = array();
 
         $this->_buildMessage();
@@ -625,8 +625,8 @@ class IMP_Contents
             ($id != 0) &&
             (intval($id) != 1) &&
             (strpos($id, '.') === false)) {
-            $url = Util::removeParameter(Horde::selfUrl(true), array('actionID', 'imapid', 'index'));
-            $url = Util::addParameter($url, array('actionID' => 'strip_attachment', 'imapid' => $id, 'index' => $this->_index, 'message_token' => IMP::getRequestToken('imp.impcontents')));
+            $url = Horde_Util::removeParameter(Horde::selfUrl(true), array('actionID', 'imapid', 'index'));
+            $url = Horde_Util::addParameter($url, array('actionID' => 'strip_attachment', 'imapid' => $id, 'index' => $this->_index, 'message_token' => IMP::getRequestToken('imp.impcontents')));
             $part['strip'] = Horde::link($url, _("Strip Attachment"), 'stripAtc', null, "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete this attachment?")) . "');") . '</a>';
         }
 
@@ -652,7 +652,7 @@ class IMP_Contents
         $params = $this->_urlViewParams($mime_part, $actionID, isset($options['params']) ? $options['params'] : array());
 
         return empty($options['dload'])
-            ? Util::addParameter(Horde::applicationUrl('view.php'), $params)
+            ? Horde_Util::addParameter(Horde::applicationUrl('view.php'), $params)
             : Horde::downloadUrl($mime_part->getName(true), $params);
     }
 
index 277853e..0934aed 100644 (file)
@@ -154,7 +154,7 @@ class IMP_Fetchmail_Account
     {
         $list = $this->getAll($key);
         foreach ($list as $val2) {
-            if (strpos(String::lower($val), String::lower($val2)) !== false) {
+            if (strpos(Horde_String::lower($val), Horde_String::lower($val2)) !== false) {
                 return true;
             }
         }
index 2d55f0f..cca9eb1 100644 (file)
@@ -132,7 +132,7 @@ class IMP_Folder
 
             $abbrev = $label = str_repeat(' ', 4 * $ob['c']) . $ob['l'];
             if (strlen($abbrev) > 26) {
-                $abbrev = String::substr($abbrev, 0, 10) . '...' . String::substr($abbrev, -13, 13);
+                $abbrev = Horde_String::substr($abbrev, 0, 10) . '...' . Horde_String::substr($abbrev, -13, 13);
             }
             $list[$ob['v']] = array('val' => $imaptree->isContainer($ob) ? '' : $ob['v'], 'label' => $label, 'abbrev' => $abbrev);
         }
index 7439dc4..fd8465c 100644 (file)
@@ -84,10 +84,10 @@ class IMP
             return false;
         }
 
-        if (Util::getFormData('popup')) {
-            Util::closeWindowJS();
+        if (Horde_Util::getFormData('popup')) {
+            Horde_Util::closeWindowJS();
         } else {
-            $url = Util::addParameter(self::getLogoutUrl(null, true), 'url', Horde::selfUrl(true));
+            $url = Horde_Util::addParameter(self::getLogoutUrl(null, true), 'url', Horde::selfUrl(true));
             header('Location: ' . $url);
         }
         exit;
@@ -317,7 +317,7 @@ class IMP
         $fields = array('to', 'cc', 'bcc', 'message', 'body', 'subject');
 
         foreach ($fields as $val) {
-            if (($$val = Util::getFormData($val))) {
+            if (($$val = Horde_Util::getFormData($val))) {
                 $args[$val] = $$val;
             }
         }
@@ -353,7 +353,7 @@ class IMP
         }
 
         $options += self::getComposeArgs();
-        $url = Util::addParameter(Horde::applicationUrl('compose.php', true), $options, null, false);
+        $url = Horde_Util::addParameter(Horde::applicationUrl('compose.php', true), $options, null, false);
         header('Location: ' . $url);
         return true;
     }
@@ -424,7 +424,7 @@ class IMP
             foreach ($args as $k => $v) {
                 $encode_args[$k] = rawurlencode($v);
             }
-            return 'javascript:void(window.open(\'' . Util::addParameter(Horde::applicationUrl('compose-dimp.php'), $encode_args, null, false) . '\', \'\', \'width=820,height=610,status=1,scrollbars=yes,resizable=yes\'));';
+            return 'javascript:void(window.open(\'' . Horde_Util::addParameter(Horde::applicationUrl('compose-dimp.php'), $encode_args, null, false) . '\', \'\', \'width=820,height=610,status=1,scrollbars=yes,resizable=yes\'));';
         }
 
         if (($view != 'mimp') &&
@@ -438,7 +438,7 @@ class IMP
             return "javascript:" . self::popupIMPString('compose.php', $args);
         }
 
-        return Util::addParameter(Horde::applicationUrl(($view == 'mimp') ? 'compose-mimp.php' : 'compose.php'), $args);
+        return Horde_Util::addParameter(Horde::applicationUrl(($view == 'mimp') ? 'compose-mimp.php' : 'compose.php'), $args);
     }
 
     /**
@@ -487,13 +487,13 @@ class IMP
             if (stripos($out, $key) === 0) {
                 $len = strlen($key);
                 if ((strlen($out) == $len) || ($out[$len + 1] == $delimiter)) {
-                    $out = substr_replace($out, String::convertCharset($val, NLS::getCharset(), 'UTF7-IMAP'), 0, $len);
+                    $out = substr_replace($out, Horde_String::convertCharset($val, NLS::getCharset(), 'UTF7-IMAP'), 0, $len);
                     break;
                 }
             }
         }
 
-        $cache[$folder] = String::convertCharset($out, 'UTF7-IMAP');
+        $cache[$folder] = Horde_String::convertCharset($out, 'UTF7-IMAP');
 
         return $cache[$folder];
     }
@@ -591,14 +591,14 @@ class IMP
                 }
 
                 if (!empty($mailbox) && !$GLOBALS['imp_imap']->isReadOnly($mailbox)) {
-                    $menu_trash_url = Util::addParameter(self::generateIMPUrl($menu_mailbox_url, $mailbox), array('actionID' => 'empty_mailbox', 'mailbox_token' => self::getRequestToken('imp.mailbox')));
+                    $menu_trash_url = Horde_Util::addParameter(self::generateIMPUrl($menu_mailbox_url, $mailbox), array('actionID' => 'empty_mailbox', 'mailbox_token' => self::getRequestToken('imp.mailbox')));
                     $menu->add($menu_trash_url, _("Empty _Trash"), 'empty_trash.png', null, null, "return window.confirm('" . addslashes(_("Are you sure you wish to empty your trash folder?")) . "');", '__noselection');
                 }
             }
 
             if (!empty($spam_folder) &&
                 $prefs->getValue('empty_spam_menu')) {
-                $menu_spam_url = Util::addParameter(self::generateIMPUrl($menu_mailbox_url, $spam_folder), array('actionID' => 'empty_mailbox', 'mailbox_token' => self::getRequestToken('imp.mailbox')));
+                $menu_spam_url = Horde_Util::addParameter(self::generateIMPUrl($menu_mailbox_url, $spam_folder), array('actionID' => 'empty_mailbox', 'mailbox_token' => self::getRequestToken('imp.mailbox')));
                 $menu->add($menu_spam_url, _("Empty _Spam"), 'empty_spam.png', null, null, "return window.confirm('" . addslashes(_("Are you sure you wish to empty your spam folder?")) . "');", '__noselection');
             }
         }
@@ -609,7 +609,7 @@ class IMP
         }
 
         if ($conf['user']['allow_folders']) {
-            $menu->add(Util::nocacheUrl(Horde::applicationUrl('folders.php')), _("_Folders"), 'folders/folder.png');
+            $menu->add(Horde_Util::nocacheUrl(Horde::applicationUrl('folders.php')), _("_Folders"), 'folders/folder.png');
         }
 
         if ($_SESSION['imp']['protocol'] != 'pop') {
@@ -664,7 +664,7 @@ class IMP
     static public function menu()
     {
         $t = new IMP_Template();
-        $t->set('forminput', Util::formInput());
+        $t->set('forminput', Horde_Util::formInput());
         $t->set('use_folders', ($_SESSION['imp']['protocol'] != 'pop') && $GLOBALS['conf']['user']['allow_folders'], true);
         if ($t->get('use_folders')) {
             Horde::addScriptFile('imp.js', 'imp', true);
@@ -798,7 +798,7 @@ class IMP
             $folders = array();
             foreach ($var as $mb => $nm) {
                 $folders[] = array(
-                    'url' => Util::addParameter(self::generateIMPUrl('mailbox.php', $mb), 'no_newmail_popup', 1),
+                    'url' => Horde_Util::addParameter(self::generateIMPUrl('mailbox.php', $mb), 'no_newmail_popup', 1),
                     'name' => htmlspecialchars(self::displayFolder($mb)),
                     'new' => (int)$nm,
                 );
@@ -808,7 +808,7 @@ class IMP
             if (($_SESSION['imp']['protocol'] != 'pop') &&
                 $GLOBALS['prefs']->getValue('use_vinbox') &&
                 ($vinbox_id = $GLOBALS['prefs']->getValue('vinbox_id'))) {
-                $t->set('vinbox', Horde::link(Util::addParameter(self::generateIMPUrl('mailbox.php', $GLOBALS['imp_search']->createSearchID($vinbox_id)), 'no_newmail_popup', 1)));
+                $t->set('vinbox', Horde::link(Horde_Util::addParameter(self::generateIMPUrl('mailbox.php', $GLOBALS['imp_search']->createSearchID($vinbox_id)), 'no_newmail_popup', 1)));
             }
         } else {
             $t->set('msg', ($var == 1) ? _("You have 1 new message.") : sprintf(_("You have %s new messages."), $var));
@@ -830,7 +830,7 @@ class IMP
      */
     static public function prefsURL($full = false)
     {
-        return Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php', $full), array('app' => 'imp'));
+        return Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php', $full), array('app' => 'imp'));
     }
 
     /**
@@ -982,7 +982,7 @@ class IMP
     static public function generateIMPUrl($page, $mailbox, $uid = null,
                                           $tmailbox = null, $encode = true)
     {
-        return Util::addParameter(Horde::applicationUrl($page), self::getIMPMboxParameters($mailbox, $uid, $tmailbox), null, $encode);
+        return Horde_Util::addParameter(Horde::applicationUrl($page), self::getIMPMboxParameters($mailbox, $uid, $tmailbox), null, $encode);
     }
 
     /**
@@ -1315,11 +1315,11 @@ class IMP
      */
     static public function getCurrentMailboxInfo()
     {
-        $mbox = Util::getFormData('mailbox');
+        $mbox = Horde_Util::getFormData('mailbox');
         return array(
             'mailbox' => empty($mbox) ? 'INBOX' : $mbox,
-            'thismailbox' => Util::getFormData('thismailbox', $mbox),
-            'index' => Util::getFormData('index')
+            'thismailbox' => Horde_Util::getFormData('thismailbox', $mbox),
+            'index' => Horde_Util::getFormData('index')
         );
     }
 
@@ -1336,8 +1336,8 @@ class IMP
         $params = array_filter(array(
             'server_key' => isset($_SESSION['imp']['server_key']) ?
                           $_SESSION['imp']['server_key'] :
-                          Util::getFormData('server_key'),
-            'language' => Util::getFormData('language')
+                          Horde_Util::getFormData('server_key'),
+            'language' => Horde_Util::getFormData('language')
         ));
 
         if ($force ||
@@ -1352,7 +1352,7 @@ class IMP
             : Auth::addLogoutParameters($url, $reason);
 
         if (!empty($params)) {
-            $url = Util::addParameter($url, $params, null, false);
+            $url = Horde_Util::addParameter($url, $params, null, false);
         }
 
         return $url;
@@ -1371,7 +1371,7 @@ class IMP
     static public function popupIMPString($url, $params = array(),
                                           $width = 700, $height = 650)
     {
-        return "IMP.popup('" . Horde::applicationUrl($url) . "'," . $width . "," . $height . ",'" . $GLOBALS['browser']->escapeJSCode(str_replace('+', '%20', substr(Util::addParameter('', $params, null, false), 1))) . "');";
+        return "IMP.popup('" . Horde::applicationUrl($url) . "'," . $width . "," . $height . ",'" . $GLOBALS['browser']->escapeJSCode(str_replace('+', '%20', substr(Horde_Util::addParameter('', $params, null, false), 1))) . "');";
     }
 
     /**
@@ -1440,7 +1440,7 @@ class IMP
      */
     static public function getTidyConfig($size)
     {
-        if (!Util::extensionExists('tidy') ||
+        if (!Horde_Util::extensionExists('tidy') ||
             function_exists('tidy_load_config') &&
             ($size > 250000)) {
             return false;
index bb2e08f..f779392 100644 (file)
@@ -78,9 +78,8 @@ class Identity_imp extends Identity
 
         /* Prepare email validator */
         require_once 'Horde/Form.php';
-        require_once 'Horde/Variables.php';
         $email = new Horde_Form_Type_email();
-        $vars = new Variables();
+        $vars = new Horde_Variables();
         $var = new Horde_Form_Variable('', 'replyto_addr', $email, false);
 
         /* Verify From address. */
@@ -205,7 +204,7 @@ class Identity_imp extends Identity
     {
         static $list;
 
-        $address = String::lower($address);
+        $address = Horde_String::lower($address);
         if (!isset($list)) {
             $list = $this->getAllFromAddresses(true);
         }
@@ -274,14 +273,14 @@ class Identity_imp extends Identity
 
         foreach ($this->_identitiesWithDefaultLast() as $key => $identity) {
             /* Get From Addresses. */
-            $list[String::lower($this->getFromAddress($key))] = $key;
+            $list[Horde_String::lower($this->getFromAddress($key))] = $key;
 
             /* Get Aliases. */
             if ($alias) {
                 $addrs = $this->getAliasAddress($key);
                 if (!empty($addrs)) {
                     foreach (array_filter($addrs) as $val) {
-                        $list[String::lower($val)] = $key;
+                        $list[Horde_String::lower($val)] = $key;
                     }
                 }
             }
@@ -395,7 +394,7 @@ class Identity_imp extends Identity
             if (!empty($address['host'])) {
                 $find_address .= '@' . $address['host'];
             }
-            $find_address = String::lower($find_address);
+            $find_address = Horde_String::lower($find_address);
 
             /* Search 'tieto' addresses first. */
             /* Check for this address explicitly. */
index 38f376d..85322a7 100644 (file)
@@ -716,7 +716,7 @@ class IMP_Imap_Tree
                 }
 
                 $elt = $this->_makeElt($val, self::ELT_VFOLDER | self::ELT_IS_SUBSCRIBED);
-                $elt['l'] = $elt['v'] = String::substr($val, String::length($this->VFOLDER_KEY) + String::length($this->_delimiter));
+                $elt['l'] = $elt['v'] = Horde_String::substr($val, Horde_String::length($this->VFOLDER_KEY) + Horde_String::length($this->_delimiter));
                 $this->_insertElt($elt);
             } else {
                 /* Break apart the name via the delimiter and go step by
index 9f8a39a..1c32fe2 100644 (file)
@@ -120,7 +120,7 @@ class IMP_Imple_ContactAutoCompleter extends IMP_Imple
     {
         // Avoid errors if 'input' isn't set and short-circuit empty searches.
         if (empty($args['input']) ||
-            !($input = Util::getPost($args['input']))) {
+            !($input = Horde_Util::getPost($args['input']))) {
             return array();
         }
 
index 62bb068..52e08a8 100644 (file)
@@ -95,7 +95,7 @@ class IMP_Imple_SpellChecker extends IMP_Imple
         }
 
         try {
-            return $speller->spellCheck(Util::getPost($args['input']));
+            return $speller->spellCheck(Horde_Util::getPost($args['input']));
         } catch (Exception $e) {
             Horde::logMessage($e, __FILE__, __LINE__, PEAR_LOG_ERR);
             return array('bad' => array(), 'suggestions' => array());
index 16daeda..b9c924b 100644 (file)
@@ -34,7 +34,7 @@ class MIMP
             (empty($GLOBALS['conf']['hooks']['disable_compose']) ||
              Horde::callHook('_imp_hook_disable_compose', array(true), 'imp'))) {
 
-            $items[Util::addParameter(Horde::applicationUrl('compose-mimp.php'), 'u', uniqid(mt_rand()))] = _("New Message");
+            $items[Horde_Util::addParameter(Horde::applicationUrl('compose-mimp.php'), 'u', uniqid(mt_rand()))] = _("New Message");
         }
 
         if ($page != 'folders') {
@@ -43,7 +43,7 @@ class MIMP
 
         // @TODO - Options for mobile browsers
         // if ($options_link = Horde::getServiceLink('options', 'mimp')) {
-        //     $items[Util::addParameter($options_link, 'mobile', 1, false)] = _("Options");
+        //     $items[Horde_Util::addParameter($options_link, 'mobile', 1, false)] = _("Options");
         // }
         $logout_link = IMP::getLogoutUrl(AUTH_REASON_LOGOUT);
         if (!empty($logout_link)) {
index c2c7e36..0b8846a 100644 (file)
@@ -36,7 +36,7 @@ class Maintenance_Task_delete_sentmail_monthly extends Maintenance_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] = 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]"), NLS::getCharset(), 'UTF7-IMAP');
                 }
             }
         }
index 4525038..8f8c07c 100644 (file)
@@ -91,7 +91,7 @@ class Maintenance_Task_rename_sentmail_monthly extends Maintenance_Task
 
         $text = (substr($GLOBALS['language'], 0, 2) == 'en') ? strtolower(strftime('-%b-%Y', $last_maintenance)) : strftime('-%m-%Y', $last_maintenance);
 
-        return $folder . String::convertCharset($text, NLS::getExternalCharset(), 'UTF7-IMAP');
+        return $folder . Horde_String::convertCharset($text, NLS::getExternalCharset(), 'UTF7-IMAP');
     }
 
 }
index d423fca..44f1a58 100644 (file)
@@ -26,7 +26,7 @@ class Maintenance_Task_tos_agreement extends Maintenance_Task
      */
     function doMaintenance()
     {
-        $result = Util::getFormData('not_agree');
+        $result = Horde_Util::getFormData('not_agree');
         if (isset($result)) {
             header('Location: ' . IMP::getLogoutUrl(array(AUTH_REASON_MESSAGE => _("You did not agree to the Terms of Service agreement, so you were not allowed to login.")), true));
             exit;
index e5a554a..caae296 100644 (file)
@@ -362,7 +362,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 = String::convertCharset($body, $body_part->getCharset(), NLS::getCharset());
+                $body = Horde_String::convertCharset($body, $body_part->getCharset(), NLS::getCharset());
 
                 /* Create a new iCalendar. */
                 $vCal = new Horde_iCalendar();
index de0d9c3..f0e70ce 100644 (file)
@@ -112,21 +112,21 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html
         $msg_charset = $this->_mimepart->getCharset();
 
         if ($inline) {
-            $data = String::convertCharset($data, $msg_charset);
+            $data = Horde_String::convertCharset($data, $msg_charset);
             $msg_charset = $charset;
         }
 
         /* Run tidy on the HTML. */
         if ($this->getConfigParam('tidy') &&
-            ($tidy_config = IMP::getTidyConfig(String::length($data)))) {
+            ($tidy_config = IMP::getTidyConfig(Horde_String::length($data)))) {
             if ($msg_charset == 'us-ascii') {
                 $tidy = tidy_parse_string($data, $tidy_config, 'ascii');
                 $tidy->cleanRepair();
                 $data = tidy_get_output($tidy);
             } else {
-                $tidy = tidy_parse_string(String::convertCharset($data, $msg_charset, 'UTF-8'), $tidy_config, 'utf8');
+                $tidy = tidy_parse_string(Horde_String::convertCharset($data, $msg_charset, 'UTF-8'), $tidy_config, 'utf8');
                 $tidy->cleanRepair();
-                $data = String::convertCharset(tidy_get_output($tidy), 'UTF-8', $msg_charset);
+                $data = Horde_String::convertCharset(tidy_get_output($tidy), 'UTF-8', $msg_charset);
             }
         }
 
@@ -208,22 +208,22 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html
             preg_match($this->_img_regex, $data)) {
             /* Make sure the URL parameters are correct for the current
              * message. */
-            $url = Util::removeParameter(IMP::selfUrl(), array('actionID', 'index'));
-            $url = Util::addParameter($url, 'index', $this->_params['contents']->getIndex());
+            $url = Horde_Util::removeParameter(IMP::selfUrl(), array('actionID', 'index'));
+            $url = Horde_Util::addParameter($url, 'index', $this->_params['contents']->getIndex());
 
-            $view_img = Util::getFormData('view_html_images');
+            $view_img = Horde_Util::getFormData('view_html_images');
             $addr_check = ($GLOBALS['prefs']->getValue('html_image_addrbook') && $this->_inAddressBook());
 
             if (!$view_img && !$addr_check) {
-                $data .= Util::bufferOutput(array('Horde', 'addScriptFile'), 'prototype.js', 'horde', true) .
-                    Util::bufferOutput(array('Horde', 'addScriptFile'), 'imp.js', 'imp', true);
+                $data .= Horde_Util::bufferOutput(array('Horde', 'addScriptFile'), 'prototype.js', 'horde', true) .
+                    Horde_Util::bufferOutput(array('Horde', 'addScriptFile'), 'imp.js', 'imp', true);
 
                 // Unblock javascript code in js/src/imp.js
                 $cleanhtml['status'][] = array(
                     'icon' => Horde::img('mime/image.png'),
                     'text' => array(
-                        String::convertCharset(_("Images have been blocked to protect your privacy."), $charset, $msg_charset),
-                        Horde::link(Util::addParameter($url, 'view_html_images', 1), '', 'unblockImageLink') . String::convertCharset(_("Show Images?"), $charset, $msg_charset) . '</a>'
+                        Horde_String::convertCharset(_("Images have been blocked to protect your privacy."), $charset, $msg_charset),
+                        Horde::link(Horde_Util::addParameter($url, 'view_html_images', 1), '', 'unblockImageLink') . Horde_String::convertCharset(_("Show Images?"), $charset, $msg_charset) . '</a>'
                     )
                 );
 
@@ -247,7 +247,7 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html
      */
     protected function _mailtoCallback($m)
     {
-        return 'href="' . $GLOBALS['registry']->call('mail/compose', array(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', NLS::getCharset()))) . '"';
     }
 
     /**
index eb290e0..18993d2 100644 (file)
@@ -42,7 +42,7 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images
      */
     protected function _render()
     {
-        switch (Util::getFormData('imp_img_view')) {
+        switch (Horde_Util::getFormData('imp_img_view')) {
         case 'data':
             /* If calling page is asking us to output data, do that without
              * any further delay and exit. */
@@ -163,7 +163,7 @@ class IMP_Horde_Mime_Viewer_Images extends Horde_Mime_Viewer_Images
      */
     protected function _popupImageWindow()
     {
-        $self_url = Util::addParameter(IMP::selfUrl(), array('imp_img_view' => ((Util::getFormData('imp_img_view') == 'load_convert') ? 'view_convert' : 'data')));
+        $self_url = Horde_Util::addParameter(IMP::selfUrl(), array('imp_img_view' => ((Horde_Util::getFormData('imp_img_view') == 'load_convert') ? 'view_convert' : 'data')));
         $title = $this->_mimepart->getName(true);
 
         $str = <<<EOD
@@ -263,7 +263,7 @@ EOD;
         if (!empty($GLOBALS['conf']['image']['convert'])) {
             $context['convert'] = $GLOBALS['conf']['image']['convert'];
             $img = Horde_Image::factory('Im', array('context' => $context));
-        } elseif (Util::extensionExists('gd')) {
+        } elseif (Horde_Util::extensionExists('gd')) {
             $img = Horde_Image::factory('Gd', array('context' => $context));
         }
 
index 57972d4..501aa16 100644 (file)
@@ -38,9 +38,9 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         $ret = $this->_renderInline();
         if (!empty($ret)) {
             reset($ret);
-            $ret[key($ret)]['data'] = Util::bufferOutput('include', $GLOBALS['registry']->get('templates', 'horde') . '/common-header.inc') .
+            $ret[key($ret)]['data'] = Horde_Util::bufferOutput('include', $GLOBALS['registry']->get('templates', 'horde') . '/common-header.inc') .
                 $ret[key($ret)]['data'] .
-                Util::bufferOutput('include', $GLOBALS['registry']->get('templates', 'horde') . '/common-footer.inc');
+                Horde_Util::bufferOutput('include', $GLOBALS['registry']->get('templates', 'horde') . '/common-footer.inc');
         }
         return $ret;
     }
@@ -93,7 +93,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
         $msgs = array();
 
         // Handle the action requests.
-        $actions = Util::getFormData('itip_action', array());
+        $actions = Horde_Util::getFormData('itip_action', array());
         foreach ($actions as $key => $action) {
             switch ($action) {
             case 'delete':
@@ -308,7 +308,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     $body = new Horde_Mime_Part();
                     $body->setType('text/plain');
                     $body->setCharset($charset);
-                    $body->setContents(String::wrap($message, 76, "\n"));
+                    $body->setContents(Horde_String::wrap($message, 76, "\n"));
 
                     $ics = new Horde_Mime_Part();
                     $ics->setType('text/calendar');
@@ -328,7 +328,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     $msg_headers->addHeader('From', $email);
                     $msg_headers->addHeader('To', $organizerEmail);
 
-                    $identity->setDefault(Util::getFormData('identity'));
+                    $identity->setDefault(Horde_Util::getFormData('identity'));
                     $replyto = $identity->getValue('replyto_addr');
                     if (!empty($replyto) && ($replyto != $email)) {
                         $msg_headers->addHeader('Reply-to', $replyto);
@@ -410,7 +410,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
 
                     $message = _("Attached is a reply to a calendar request you sent.");
                     $body = new Horde_Mime_Part('text/plain',
-                                          String::wrap($message, 76, "\n"),
+                                          Horde_String::wrap($message, 76, "\n"),
                                           $charset);
 
                     $ics = new Horde_Mime_Part('text/calendar', $vCal->exportvCalendar());
@@ -430,7 +430,7 @@ class IMP_Horde_Mime_Viewer_Itip extends Horde_Mime_Viewer_Driver
                     $msg_headers->addHeader('From', $email);
                     $msg_headers->addHeader('To', $organizerEmail);
 
-                    $identity->setDefault(Util::getFormData('identity'));
+                    $identity->setDefault(Horde_Util::getFormData('identity'));
                     $replyto = $identity->getValue('replyto_addr');
                     if (!empty($replyto) && ($replyto != $email)) {
                         $msg_headers->addHeader('Reply-to', $replyto);
index a06db2f..36acd70 100644 (file)
@@ -39,7 +39,7 @@ class IMP_Horde_Mime_Viewer_Pdf extends Horde_Mime_Viewer_Pdf
     protected function _render()
     {
         /* Create the thumbnail and display. */
-        if (!Util::getFormData('pdf_view_thumbnail')) {
+        if (!Horde_Util::getFormData('pdf_view_thumbnail')) {
             return parent::_render();
         }
 
index 5da2bbf..4d05525 100644 (file)
@@ -68,7 +68,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
             $this->_imppgp = Horde_Crypt::singleton(array('IMP', 'Pgp'));
         }
 
-        if (Util::getFormData('rawpgpkey')) {
+        if (Horde_Util::getFormData('rawpgpkey')) {
             return array(
                 $this->_mimepart->getMimeId() => array(
                     'data' => $this->_mimepart->getContents(),
@@ -336,7 +336,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
         $status[] = _("The message below has been digitally signed via PGP.");
 
         if ($GLOBALS['prefs']->getValue('pgp_verify') ||
-            Util::getFormData('pgp_verify_msg')) {
+            Horde_Util::getFormData('pgp_verify_msg')) {
             $graphicsdir = $GLOBALS['registry']->getImageDir('horde');
             $sig_part = $this->_params['contents']->getMIMEPart($sig_id);
 
@@ -370,7 +370,7 @@ class IMP_Horde_Mime_Viewer_Pgp extends Horde_Mime_Viewer_Driver
         } else {
             switch ($_SESSION['imp']['view']) {
             case 'imp':
-                $status[] = Horde::link(Util::addParameter(IMP::selfUrl(), array('pgp_verify_msg' => 1))) . _("Click HERE to verify the message.") . '</a>';
+                $status[] = Horde::link(Horde_Util::addParameter(IMP::selfUrl(), array('pgp_verify_msg' => 1))) . _("Click HERE to verify the message.") . '</a>';
                 break;
 
             case 'dimp':
index 4c83cd0..c1af81d 100644 (file)
@@ -39,7 +39,7 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain
         }
 
         // Convert to the local charset.
-        $text = String::convertCharset($text, $this->_mimepart->getCharset());
+        $text = Horde_String::convertCharset($text, $this->_mimepart->getCharset());
 
         // Check for 'flowed' text data.
         if ($this->_mimepart->getContentTypeParameter('format') == 'flowed') {
@@ -234,7 +234,7 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain
 
                     $part2 = new Horde_Mime_Part();
                     $part2->setType('application/x-imp-pgp-signature');
-                    $part2->setContents(String::convertCharset(implode("\n", $val['data']) . "\n" . implode("\n", $sig['data']), $charset));
+                    $part2->setContents(Horde_String::convertCharset(implode("\n", $val['data']) . "\n" . implode("\n", $sig['data']), $charset));
 
                     $part->addPart($part1);
                     $part->addPart($part2);
@@ -258,7 +258,7 @@ class IMP_Horde_Mime_Viewer_Plain extends Horde_Mime_Viewer_Plain
      */
     protected function _parseUUencode()
     {
-        $text = String::convertCharset($this->_mimepart->getContents(), $this->_mimepart->getCharset());
+        $text = Horde_String::convertCharset($this->_mimepart->getContents(), $this->_mimepart->getCharset());
 
         /* Don't want to use convert_uudecode() here as there may be multiple
          * files residing in the text. */
index dcd0e03..b1007fb 100644 (file)
@@ -62,7 +62,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
         /* Check to see if S/MIME support is available. */
         $this->_initSMIME();
 
-        if (Util::getFormData('view_smime_key')) {
+        if (Horde_Util::getFormData('view_smime_key')) {
             return $this->_outputSMIMEKey();
         }
 
@@ -245,7 +245,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
         $sig_result = null;
 
         if ($GLOBALS['prefs']->getValue('smime_verify') ||
-            Util::getFormData('smime_verify_msg')) {
+            Horde_Util::getFormData('smime_verify_msg')) {
             try {
                 $sig_result = $this->_impsmime->verifySignature($raw_text);
             } catch (Horde_Exception $e) {
@@ -258,7 +258,7 @@ class IMP_Horde_Mime_Viewer_Smime extends Horde_Mime_Viewer_Driver
         } else {
             switch ($_SESSION['imp']['view']) {
             case 'imp':
-                $status[] = Horde::link(Util::addParameter(IMP::selfUrl(), 'smime_verify_msg', 1)) . _("Click HERE to verify the message.") . '</a>';
+                $status[] = Horde::link(Horde_Util::addParameter(IMP::selfUrl(), 'smime_verify_msg', 1)) . _("Click HERE to verify the message.") . '</a>';
                 break;
 
             case 'dimp':
index faf68e7..b8479fd 100644 (file)
@@ -38,7 +38,7 @@ class IMP_Horde_Mime_Viewer_Tnef extends Horde_Mime_Viewer_Tnef
      */
     protected function _render()
     {
-        if (!Util::getFormData('tnef_attachment')) {
+        if (!Horde_Util::getFormData('tnef_attachment')) {
             $ret = $this->_renderInfo();
             reset($ret);
             $ret[key($ret)]['data'] = '<html><body>' . $ret[key($ret)]['data'] . '</body></html>';
@@ -51,7 +51,7 @@ class IMP_Horde_Mime_Viewer_Tnef extends Horde_Mime_Viewer_Tnef
 
         /* Display the requested file. Its position in the $tnefData
          * array can be found in 'tnef_attachment'. */
-        $tnefKey = Util::getFormData('tnef_attachment') - 1;
+        $tnefKey = Horde_Util::getFormData('tnef_attachment') - 1;
 
         /* Verify that the requested file exists. */
         if (isset($tnefData[$tnefKey])) {
index 504dcd2..f2d9d45 100644 (file)
@@ -26,7 +26,7 @@ class IMP_Horde_Mime_Viewer_Zip extends Horde_Mime_Viewer_Zip
      */
     protected function _render()
     {
-        if (!Util::getFormData('zip_attachment')) {
+        if (!Horde_Util::getFormData('zip_attachment')) {
             $this->_callback = array(&$this, '_IMPcallback');
             return parent::_render();
         }
@@ -35,7 +35,7 @@ class IMP_Horde_Mime_Viewer_Zip extends Horde_Mime_Viewer_Zip
          * in 'zip_attachment'. */
         $data = $this->_mimepart->getContents();
         $zip = &Horde_Compress::singleton('zip');
-        $fileKey = Util::getFormData('zip_attachment') - 1;
+        $fileKey = Horde_Util::getFormData('zip_attachment') - 1;
         $zipInfo = $zip->decompress($data, array('action' => HORDE_COMPRESS_ZIP_LIST));
 
         /* Verify that the requested file exists. */
@@ -81,7 +81,7 @@ class IMP_Horde_Mime_Viewer_Zip extends Horde_Mime_Viewer_Zip
         $name = preg_replace('/(&nbsp;)+$/', '', $val['name']);
 
         if (!empty($val['size']) && (strstr($val['attr'], 'D') === false) &&
-            ((($val['method'] == 0x8) && Util::extensionExists('zlib')) ||
+            ((($val['method'] == 0x8) && Horde_Util::extensionExists('zlib')) ||
              ($val['method'] == 0x0))) {
             $mime_part = $this->_mimepart;
             $mime_part->setName(basename($name));
index 4e2c18f..342d86c 100644 (file)
@@ -590,7 +590,7 @@ class IMP_Search
     public function editURL($id = null)
     {
         $id = $this->_strip($id);
-        return Util::addParameter(Horde::applicationUrl('search.php'), array('edit_query' => $id));
+        return Horde_Util::addParameter(Horde::applicationUrl('search.php'), array('edit_query' => $id));
     }
 
     /**
@@ -604,7 +604,7 @@ class IMP_Search
     public function deleteURL($id = null)
     {
         $id = $this->_strip($id);
-        return Util::addParameter(Horde::applicationUrl('folders.php'),
+        return Horde_Util::addParameter(Horde::applicationUrl('folders.php'),
                                   array('actionID' => 'delete_search_query',
                                         'folders_token' => IMP::getRequestToken('imp.folders'),
                                         'queryid' => $id,
index cff470a..d6f06ae 100644 (file)
@@ -333,9 +333,9 @@ class IMP_Session
     {
         /* TODO: For now, redirect MIMP to mailbox page. */
         if ($_SESSION['imp']['view'] == 'mimp') {
-            $url = Util::addParameter(Horde::applicationUrl('mailbox-mimp.php', true), array('mailbox' => 'INBOX'));
+            $url = Horde_Util::addParameter(Horde::applicationUrl('mailbox-mimp.php', true), array('mailbox' => 'INBOX'));
             if (!empty($actionID)) {
-                $url = Util::addParameter($url, array('actionID' => $actionID), null, false);
+                $url = Horde_Util::addParameter($url, array('actionID' => $actionID), null, false);
             }
             return $url;
         }
@@ -363,13 +363,13 @@ class IMP_Session
         }
 
         if ($init_url == 'folders.php') {
-            $url = Util::addParameter(Horde::applicationUrl($init_url, !$encode), array_merge(array('folders_token' => IMP::getRequestToken('imp.folders')), IMP::getComposeArgs()), null, $encode);
+            $url = Horde_Util::addParameter(Horde::applicationUrl($init_url, !$encode), array_merge(array('folders_token' => IMP::getRequestToken('imp.folders')), IMP::getComposeArgs()), null, $encode);
         } else {
-            $url = Util::addParameter(Horde::applicationUrl('mailbox.php', !$encode), array_merge(array('mailbox' => $init_url, 'mailbox_token' => IMP::getRequestToken('imp.mailbox')), IMP::getComposeArgs()), null, $encode);
+            $url = Horde_Util::addParameter(Horde::applicationUrl('mailbox.php', !$encode), array_merge(array('mailbox' => $init_url, 'mailbox_token' => IMP::getRequestToken('imp.mailbox')), IMP::getComposeArgs()), null, $encode);
         }
 
         if (!empty($actionID)) {
-            $url = Util::addParameter($url, 'actionID', $actionID, $encode);
+            $url = Horde_Util::addParameter($url, 'actionID', $actionID, $encode);
         }
 
         return $url;
index bfd2e0b..283cd01 100644 (file)
@@ -137,7 +137,7 @@ class IMP_UI_Compose
             $clean_to = '';
             foreach (Horde_Mime_Address::explode($to, ',;') as $val) {
                 $val = trim($val);
-                $clean_to .= $val . (($val[String::length($val) - 1] == ';') ? ' ' : ', ');
+                $clean_to .= $val . (($val[Horde_String::length($val) - 1] == ';') ? ' ' : ', ');
             }
             if ($expand) {
                return $clean_to;
index f851661..4b25361 100644 (file)
@@ -325,7 +325,7 @@ class IMP_UI_Message
             $add_link = $registry->link('contacts/add', array('source' => $prefs->getValue('add_source')));
             if (is_a($add_link, 'PEAR_Error')) {
                 $add_link = $registry->hasMethod('contacts/import')
-                    ? Util::addParameter($addURL, 'actionID', 'add_address')
+                    ? Horde_Util::addParameter($addURL, 'actionID', 'add_address')
                     : null;
             }
         }
@@ -349,7 +349,7 @@ class IMP_UI_Message
                     /* Append the add address icon to every address if contact
                      * manager is available. */
                     if ($add_link) {
-                        $curr_link = Util::addParameter($add_link, array('name' => $ad['personal'], 'address' => $ad['inner']));
+                        $curr_link = Horde_Util::addParameter($add_link, array('name' => $ad['personal'], 'address' => $ad['inner']));
                         $ret .= Horde::link($curr_link, sprintf(_("Add %s to my Address Book"), $ad['inner'])) .
                             Horde::img('addressbook_add.png', sprintf(_("Add %s to my Address Book"), $ad['inner'])) . '</a>';
                     }
@@ -377,7 +377,7 @@ class IMP_UI_Message
                     /* Append the add address icon to every address if contact
                      * manager is available. */
                     if ($add_link) {
-                        $curr_link = Util::addParameter($add_link, array('name' => $ob['personal'], 'address' => $ob['inner']));
+                        $curr_link = Horde_Util::addParameter($add_link, array('name' => $ob['personal'], 'address' => $ob['inner']));
                         $ret .= Horde::link($curr_link, sprintf(_("Add %s to my Address Book"), $ob['inner'])) .
                             Horde::img('addressbook_add.png', sprintf(_("Add %s to my Address Book"), $ob['inner'])) . '</a>';
                     }
index c472b00..34cdd9c 100644 (file)
@@ -169,7 +169,7 @@ class IMP_Views_ShowMessage
                     $result[$head] = $result['reply-to'];
                     unset($result['reply-to']);
                 }
-                $headers[] = array('id' => String::ucfirst($head), 'name' => $str, 'value' => '');
+                $headers[] = array('id' => Horde_String::ucfirst($head), 'name' => $str, 'value' => '');
             } elseif ($val = $mime_headers->getValue($head)) {
                 if ($head == 'date') {
                     /* Add local time to date header. */
@@ -181,7 +181,7 @@ class IMP_Views_ShowMessage
                     $val = htmlspecialchars($val);
                 }
                 if (!$preview) {
-                    $headers[] = array('id' => String::ucfirst($head), 'name' => $str, 'value' => $val);
+                    $headers[] = array('id' => Horde_String::ucfirst($head), 'name' => $str, 'value' => $val);
                 }
             }
         }
index 9afd8b2..e1fe156 100644 (file)
@@ -534,10 +534,10 @@ function _imp_adminDo($task, $params)
 
     switch ($task) {
     case 'add':
-        return $imap->addMailbox(String::convertCharset($params[0], NLS::getCharset(), 'utf7-imap'));
+        return $imap->addMailbox(Horde_String::convertCharset($params[0], NLS::getCharset(), 'utf7-imap'));
 
     case 'remove':
-        return $imap->removeMailbox(String::convertCharset($params[0], NLS::getCharset(), 'utf7-imap'));
+        return $imap->removeMailbox(Horde_String::convertCharset($params[0], NLS::getCharset(), 'utf7-imap'));
 
     case 'list':
         return $imap->listMailboxes();
index 3d12554..e3b997b 100644 (file)
@@ -42,7 +42,7 @@ Horde_Autoloader::addClassPattern('/^IMP_/', $imp_dir);
 
 // Registry.
 $s_ctrl = 0;
-switch (Util::nonInputVar('session_control')) {
+switch (Horde_Util::nonInputVar('session_control')) {
 case 'netscape':
     if ($browser->isBrowser('mozilla')) {
         session_cache_limiter('private, must-revalidate');
@@ -62,7 +62,7 @@ $registry = &Registry::singleton($s_ctrl);
 // We explicitly do not check application permissions for the compose
 // and login pages, since those are handled below and need to fall through
 // to IMP-specific code.
-$compose_page = Util::nonInputVar('compose_page');
+$compose_page = Horde_Util::nonInputVar('compose_page');
 if (is_a(($pushed = $registry->pushApp('imp', !(defined('AUTH_HANDLER') || $compose_page))), 'PEAR_Error')) {
     if ($pushed->getCode() == 'permission_denied') {
         Horde::authenticationFailureRedirect();
@@ -80,7 +80,7 @@ if (!isset($GLOBALS['imp_imap'])) {
 }
 
 // Start compression.
-if (!Util::nonInputVar('no_compress')) {
+if (!Horde_Util::nonInputVar('no_compress')) {
     Horde::compressOutput();
 }
 
@@ -100,7 +100,7 @@ $viewmode = isset($_SESSION['imp']['view'])
     ? $_SESSION['imp']['view']
     : 'imp';
 
-$authentication = Util::nonInputVar('authentication', 0);
+$authentication = Horde_Util::nonInputVar('authentication', 0);
 if ($authentication !== 'none') {
     // If we've gotten to this point and have valid login credentials
     // but don't actually have an IMP session, then we need to go
@@ -128,7 +128,7 @@ if ($authentication !== 'none') {
     } elseif ($viewmode == 'dimp') {
         // Handle session timeouts
         if (!IMP::checkAuthentication(true)) {
-            switch (Util::nonInputVar('session_timeout')) {
+            switch (Horde_Util::nonInputVar('session_timeout')) {
             case 'json':
                 $GLOBALS['notification']->push(null, 'dimp.timeout');
                 Horde::sendHTTPResponse(Horde::prepareResponse(), 'json');
@@ -137,7 +137,7 @@ if ($authentication !== 'none') {
                 exit;
 
             default:
-                Horde::redirect(Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'imp') . '/redirect.php'), 'url', Horde::selfUrl(true)));
+                Horde::redirect(Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'imp') . '/redirect.php'), 'url', Horde::selfUrl(true)));
             }
         }
     } else {
@@ -159,14 +159,14 @@ if ($authentication !== 'none') {
 }
 
 // Handle logout requests
-if (($viewmode == 'dimp') && Util::nonInputVar('dimp_logout')) {
+if (($viewmode == 'dimp') && Horde_Util::nonInputVar('dimp_logout')) {
     Horde::redirect(str_replace('&amp;', '&', IMP::getLogoutUrl()));
 }
 
 // Notification system.
 $notification = &Notification::singleton();
 if (($viewmode == 'mimp') ||
-    (Util::nonInputVar('login_page') && $GLOBALS['browser']->isMobile())) {
+    (Horde_Util::nonInputVar('login_page') && $GLOBALS['browser']->isMobile())) {
     require_once 'Horde/Notification/Listener/mobile.php';
     $GLOBALS['imp_notify'] = &$notification->attach('status', null, 'Notification_Listener_mobile');
 } elseif ($viewmode == 'dimp') {
@@ -193,7 +193,7 @@ $GLOBALS['imp_search'] = new IMP_Search(array('id' => (isset($_SESSION['imp']) &
 
 if ($viewmode == 'mimp') {
     // Mobile markup renderer.
-    $debug = Util::nonInputVar('mimp_debug');
+    $debug = Horde_Util::nonInputVar('mimp_debug');
     $GLOBALS['mimp_render'] = new Horde_Mobile(null, $debug);
     $GLOBALS['mimp_render']->set('debug', !empty($debug));
 }
index b560aa0..8b8e993 100644 (file)
@@ -17,8 +17,8 @@ function handle_sentmailselect($updated)
 
     if ($conf['user']['allow_folders'] &&
         !$prefs->isLocked('sent_mail_folder')) {
-        $sent_mail_folder = Util::getFormData('sent_mail_folder');
-        $sent_mail_new = String::convertCharset(Util::getFormData('sent_mail_new'), NLS::getCharset(), 'UTF7-IMAP');
+        $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_default = $prefs->getValue('sent_mail_folder');
         if (empty($sent_mail_folder) && !empty($sent_mail_new)) {
             $sent_mail_folder = IMP::appendNamespace($sent_mail_new);
@@ -44,9 +44,9 @@ function handlefolders($updated, $pref, $folder, $new)
     global $conf, $prefs;
 
     if ($conf['user']['allow_folders']) {
-        $folder = Util::getFormData($folder);
+        $folder = Horde_Util::getFormData($folder);
         if (isset($folder) && !$prefs->isLocked($pref)) {
-            $new = String::convertCharset(Util::getFormData($new), NLS::getCharset(), 'UTF7-IMAP');
+            $new = Horde_String::convertCharset(Horde_Util::getFormData($new), NLS::getCharset(), 'UTF7-IMAP');
             if ($folder == IMP_PREF_NO_FOLDER) {
                 $prefs->setValue($pref, '');
             } else {
@@ -79,7 +79,7 @@ function handle_trashselect($updated)
     global $prefs;
     $ret = true;
 
-    if (Util::getFormData('trash') == IMP_PREF_VTRASH) {
+    if (Horde_Util::getFormData('trash') == IMP_PREF_VTRASH) {
         if ($prefs->isLocked('use_vtrash')) {
             $ret = false;
         } else {
@@ -105,20 +105,20 @@ function handle_sourceselect($updated)
 {
     global $prefs;
 
-    $search_sources = Util::getFormData('search_sources');
+    $search_sources = Horde_Util::getFormData('search_sources');
     if (!is_null($search_sources)) {
         $prefs->setValue('search_sources', $search_sources);
         unset($_SESSION['imp']['cache']['ac_ajax']);
         $updated = true;
     }
 
-    $search_fields_string = Util::getFormData('search_fields_string');
+    $search_fields_string = Horde_Util::getFormData('search_fields_string');
     if (!is_null($search_fields_string)) {
         $prefs->setValue('search_fields', $search_fields_string);
         $updated = true;
     }
 
-    $add_source = Util::getFormData('add_source');
+    $add_source = Horde_Util::getFormData('add_source');
     if (!is_null($add_source)) {
         $prefs->setValue('add_source', $add_source);
         $updated = true;
@@ -129,14 +129,14 @@ function handle_sourceselect($updated)
 
 function handle_initialpageselect($updated)
 {
-    $initial_page = Util::getFormData('initial_page');
+    $initial_page = Horde_Util::getFormData('initial_page');
     $GLOBALS['prefs']->setValue('initial_page', $initial_page);
     return true;
 }
 
 function handle_encryptselect($updated)
 {
-    $default_encrypt = Util::getFormData('default_encrypt');
+    $default_encrypt = Horde_Util::getFormData('default_encrypt');
     $GLOBALS['prefs']->setValue('default_encrypt', $default_encrypt);
     return true;
 }
@@ -148,21 +148,21 @@ function handle_spamselect($updated)
 
 function handle_defaultsearchselect($updated)
 {
-    $default_search = Util::getFormData('default_search');
+    $default_search = Horde_Util::getFormData('default_search');
     $GLOBALS['prefs']->setValue('default_search', $default_search);
     return true;
 }
 
 function handle_soundselect($updated)
 {
-    return $GLOBALS['prefs']->setValue('nav_audio', Util::getFormData('nav_audio'));
+    return $GLOBALS['prefs']->setValue('nav_audio', Horde_Util::getFormData('nav_audio'));
 }
 
 function handle_flagmanagement($updated)
 {
     $imp_flags = &IMP_Imap_Flags::singleton();
-    $flag_action = Util::getFormData('flag_action');
-    $flag_data = Util::getFormData('flag_data');
+    $flag_action = Horde_Util::getFormData('flag_action');
+    $flag_data = Horde_Util::getFormData('flag_data');
 
     if ($flag_action == 'add') {
         $imp_flags->addFlag($flag_data);
@@ -186,14 +186,14 @@ function handle_flagmanagement($updated)
         default:
             /* Change labels for user-defined flags. */
             if ($val['t'] == 'imapp') {
-                $label = Util::getFormData('label_' . $md5);
+                $label = Horde_Util::getFormData('label_' . $md5);
                 if (strlen($label) && ($label != $val['l'])) {
                     $imp_flags->updateFlag($key, array('l' => $label));
                 }
             }
 
             /* Change background for all flags. */
-            $bg = strtolower(Util::getFormData('bg_' . $md5));
+            $bg = strtolower(Horde_Util::getFormData('bg_' . $md5));
             if ((isset($val['b']) && ($bg != $val['b'])) ||
                 (!isset($val['b']) && ($bg != $def_color))) {
                 $imp_flags->updateFlag($key, array('b' => $bg));
@@ -263,6 +263,6 @@ foreach (($maint->exportIntervalPrefs()) as $val) {
 
 /* Make sure we have an active IMAP stream. */
 if (!$GLOBALS['registry']->call('mail/server')) {
-    header('Location: ' . Util::addParameter(Horde::applicationUrl('redirect.php'), 'url', Horde::selfUrl(true)));
+    header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('redirect.php'), 'url', Horde::selfUrl(true)));
     exit;
 }
index 485dc94..7f31e7d 100644 (file)
@@ -18,7 +18,7 @@ $login_page = true;
 require_once dirname(__FILE__) . '/lib/base.php';
 
 /* Set the 'preferred' server. */
-$pref_server = Util::getFormData('server');
+$pref_server = Horde_Util::getFormData('server');
 if (!empty($pref_server)) {
     IMP_Session::$prefServer = $pref_server;
 }
@@ -28,8 +28,8 @@ $imp_auth = (Auth::getProvider() == 'imp');
 $auth = &Auth::singleton($conf['auth']['driver']);
 $logout_reason = $auth->getLogoutReason();
 
-$actionID = (Util::getFormData('action') == 'compose') ? 'login_compose' : Util::getFormData('actionID');
-$url_param = Util::getFormData('url');
+$actionID = (Horde_Util::getFormData('action') == 'compose') ? 'login_compose' : Horde_Util::getFormData('actionID');
+$url_param = Horde_Util::getFormData('url');
 
 /* Handle cases where we already have a session. */
 if (!empty($_SESSION['imp']) && is_array($_SESSION['imp'])) {
@@ -90,7 +90,7 @@ if ($logout_reason == AUTH_REASON_LOGOUT &&
         $url = Auth::addLogoutParameters($conf['user']['redirect_on_logout'], AUTH_REASON_LOGOUT);
     }
     if (!isset($_COOKIE[session_name()])) {
-        $url = Util::addParameter($url, session_name(), session_id());
+        $url = Horde_Util::addParameter($url, session_name(), session_id());
     }
     header('Location: ' . $url);
     exit;
@@ -100,17 +100,17 @@ if ($logout_reason == AUTH_REASON_LOGOUT &&
 if (!empty($conf['auth']['alternate_login'])) {
     $url = Auth::addLogoutParameters($conf['auth']['alternate_login']);
     if (!isset($_COOKIE[session_name()])) {
-        $url = Util::addParameter($url, session_name(), session_id(), false);
+        $url = Horde_Util::addParameter($url, session_name(), session_id(), false);
     }
     if ($url_param) {
-        $url = Util::addParameter($url, 'url', $url_param, false);
+        $url = Horde_Util::addParameter($url, 'url', $url_param, false);
     }
     header('Location: ' . $url);
     exit;
 } elseif ($conf['user']['alternate_login']) {
     $url = Auth::addLogoutParameters($conf['user']['alternate_login']);
     if (!isset($_COOKIE[session_name()])) {
-        $url = Util::addParameter($url, session_name(), session_id(), false);
+        $url = Horde_Util::addParameter($url, session_name(), session_id(), false);
     }
     header('Location: ' . $url);
     exit;
@@ -120,8 +120,8 @@ if (!empty($conf['auth']['alternate_login'])) {
  * make sure that the Horde auth key gets set instead. */
 Horde_Secret::setKey($imp_auth ? 'auth' : 'imp');
 
-$autologin = Util::getFormData('autologin', false);
-$server_key = Util::getFormData('server_key', IMP_Session::getAutoLoginServer());
+$autologin = Horde_Util::getFormData('autologin', false);
+$server_key = Horde_Util::getFormData('server_key', IMP_Session::getAutoLoginServer());
 if (($servers = $GLOBALS['imp_imap']->loadServerConfig()) === false) {
     $servers = array();
 }
@@ -136,7 +136,7 @@ if (!$logout_reason && IMP_Session::canAutoLogin($server_key, $autologin)) {
     if (count($used_servers) == 1) {
         $params['server_key'] = key($used_servers);
     }
-    $url = Util::addParameter($url, $params, null, false);
+    $url = Horde_Util::addParameter($url, $params, null, false);
     header('Location: ' . $url);
     exit;
 }
@@ -257,11 +257,11 @@ $tabindex = 0;
 
 $t->set('action', Horde::url('redirect.php', false, -1, true));
 $t->set('imp_auth', intval($imp_auth));
-$t->set('formInput', Util::formInput());
+$t->set('formInput', Horde_Util::formInput());
 $t->set('actionID', htmlspecialchars($actionID));
 $t->set('url', htmlspecialchars($url_param));
 $t->set('autologin', intval($autologin));
-$t->set('anchor_string', htmlspecialchars(Util::getFormData('anchor_string')));
+$t->set('anchor_string', htmlspecialchars(Horde_Util::getFormData('anchor_string')));
 $t->set('server_key', (!$display_list) ? htmlspecialchars($server_key) : null);
 
 /* Do we need to do IE version detection? */
@@ -297,7 +297,7 @@ if ($t->get('server_list')) {
 }
 
 $t->set('username_tabindex', ++$tabindex);
-$t->set('username', htmlspecialchars(Util::getFormData('imapuser')));
+$t->set('username', htmlspecialchars(Horde_Util::getFormData('imapuser')));
 $t->set('user_vinfo', null);
 if (!empty($conf['hooks']['vinfo'])) {
     $t->set('user_vinfo', Horde::callHook('_imp_hook_vinfo', array('vdomain'), 'imp'));
@@ -322,7 +322,7 @@ $t->set('login', _("Login"));
 $t->set('signup_link', false);
 if ($conf['signup']['allow'] && isset($auth) && $auth->hasCapability('add')) {
     $t->set('signup_text', _("Don't have an account? Sign up."));
-    $t->set('signup_link', Horde::link(Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/signup.php'), 'url', $url_param), $t->get('signup_text'), 'light'));
+    $t->set('signup_link', Horde::link(Horde_Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/signup.php'), 'url', $url_param), $t->get('signup_text'), 'light'));
 }
 
 $login_page = true;
@@ -336,7 +336,7 @@ $login_params = $autologin
     : array('server_key' => '');
 
 IMP::addInlineScript(array(
-    'ImpLogin.autologin_url = ' . Horde_Serialize::serialize(Util::addParameter(Horde::selfUrl(), $login_params, null, false), Horde_Serialize::JSON, $charset),
+    'ImpLogin.autologin_url = ' . Horde_Serialize::serialize(Horde_Util::addParameter(Horde::selfUrl(), $login_params, null, false), Horde_Serialize::JSON, $charset),
     'ImpLogin.ie_clientcaps = ' . intval($t->get('ie_clientcaps')),
     'ImpLogin.imp_auth = ' . intval($imp_auth),
     'ImpLogin.lang_url = ' . Horde_Serialize::serialize($lang_url, Horde_Serialize::JSON, $charset),
index b3a53a4..5b233b1 100644 (file)
@@ -28,7 +28,7 @@ $readonly = $imp_imap->isReadOnly($imp_mbox['mailbox']);
 NLS::setTimeZone();
 
 /* Run through the action handlers */
-$actionID = Util::getFormData('a');
+$actionID = Horde_Util::getFormData('a');
 switch ($actionID) {
 // 'm' = message missing
 case 'm':
@@ -45,7 +45,7 @@ case 'e':
 
 // 'c' = change sort
 case 'c':
-    IMP::setSort(Util::getFormData('sb'), Util::getFormData('sd'));
+    IMP::setSort(Horde_Util::getFormData('sb'), Horde_Util::getFormData('sd'));
     break;
 }
 
@@ -54,17 +54,17 @@ $mailbox_url = IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']);
 
 /* Build the list of messages in the mailbox. */
 $imp_mailbox = &IMP_Mailbox::singleton($imp_mbox['mailbox']);
-$pageOb = $imp_mailbox->buildMailboxPage(Util::getFormData('p'), Util::getFormData('s'));
+$pageOb = $imp_mailbox->buildMailboxPage(Horde_Util::getFormData('p'), Horde_Util::getFormData('s'));
 
 /* Generate page links. */
 $pages_first = $pages_prev = $pages_last = $pages_next = null;
 if ($pageOb['page'] != 1) {
-    $pages_first = new Horde_Mobile_link(_("First Page"), Util::addParameter($mailbox_url, 'p', 1));
-    $pages_prev = new Horde_Mobile_link(_("Previous Page"), Util::addParameter($mailbox_url, 'p', $pageOb['page'] - 1));
+    $pages_first = new Horde_Mobile_link(_("First Page"), Horde_Util::addParameter($mailbox_url, 'p', 1));
+    $pages_prev = new Horde_Mobile_link(_("Previous Page"), Horde_Util::addParameter($mailbox_url, 'p', $pageOb['page'] - 1));
 }
 if ($pageOb['page'] != $pageOb['pagecount']) {
-    $pages_next = new Horde_Mobile_link(_("Next Page"), Util::addParameter($mailbox_url, 'p', $pageOb['page'] + 1));
-    $pages_last = new Horde_Mobile_link(_("Last Page"), Util::addParameter($mailbox_url, 'p', $pageOb['pagecount']));
+    $pages_next = new Horde_Mobile_link(_("Next Page"), Horde_Util::addParameter($mailbox_url, 'p', $pageOb['page'] + 1));
+    $pages_last = new Horde_Mobile_link(_("Last Page"), Horde_Util::addParameter($mailbox_url, 'p', $pageOb['pagecount']));
 }
 
 /* Generate mailbox summary string. */
@@ -101,8 +101,8 @@ while (list(,$ob) = each($mbox_info['overview'])) {
     /* Format the from header. */
     $getfrom = $imp_ui->getFrom($ob['envelope']);
     $msg['from'] = $getfrom['from'];
-    if (String::length($msg['from']) > $conf['mimp']['mailbox']['max_from_chars']) {
-        $msg['from'] = String::substr($msg['from'], 0, $conf['mimp']['mailbox']['max_from_chars']) . '...';
+    if (Horde_String::length($msg['from']) > $conf['mimp']['mailbox']['max_from_chars']) {
+        $msg['from'] = Horde_String::substr($msg['from'], 0, $conf['mimp']['mailbox']['max_from_chars']) . '...';
     }
 
     /* Get flag information. */
@@ -118,8 +118,8 @@ while (list(,$ob) = each($mbox_info['overview'])) {
             $msg['status'] .= $val['abbrev'];
         } elseif ($val['type'] == 'imapp') {
             $msg['subject'] = '*' .
-                ((String::length($val['label']) > 8)
-                     ? String::substr($val['label'], 0, 5) . '...'
+                ((Horde_String::length($val['label']) > 8)
+                     ? Horde_String::substr($val['label'], 0, 5) . '...'
                      : $val['label']
                 ) .
                 '* ' . $msg['subject'];
@@ -130,8 +130,8 @@ while (list(,$ob) = each($mbox_info['overview'])) {
         $msg['subject'] = '>> ' . ltrim($msg['subject']);
     }
 
-    if (String::length($msg['subject']) > $conf['mimp']['mailbox']['max_subj_chars']) {
-        $msg['subject'] = String::substr($msg['subject'], 0, $conf['mimp']['mailbox']['max_subj_chars']) . '...';
+    if (Horde_String::length($msg['subject']) > $conf['mimp']['mailbox']['max_subj_chars']) {
+        $msg['subject'] = Horde_String::substr($msg['subject'], 0, $conf['mimp']['mailbox']['max_subj_chars']) . '...';
     }
 
     /* Generate the target link. */
@@ -142,14 +142,14 @@ while (list(,$ob) = each($mbox_info['overview'])) {
     $msgs[] = $msg;
 }
 
-$mailbox = Util::addParameter($mailbox_url, 'p', $pageOb['page']);
+$mailbox = Horde_Util::addParameter($mailbox_url, 'p', $pageOb['page']);
 $items = array($mailbox => _("Refresh"));
 
 /* Determine if we are going to show the Purge Deleted link. */
 if (!$readonly &&
     !$prefs->getValue('use_trash') &&
     !$imp_search->isVINBOXFolder()) {
-    $items[Util::addParameter($mailbox, array('a' => 'e'))] = _("Purge Deleted");
+    $items[Horde_Util::addParameter($mailbox, array('a' => 'e'))] = _("Purge Deleted");
 }
 
 /* Create sorting links. */
@@ -168,17 +168,17 @@ foreach ($sort_list as $key => $val) {
         if (($key == Horde_Imap_Client::SORT_SUBJECT) &&
             IMP::threadSortAvailable($mailbox)) {
             if (is_null($threadob)) {
-                $items[Util::addParameter($mailbox, array('a' => 'c', 'sb' => Horde_Imap_Client::SORT_THREAD, 'sd' => $sortdir))] = _("Sort by Thread");
+                $items[Horde_Util::addParameter($mailbox, array('a' => 'c', 'sb' => Horde_Imap_Client::SORT_THREAD, 'sd' => $sortdir))] = _("Sort by Thread");
             } else {
                 $sortkey = Horde_Imap_Client::SORT_THREAD;
-                $items[Util::addParameter($mailbox, array('a' => 'c', 'sb' => Horde_Imap_Client::SORT_SUBJECT, 'sd' => $sortdir))] = _("Do Not Sort by Thread");
+                $items[Horde_Util::addParameter($mailbox, array('a' => 'c', 'sb' => Horde_Imap_Client::SORT_SUBJECT, 'sd' => $sortdir))] = _("Do Not Sort by Thread");
             }
         }
         if ($sortpref['by'] == $key) {
             $val = '*' . $val;
             $sortdir = !$sortdir;
         }
-        $sort[$key] = new Horde_Mobile_link($val, Util::addParameter($mailbox, array('a' => 'c', 'sb' => $sortkey, 'sd' => $sortdir)));
+        $sort[$key] = new Horde_Mobile_link($val, Horde_Util::addParameter($mailbox, array('a' => 'c', 'sb' => $sortkey, 'sd' => $sortdir)));
     }
 }
 
@@ -192,7 +192,7 @@ foreach ($items as $link => $label) {
 
 $nav = array('pages_first', 'pages_prev', 'pages_next', 'pages_last');
 foreach ($nav as $n) {
-    if (Util::nonInputVar($n)) {
+    if (Horde_Util::nonInputVar($n)) {
         $mset->add($$n);
     }
 }
index fd93c8b..bcb402d 100644 (file)
@@ -63,15 +63,15 @@ $vfolder = $imp_search->isVFolder();
  * set: $actionID, $start. */
 $mailbox_url = Horde::applicationUrl('mailbox.php');
 $mailbox_imp_url = IMP::generateIMPUrl('mailbox.php', $imp_mbox['mailbox']);
-if (!Util::nonInputVar('from_message_page')) {
-    $actionID = Util::getFormData('actionID');
-    $start = Util::getFormData('start');
+if (!Horde_Util::nonInputVar('from_message_page')) {
+    $actionID = Horde_Util::getFormData('actionID');
+    $start = Horde_Util::getFormData('start');
 }
 
 /* Get form data and make sure it's the type that we're expecting. */
-$targetMbox = Util::getFormData('targetMbox');
-$newMbox = Util::getFormData('newMbox');
-if (!is_array(($indices = Util::getFormData('indices')))) {
+$targetMbox = Horde_Util::getFormData('targetMbox');
+$newMbox = Horde_Util::getFormData('newMbox');
+if (!is_array(($indices = Horde_Util::getFormData('indices')))) {
     $indices = array($indices);
 }
 
@@ -84,7 +84,7 @@ $open_compose_window = null;
 /* Run through the action handlers */
 if ($actionID && ($actionID != 'message_missing')) {
     try {
-        IMP::checkRequestToken('imp.mailbox', Util::getFormData('mailbox_token'));
+        IMP::checkRequestToken('imp.mailbox', Horde_Util::getFormData('mailbox_token'));
     } catch (Horde_Exception $e) {
         $notification->push($e);
         $actionID = null;
@@ -107,7 +107,7 @@ if ($readonly &&
 
 switch ($actionID) {
 case 'change_sort':
-    IMP::setSort(Util::getFormData('sortby'), Util::getFormData('sortdir'));
+    IMP::setSort(Horde_Util::getFormData('sortby'), Horde_Util::getFormData('sortdir'));
     break;
 
 case 'blacklist':
@@ -168,7 +168,7 @@ case 'copy_messages':
     break;
 
 case 'flag_messages':
-    $flag = Util::getPost('flag');
+    $flag = Horde_Util::getPost('flag');
     if ($flag && !empty($indices)) {
         $set = true;
         if ($flag[0] == '0') {
@@ -200,7 +200,7 @@ case 'empty_mailbox':
     break;
 
 case 'view_messages':
-    $redirect = Util::addParameter(IMP::generateIMPUrl('thread.php', $imp_mbox['mailbox'], null, null, false), array('mode' => 'msgview', 'msglist' => $GLOBALS['imp_imap']->ob->utils->toSequenceString(IMP::parseIndicesList($indices), array('mailbox' => true))), null, false);
+    $redirect = Horde_Util::addParameter(IMP::generateIMPUrl('thread.php', $imp_mbox['mailbox'], null, null, false), array('mode' => 'msgview', 'msglist' => $GLOBALS['imp_imap']->ob->utils->toSequenceString(IMP::parseIndicesList($indices), array('mailbox' => true))), null, false);
     header('Location: ' . $redirect);
     exit;
 
@@ -220,7 +220,7 @@ if (!$readonly && !empty($_SESSION['imp']['filteravail'])) {
         $do_filter = true;
     } elseif (($imp_mbox['mailbox'] == 'INBOX') ||
               ($prefs->getValue('filter_any_mailbox') && !$search_mbox)) {
-        $filter_url = Util::addParameter($mailbox_imp_url, array('actionID' => 'filter', 'mailbox_token' => $mailbox_token));
+        $filter_url = Horde_Util::addParameter($mailbox_imp_url, array('actionID' => 'filter', 'mailbox_token' => $mailbox_token));
     }
 }
 
@@ -237,7 +237,7 @@ if ($conf['user']['allow_folders']) {
 
 /* Build the list of messages in the mailbox. */
 $imp_mailbox = IMP_Mailbox::singleton($imp_mbox['mailbox']);
-$pageOb = $imp_mailbox->buildMailboxPage(Util::getFormData('page'), $start);
+$pageOb = $imp_mailbox->buildMailboxPage(Horde_Util::getFormData('page'), $start);
 $show_preview = ($conf['mailbox']['show_preview'] && $prefs->getValue('preview_enabled'));
 
 $overview_headers = array('x-priority');
@@ -256,7 +256,7 @@ $sortpref = IMP::getSort($imp_mbox['mailbox']);
  * not a virtual folder. */
 if ($search_mbox && !$pageOb['msgcount'] && !$vfolder) {
     $notification->push(_("No messages matched your search."), 'horde.warning');
-    header('Location: ' . Util::addParameter(Horde::applicationUrl('search.php', true), array('no_match' => 1, 'mailbox' => $imp_mbox['mailbox']), null, false));
+    header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('search.php', true), array('no_match' => 1, 'mailbox' => $imp_mbox['mailbox']), null, false));
     exit;
 }
 
@@ -295,9 +295,9 @@ if ($pageOb['pagecount']) {
         $pages_first = Horde::img($rtl ? 'nav/last-grey.png' : 'nav/first-grey.png', null, null, $graphicsdir);
         $pages_prev = Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png', null, null, $graphicsdir);
     } else {
-        $first_url = Util::addParameter($mailbox_imp_url, 'page', 1);
+        $first_url = Horde_Util::addParameter($mailbox_imp_url, 'page', 1);
         $pages_first = Horde::link($first_url, _("First Page")) . Horde::img($rtl ? 'nav/last.png' : 'nav/first.png', $rtl ? '>>' : '<<', null, $graphicsdir) . '</a>';
-        $prev_url = Util::addParameter($mailbox_imp_url, 'page', $pageOb['page'] - 1);
+        $prev_url = Horde_Util::addParameter($mailbox_imp_url, 'page', $pageOb['page'] - 1);
         $pages_prev = Horde::link($prev_url, _("Previous Page")) . Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<', null, $graphicsdir) . '</a>';
     }
 
@@ -305,9 +305,9 @@ if ($pageOb['pagecount']) {
         $pages_last = Horde::img($rtl ? 'nav/first-grey.png' : 'nav/last-grey.png', null, null, $graphicsdir);
         $pages_next = Horde::img($rtl ? 'nav/left-grey.png' : 'nav/right-grey.png', null, null, $graphicsdir);
     } else {
-        $next_url = Util::addParameter($mailbox_imp_url, 'page', $pageOb['page'] + 1);
+        $next_url = Horde_Util::addParameter($mailbox_imp_url, 'page', $pageOb['page'] + 1);
         $pages_next = Horde::link($next_url, _("Next Page")) . Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>', null, $graphicsdir) . '</a>';
-        $last_url = Util::addParameter($mailbox_imp_url, 'page', $pageOb['pagecount']);
+        $last_url = Horde_Util::addParameter($mailbox_imp_url, 'page', $pageOb['pagecount']);
         $pages_last = Horde::link($last_url, _("Last Page")) . Horde::img($rtl ? 'nav/first.png' : 'nav/last.png', $rtl ? '<<' : '>>', null, $graphicsdir) . '</a>';
     }
 }
@@ -336,13 +336,13 @@ if (!is_null($rss_box)) {
 
 /* If user wants the mailbox to be refreshed, set time here. */
 $refresh_time = $prefs->getValue('refresh_time');
-$refresh_url = Util::addParameter($mailbox_imp_url, 'page', $pageOb['page']);
+$refresh_url = Horde_Util::addParameter($mailbox_imp_url, 'page', $pageOb['page']);
 if (isset($filter_url)) {
-    $filter_url = Util::addParameter($filter_url, 'page', $pageOb['page']);
+    $filter_url = Horde_Util::addParameter($filter_url, 'page', $pageOb['page']);
 }
 
 /* Set the folder for the sort links. */
-$sort_url = Util::addParameter($mailbox_imp_url, 'sortdir', ($sortpref['dir']) ? 0 : 1);
+$sort_url = Horde_Util::addParameter($mailbox_imp_url, 'sortdir', ($sortpref['dir']) ? 0 : 1);
 
 /* Determine if we are showing previews. */
 $preview_tooltip = ($show_preview) ? $prefs->getValue('preview_show_tooltip') : false;
@@ -413,7 +413,7 @@ if (!empty($newmsgs)) {
      * the current mailbox. */
     $imp_imap->ob->openMailbox($imp_mbox['mailbox'], Horde_Imap_Client::OPEN_READWRITE);
 
-    if (!Util::getFormData('no_newmail_popup')) {
+    if (!Horde_Util::getFormData('no_newmail_popup')) {
         /* Newmail audio. */
         if (($sound = $prefs->getValue('nav_audio'))) {
             $notification->push($registry->getImageDir() . '/audio/' . $sound, 'audio');
@@ -444,9 +444,9 @@ if (isset($filter_url)) {
 $hdr_template->set('search', false);
 if ($_SESSION['imp']['protocol'] != 'pop') {
     if (!$search_mbox) {
-        $hdr_template->set('search', Horde::link(Util::addParameter(Horde::applicationUrl('search.php'), 'search_mailbox', $imp_mbox['mailbox']), sprintf(_("Search %s"), $rawtitle)) . Horde::img('search.png', _("Search")) . '</a>');
+        $hdr_template->set('search', Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_mailbox', $imp_mbox['mailbox']), sprintf(_("Search %s"), $rawtitle)) . Horde::img('search.png', _("Search")) . '</a>');
         if (!$readonly) {
-            $hdr_template->set('empty', Horde::link(Util::addParameter($mailbox_imp_url, array('actionID' => 'empty_mailbox', 'mailbox' => $imp_mbox['mailbox'], 'mailbox_token' => $mailbox_token)), _("Empty folder"), '', '', "ImpMailbox.confirmDialog(this.href, '" . addslashes(_("Are you sure you wish to delete all mail in this folder?")) . "'); return false;") . Horde::img('empty_spam.png', _("Empty folder")) . '</a>');
+            $hdr_template->set('empty', Horde::link(Horde_Util::addParameter($mailbox_imp_url, array('actionID' => 'empty_mailbox', 'mailbox' => $imp_mbox['mailbox'], 'mailbox_token' => $mailbox_token)), _("Empty folder"), '', '', "ImpMailbox.confirmDialog(this.href, '" . addslashes(_("Are you sure you wish to delete all mail in this folder?")) . "'); return false;") . Horde::img('empty_spam.png', _("Empty folder")) . '</a>');
         }
     } else {
         if ($imp_search->isEditableVFolder()) {
@@ -475,9 +475,9 @@ if (empty($pageOb['end'])) {
         /* Show 'Show Deleted' prompt if mailbox has no viewable message but
            has hidden, deleted messages. */
         $del_template = new IMP_Template();
-        $del_template->set('hide', Horde::widget(Util::addParameter($refresh_url, array('actionID' => 'hide_deleted', 'mailbox_token' => $mailbox_token)), $deleted_prompt, 'widget hideAction', '', '', $deleted_prompt));
+        $del_template->set('hide', Horde::widget(Horde_Util::addParameter($refresh_url, array('actionID' => 'hide_deleted', 'mailbox_token' => $mailbox_token)), $deleted_prompt, 'widget hideAction', '', '', $deleted_prompt));
         if (!$readonly) {
-            $del_template->set('purge', Horde::widget(Util::addParameter($refresh_url, array('actionID' => 'expunge_mailbox', 'mailbox_token' => $mailbox_token)), _("Purge Deleted"), 'widget purgeAction', '', '', _("Pur_ge Deleted")));
+            $del_template->set('purge', Horde::widget(Horde_Util::addParameter($refresh_url, array('actionID' => 'expunge_mailbox', 'mailbox_token' => $mailbox_token)), _("Purge Deleted"), 'widget purgeAction', '', '', _("Pur_ge Deleted")));
         }
         echo $del_template->fetch(IMP_TEMPLATES . '/mailbox/actions_deleted.html');
     }
@@ -499,7 +499,7 @@ if ($pageOb['msgcount']) {
     $n_template = new IMP_Template();
     $n_template->setOption('gettext', true);
     $n_template->set('id', 1);
-    $n_template->set('sessiontag', Util::formInput());
+    $n_template->set('sessiontag', Horde_Util::formInput());
     $n_template->set('use_folders', $conf['user']['allow_folders']);
     $n_template->set('readonly', $readonly);
     $n_template->set('use_pop', $_SESSION['imp']['protocol'] == 'pop');
@@ -525,7 +525,7 @@ if ($pageOb['msgcount']) {
         $n_template->set('pages_next', $pages_next);
         $n_template->set('pages_last', $pages_last);
         $n_template->set('page_val', htmlspecialchars($pageOb['page']));
-        $n_template->set('page_size', String::length($pageOb['pagecount']));
+        $n_template->set('page_size', Horde_String::length($pageOb['pagecount']));
     }
 
     echo $n_template->fetch(IMP_TEMPLATES . '/mailbox/navbar.html');
@@ -544,11 +544,11 @@ if ($pageOb['msgcount']) {
     }
 
     if ($showdelete['purge']) {
-        $mailbox_link = Util::addParameter($mailbox_imp_url, 'page', $pageOb['page']);
+        $mailbox_link = Horde_Util::addParameter($mailbox_imp_url, 'page', $pageOb['page']);
         if (isset($deleted_prompt)) {
-            $a_template->set('hide_deleted', Horde::widget(Util::addParameter($mailbox_link, array('actionID' => 'hide_deleted', 'mailbox_token' => $mailbox_token)), $deleted_prompt, 'widget hideAction', '', '', $deleted_prompt));
+            $a_template->set('hide_deleted', Horde::widget(Horde_Util::addParameter($mailbox_link, array('actionID' => 'hide_deleted', 'mailbox_token' => $mailbox_token)), $deleted_prompt, 'widget hideAction', '', '', $deleted_prompt));
         }
-        $a_template->set('purge_deleted', Horde::widget(Util::addParameter($mailbox_link, array('actionID' => 'expunge_mailbox', 'mailbox_token' => $mailbox_token)), _("Purge Deleted"), 'widget purgeAction', '', '', _("Pur_ge Deleted")));
+        $a_template->set('purge_deleted', Horde::widget(Horde_Util::addParameter($mailbox_link, array('actionID' => 'expunge_mailbox', 'mailbox_token' => $mailbox_token)), _("Purge Deleted"), 'widget purgeAction', '', '', _("Pur_ge Deleted")));
     }
 
     if ($registry->hasMethod('mail/blacklistFrom')) {
@@ -653,7 +653,7 @@ if ($pageOb['msgcount']) {
             $extra = Horde_Imap_Client::SORT_SUBJECT;
             $standard = Horde_Imap_Client::SORT_THREAD;
         }
-        $headers[$standard]['extra'] = '&nbsp;<span style="font-size:95%">[' . Horde::widget(Util::addParameter($mailbox_imp_url, array('sortby' => $extra, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $headers[$extra]['stext'], 'widget" style="font-size:95%; font-weight:normal;', null, 'if (window.event) window.event.cancelBubble = true; else if (event) event.stopPropagation();', $headers[$extra]['text']) . ']</span>';
+        $headers[$standard]['extra'] = '&nbsp;<span style="font-size:95%">[' . Horde::widget(Horde_Util::addParameter($mailbox_imp_url, array('sortby' => $extra, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $headers[$extra]['stext'], 'widget" style="font-size:95%; font-weight:normal;', null, 'if (window.event) window.event.cancelBubble = true; else if (event) event.stopPropagation();', $headers[$extra]['text']) . ']</span>';
         unset($headers[$extra]);
     }
 
@@ -661,15 +661,15 @@ if ($pageOb['msgcount']) {
         $ptr = &$headers[$key];
         $ptr['class'] = ($sortpref['by'] == $key) ? 'selected' : 'item';
         if ($sortpref['by'] == $key) {
-            $ptr['change_sort_link'] = Horde::link(Util::addParameter($sort_url, array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText, '', $graphicsdir) . '</a>';
+            $ptr['change_sort_link'] = Horde::link(Horde_Util::addParameter($sort_url, array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], null, null, null, $val['stext']) . Horde::img($sortImg, $sortText, '', $graphicsdir) . '</a>';
         } else {
             $ptr['change_sort_link'] = null;
         }
         if ($sortpref['limit']) {
             $ptr['sortlimit_text'] = Horde::stripAccessKey($val['text']);
         } else {
-            $ptr['change_sort'] = addslashes(Util::addParameter(($sortpref['by'] == $key) ? $sort_url : $mailbox_imp_url, array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)));
-            $ptr['change_sort_widget'] = Horde::widget(Util::addParameter(($sortpref['by'] == $key) ? $sort_url : $mailbox_imp_url, array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], 'widget', null, null, $val['text']);
+            $ptr['change_sort'] = addslashes(Horde_Util::addParameter(($sortpref['by'] == $key) ? $sort_url : $mailbox_imp_url, array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)));
+            $ptr['change_sort_widget'] = Horde::widget(Horde_Util::addParameter(($sortpref['by'] == $key) ? $sort_url : $mailbox_imp_url, array('sortby' => $key, 'actionID' => 'change_sort', 'mailbox_token' => $mailbox_token)), $val['stext'], 'widget', null, null, $val['text']);
             if (!isset($val['extra'])) {
                 $ptr['extra'] = null;
             }
@@ -684,7 +684,7 @@ if ($pageOb['msgcount']) {
     $mh_template->set('mailbox_url', $mailbox_url);
     $mh_template->set('mailbox', htmlspecialchars($imp_mbox['mailbox']));
     $mh_template->set('mailbox_token', $mailbox_token);
-    $mh_template->set('sessiontag', Util::formInput());
+    $mh_template->set('sessiontag', Horde_Util::formInput());
     $mh_template->set('sortlimit', $sortpref['limit']);
     $mh_template->set('headers', $headers);
 
@@ -708,7 +708,7 @@ while (list(,$ob) = each($mbox_info['overview'])) {
                 _outputSummaries($msgs, $lastMbox);
                 $msgs = array();
             }
-            $folder_link = Horde::url(Util::addParameter('mailbox.php', 'mailbox', $ob['mailbox']));
+            $folder_link = Horde::url(Horde_Util::addParameter('mailbox.php', 'mailbox', $ob['mailbox']));
             $folder_link = Horde::link($folder_link, sprintf(_("View messages in %s"), IMP::displayFolder($ob['mailbox'])), 'smallheader') . IMP::displayFolder($ob['mailbox']) . '</a>';
             if (is_null($search_template)) {
                 $search_template = new IMP_Template();
@@ -804,8 +804,8 @@ while (list(,$ob) = each($mbox_info['overview'])) {
             }
 
             $maxlen = $prefs->getValue('preview_maxlen');
-            if (String::length($ptext) > $maxlen) {
-                $ptext = String::substr($ptext, 0, $maxlen) . ' ...';
+            if (Horde_String::length($ptext) > $maxlen) {
+                $ptext = Horde_String::substr($ptext, 0, $maxlen) . ' ...';
             } elseif (empty($ob['previewcut'])) {
                 $ptext .= '[[' . _("END") . ']]';
             }
@@ -841,8 +841,8 @@ while (list(,$ob) = each($mbox_info['overview'])) {
     /* Add subject flags. */
     foreach ($subject_flags as $val) {
         $flag_label = $val['label'];
-        if (String::length($val['label']) > 12) {
-            $flag_label = String::substr($val['label'], 0, 10) . '...';
+        if (Horde_String::length($val['label']) > 12) {
+            $flag_label = Horde_String::substr($val['label'], 0, 10) . '...';
         }
 
         $msg['subject'] = '<span class="' . $val['classname'] . '" style="background:' . htmlspecialchars($val['bg']) . '" title="' . htmlspecialchars($val['label']) . '">' . htmlspecialchars($flag_label) . '</span>' . $msg['subject'];
index 9394b76..9d2e126 100644 (file)
@@ -12,8 +12,8 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$folder = Util::getFormData('folder');
-$index = Util::getFormData('uid');
+$folder = Horde_Util::getFormData('folder');
+$index = Horde_Util::getFormData('uid');
 if (!$index || !$folder) {
     exit;
 }
index de51658..b7e020e 100644 (file)
@@ -23,7 +23,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 /* Make sure we have a valid index. */
 $imp_mailbox = &IMP_Mailbox::singleton($imp_mbox['mailbox'], $imp_mbox['index']);
 if (!$imp_mailbox->isValidIndex()) {
-    header('Location: ' . Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']), array('a' => 'm'), null, false));
+    header('Location: ' . Horde_Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']), array('a' => 'm'), null, false));
     exit;
 }
 
@@ -37,7 +37,7 @@ $readonly = $imp_imap->isReadOnly($imp_mbox['mailbox']);
 NLS::setTimeZone();
 
 /* Run through action handlers */
-$actionID = Util::getFormData('a');
+$actionID = Horde_Util::getFormData('a');
 switch ($actionID) {
 // 'd' = delete message
 // 'u' = undelete message
@@ -55,10 +55,10 @@ case 'u':
         $imp_message->undelete($indices_array);
     } else {
         try {
-            IMP::checkRequestToken('imp.message-mimp', Util::getFormData('mt'));
+            IMP::checkRequestToken('imp.message-mimp', Horde_Util::getFormData('mt'));
             $imp_message->delete($indices_array);
             if ($prefs->getValue('mailbox_return')) {
-                header('Location: ' . Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']), array('s' => $imp_mailbox->getMessageIndex()), null, false));
+                header('Location: ' . Horde_Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']), array('s' => $imp_mailbox->getMessageIndex()), null, false));
                 exit;
             }
             if (($_SESSION['imp']['protocol'] != 'pop') &&
@@ -80,7 +80,7 @@ case 'u':
  * message array, so we will return to mailbox.php if that is the
  * case. */
 if (!$imp_mailbox->isValidIndex()) {
-    header('Location: ' . Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']), array('s' => $imp_mailbox->getMessageIndex()), null, false));
+    header('Location: ' . Horde_Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']), array('s' => $imp_mailbox->getMessageIndex()), null, false));
     exit;
 }
 
@@ -102,7 +102,7 @@ try {
         Horde_Imap_Client::FETCH_HEADERTEXT => array(array('parse' => true, 'peek' => $readonly))
     ), array('ids' => array($index)));
 } catch (Horde_Imap_Client_Exception $e) {
-    header('Location: ' . Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $mailbox_name), array('a' => 'm'), null, false));
+    header('Location: ' . Horde_Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $mailbox_name), array('a' => 'm'), null, false));
     exit;
 }
 
@@ -115,7 +115,7 @@ $use_pop = ($_SESSION['imp']['protocol'] == 'pop');
 try {
     $imp_contents = &IMP_Contents::singleton($index . IMP::IDX_SEP . $mailbox_name);
 } catch (Horde_Exception $e) {
-    header('Location: ' . Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $mailbox_name), array('a' => 'm'), null, false));
+    header('Location: ' . Horde_Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $mailbox_name), array('a' => 'm'), null, false));
     exit;
 }
 
@@ -124,11 +124,11 @@ $msgindex = $imp_mailbox->getMessageIndex();
 $msgcount = $imp_mailbox->getMessageCount();
 
 /* Generate the mailbox link. */
-$mailbox_link = Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']), array('s' => $msgindex));
+$mailbox_link = Horde_Util::addParameter(IMP::generateIMPUrl('mailbox-mimp.php', $imp_mbox['mailbox']), array('s' => $msgindex));
 $self_link = IMP::generateIMPUrl('message-mimp.php', $imp_mbox['mailbox'], $index, $mailbox_name);
 
 /* Output download confirmation screen. */
-$atc_id = Util::getFormData('atc');
+$atc_id = Horde_Util::getFormData('atc');
 if (($actionID == 'c') && !is_null($atc_id)) {
     $summary = $imp_contents->getSummary($atc_id, IMP_Contents::SUMMARY_SIZE | IMP_Contents::SUMMARY_DESCRIP_NOLINK_NOHTMLSPECCHARS | IMP_Contents::SUMMARY_DOWNLOAD_NOJS);
 
@@ -183,8 +183,8 @@ if (($subject = $mime_headers->getValue('subject'))) {
     $subject = IMP::filterText($subject);
 
     /* Generate the shortened subject text. */
-    if (String::length($subject) > $conf['mimp']['mailbox']['max_subj_chars']) {
-        $subject = String::substr($subject, 0, $conf['mimp']['mailbox']['max_subj_chars']) . '...';
+    if (Horde_String::length($subject) > $conf['mimp']['mailbox']['max_subj_chars']) {
+        $subject = Horde_String::substr($subject, 0, $conf['mimp']['mailbox']['max_subj_chars']) . '...';
     }
 } else {
     $subject = _("[No Subject]");
@@ -225,8 +225,8 @@ foreach ($flag_parse as $val) {
     if (isset($val['abbrev'])) {
         $status .= $val['abbrev'];
     } elseif ($val['type'] == 'imapp') {
-        if (String::length($val['label']) > 8) {
-            $status .= ' *' . String::substr($val['label'], 0, 5) . '...*';
+        if (Horde_String::length($val['label']) > 8) {
+            $status .= ' *' . Horde_String::substr($val['label'], 0, 5) . '...*';
         } else {
             $status .= ' *' . $val['label'] . '*';
         }
@@ -286,9 +286,9 @@ foreach ($parts_list as $mime_id => $mime_type) {
 }
 
 /* Display the first 250 characters, or display the entire message? */
-if ($prefs->getValue('mimp_preview_msg') && !Util::getFormData('fullmsg')) {
-    $msg_text = String::substr($msg_text, 0, 250) . " [...]\n";
-    $fullmsg_link = new Horde_Mobile_link(_("View Full Message"), Util::addParameter($self_link, array('fullmsg' => 1)));
+if ($prefs->getValue('mimp_preview_msg') && !Horde_Util::getFormData('fullmsg')) {
+    $msg_text = Horde_String::substr($msg_text, 0, 250) . " [...]\n";
+    $fullmsg_link = new Horde_Mobile_link(_("View Full Message"), Horde_Util::addParameter($self_link, array('fullmsg' => 1)));
 } else {
     $fullmsg_link = null;
 }
@@ -299,9 +299,9 @@ $mset = &$menu->add(new Horde_Mobile_linkset());
 
 if (!$readonly) {
     if (in_array('\\deleted', $flags)) {
-        $mset->add(new Horde_Mobile_link(_("Undelete"), Util::addParameter($self_link, array('a' => 'u'))));
+        $mset->add(new Horde_Mobile_link(_("Undelete"), Horde_Util::addParameter($self_link, array('a' => 'u'))));
     } else {
-        $mset->add(new Horde_Mobile_link(_("Delete"), Util::addParameter($self_link, array('a' => 'd', 'mt' => IMP::getRequestToken('imp.message-mimp')))));
+        $mset->add(new Horde_Mobile_link(_("Delete"), Horde_Util::addParameter($self_link, array('a' => 'd', 'mt' => IMP::getRequestToken('imp.message-mimp')))));
     }
 }
 
@@ -354,20 +354,20 @@ $notification->notify(array('listeners' => 'status'));
 $null = null;
 $hb = &$c->add(new Horde_Mobile_block($null));
 
-$allto_param = Util::getFormData('allto');
+$allto_param = Horde_Util::getFormData('allto');
 
 foreach ($display_headers as $head => $val) {
     $all_to = false;
     $hb->add(new Horde_Mobile_text($basic_headers[$head] . ': ', array('b')));
-    if ((String::lower($head) == 'to') &&
+    if ((Horde_String::lower($head) == 'to') &&
         !$allto_param &&
         (($pos = strpos($val, ',')) !== false)) {
-        $val = String::substr($val, 0, strpos($val, ','));
+        $val = Horded_String::substr($val, 0, strpos($val, ','));
         $all_to = true;
     }
     $t = &$hb->add(new Horde_Mobile_text($val . (($all_to) ? ' ' : "\n")));
     if ($all_to) {
-        $hb->add(new Horde_Mobile_link('[' . _("Show All") . ']', Util::addParameter($self_link, array('allto' => 1))));
+        $hb->add(new Horde_Mobile_link('[' . _("Show All") . ']', Horde_Util::addParameter($self_link, array('allto' => 1))));
         $t = &$hb->add(new Horde_Mobile_text("\n"));
     }
     $t->set('linebreaks', true);
@@ -379,7 +379,7 @@ foreach ($atc_parts as $key) {
     if (empty($summary['download'])) {
         $hb->add(new Horde_Mobile_text($summary['description']));
     } else {
-        $hb->add(new Horde_Mobile_link($summary['description'], Util::addParameter($self_link, array('a' => 'c', 'atc' => $key))));
+        $hb->add(new Horde_Mobile_link($summary['description'], Horde_Util::addParameter($self_link, array('a' => 'c', 'atc' => $key))));
     }
     $t = &$hb->add(new Horde_Mobile_text(sprintf(' [%s] %s', $summary['type'], $summary['size']) . "\n"));
     $t->set('linebreaks', true);
index 87a6d3f..a968515 100644 (file)
@@ -54,10 +54,10 @@ require_once 'Horde/Identity.php';
 $user_identity = &Identity::singleton(array('imp', 'imp'));
 
 /* Run through action handlers. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 if ($actionID && ($actionID != 'print_message')) {
     try {
-        IMP::checkRequestToken('imp.message', Util::getFormData('message_token'));
+        IMP::checkRequestToken('imp.message', Horde_Util::getFormData('message_token'));
     } catch (Horde_Exception $e) {
         $notification->push($e);
         $actionID = null;
@@ -111,8 +111,8 @@ case 'undelete_message':
 
 case 'move_message':
 case 'copy_message':
-    if (($targetMbox = Util::getFormData('targetMbox')) !== null) {
-        if (Util::getFormData('newMbox', 0) == 1) {
+    if (($targetMbox = Horde_Util::getFormData('targetMbox')) !== null) {
+        if (Horde_Util::getFormData('newMbox', 0) == 1) {
             $targetMbox = IMP::folderPref($targetMbox, true);
             $newMbox = true;
         } else {
@@ -145,7 +145,7 @@ case 'notspam_report':
     break;
 
 case 'flag_message':
-    $flag = Util::getFormData('flag');
+    $flag = Horde_Util::getFormData('flag');
     if ($flag && !empty($indices_array)) {
         $peek = $set = true;
         if ($flag[0] == '0') {
@@ -163,7 +163,7 @@ case 'flag_message':
 
 case 'add_address':
     try {
-        $contact_link = IMP::addAddress(Util::getFormData('address'), Util::getFormData('name'));
+        $contact_link = IMP::addAddress(Horde_Util::getFormData('address'), Horde_Util::getFormData('name'));
         $notification->push(sprintf(_("Entry \"%s\" was successfully added to the address book"), $contact_link), 'horde.success', array('content.raw'));
     } catch (Horde_Exception $e) {
         $notification->push($e, 'horde.error');
@@ -173,7 +173,7 @@ case 'add_address':
 case 'strip_all':
 case 'strip_attachment':
     try {
-        $imp_message->stripPart($indices_array, ($actionID == 'strip_all') ? null : Util::getFormData('imapid'));
+        $imp_message->stripPart($indices_array, ($actionID == 'strip_all') ? null : Horde_Util::getFormData('imapid'));
     } catch (Horde_Exception $e) {
         $notification->push($e, 'horde.error');
     }
@@ -234,7 +234,7 @@ $page_label = IMP::getLabel($imp_mbox['mailbox']);
 /* Generate the link to ourselves. */
 $msgindex = $imp_mailbox->getMessageIndex();
 $message_url = Horde::applicationUrl('message.php');
-$self_link = Util::addParameter(IMP::generateIMPUrl('message.php', $imp_mbox['mailbox'], $index, $mailbox_name), array('start' => $msgindex, 'message_token' => $message_token));
+$self_link = Horde_Util::addParameter(IMP::generateIMPUrl('message.php', $imp_mbox['mailbox'], $index, $mailbox_name), array('start' => $msgindex, 'message_token' => $message_token));
 
 /* Create the IMP_UI_Message:: object. */
 $imp_ui = new IMP_UI_Message();
@@ -320,8 +320,8 @@ if (!empty($reply_to) &&
 }
 
 /* Determine if all/list/user-requested headers needed. */
-$all_headers = Util::getFormData('show_all_headers');
-$list_headers = Util::getFormData('show_list_headers');
+$all_headers = Horde_Util::getFormData('show_all_headers');
+$list_headers = Horde_Util::getFormData('show_list_headers');
 $user_hdrs = $imp_ui->getUserHeaders();
 
 /* Check for the presence of mailing list information. */
@@ -363,10 +363,10 @@ ksort($full_headers);
 /* For the self URL link, we can't trust the index in the query string as it
  * may have changed if we deleted/copied/moved messages. We may need other
  * stuff in the query string, so we need to do an add/remove of 'index'. */
-$selfURL = Util::removeParameter(Horde::selfUrl(true), array('index', 'actionID', 'mailbox', 'thismailbox'));
+$selfURL = Horde_Util::removeParameter(Horde::selfUrl(true), array('index', 'actionID', 'mailbox', 'thismailbox'));
 $selfURL = IMP::generateIMPUrl($selfURL, $imp_mbox['mailbox'], $index, $mailbox_name);
-IMP::$newUrl = $selfURL = html_entity_decode(Util::addParameter($selfURL, 'message_token', $message_token));
-$headersURL = htmlspecialchars(Util::removeParameter($selfURL, array('show_all_headers', 'show_list_headers')));
+IMP::$newUrl = $selfURL = html_entity_decode(Horde_Util::addParameter($selfURL, 'message_token', $message_token));
+$headersURL = htmlspecialchars(Horde_Util::removeParameter($selfURL, array('show_all_headers', 'show_list_headers')));
 
 /* Generate previous/next links. */
 $prev_msg = $imp_mailbox->getIMAPIndex(-1);
@@ -379,7 +379,7 @@ if ($next_msg) {
 }
 
 /* Generate the mailbox link. */
-$mailbox_url = Util::addParameter(IMP::generateIMPUrl('mailbox.php', $imp_mbox['mailbox']), 'start', $msgindex);
+$mailbox_url = Horde_Util::addParameter(IMP::generateIMPUrl('mailbox.php', $imp_mbox['mailbox']), 'start', $msgindex);
 
 /* Generate the view link. */
 $view_link = IMP::generateIMPUrl('view.php', $imp_mbox['mailbox'], $index, $mailbox_name);
@@ -417,13 +417,13 @@ if (!IMP::$printMode) {
     $h_page_label = htmlspecialchars($page_label);
     $header_label = $h_page_label;
     if ($imp_search->isSearchMbox($imp_mbox['mailbox'])) {
-        $header_label .= ' [' . Horde::link(Util::addParameter(Horde::applicationUrl('mailbox.php'), 'mailbox', $mailbox_name)) . IMP::displayFolder($mailbox_name) . '</a>]';
+        $header_label .= ' [' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('mailbox.php'), 'mailbox', $mailbox_name)) . IMP::displayFolder($mailbox_name) . '</a>]';
     }
 
     /* Prepare the navbar top template. */
     $t_template = new IMP_Template();
     $t_template->set('message_url', $message_url);
-    $t_template->set('form_input', Util::formInput());
+    $t_template->set('form_input', Horde_Util::formInput());
     $t_template->set('mailbox', htmlspecialchars($imp_mbox['mailbox']));
     $t_template->set('thismailbox', htmlspecialchars($mailbox_name));
     $t_template->set('start', htmlspecialchars($msgindex));
@@ -457,14 +457,14 @@ if (!IMP::$printMode) {
     $n_template->set('back_to', Horde::widget($mailbox_url, sprintf(_("Back to %s"), $h_page_label), 'widget', '', '', sprintf(_("Bac_k to %s"), $h_page_label), true));
 
     $rtl = !empty($nls['rtl'][$language]);
-    if (Util::nonInputVar('prev_url')) {
+    if (Horde_Util::nonInputVar('prev_url')) {
         $n_template->set('prev', Horde::link($prev_url, _("Previous Message")));
         $n_template->set('prev_img', Horde::img($rtl ? 'nav/right.png' : 'nav/left.png', $rtl ? '>' : '<', '', $registry->getImageDir('horde')));
     } else {
         $n_template->set('prev_img', Horde::img($rtl ? 'nav/right-grey.png' : 'nav/left-grey.png', '', '', $registry->getImageDir('horde')));
     }
 
-    if (Util::nonInputVar('next_url')) {
+    if (Horde_Util::nonInputVar('next_url')) {
         $n_template->set('next', Horde::link($next_url, _("Next Message")));
         $n_template->set('next_img', Horde::img($rtl ? 'nav/left.png' : 'nav/right.png', $rtl ? '<' : '>', '', $registry->getImageDir('horde')));
     } else {
@@ -482,9 +482,9 @@ if (!IMP::$printMode) {
 
     if (!$readonly) {
         if (in_array('\\deleted', $flags)) {
-            $a_template->set('delete', Horde::widget(Util::addParameter($self_link, 'actionID', 'undelete_message'), _("Undelete"), 'widget', '', '', _("Undelete"), true));
+            $a_template->set('delete', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'undelete_message'), _("Undelete"), 'widget', '', '', _("Undelete"), true));
         } else {
-            $a_template->set('delete', Horde::widget(Util::addParameter($self_link, 'actionID', 'delete_message'), _("Delete"), 'widget', '', ($use_pop) ? "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete these messages?")) . "');" : '', _("_Delete"), true));
+            $a_template->set('delete', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'delete_message'), _("Delete"), 'widget', '', ($use_pop) ? "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete these messages?")) . "');" : '', _("_Delete"), true));
         }
     }
 
@@ -509,15 +509,15 @@ if (!IMP::$printMode) {
     }
 
     if (IMP::threadSortAvailable($imp_mbox['mailbox'])) {
-        $a_template->set('show_thread', Horde::widget(Util::addParameter(IMP::generateIMPUrl('thread.php', $imp_mbox['mailbox'], $index, $mailbox_name), array('start' => $msgindex)), _("View Thread"), 'widget', '', '', _("_View Thread"), true));
+        $a_template->set('show_thread', Horde::widget(Horde_Util::addParameter(IMP::generateIMPUrl('thread.php', $imp_mbox['mailbox'], $index, $mailbox_name), array('start' => $msgindex)), _("View Thread"), 'widget', '', '', _("_View Thread"), true));
     }
 
     if ($registry->hasMethod('mail/blacklistFrom')) {
-        $a_template->set('blacklist', Horde::widget(Util::addParameter($self_link, 'actionID', 'blacklist'), _("Blacklist"), 'widget', '', '', _("_Blacklist"), true));
+        $a_template->set('blacklist', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'blacklist'), _("Blacklist"), 'widget', '', '', _("_Blacklist"), true));
     }
 
     if ($registry->hasMethod('mail/whitelistFrom')) {
-        $a_template->set('whitelist', Horde::widget(Util::addParameter($self_link, 'actionID', 'whitelist'), _("Whitelist"), 'widget', '', '', _("_Whitelist"), true));
+        $a_template->set('whitelist', Horde::widget(Horde_Util::addParameter($self_link, 'actionID', 'whitelist'), _("Whitelist"), 'widget', '', '', _("_Whitelist"), true));
     }
 
     if (!empty($conf['user']['allow_view_source'])) {
@@ -536,7 +536,7 @@ if (!IMP::$printMode) {
     $a_template->set('save_as', Horde::widget(Horde::downloadUrl($subject, array_merge(array('actionID' => 'save_message'), $imp_params)), _("Save as"), 'widget', '', '', _("Sa_ve as"), 2));
 
     $print_params = array_merge(array('actionID' => 'print_message'), $imp_params);
-    $a_template->set('print', Horde::widget(Util::addParameter(IMP::generateIMPUrl('message.php', $imp_mbox['mailbox']), $print_params), _("Print"), 'widget', '_blank', IMP::popupIMPString('message.php', $print_params) . 'return false;', _("_Print"), true));
+    $a_template->set('print', Horde::widget(Horde_Util::addParameter(IMP::generateIMPUrl('message.php', $imp_mbox['mailbox']), $print_params), _("Print"), 'widget', '_blank', IMP::popupIMPString('message.php', $print_params) . 'return false;', _("_Print"), true));
 
     if ($conf['spam']['reporting'] &&
         ($conf['spam']['spamfolder'] ||
@@ -557,10 +557,10 @@ if (!IMP::$printMode) {
         $a_template->set('common_headers', Horde::widget($headersURL, _("Show Common Headers"), 'widget', '', '', _("Show Common Headers"), true));
     }
     if (!$all_headers) {
-        $a_template->set('all_headers', Horde::widget(Util::addParameter($headersURL, 'show_all_headers', 1), _("Show All Headers"), 'widget', '', '', _("Show All Headers"), true));
+        $a_template->set('all_headers', Horde::widget(Horde_Util::addParameter($headersURL, 'show_all_headers', 1), _("Show All Headers"), 'widget', '', '', _("Show All Headers"), true));
     }
     if ($list_info['exists'] && !$list_headers) {
-        $a_template->set('list_headers', Horde::widget(Util::addParameter($headersURL, 'show_list_headers', 1), _("Show Mailing List Information"), 'widget', '', '', _("Show Mailing List Information"), true));
+        $a_template->set('list_headers', Horde::widget(Horde_Util::addParameter($headersURL, 'show_list_headers', 1), _("Show Mailing List Information"), 'widget', '', '', _("Show Mailing List Information"), true));
     }
 }
 
@@ -594,11 +594,11 @@ $msgtext = '';
 
 /* Do MDN processing now. */
 if (!IMP::$printMode &&
-    $imp_ui->MDNCheck($imp_mbox['mailbox'], $index, $mime_headers, Util::getFormData('mdn_confirm'))) {
-    $msgtext .= $imp_ui->formatStatusMsg(array('text' => array(_("The sender of this message is requesting a Message Disposition Notification from you when you have read this message."), sprintf(_("Click %s to send the notification message."), Horde::link(htmlspecialchars(Util::addParameter($selfURL, 'mdn_confirm', 1))) . _("HERE") . '</a>'))));
+    $imp_ui->MDNCheck($imp_mbox['mailbox'], $index, $mime_headers, Horde_Util::getFormData('mdn_confirm'))) {
+    $msgtext .= $imp_ui->formatStatusMsg(array('text' => array(_("The sender of this message is requesting a Message Disposition Notification from you when you have read this message."), sprintf(_("Click %s to send the notification message."), Horde::link(htmlspecialchars(Horde_Util::addParameter($selfURL, 'mdn_confirm', 1))) . _("HERE") . '</a>'))));
 }
 
-$show_parts = Util::getFormData('show_parts', $prefs->getValue('parts_display'));
+$show_parts = Horde_Util::getFormData('show_parts', $prefs->getValue('parts_display'));
 if ($show_parts == 'all') {
     $atc_parts = array_keys($parts_list);
 }
@@ -676,15 +676,15 @@ if (!strlen($msgtext)) {
 if (!IMP::$printMode) {
     $a_template->set('atc', Horde::widget('#', _("Attachments"), 'widget hasmenu', '', '', _("Attachments"), true));
     if ($show_parts != 'all') {
-        $a_template->set('show_parts_all', Horde::widget(Util::addParameter($headersURL, array('show_parts' => 'all')), _("Show All Message Parts"), 'widget', '', '', _("Show All Message Parts"), true));
+        $a_template->set('show_parts_all', Horde::widget(Horde_Util::addParameter($headersURL, array('show_parts' => 'all')), _("Show All Message Parts"), 'widget', '', '', _("Show All Message Parts"), true));
     }
     if ($show_parts != 'atc') {
-        $a_template->set('show_parts_atc', Horde::widget(Util::addParameter($headersURL, array('show_parts' => 'atc')), _("Show Attachments Only"), 'widget', '', '', _("Show Attachments Only"), true));
+        $a_template->set('show_parts_atc', Horde::widget(Horde_Util::addParameter($headersURL, array('show_parts' => 'atc')), _("Show Attachments Only"), 'widget', '', '', _("Show Attachments Only"), true));
     }
     if (count($display_ids) > 2) {
         $a_template->set('download_all', Horde::widget($imp_contents->urlView($imp_contents->getMIMEMessage(), 'download_all'), _("Download All Attachments (in .zip file)"), 'widget', '', '', _("Download All Attachments (in .zip file)"), true));
         if ($strip_atc) {
-            $a_template->set('strip_all', Horde::widget(htmlspecialchars(html_entity_decode(Util::addParameter(Util::removeParameter(Horde::selfUrl(true), array('actionID')), array('actionID' => 'strip_all', 'message_token' => $message_token)))), _("Strip All Attachments"), 'widget', '', "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete all attachments?")) . "');", _("Strip All Attachments"), true));
+            $a_template->set('strip_all', Horde::widget(htmlspecialchars(html_entity_decode(Horde_Util::addParameter(Horde_Util::removeParameter(Horde::selfUrl(true), array('actionID')), array('actionID' => 'strip_all', 'message_token' => $message_token)))), _("Strip All Attachments"), 'widget', '', "return window.confirm('" . addslashes(_("Are you sure you wish to PERMANENTLY delete all attachments?")) . "');", _("Strip All Attachments"), true));
         }
     }
 }
index a2ce671..30f35dc 100644 (file)
@@ -30,9 +30,9 @@ function _importKeyDialog($target)
     $t->setOption('gettext', true);
     $t->set('selfurl', Horde::applicationUrl('pgp.php'));
     $t->set('broken_mp_form', $GLOBALS['browser']->hasQuirk('broken_multipart_form'));
-    $t->set('reload', htmlspecialchars(Util::getFormData('reload')));
+    $t->set('reload', htmlspecialchars(Horde_Util::getFormData('reload')));
     $t->set('target', $target);
-    $t->set('forminput', Util::formInput());
+    $t->set('forminput', Horde_Util::formInput());
     $t->set('import_public_key', $target == 'process_import_public_key');
     $t->set('import_personal_public_key', $target == 'process_import_personal_public_key');
     $t->set('import_personal_private_key', $target == 'process_import_personal_private_key');
@@ -41,7 +41,7 @@ function _importKeyDialog($target)
 
 function _getImportKey()
 {
-    $key = Util::getFormData('import_key');
+    $key = Horde_Util::getFormData('import_key');
     if (!empty($key)) {
         return $key;
     }
@@ -64,9 +64,9 @@ function _textWindowOutput($filename, $msg)
 function _reloadWindow()
 {
     $cacheSess = &Horde_SessionObjects::singleton();
-    $reload = Util::getFormData('reload');
+    $reload = Horde_Util::getFormData('reload');
     $cacheSess->setPruneFlag($reload, true);
-    Util::closeWindowJS('opener.focus();opener.location.href="' . $cacheSess->query($reload) . '";');
+    Horde_Util::closeWindowJS('opener.focus();opener.location.href="' . $cacheSess->query($reload) . '";');
 }
 
 require_once dirname(__FILE__) . '/lib/base.php';
@@ -80,17 +80,17 @@ try {
 $secure_check = Horde::isConnectionSecure();
 
 /* Run through the action handlers */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'generate_key':
     /* Check that fields are filled out (except for Comment) and that the
        passphrases match. */
-    $realname = Util::getFormData('generate_realname');
-    $email = Util::getFormData('generate_email');
-    $comment = Util::getFormData('generate_comment');
-    $keylength = Util::getFormData('generate_keylength');
-    $passphrase1 = Util::getFormData('generate_passphrase1');
-    $passphrase2 = Util::getFormData('generate_passphrase2');
+    $realname = Horde_Util::getFormData('generate_realname');
+    $email = Horde_Util::getFormData('generate_email');
+    $comment = Horde_Util::getFormData('generate_comment');
+    $keylength = Horde_Util::getFormData('generate_keylength');
+    $passphrase1 = Horde_Util::getFormData('generate_passphrase1');
+    $passphrase2 = Horde_Util::getFormData('generate_passphrase2');
 
     if (empty($realname) || empty($email)) {
         $notification->push(_("Name and/or email cannot be empty"), 'horde.error');
@@ -212,7 +212,7 @@ case 'process_import_personal_private_key':
 case 'view_public_key':
 case 'info_public_key':
     try {
-        $key = $imp_pgp->getPublicKey(Util::getFormData('email'), array('noserver' => true));
+        $key = $imp_pgp->getPublicKey(Horde_Util::getFormData('email'), array('noserver' => true));
     } catch (Horde_Exception $e) {
         $key = $e->getMessage();
     }
@@ -241,29 +241,29 @@ case 'info_personal_private_key':
 
 case 'delete_public_key':
     try {
-        $imp_pgp->deletePublicKey(Util::getFormData('email'));
-        $notification->push(sprintf(_("PGP Public Key for \"%s\" was successfully deleted."), Util::getFormData('email')), 'horde.success');
+        $imp_pgp->deletePublicKey(Horde_Util::getFormData('email'));
+        $notification->push(sprintf(_("PGP Public Key for \"%s\" was successfully deleted."), Horde_Util::getFormData('email')), 'horde.success');
     } catch (Horde_Exception $e) {
         $notification->push($e);
     }
     break;
 
 case 'save_options':
-    $prefs->setValue('use_pgp', Util::getFormData('use_pgp') ? 1 : 0);
-    $prefs->setValue('pgp_attach_pubkey', Util::getFormData('pgp_attach_pubkey') ? 1 : 0);
-    $prefs->setValue('pgp_scan_body', Util::getFormData('pgp_scan_body') ? 1 : 0);
-    $prefs->setValue('pgp_verify', Util::getFormData('pgp_verify') ? 1 : 0);
+    $prefs->setValue('use_pgp', Horde_Util::getFormData('use_pgp') ? 1 : 0);
+    $prefs->setValue('pgp_attach_pubkey', Horde_Util::getFormData('pgp_attach_pubkey') ? 1 : 0);
+    $prefs->setValue('pgp_scan_body', Horde_Util::getFormData('pgp_scan_body') ? 1 : 0);
+    $prefs->setValue('pgp_verify', Horde_Util::getFormData('pgp_verify') ? 1 : 0);
     $notification->push(_("Preferences successfully updated."), 'horde.success');
     break;
 
 case 'save_attachment_public_key':
     /* Retrieve the key from the message. */
     try {
-        $contents = &IMP_Contents::singleton(Util::getFormData('uid') . IMP::IDX_SEP . Util::getFormData('mailbox'));
+        $contents = &IMP_Contents::singleton(Horde_Util::getFormData('uid') . IMP::IDX_SEP . Horde_Util::getFormData('mailbox'));
     } catch (Horde_Exception $e) {
         Horde::fatal($e, __FILE__, __LINE__);
     }
-    $mime_part = $contents->getMIMEPart(Util::getFormData('mime_id'));
+    $mime_part = $contents->getMIMEPart(Horde_Util::getFormData('mime_id'));
     if (empty($mime_part)) {
         Horde::fatal('Cannot retrieve public key from message.', __FILE__, __LINE__);
     }
@@ -271,7 +271,7 @@ case 'save_attachment_public_key':
     /* Add the public key to the storage system. */
     try {
         $imp_pgp->addPublicKey($mime_part->getContents());
-        Util::closeWindowJS();
+        Horde_Util::closeWindowJS();
     } catch (Horde_Exception $e) {
         $notification->push($e, $key_info->getCode());
     }
@@ -311,7 +311,7 @@ extract($result);
 require_once 'Horde/Help.php';
 require_once 'Horde/Prefs/UI.php';
 $app = 'imp';
-$chunk = Util::nonInputVar('chunk');
+$chunk = Horde_Util::nonInputVar('chunk');
 Prefs_UI::generateHeader('pgp', $chunk);
 
 /* If PGP preference not active, do NOT show PGP Admin screen. */
@@ -343,13 +343,13 @@ if ($prefs->getValue('use_pgp')) {
     if (!$t->get('empty_pubkey_list')) {
         $plist = array();
         foreach ($pubkey_list as $val) {
-            $linkurl = Util::addParameter($selfURL, 'email', $val['email']);
+            $linkurl = Horde_Util::addParameter($selfURL, 'email', $val['email']);
             $plist[] = array(
                 'name' => $val['name'],
                 'email' => $val['email'],
-                'view' => Horde::link(Util::addParameter($linkurl, 'actionID', 'view_public_key'), sprintf(_("View %s Public Key"), $val['name']), null, 'view_key'),
-                'info' => Horde::link(Util::addParameter($linkurl, 'actionID', 'info_public_key'), sprintf(_("Information on %s Public Key"), $val['name']), null, 'info_key'),
-                'delete' => Horde::link(Util::addParameter($linkurl, 'actionID', 'delete_public_key'), sprintf(_("Delete %s Public Key"), $val['name']), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this public key?")) . "')) { return true; } else { return false; }")
+                'view' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'view_public_key'), sprintf(_("View %s Public Key"), $val['name']), null, 'view_key'),
+                'info' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'info_public_key'), sprintf(_("Information on %s Public Key"), $val['name']), null, 'info_key'),
+                'delete' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'delete_public_key'), sprintf(_("Delete %s Public Key"), $val['name']), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this public key?")) . "')) { return true; } else { return false; }")
             );
         }
         $t->set('pubkey_list', $plist);
@@ -360,7 +360,7 @@ if ($prefs->getValue('use_pgp')) {
         $t->set('no_source', !$GLOBALS['prefs']->getValue('add_source'));
         if (!$t->get('no_source')) {
             $cacheSess = &Horde_SessionObjects::singleton();
-            $t->set('public_import_url', Util::addParameter(Util::addParameter($selfURL, 'actionID', 'import_public_key'), 'reload', $cacheSess->storeOid($selfURL, false)));
+            $t->set('public_import_url', Horde_Util::addParameter(Horde_Util::addParameter($selfURL, 'actionID', 'import_public_key'), 'reload', $cacheSess->storeOid($selfURL, false)));
             $t->set('import_pubkey-help', Help::link('imp', 'pgp-import-pubkey'));
         }
     }
@@ -370,14 +370,14 @@ if ($prefs->getValue('use_pgp')) {
     if ($secure_check) {
         $t->set('has_key', $prefs->getValue('pgp_public_key') && $prefs->getValue('pgp_private_key'));
         if ($t->get('has_key')) {
-            $t->set('viewpublic', Horde::link(Util::addParameter($selfURL, 'actionID', 'view_personal_public_key'), _("View Personal Public Key"), null, 'view_key'));
-            $t->set('infopublic', Horde::link(Util::addParameter($selfURL, 'actionID', 'info_personal_public_key'), _("Information on Personal Public Key"), null, 'info_key'));
-            $t->set('sendkey', Horde::link(Util::addParameter($selfURL, 'actionID', 'send_public_key'), _("Send Key to Public Keyserver")));
+            $t->set('viewpublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_public_key'), _("View Personal Public Key"), null, 'view_key'));
+            $t->set('infopublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'info_personal_public_key'), _("Information on Personal Public Key"), null, 'info_key'));
+            $t->set('sendkey', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'send_public_key'), _("Send Key to Public Keyserver")));
             $t->set('personalkey-public-help', Help::link('imp', 'pgp-personalkey-public'));
             $passphrase = $imp_pgp->getPassphrase('personal');
-            $t->set('passphrase', (empty($passphrase)) ? Horde::link('#', _("Enter Passphrase"), null, null, IMP::passphraseDialogJS('PGPPersonal') . ';return false;') . _("Enter Passphrase") : Horde::link(Util::addParameter($selfURL, 'actionID', 'unset_passphrase'), _("Unload Passphrase")) . _("Unload Passphrase"));
-            $t->set('viewprivate', Horde::link(Util::addParameter($selfURL, 'actionID', 'view_personal_private_key'), _("View Personal Private Key"), null, 'view_key'));
-            $t->set('infoprivate', Horde::link(Util::addParameter($selfURL, 'actionID', 'info_personal_private_key'), _("Information on Personal Private Key"), null, 'info_key'));
+            $t->set('passphrase', (empty($passphrase)) ? Horde::link('#', _("Enter Passphrase"), null, null, IMP::passphraseDialogJS('PGPPersonal') . ';return false;') . _("Enter Passphrase") : Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'unset_passphrase'), _("Unload Passphrase")) . _("Unload Passphrase"));
+            $t->set('viewprivate', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_private_key'), _("View Personal Private Key"), null, 'view_key'));
+            $t->set('infoprivate', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'info_personal_private_key'), _("Information on Personal Private Key"), null, 'info_key'));
             $t->set('personalkey-private-help', Help::link('imp', 'pgp-personalkey-private'));
             $t->set('deletekeypair', addslashes(_("Are you sure you want to delete your keypair? (This is NOT recommended!)")));
             $t->set('personalkey-delete-help', Help::link('imp', 'pgp-personalkey-delete'));
@@ -392,7 +392,7 @@ if ($prefs->getValue('use_pgp')) {
             $t->set('personalkey-create-keylength-help', Help::link('imp', 'pgp-personalkey-create-keylength'));
             $t->set('personalkey-create-passphrase-help', Help::link('imp', 'pgp-personalkey-create-passphrase'));
             $t->set('keygen',  addslashes(_("Key generation may take a long time to complete.  Continue with key generation?")));
-            $t->set('personal_import_url', Util::addParameter($selfURL, 'actionID', 'import_personal_public_key'));
+            $t->set('personal_import_url', Horde_Util::addParameter($selfURL, 'actionID', 'import_personal_public_key'));
             $t->set('personalkey-create-actions-help', Help::link('imp', 'pgp-personalkey-create-actions'));
         }
     }
index 88ff10d..06873f0 100644 (file)
@@ -11,9 +11,9 @@
 
 function _framesetUrl($url)
 {
-    if (!$GLOBALS['noframeset'] && Util::getFormData('load_frameset')) {
+    if (!$GLOBALS['noframeset'] && Horde_Util::getFormData('load_frameset')) {
         $full_url = Horde::applicationUrl($GLOBALS['registry']->get('webroot', 'horde') . '/index.php', true);
-        $url = Util::addParameter($full_url, 'url', _addAnchor($url, 'param'), false);
+        $url = Horde_Util::addParameter($full_url, 'url', _addAnchor($url, 'param'), false);
     }
     return $url;
 }
@@ -24,26 +24,26 @@ function _newSessionUrl($actionID, $isLogin)
     $addActionID = true;
 
     if ($GLOBALS['url_in']) {
-        $url = Horde::url(Util::removeParameter($GLOBALS['url_in'], session_name()), true);
+        $url = Horde::url(Horde_Util::removeParameter($GLOBALS['url_in'], session_name()), true);
     } elseif (Auth::getProvider() == 'imp') {
         $url = Horde::applicationUrl($GLOBALS['registry']->get('webroot', 'horde') . '/', true);
         /* Force the initial page to IMP if we're logging in to compose a
          * message. */
         if ($actionID == 'login_compose') {
-            $url = Util::addParameter($url, 'url', _addAnchor(IMP_Session::getInitialUrl('login_compose', false), 'param'));
+            $url = Horde_Util::addParameter($url, 'url', _addAnchor(IMP_Session::getInitialUrl('login_compose', false), 'param'));
             $addActionID = false;
         }
     } else {
         $url = IMP_Session::getInitialUrl($actionID, false);
         if ($isLogin) {
             /* Don't show popup window in initial page. */
-            $url = Util::addParameter($url, 'no_newmail_popup', 1, false);
+            $url = Horde_Util::addParameter($url, 'no_newmail_popup', 1, false);
         }
     }
 
     if ($addActionID && $actionID) {
         /* Preserve the actionID. */
-        $url = Util::addParameter($url, 'actionID', $actionID, false);
+        $url = Horde_Util::addParameter($url, 'actionID', $actionID, false);
     }
 
     return $url;
@@ -65,7 +65,7 @@ function _addAnchor($url, $type)
         break;
 
     case 'url':
-        $anchor = Util::getFormData('anchor_string');
+        $anchor = Horde_Util::getFormData('anchor_string');
         if (!empty($anchor)) {
             $url .= '#' . $anchor;
         } else {
@@ -82,10 +82,10 @@ $authentication = 'none';
 require_once dirname(__FILE__) . '/lib/base.php';
 require_once 'Horde/Maintenance.php';
 
-$actionID = (Util::getFormData('action') == 'compose') ? 'login_compose' : Util::getFormData('actionID');
-$autologin = Util::getFormData('autologin');
-$imapuser = Util::getPost('imapuser');
-$pass = Util::getPost('pass');
+$actionID = (Horde_Util::getFormData('action') == 'compose') ? 'login_compose' : Horde_Util::getFormData('actionID');
+$autologin = Horde_Util::getFormData('autologin');
+$imapuser = Horde_Util::getPost('imapuser');
+$pass = Horde_Util::getPost('pass');
 if (!empty($autologin)) {
     $imapuser = IMP_Session::canAutoLogin();
     $pass = Auth::getCredential('password');
@@ -95,14 +95,14 @@ $noframeset = false;
 
 /* Get URL/Anchor strings now. */
 $url_anchor = null;
-$url_in = $url_form = Util::getFormData('url');
+$url_in = $url_form = Horde_Util::getFormData('url');
 if (($pos = strrpos($url_in, '#')) !== false) {
     $url_anchor = substr($url_in, $pos + 1);
     $url_in = substr($url_in, 0, $pos);
 }
 
 /* If we are returning from Maintenance processing. */
-if (Util::getFormData(MAINTENANCE_DONE_PARAM)) {
+if (Horde_Util::getFormData(MAINTENANCE_DONE_PARAM)) {
     /* Finish up any login tasks we haven't completed yet. */
     IMP_Session::loginTasks();
 
@@ -127,12 +127,12 @@ if (isset($_SESSION['imp']) && is_array($_SESSION['imp'])) {
     if (empty($url_in)) {
         $url = IMP_Session::getInitialUrl($actionID, false);
     } elseif (!empty($actionID)) {
-        $url = Util::addParameter($url_in, 'actionID', $actionID, false);
+        $url = Horde_Util::addParameter($url_in, 'actionID', $actionID, false);
     }
 
     /* Don't show popup window in initial page. */
     if ($isLogin) {
-        $url = Util::addParameter($url, 'no_newmail_popup', 1, false);
+        $url = Horde_Util::addParameter($url, 'no_newmail_popup', 1, false);
     }
 
     _redirect(_framesetUrl($url));
@@ -146,19 +146,19 @@ if (!is_null($imapuser) && !is_null($pass)) {
         Horde::getCleanSession();
     }
 
-    if (IMP_Session::createSession($imapuser, $pass, Util::getFormData('server_key', IMP_Session::getAutoLoginServer()))) {
-        $ie_version = Util::getFormData('ie_version');
+    if (IMP_Session::createSession($imapuser, $pass, Horde_Util::getFormData('server_key', IMP_Session::getAutoLoginServer()))) {
+        $ie_version = Horde_Util::getFormData('ie_version');
         if ($ie_version) {
             $browser->setIEVersion($ie_version);
         }
 
-        if (($horde_language = Util::getFormData('new_lang'))) {
+        if (($horde_language = Horde_Util::getFormData('new_lang'))) {
             $_SESSION['horde_language'] = $horde_language;
         }
 
         $view = empty($conf['user']['select_view'])
             ? (empty($conf['user']['force_view']) ? 'imp' : $conf['user']['force_view'])
-            : Util::getFormData('select_view', 'imp');
+            : Horde_Util::getFormData('select_view', 'imp');
 
         setcookie('default_imp_view', $view, time() + 30 * 86400,
                   $conf['cookie']['path'],
index 0f1825c..21397cc 100644 (file)
@@ -30,7 +30,7 @@ $unseen_num = 0;
 
 /* Determine the mailbox that was requested and if only new mail should be
  * displayed. Default to new mail in INBOX. */
-$request = Util::getPathInfo();
+$request = Horde_Util::getPathInfo();
 if (!empty($request)) {
     $request_parts = explode('/-/', $request);
     if (!empty($request_parts[0])) {
index a6053f6..2d659fc 100644 (file)
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$id = Util::getFormData('id');
-$index = Util::getFormData('index');
+$id = Horde_Util::getFormData('id');
+$index = Horde_Util::getFormData('index');
 
 /* Run through the action handlers. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'save_image':
     $contents = &IMP_Contents::singleton($index);
@@ -26,12 +26,12 @@ case 'save_image':
         'data' => $mime_part->getContents(),
         'type' => $mime_part->getType()
     );
-    $res = $registry->call('images/saveImage', array(null, Util::getFormData('gallery'), $image_data));
+    $res = $registry->call('images/saveImage', array(null, Horde_Util::getFormData('gallery'), $image_data));
     if (is_a($res, 'PEAR_Error')) {
         $notification->push($res, 'horde.error');
         break;
     }
-    Util::closeWindowJS();
+    Horde_Util::closeWindowJS();
     exit;
 }
 
index 8acc38f..57c980e 100644 (file)
@@ -26,10 +26,10 @@ if ($_SESSION['imp']['protocol'] == 'pop') {
     exit;
 }
 
-$actionID = Util::getFormData('actionID');
-$edit_query = Util::getFormData('edit_query');
-$edit_query_vfolder = Util::getFormData('edit_query_vfolder');
-$search_mailbox = Util::getFormData('search_mailbox');
+$actionID = Horde_Util::getFormData('actionID');
+$edit_query = Horde_Util::getFormData('edit_query');
+$edit_query_vfolder = Horde_Util::getFormData('edit_query_vfolder');
+$search_mailbox = Horde_Util::getFormData('search_mailbox');
 
 $imp_search_fields = $imp_search->searchFields();
 
@@ -37,7 +37,7 @@ $charset = NLS::getCharset();
 
 /* Get URL parameter data. */
 $search = array();
-if (Util::getFormData('no_match')) {
+if (Horde_Util::getFormData('no_match')) {
     $search = $imp_search->retrieveUIQuery();
     $retrieve_search = true;
 } elseif (($edit_query !== null) && $imp_search->isSearchMbox($edit_query)) {
@@ -55,19 +55,19 @@ if (Util::getFormData('no_match')) {
     $retrieve_search = false;
 }
 if (empty($search)) {
-    $search['field'] = Util::getFormData('field', array('from', 'to', 'subject', 'body'));
+    $search['field'] = Horde_Util::getFormData('field', array('from', 'to', 'subject', 'body'));
     if (!empty($search['field']) && !end($search['field'])) {
         array_pop($search['field']);
     }
     $search['field_end'] = count($search['field']);
-    $search['match'] = Util::getFormData('search_match');
-    $search['text'] = Util::getFormData('search_text');
-    $search['text_not'] = Util::getFormData('search_text_not');
-    $search['date'] = Util::getFormData('search_date');
-    $search['folders'] = Util::getFormData('search_folders', array());
-    $search['save_vfolder'] = Util::getFormData('save_vfolder');
-    $search['vfolder_label'] = Util::getFormData('vfolder_label');
-    $search['mbox'] = Util::getFormData('mbox', $search_mailbox);
+    $search['match'] = Horde_Util::getFormData('search_match');
+    $search['text'] = Horde_Util::getFormData('search_text');
+    $search['text_not'] = Horde_Util::getFormData('search_text_not');
+    $search['date'] = Horde_Util::getFormData('search_date');
+    $search['folders'] = Horde_Util::getFormData('search_folders', array());
+    $search['save_vfolder'] = Horde_Util::getFormData('save_vfolder');
+    $search['vfolder_label'] = Horde_Util::getFormData('vfolder_label');
+    $search['mbox'] = Horde_Util::getFormData('mbox', $search_mailbox);
 }
 
 /* Run through the action handlers. */
@@ -100,7 +100,7 @@ case 'do_search':
     }
 
     /* Redirect to the Mailbox Screen. */
-    header('Location: ' . Util::addParameter(Horde::applicationUrl('mailbox.php', true), 'mailbox', $GLOBALS['imp_search']->createSearchID($id), false));
+    header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('mailbox.php', true), 'mailbox', $GLOBALS['imp_search']->createSearchID($id), false));
     exit;
 
 case 'reset_search':
@@ -117,7 +117,7 @@ case 'reset_search':
     break;
 
 case 'delete_field':
-    $key = Util::getFormData('delete_field_id');
+    $key = Horde_Util::getFormData('delete_field_id');
 
     /* Unset all entries in array input and readjust ids. */
     $vars = array('field', 'text', 'text_not', 'date');
@@ -137,7 +137,7 @@ if (!$conf['user']['allow_folders']) {
     $search['folders'][] = 'INBOX';
     $subscribe = false;
 } elseif ($subscribe = $prefs->getValue('subscribe')) {
-    $shown = Util::getFormData('show_subscribed_only', $subscribe);
+    $shown = Horde_Util::getFormData('show_subscribed_only', $subscribe);
 }
 
 /* Prepare the search template. */
@@ -156,7 +156,7 @@ if (!$edit_query_vfolder) {
                 sprintf(
                     _("Search %s"),
                     Horde::link(
-                        Horde::url(Util::addParameter('mailbox.php',
+                        Horde::url(Horde_Util::addParameter('mailbox.php',
                                                       'mailbox',
                                                       $search['mbox'])))
                     . htmlspecialchars(IMP::displayFolder($search['mbox']))
@@ -173,8 +173,8 @@ $saved_searches = $imp_search->getSearchQueries();
 if (!empty($saved_searches)) {
     $ss = array();
     foreach ($saved_searches as $key => $val) {
-        if (String::length($val) > 100) {
-            $val = String::substr($val, 0, 100) . ' ...';
+        if (Horde_String::length($val) > 100) {
+            $val = Horde_String::substr($val, 0, 100) . ' ...';
         }
         $ss[] = array('val' => htmlspecialchars($key), 'text' => htmlspecialchars($val));
     }
index d49e103..440c330 100644 (file)
@@ -20,9 +20,9 @@ function _importKeyDialog($target)
     $t->setOption('gettext', true);
     $t->set('selfurl', Horde::applicationUrl('smime.php'));
     $t->set('broken_mp_form', $GLOBALS['browser']->hasQuirk('broken_multipart_form'));
-    $t->set('reload', htmlspecialchars(Util::getFormData('reload')));
+    $t->set('reload', htmlspecialchars(Horde_Util::getFormData('reload')));
     $t->set('target', $target);
-    $t->set('forminput', Util::formInput());
+    $t->set('forminput', Horde_Util::formInput());
     $t->set('import_public_key', $target == 'process_import_public_key');
     $t->set('import_personal_certs', $target == 'process_import_personal_certs');
     echo $t->fetch(IMP_TEMPLATES . '/smime/import_key.html');
@@ -30,7 +30,7 @@ function _importKeyDialog($target)
 
 function _getImportKey()
 {
-    $key = Util::getFormData('import_key');
+    $key = Horde_Util::getFormData('import_key');
     if (!empty($key)) {
         return $key;
     }
@@ -46,18 +46,18 @@ function _getImportKey()
 
 function _actionWindow()
 {
-    $oid = Util::getFormData('passphrase_action');
+    $oid = Horde_Util::getFormData('passphrase_action');
     $cacheSess = &Horde_SessionObjects::singleton();
     $cacheSess->setPruneFlag($oid, true);
-    Util::closeWindowJS($cacheSess->query($oid));
+    Horde_Util::closeWindowJS($cacheSess->query($oid));
 }
 
 function _reloadWindow()
 {
     $cacheSess = &Horde_SessionObjects::singleton();
-    $reload = Util::getFormData('reload');
+    $reload = Horde_Util::getFormData('reload');
     $cacheSess->setPruneFlag($reload, true);
-    Util::closeWindowJS('opener.focus();opener.location.href="' . $cacheSess->query($reload) . '";');
+    Horde_Util::closeWindowJS('opener.focus();opener.location.href="' . $cacheSess->query($reload) . '";');
 }
 
 function _textWindowOutput($filename, $msg, $html = false)
@@ -89,7 +89,7 @@ try {
 $secure_check = Horde::isConnectionSecure();
 
 /* Run through the action handlers */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'delete_key':
     $imp_smime->deletePersonalKeys();
@@ -98,8 +98,8 @@ case 'delete_key':
 
 case 'delete_public_key':
     try {
-        $imp_smime->deletePublicKey(Util::getFormData('email'));
-        $notification->push(sprintf(_("S/MIME Public Key for \"%s\" was successfully deleted."), Util::getFormData('email')), 'horde.success');
+        $imp_smime->deletePublicKey(Horde_Util::getFormData('email'));
+        $notification->push(sprintf(_("S/MIME Public Key for \"%s\" was successfully deleted."), Horde_Util::getFormData('email')), 'horde.success');
     } catch (Horde_Exception $e) {
         $notification->push($e);
     }
@@ -132,7 +132,7 @@ case 'process_import_public_key':
 case 'view_public_key':
 case 'info_public_key':
     try {
-        $key = $imp_smime->getPublicKey(Util::getFormData('email'));
+        $key = $imp_smime->getPublicKey(Horde_Util::getFormData('email'));
     } catch (Horde_Exception $e) {
         $key = $e->getMessage();
     }
@@ -165,7 +165,7 @@ case 'process_import_personal_certs':
         _importKeyDialog('process_import_personal_certs');
     } else {
         try {
-            $imp_smime->addFromPKCS12($pkcs12, Util::getFormData('upload_key_pass'), Util::getFormData('upload_key_pk_pass'));
+            $imp_smime->addFromPKCS12($pkcs12, Horde_Util::getFormData('upload_key_pass'), Horde_Util::getFormData('upload_key_pk_pass'));
             $notification->push(_("S/MIME Public/Private Keypair successfully added."), 'horde.success');
             _reloadWindow();
         } catch (Horde_Exception $e) {
@@ -179,11 +179,11 @@ case 'process_import_personal_certs':
 case 'save_attachment_public_key':
     /* Retrieve the key from the message. */
     try {
-        $contents = &IMP_Contents::singleton(Util::getFormData('uid') . IMP::IDX_SEP . Util::getFormData('mailbox'));
+        $contents = &IMP_Contents::singleton(Horde_Util::getFormData('uid') . IMP::IDX_SEP . Horde_Util::getFormData('mailbox'));
     } catch (Horde_Exception $e) {
         Horde::fatal($e, __FILE__, __LINE__);
     }
-    $mime_part = $contents->getMIMEPart(Util::getFormData('mime_id'));
+    $mime_part = $contents->getMIMEPart(Horde_Util::getFormData('mime_id'));
     if (empty($mime_part)) {
         Horde::fatal('Cannot retrieve public key from message.', __FILE__, __LINE__);
     }
@@ -191,7 +191,7 @@ case 'save_attachment_public_key':
     /* Add the public key to the storage system. */
     try {
         $imp_smime->addPublicKey($mime_part);
-        Util::closeWindowJS();
+        Horde_Util::closeWindowJS();
     } catch (Horde_Exception $e) {
         $notification->push(_("No Certificate found"), 'horde.error');
     }
@@ -205,8 +205,8 @@ case 'unset_passphrase':
     break;
 
 case 'save_options':
-    $prefs->setValue('use_smime', Util::getFormData('use_smime') ? 1 : 0);
-    $prefs->setValue('smime_verify', Util::getFormData('smime_verify') ? 1 : 0);
+    $prefs->setValue('use_smime', Horde_Util::getFormData('use_smime') ? 1 : 0);
+    $prefs->setValue('smime_verify', Horde_Util::getFormData('smime_verify') ? 1 : 0);
     $notification->push(_("Preferences successfully updated."), 'horde.success');
     break;
 }
@@ -228,7 +228,7 @@ extract($result);
 require_once 'Horde/Help.php';
 require_once 'Horde/Prefs/UI.php';
 $app = 'imp';
-$chunk = Util::nonInputVar('chunk');
+$chunk = Horde_Util::nonInputVar('chunk');
 Prefs_UI::generateHeader('smime', $chunk);
 
 $selfURL = Horde::applicationUrl('smime.php');
@@ -261,13 +261,13 @@ if ($openssl_check && $prefs->getValue('use_smime')) {
     if (!$t->get('empty_pubkey_list')) {
         $plist = array();
         foreach ($pubkey_list as $val) {
-            $linkurl = Util::addParameter($selfURL, 'email', $val['email']);
+            $linkurl = Horde_Util::addParameter($selfURL, 'email', $val['email']);
             $plist[] = array(
                 'name' => $val['name'],
                 'email' => $val['email'],
-                'view' => Horde::link(Util::addParameter($linkurl, 'actionID', 'view_public_key'), sprintf(_("View %s Public Key"), $val['name']), null, 'view_key'),
-                'info' => Horde::link(Util::addParameter($linkurl, 'actionID', 'info_public_key'), sprintf(_("Information on %s Public Key"), $val['name']), null, 'info_key'),
-                'delete' => Horde::link(Util::addParameter($linkurl, 'actionID', 'delete_public_key'), sprintf(_("Delete %s Public Key"), $val['name']), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this public key?")) . "')) { return true; } else { return false; }")
+                'view' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'view_public_key'), sprintf(_("View %s Public Key"), $val['name']), null, 'view_key'),
+                'info' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'info_public_key'), sprintf(_("Information on %s Public Key"), $val['name']), null, 'info_key'),
+                'delete' => Horde::link(Horde_Util::addParameter($linkurl, 'actionID', 'delete_public_key'), sprintf(_("Delete %s Public Key"), $val['name']), null, null, "if (confirm('" . addslashes(_("Are you sure you want to delete this public key?")) . "')) { return true; } else { return false; }")
             );
         }
         $t->set('pubkey_list', $plist);
@@ -278,7 +278,7 @@ if ($openssl_check && $prefs->getValue('use_smime')) {
         $t->set('no_source', !$GLOBALS['prefs']->getValue('add_source'));
         if (!$t->get('no_source')) {
             $cacheSess = &Horde_SessionObjects::singleton();
-            $t->set('public_import_url', Util::addParameter(Util::addParameter($selfURL, 'actionID', 'import_public_key'), 'reload', $cacheSess->storeOid($selfURL, false)));
+            $t->set('public_import_url', Horde_Util::addParameter(Horde_Util::addParameter($selfURL, 'actionID', 'import_public_key'), 'reload', $cacheSess->storeOid($selfURL, false)));
             $t->set('import_pubkey-help', Help::link('imp', 'smime-import-pubkey'));
         }
     }
@@ -288,15 +288,15 @@ if ($openssl_check && $prefs->getValue('use_smime')) {
     if (!$t->get('secure_check')) {
         $t->set('has_key', $prefs->getValue('smime_public_key') && $prefs->getValue('smime_private_key'));
         if ($t->get('has_key')) {
-            $t->set('viewpublic', Horde::link(Util::addParameter($selfURL, 'actionID', 'view_personal_public_key'), _("View Personal Public Key"), null, 'view_key'));
-            $t->set('infopublic', Horde::link(Util::addParameter($selfURL, 'actionID', 'info_personal_public_key'), _("Information on Personal Public Key"), null, 'info_key'));
+            $t->set('viewpublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_public_key'), _("View Personal Public Key"), null, 'view_key'));
+            $t->set('infopublic', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'info_personal_public_key'), _("Information on Personal Public Key"), null, 'info_key'));
             $passphrase = $imp_smime->getPassphrase();
-            $t->set('passphrase', empty($passphrase) ? Horde::link('#', _("Enter Passphrase"), null, null, IMP::passphraseDialogJS('SMIMEPersonal') . ';return false;') . _("Enter Passphrase") : Horde::link(Util::addParameter($selfURL, 'actionID', 'unset_passphrase'), _("Unload Passphrase")) . _("Unload Passphrase"));
-            $t->set('viewprivate', Horde::link(Util::addParameter($selfURL, 'actionID', 'view_personal_private_key'), _("View Personal Private Key"), null, 'view_key'));
+            $t->set('passphrase', empty($passphrase) ? Horde::link('#', _("Enter Passphrase"), null, null, IMP::passphraseDialogJS('SMIMEPersonal') . ';return false;') . _("Enter Passphrase") : Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'unset_passphrase'), _("Unload Passphrase")) . _("Unload Passphrase"));
+            $t->set('viewprivate', Horde::link(Horde_Util::addParameter($selfURL, 'actionID', 'view_personal_private_key'), _("View Personal Private Key"), null, 'view_key'));
             $t->set('deletekeypair', addslashes(_("Are you sure you want to delete your keypair? (This is NOT recommended!)")));
             $t->set('personalkey-delete-help', Help::link('imp', 'smime-delete-personal-certs'));
         } else {
-            $t->set('personal_import_url', Util::addParameter($selfURL, 'actionID', 'import_personal_certs'));
+            $t->set('personal_import_url', Horde_Util::addParameter($selfURL, 'actionID', 'import_personal_certs'));
             $t->set('import-cert-help', Help::link('imp', 'smime-import-personal-certs'));
         }
     }
index dbc8ee9..6c3f01d 100644 (file)
@@ -13,7 +13,7 @@ $authentication = 'horde';
 require_once dirname(__FILE__) . '/lib/base.php';
 require_once 'Horde/Prefs/UI.php';
 
-$compose_url = Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/services/prefs.php', true), 'app', 'imp', false);
+$compose_url = Horde_Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/services/prefs.php', true), 'app', 'imp', false);
 
 /* Is the preference locked? */
 if ($prefs->isLocked('stationery')) {
@@ -24,20 +24,20 @@ if ($prefs->isLocked('stationery')) {
 /* Retrieve stationery. */
 $stationery_list = @unserialize($prefs->getValue('stationery', false));
 $stationery_list = is_array($stationery_list)
-    ? String::convertCharset($stationery_list, $prefs->getCharset())
+    ? Horde_String::convertCharset($stationery_list, $prefs->getCharset())
     : array();
 
 /* Get form data. */
-$selected = Util::getFormData('stationery');
+$selected = Horde_Util::getFormData('stationery');
 if (strlen($selected)) {
     $selected = (int)$selected;
 }
 
 /* Always check for stationery type switches. */
-$content = Util::getFormData('content', '');
-$last_type = Util::getFormData('last_type');
-$name = Util::getFormData('name', '');
-$type = Util::getFormData('type', 'plain');
+$content = Horde_Util::getFormData('content', '');
+$last_type = Horde_Util::getFormData('last_type');
+$name = Horde_Util::getFormData('name', '');
+$type = Horde_Util::getFormData('type', 'plain');
 if (!empty($last_type) && $last_type != $type) {
     if ($type == 'plain') {
         require_once 'Horde/Text/Filter.php';
@@ -49,11 +49,11 @@ if (!empty($last_type) && $last_type != $type) {
 $stationery = array('n' => $name, 't' => $type, 'c' => $content);
 
 /* Run through the action handlers. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 $updated = false;
 switch ($actionID) {
 case 'update':
-    if (Util::getFormData('edit')) {
+    if (Horde_Util::getFormData('edit')) {
         /* Stationery has been switched. */
         if (strlen($selected)) {
             /* Edit existing. */
@@ -63,7 +63,7 @@ case 'update':
         } else {
             $stationery = array('n' => '', 't' => 'plain', 'c' => '');
         }
-    } elseif (Util::getFormData('delete')) {
+    } elseif (Horde_Util::getFormData('delete')) {
         /* Delete stationery. */
         if (isset($stationery_list[$selected])) {
             $updated = sprintf(_("The stationery \"%s\" has been deleted."), $stationery_list[$selected]['n']);
@@ -71,7 +71,7 @@ case 'update':
             $selected = null;
         }
         $stationery = array('n' => '', 't' => 'plain', 'c' => '');
-    } elseif (Util::getFormData('save')) {
+    } elseif (Horde_Util::getFormData('save')) {
         /* Saving stationery. */
         if (!strlen($selected)) {
             $selected = count($stationery_list);
@@ -86,7 +86,7 @@ case 'update':
 }
 
 if ($updated) {
-    $prefs->setValue('stationery', serialize(String::convertCharset($stationery_list, NLS::getCharset(), $prefs->getCharset())), false);
+    $prefs->setValue('stationery', serialize(Horde_String::convertCharset($stationery_list, NLS::getCharset(), $prefs->getCharset())), false);
     $notification->push($updated, 'horde.success');
 }
 
@@ -103,14 +103,14 @@ if (is_a($result, 'PEAR_Error')) {
 extract($result);
 
 $app = 'imp';
-$chunk = Util::nonInputVar('chunk');
+$chunk = Horde_Util::nonInputVar('chunk');
 Prefs_UI::generateHeader(null, $chunk);
 
 $t = new IMP_Template();
 $t->setOption('gettext', true);
 $t->set('action', Horde::selfUrl());
-$t->set('forminput', Util::formInput());
-$t->set('navcell', Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'compose'));
+$t->set('forminput', Horde_Util::formInput());
+$t->set('navcell', Horde_Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'compose'));
 
 $slist = array();
 foreach ($stationery_list as $key => $choice) {
@@ -130,7 +130,7 @@ $t->set('plain', $stationery['t'] == 'plain');
 $t->set('html', $stationery['t'] == 'html');
 $t->set('content_label', Horde::label('content', _("Stationery:")));
 $t->set('content', $stationery['c']);
-$t->set('button_href', Util::addParameter($compose_url, 'group', 'compose'));
+$t->set('button_href', Horde_Util::addParameter($compose_url, 'group', 'compose'));
 $t->set('button_val', htmlspecialchars(_("Return to Message Composition"), ENT_COMPAT, NLS::getCharset()));
 
 echo $t->fetch(IMP_TEMPLATES . '/stationery/stationery.html');
index f78daec..a6f7740 100644 (file)
@@ -35,7 +35,7 @@ function _createDAcompose($text, $image, $id)
 ?>
 <div id="composeloading"></div>
 <form id="compose" name="compose" enctype="multipart/form-data" action="compose-dimp.php" method="post" target="submit_frame">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
 <input type="hidden" id="action" name="action" />
 <input type="hidden" id="last_identity" name="last_identity" value="<?php echo (int)$selected_identity ?>" />
 <input type="hidden" id="html" name="html" value="<?php echo intval($rte && $compose_html) ?>" />
index e555c0c..569dd1a 100644 (file)
@@ -13,38 +13,38 @@ if (!empty($title)) $page_title .= ' :: ' . $title;
 if (!empty($refresh_time) && !empty($refresh_url)) {
     echo "<meta http-equiv=\"refresh\" content=\"$refresh_time;url=$refresh_url\" />\n";
 }
-echo Util::bufferOutput('require', IMP_TEMPLATES . '/javascript_defs.php');
+echo Horde_Util::bufferOutput('require', IMP_TEMPLATES . '/javascript_defs.php');
 IMP::includeScriptFiles();
 IMP::includeStylesheetFiles(!empty($printer_friendly));
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
 <link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
-<?php if ($mailbox_url = Util::nonInputVar('mailbox_url')): ?>
+<?php if ($mailbox_url = Horde_Util::nonInputVar('mailbox_url')): ?>
 <link href="<?php echo $mailbox_url ?>" rel="Up" />
-<?php elseif (!Util::nonInputVar('login_page')): ?>
-<link href="<?php echo Util::addParameter(Horde::applicationUrl('mailbox.php'), 'mailbox', 'INBOX') ?>" rel="Top" />
+<?php elseif (!Horde_Util::nonInputVar('login_page')): ?>
+<link href="<?php echo Horde_Util::addParameter(Horde::applicationUrl('mailbox.php'), 'mailbox', 'INBOX') ?>" rel="Top" />
 <?php endif; ?>
-<?php if ($first_url = Util::nonInputVar('first_url')): ?>
+<?php if ($first_url = Horde_Util::nonInputVar('first_url')): ?>
 <link href="<?php echo $first_url ?>" rel="First" />
 <?php endif; ?>
-<?php if ($prev_url = Util::nonInputVar('prev_url')): ?>
+<?php if ($prev_url = Horde_Util::nonInputVar('prev_url')): ?>
 <link href="<?php echo $prev_url ?>" rel="Previous" id="prev" />
 <?php endif; ?>
-<?php if ($next_url = Util::nonInputVar('next_url')): ?>
+<?php if ($next_url = Horde_Util::nonInputVar('next_url')): ?>
 <link href="<?php echo $next_url ?>" rel="Next" id="next" />
 <?php endif; ?>
-<?php if ($last_url = Util::nonInputVar('last_url')): ?>
+<?php if ($last_url = Horde_Util::nonInputVar('last_url')): ?>
 <link href="<?php echo $last_url ?>" rel="Last" />
 <?php endif; ?>
-<?php if ($rss_url = Util::nonInputVar('rss_url')): ?>
+<?php if ($rss_url = Horde_Util::nonInputVar('rss_url')): ?>
 <link rel="alternate" type="application/rss+xml" href="<?php echo $rss_url ?>" />
 <?php endif; ?>
-<?php if (!Util::nonInputVar('login_page')): ?>
+<?php if (!Horde_Util::nonInputVar('login_page')): ?>
 <link href="<?php echo Horde::applicationUrl('search.php') ?>" rel="search" />
 <?php endif ?>
 <?php if (!empty($ie_clientcaps)): ?><style>IE\:clientcaps {behavior:url(#default#clientcaps)}</style><?php endif; ?>
 <?php IMP::outputInlineScript(); ?>
 </head>
 
-<body<?php if ($bc = Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
+<body<?php if ($bc = Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
 <?php if (!empty($ie_clientcaps)): ?><IE:clientcaps ID="objCCaps" /><?php endif; ?>
index 85bac39..22d288d 100644 (file)
@@ -10,12 +10,12 @@ $f = &$c->add(new Horde_Mobile_form('compose-mimp.php'));
 
 // Hidden Variables.
 $f->add(new Horde_Mobile_hidden('composeCache', $cacheID));
-$f->add(new Horde_Mobile_hidden('thismailbox', Util::getFormData('thismailbox')));
-$f->add(new Horde_Mobile_hidden('index', Util::getFormData('index')));
-$f->add(new Horde_Mobile_hidden('resume_draft', Util::getFormData('resume_draft', $resume_draft)));
+$f->add(new Horde_Mobile_hidden('thismailbox', Horde_Util::getFormData('thismailbox')));
+$f->add(new Horde_Mobile_hidden('index', Horde_Util::getFormData('index')));
+$f->add(new Horde_Mobile_hidden('resume_draft', Horde_Util::getFormData('resume_draft', $resume_draft)));
 
-if (Util::getFormData('ctype')) {
-    $f->add(new Horde_Mobile_hidden('ctype', Util::getFormData('ctype')));
+if (Horde_Util::getFormData('ctype')) {
+    $f->add(new Horde_Mobile_hidden('ctype', Horde_Util::getFormData('ctype')));
 } else {
     switch ($actionID) {
     case 'r':
@@ -30,7 +30,7 @@ if (Util::getFormData('ctype')) {
     }
 }
 
-if ((Util::getFormData('is_reply') == 1) ||
+if ((Horde_Util::getFormData('is_reply') == 1) ||
     (strpos($actionID, 'reply') === 0)) {
     $f->add(new Horde_Mobile_hidden('is_reply', 1));
     $f->add(new Horde_Mobile_hidden('in_reply_to', $header['in_reply_to']));
@@ -40,7 +40,7 @@ if ((Util::getFormData('is_reply') == 1) ||
 if (!$prefs->isLocked('default_identity')) {
     $ib = &$f->add(new Horde_Mobile_block(new Horde_Mobile_text(_("Identity"))));
     $ident_sel = &$ib->add(new Horde_Mobile_select('identity'));
-    $default = Util::getFormData('identity', $identity->getDefault());
+    $default = Horde_Util::getFormData('identity', $identity->getDefault());
     foreach ($select_list as $key => $select) {
         $ident_sel->add($select, $key, ($key == $default));
     }
index 367b014..a188800 100644 (file)
@@ -11,7 +11,7 @@ $f = &$c->add(new Horde_Mobile_form('compose.php'));
 $f->add(new Horde_Mobile_hidden('thismailbox', $thismailbox));
 $f->add(new Horde_Mobile_hidden('index', $index));
 $f->add(new Horde_Mobile_hidden('action', 'rc'));
-$f->add(new Horde_Mobile_hidden('array_index', Util::getFormData('array_index')));
+$f->add(new Horde_Mobile_hidden('array_index', Horde_Util::getFormData('array_index')));
 
 $f->add(new Horde_Mobile_input('to', $header['to'], _("To: ")));
 
index f823f3c..88afcc9 100644 (file)
@@ -9,7 +9,7 @@ $imp_notify->setMobileObject($c);
 $c->add(new Horde_Mobile_text(sprintf(_("Welcome to %s"), ($imp_auth) ? $registry->get('name',' horde') : $registry->get('name'))));
 
 $f = &$c->add(new Horde_Mobile_form(Horde::applicationUrl('redirect.php', false, -1)));
-$f->add(new Horde_Mobile_input('imapuser', htmlspecialchars(Util::getFormData('imapuser')), _("Username: ")));
+$f->add(new Horde_Mobile_input('imapuser', htmlspecialchars(Horde_Util::getFormData('imapuser')), _("Username: ")));
 
 // Add a password input, and set the type accordingly.
 $p = &$f->add(new Horde_Mobile_input('pass', '', _("Password: ")));
index 8bdfff2..85c57fc 100644 (file)
@@ -95,10 +95,10 @@ function _errorMsg($e)
 require_once dirname(__FILE__) . '/lib/base.load.php';
 include_once HORDE_BASE . '/lib/core.php';
 
-/* We should have loaded the String class, from the Horde_Util
- * package, in core.php. If String:: isn't defined, then we're not
+/* We should have loaded the Horde_String class, from the Horde_Util
+ * package, in core.php. If Horde_String:: isn't defined, then we're not
  * finding some critical libraries. */
-if (!class_exists('String')) {
+if (!class_exists('Horde_String')) {
     echo '<br /><h2 style="color:red">The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the <a href="http://cvs.horde.org/cvs.php/framework">framework</a> module from <a href="http://www.horde.org/source/">Horde CVS</a>, and install the packages in it with the install-packages.php script.</h2>';
     exit;
 }
index b4dee40..0dddaf0 100644 (file)
@@ -15,7 +15,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
  * DEFAULT/'thread' - Thread mode
  * 'msgview' - Multiple message view
  */
-$mode = Util::getFormData('mode', 'thread');
+$mode = Horde_Util::getFormData('mode', 'thread');
 
 $imp_mailbox = &IMP_Mailbox::singleton($imp_mbox['mailbox'], $imp_mbox['index']);
 
@@ -27,7 +27,7 @@ if ($mode == 'thread') {
     }
 } else {
     /* MSGVIEW MODE: Make sure we have a valid list of messages. */
-    $msglist = $GLOBALS['imp_imap']->ob->utils->fromSequenceString(Util::getFormData('msglist'));
+    $msglist = $GLOBALS['imp_imap']->ob->utils->fromSequenceString(Horde_Util::getFormData('msglist'));
     if (empty($msglist)) {
         $error = true;
     }
@@ -45,11 +45,11 @@ if ($error) {
 NLS::setTimeZone();
 
 /* Run through action handlers. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'add_address':
     try {
-        $contact_link = IMP::addAddress(Util::getFormData('address'), Util::getFormData('name'));
+        $contact_link = IMP::addAddress(Horde_Util::getFormData('address'), Horde_Util::getFormData('name'));
         $notification->push(sprintf(_("Entry \"%s\" was successfully added to the address book"), $contact_link), 'horde.success', array('content.raw'));
     } catch (Horde_Exception $e) {
         $notification->push($e);
@@ -127,7 +127,7 @@ foreach ($loop_array as $mbox => $idxlist) {
             $curr_msg['link'] = Horde::widget('#display', _("Back to Multiple Message View Index"), 'widget', '', '', _("Back to Multiple Message View Index"), true);
         }
         $curr_msg['link'] .= ' | ' . Horde::widget(IMP::generateIMPUrl('message.php', $imp_mbox['mailbox'], $idx, $mbox), _("Go to Message"), 'widget', '', '', _("Go to Message"), true);
-        $curr_msg['link'] .= ' | ' . Horde::widget(Util::addParameter(IMP::generateIMPUrl('mailbox.php', $mbox), array('start' => $imp_mailbox->getArrayIndex($idx))), sprintf(_("Back to %s"), $page_label), 'widget', '', '', sprintf(_("Bac_k to %s"), $page_label));
+        $curr_msg['link'] .= ' | ' . Horde::widget(Horde_Util::addParameter(IMP::generateIMPUrl('mailbox.php', $mbox), array('start' => $imp_mailbox->getArrayIndex($idx))), sprintf(_("Back to %s"), $page_label), 'widget', '', '', sprintf(_("Bac_k to %s"), $page_label));
 
         $curr_tree['class'] = (++$rowct % 2) ? 'text' : 'item0';
         $curr_tree['subject'] = (($mode == 'thread') ? $threadtree[$idx] : null) . ' ' . Horde::link('#i' . $idx) . $subject_header . '</a> (' . $addr . ')';
@@ -147,13 +147,13 @@ $template->set(
     'subject',
     $mode == 'thread' ? $subject : sprintf(_("%d Messages"), count($msgs)));
 if ($mode == 'thread') {
-    $delete_link = Util::addParameter(
+    $delete_link = Horde_Util::addParameter(
         IMP::generateIMPUrl('mailbox.php', $mbox),
         array('start' => $imp_mailbox->getArrayIndex($idx),
               'actionID' => 'delete_messages',
               'mailbox_token' => IMP::getRequestToken('imp.mailbox')));
     foreach ($thread as $val) {
-        $delete_link = Util::addParameter(
+        $delete_link = Horde_Util::addParameter(
             $delete_link,
             array('indices[]' => $val . IMP::IDX_SEP . $imp_mbox['mailbox']));
     }
index 38e3874..06505bc 100644 (file)
@@ -33,8 +33,8 @@
 
 function _sanitizeName($name)
 {
-    $name = String::convertCharset($name, NLS::getCharset(), 'UTF-8');
-    return String::convertCharset(trim(preg_replace('/[^\pL\pN-+_. ]/u', '_', $name), ' _'), 'UTF-8');
+    $name = Horde_String::convertCharset($name, NLS::getCharset(), 'UTF-8');
+    return Horde_String::convertCharset(trim(preg_replace('/[^\pL\pN-+_. ]/u', '_', $name), ' _'), 'UTF-8');
 }
 
 /* Don't compress if we are already sending in compressed format. */
@@ -46,16 +46,16 @@ if ((isset($_GET['actionID']) && ($_GET['actionID'] == 'download_all')) ||
 $session_control = 'readonly';
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$actionID = Util::getFormData('actionID');
-$ctype = Util::getFormData('ctype');
-$id = Util::getFormData('id');
+$actionID = Horde_Util::getFormData('actionID');
+$ctype = Horde_Util::getFormData('ctype');
+$id = Horde_Util::getFormData('id');
 
 /* 'compose_attach_preview' doesn't use IMP_Contents since there is no
  * IMAP message data - rather, we must use the IMP_Compose object to
  * get the necessary Horde_Mime_Part. */
 if ($actionID == 'compose_attach_preview') {
     /* Initialize the IMP_Compose:: object. */
-    $imp_compose = &IMP_Compose::singleton(Util::getFormData('composeCache'));
+    $imp_compose = &IMP_Compose::singleton(Horde_Util::getFormData('composeCache'));
     $mime = $imp_compose->buildAttachment($id);
 
     /* Create a dummy IMP_Contents() object so we can use the view code below.
@@ -64,12 +64,12 @@ if ($actionID == 'compose_attach_preview') {
     $actionID = 'view_attach';
     $id = $mime->getMimeId();
 } else {
-    $uid = Util::getFormData('uid');
+    $uid = Horde_Util::getFormData('uid');
     if (!$uid) {
         // TODO: Remove usage of 'index'
-        $uid = Util::getFormData('index');
+        $uid = Horde_Util::getFormData('index');
     }
-    $mailbox = Util::getFormData('mailbox');
+    $mailbox = Horde_Util::getFormData('mailbox');
     if (!$uid || !$mailbox) {
         exit;
     }
@@ -121,7 +121,7 @@ case 'download_render':
         break;
 
     case 'download_render':
-        $render = $contents->renderMIMEPart($id, Util::getFormData('mode', IMP_Contents::RENDER_FULL), array('type' => $ctype));
+        $render = $contents->renderMIMEPart($id, Horde_Util::getFormData('mode', IMP_Contents::RENDER_FULL), array('type' => $ctype));
         reset($render);
         $key = key($render);
         $body = $render[$key]['data'];
@@ -135,7 +135,7 @@ case 'download_render':
     }
 
     /* Compress output? */
-    if (($actionID == 'download_attach') && Util::getFormData('zip')) {
+    if (($actionID == 'download_attach') && Horde_Util::getFormData('zip')) {
         $horde_compress = &Horde_Compress::singleton('zip');
         $body = $horde_compress->compress(array(array('data' => $body, 'name' => $name)));
         $name .= '.zip';
@@ -146,7 +146,7 @@ case 'download_render':
     exit;
 
 case 'view_attach':
-    $render = $contents->renderMIMEPart($id, Util::getFormData('mode', IMP_Contents::RENDER_FULL), array('type' => $ctype));
+    $render = $contents->renderMIMEPart($id, Horde_Util::getFormData('mode', IMP_Contents::RENDER_FULL), array('type' => $ctype));
     if (!empty($render)) {
         reset($render);
         $key = key($render);
index 72c3c94..f890925 100644 (file)
@@ -35,14 +35,14 @@ if (is_a($blacklist, 'PEAR_Error')) {
 $folder = $blacklist_folder = null;
 
 /* Perform requested actions. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'create_folder':
-    $blacklist_folder = Ingo::createFolder(Util::getFormData('new_folder_name'));
+    $blacklist_folder = Ingo::createFolder(Horde_Util::getFormData('new_folder_name'));
     break;
 
 case 'rule_update':
-    switch (Util::getFormData('action')) {
+    switch (Horde_Util::getFormData('action')) {
     case 'delete':
         $folder = '';
         break;
@@ -52,14 +52,14 @@ case 'rule_update':
         break;
 
     case 'folder':
-        $folder = Util::getFormData('actionvalue');
+        $folder = Horde_Util::getFormData('actionvalue');
         break;
     }
 
     if (($folder == Ingo::BLACKLIST_MARKER) && !$have_mark) {
         $notification->push("Not supported by this script generator.", 'horde.error');
     } else {
-        $ret = $blacklist->setBlacklist(Util::getFormData('blacklist'));
+        $ret = $blacklist->setBlacklist(Horde_Util::getFormData('blacklist'));
         if (is_a($ret, 'PEAR_Error')) {
             $notification->push($ret, $ret->getCode());
         } else {
index 1f538c7..bb89d4f 100644 (file)
@@ -25,8 +25,8 @@ $ingo_script = Ingo::loadIngoScript();
 $on_demand = $ingo_script->performAvailable();
 
 /* Get web parameter data. */
-$actionID = Util::getFormData('actionID');
-$id = Util::getFormData('rulenumber');
+$actionID = Horde_Util::getFormData('actionID');
+$id = Horde_Util::getFormData('rulenumber');
 
 /* Get permissions. */
 $edit_allowed = Ingo::hasPermission('shares', PERMS_EDIT);
@@ -84,12 +84,12 @@ case 'rule_enable':
         break;
 
     case 'rule_up':
-        $steps = Util::getFormData('steps', 1);
+        $steps = Horde_Util::getFormData('steps', 1);
         $filters->ruleUp($id, $steps);
         break;
 
     case 'rule_down':
-        $steps = Util::getFormData('steps', 1);
+        $steps = Horde_Util::getFormData('steps', 1);
         $filters->ruleDown($id, $steps);
         break;
 
@@ -119,8 +119,8 @@ case 'settings_save':
         header('Location: ' . Horde::applicationUrl('filters.php', true));
         exit;
     }
-    $prefs->setValue('show_filter_msg', Util::getFormData('show_filter_msg'));
-    $prefs->setValue('filter_seen', Util::getFormData('filter_seen'));
+    $prefs->setValue('show_filter_msg', Horde_Util::getFormData('show_filter_msg'));
+    $prefs->setValue('filter_seen', Horde_Util::getFormData('filter_seen'));
     $notification->push(_("Settings successfully updated."), 'horde.success');
     break;
 
@@ -168,7 +168,7 @@ if (count($filter_list) == 0) {
 
         $entry = array();
         $entry['number'] = ++$i;
-        $url = Util::addParameter($filters_url, 'rulenumber', $rule_number);
+        $url = Horde_Util::addParameter($filters_url, 'rulenumber', $rule_number);
         $copyurl = $delurl = $editurl = $name = null;
 
         switch ($filter['action']) {
@@ -203,9 +203,9 @@ if (count($filter_list) == 0) {
             break;
 
         default:
-            $editurl = Util::addParameter($rule_url, array('edit' => $rule_number, 'actionID' => 'rule_edit'));
-            $delurl  = Util::addParameter($url, 'actionID', 'rule_delete');
-            $copyurl = Util::addParameter($url, 'actionID', 'rule_copy');
+            $editurl = Horde_Util::addParameter($rule_url, array('edit' => $rule_number, 'actionID' => 'rule_edit'));
+            $delurl  = Horde_Util::addParameter($url, 'actionID', 'rule_delete');
+            $copyurl = Horde_Util::addParameter($url, 'actionID', 'rule_copy');
             $entry['filterimg'] = false;
             $name = $filter['name'];
             break;
@@ -270,14 +270,14 @@ if (count($filter_list) == 0) {
         }
 
         /* Create up/down arrow links. */
-        $entry['upurl'] = Util::addParameter($url, 'actionID', 'rule_up');
-        $entry['downurl'] = Util::addParameter($url, 'actionID', 'rule_down');
+        $entry['upurl'] = Horde_Util::addParameter($url, 'actionID', 'rule_up');
+        $entry['downurl'] = Horde_Util::addParameter($url, 'actionID', 'rule_down');
         $entry['uplink'] = ($i > 1) ? Horde::link($entry['upurl'], _("Move Rule Up")) : false;
         $entry['downlink'] = ($i < $rule_count) ? Horde::link($entry['downurl'], _("Move Rule Down")) : false;
 
         if (empty($filter['disable'])) {
             if ($edit_allowed) {
-                $entry['disablelink'] = Horde::link(Util::addParameter($url, 'actionID', 'rule_disable'), sprintf(_("Disable %s"), $name));
+                $entry['disablelink'] = Horde::link(Horde_Util::addParameter($url, 'actionID', 'rule_disable'), sprintf(_("Disable %s"), $name));
                 $entry['disableimg'] = Horde::img('enable.png', sprintf(_("Disable %s"), $name));
             } else {
                 $entry['disableimg'] = Horde::img('enable.png');
@@ -287,7 +287,7 @@ if (count($filter_list) == 0) {
             $entry['enableimg'] = false;
         } else {
             if ($edit_allowed) {
-                $entry['enablelink'] = Horde::link(Util::addParameter($url, 'actionID', 'rule_enable'), sprintf(_("Enable %s"), $name));
+                $entry['enablelink'] = Horde::link(Horde_Util::addParameter($url, 'actionID', 'rule_enable'), sprintf(_("Enable %s"), $name));
                 $entry['enableimg'] = Horde::img('disable.png', sprintf(_("Enable %s"), $name));
             } else {
                 $entry['enableimg'] = Horde::img('disable.png');
index 80c0ed5..52176ed 100644 (file)
@@ -12,7 +12,6 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 require_once 'Horde/Help.php';
-require_once 'Horde/Variables.php';
 
 /* Redirect if forward is not available. */
 if (!in_array(Ingo_Storage::ACTION_FORWARD, $_SESSION['ingo']['script_categories'])) {
@@ -28,7 +27,7 @@ $fwd_id = $filters->findRuleId(Ingo_Storage::ACTION_FORWARD);
 $fwd_rule = $filters->getRule($fwd_id);
 
 /* Load libraries. */
-$vars = &Variables::getDefaultVariables();
+$vars = &Horde_Variables::getDefaultVariables();
 if ($vars->get('submitbutton') == _("Return to Rules List")) {
     header('Location: ' . Horde::applicationUrl('filters.php', true));
     exit;
index 75f7504..7d15410 100644 (file)
@@ -16,7 +16,7 @@ class Ingo_Driver_ldap extends Ingo_Driver
      */
     public function __construct($params = array())
     {
-        if (!Util::extensionExists('ldap')) {
+        if (!Horde_Util::extensionExists('ldap')) {
             Horde::fatal(PEAR::raiseError(_("LDAP support is required but the LDAP module is not available or not loaded.")), __FILE__, __LINE__);
         }
 
@@ -214,7 +214,7 @@ class Ingo_Driver_ldap extends Ingo_Driver
             $values[] = $script;
         }
 
-        $replace = array(String::lower($this->_params['script_attribute']) => $values);
+        $replace = array(Horde_String::lower($this->_params['script_attribute']) => $values);
         if (empty($values)) {
             $r = @ldap_mod_del($ldapcn, $userDN, $replace);
         } else {
index 2e94c9a..dca1594 100644 (file)
@@ -97,7 +97,7 @@ class Ingo
     static public function createFolder($folder)
     {
         return $GLOBALS['registry']->hasMethod('mail/createFolder')
-            ? $GLOBALS['registry']->call('mail/createFolder', array('folder' => String::convertCharset($folder, NLS::getCharset(), 'UTF7-IMAP')))
+            ? $GLOBALS['registry']->call('mail/createFolder', array('folder' => Horde_String::convertCharset($folder, NLS::getCharset(), 'UTF7-IMAP')))
             : false;
     }
 
@@ -411,7 +411,7 @@ class Ingo
             $menu->add(Horde::applicationUrl('script.php'), _("_Script"), 'script.png');
         }
         if (!empty($GLOBALS['ingo_shares']) && empty($GLOBALS['conf']['share']['no_sharing'])) {
-            $menu->add('#', _("_Permissions"), 'perms.png', $GLOBALS['registry']->getImageDir('horde'), '', 'popup(\'' . Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('app' => 'ingo', 'share' => htmlspecialchars($_SESSION['ingo']['backend']['id'] . ':' . Auth::getAuth())), null, false) . '\');return false;');
+            $menu->add('#', _("_Permissions"), 'perms.png', $GLOBALS['registry']->getImageDir('horde'), '', 'popup(\'' . Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/shares/edit.php', true), array('app' => 'ingo', 'share' => htmlspecialchars($_SESSION['ingo']['backend']['id'] . ':' . Auth::getAuth())), null, false) . '\');return false;');
         }
 
         if ($returnType == 'object') {
index 5bbb879..9374c5a 100644 (file)
@@ -279,13 +279,13 @@ class Ingo_Script_imap extends Ingo_Script
                                     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]"),
-                                            String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())),
+                                            Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())),
                                     'horde.message');
                             }
                         } else {
                             $GLOBALS['notification']->push(sprintf(_("Filter activity: %s message(s) have been moved to the folder \"%s\"."),
                                                         count($indices),
-                                                        String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())), 'horde.message');
+                                                        Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())), 'horde.message');
                         }
                     } elseif ($rule['action'] == Ingo_Storage::ACTION_DISCARD) {
                         /* We need to grab the overview first. */
@@ -321,11 +321,11 @@ class Ingo_Script_imap extends Ingo_Script
                                     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]"),
-                                            String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())),
+                                            Horde_String::convertCharset($rule['action-value'], 'UTF7-IMAP', NLS::getCharset())),
                                     'horde.message');
                             }
                         } else {
-                            $GLOBALS['notification']->push(sprintf(_("Filter activity: %s message(s) have been copied to the folder \"%s\"."), count($indices), 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', NLS::getCharset())), 'horde.message');
                         }
                     }
                 }
index 9644d1c..b2bb752 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 = String::convertCharset($code, NLS::getCharset(), 'UTF-8');
+        $code = Horde_String::convertCharset($code, 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' => String::convertCharset($vacation->getVacationSubject(), NLS::getCharset(), 'UTF-8'),
+            'subject' => Horde_String::convertCharset($vacation->getVacationSubject(), 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' => String::convertCharset($vacation->getVacationReason(), NLS::getCharset(), 'UTF-8'),
+            'reason' => Horde_String::convertCharset($vacation->getVacationReason(), NLS::getCharset(), 'UTF-8'),
         );
 
         $action = $tests = array();
@@ -2219,7 +2219,7 @@ class Sieve_Comment {
                 $code .= (empty($code) ? '' : "\n") . '# ' . $line;
             }
         }
-        return String::convertCharset($code, NLS::getCharset(), 'UTF-8');
+        return Horde_String::convertCharset($code, NLS::getCharset(), 'UTF-8');
     }
 
     /**
index 8c9acd1..23fe70d 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 = String::convertCharset($data, $prefs->getCharset(), NLS::getCharset());
+                $data = Horde_String::convertCharset($data, $prefs->getCharset(), NLS::getCharset());
             }
             if ($data) {
                 $ob->setFilterlist($data);
@@ -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(String::convertCharset($ob->getFilterList(), NLS::getCharset(), $prefs->getCharset())), false);
+            return $prefs->setValue('rules', serialize(Horde_String::convertCharset($ob->getFilterList(), NLS::getCharset(), $prefs->getCharset())), false);
 
         case self::ACTION_FORWARD:
             $data = array(
index a5af725..740b9f8 100644 (file)
@@ -206,8 +206,8 @@ class Ingo_Storage_sql extends Ingo_Storage
                 $ob->setVacationEnd((int)$data['vacation_end']);
                 $ob->setVacationExcludes(explode("\n", $data['vacation_excludes']), false);
                 $ob->setVacationIgnorelist((bool)$data['vacation_ignorelists']);
-                $ob->setVacationReason(String::convertCharset($data['vacation_reason'], $this->_params['charset']));
-                $ob->setVacationSubject(String::convertCharset($data['vacation_subject'], $this->_params['charset']));
+                $ob->setVacationReason(Horde_String::convertCharset($data['vacation_reason'], $this->_params['charset']));
+                $ob->setVacationSubject(Horde_String::convertCharset($data['vacation_subject'], $this->_params['charset']));
                 $ob->setSaved(true);
             } elseif ($data = @unserialize($GLOBALS['prefs']->getDefault('vacation'))) {
                 $ob->setVacationAddresses($data['addresses'], false);
@@ -342,10 +342,10 @@ class Ingo_Storage_sql extends Ingo_Storage
             $query = sprintf($query, $this->_params['table_vacations']);
             $values = array(
                 implode("\n", $ob->getVacationAddresses()),
-                String::convertCharset($ob->getVacationSubject(),
+                Horde_String::convertCharset($ob->getVacationSubject(),
                                        NLS::getCharset(),
                                        $this->_params['charset']),
-                String::convertCharset($ob->getVacationReason(),
+                Horde_String::convertCharset($ob->getVacationReason(),
                                        NLS::getCharset(),
                                        $this->_params['charset']),
                 (int)$ob->getVacationDays(),
@@ -462,11 +462,11 @@ class Ingo_Storage_filters_sql extends Ingo_Storage_filters {
         while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
             $data[$row['rule_order']] = array(
                 'id' => (int)$row['rule_id'],
-                'name' => String::convertCharset($row['rule_name'], $this->_params['charset']),
+                'name' => Horde_String::convertCharset($row['rule_name'], $this->_params['charset']),
                 'action' => (int)$row['rule_action'],
-                'action-value' => String::convertCharset($row['rule_value'], $this->_params['charset']),
+                'action-value' => Horde_String::convertCharset($row['rule_value'], $this->_params['charset']),
                 'flags' => (int)$row['rule_flags'],
-                'conditions' => empty($row['rule_conditions']) ? null : String::convertCharset(unserialize($row['rule_conditions']), $this->_params['charset']),
+                'conditions' => empty($row['rule_conditions']) ? null : Horde_String::convertCharset(unserialize($row['rule_conditions']), $this->_params['charset']),
                 'combine' => (int)$row['rule_combine'],
                 'stop' => (bool)$row['rule_stop'],
                 'disable' => !(bool)$row['rule_active']);
@@ -516,11 +516,11 @@ class Ingo_Storage_filters_sql extends Ingo_Storage_filters {
      */
     protected function _ruleToBackend($rule)
     {
-        return array(String::convertCharset($rule['name'], NLS::getCharset(), $this->_params['charset']),
+        return array(Horde_String::convertCharset($rule['name'], NLS::getCharset(), $this->_params['charset']),
                      (int)$rule['action'],
-                     isset($rule['action-value']) ? String::convertCharset($rule['action-value'], NLS::getCharset(), $this->_params['charset']) : null,
+                     isset($rule['action-value']) ? Horde_String::convertCharset($rule['action-value'], NLS::getCharset(), $this->_params['charset']) : null,
                      isset($rule['flags']) ? (int)$rule['flags'] : null,
-                     isset($rule['conditions']) ? serialize(String::convertCharset($rule['conditions'], NLS::getCharset(), $this->_params['charset'])) : null,
+                     isset($rule['conditions']) ? serialize(Horde_String::convertCharset($rule['conditions'], 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 1325ce8..5a6d148 100644 (file)
@@ -78,7 +78,7 @@ if ($driver->supportShares()) {
     }
 
     /* Select current share. */
-    $_SESSION['ingo']['current_share'] = Util::getFormData('ruleset', @$_SESSION['ingo']['current_share']);
+    $_SESSION['ingo']['current_share'] = Horde_Util::getFormData('ruleset', @$_SESSION['ingo']['current_share']);
     if (empty($_SESSION['ingo']['current_share']) ||
         empty($GLOBALS['all_rulesets'][$_SESSION['ingo']['current_share']]) ||
         !$GLOBALS['all_rulesets'][$_SESSION['ingo']['current_share']]->hasPermission(Auth::getAuth(), PERMS_READ)) {
index ebad0ad..fb27a46 100644 (file)
@@ -42,8 +42,8 @@ require INGO_BASE . '/config/fields.php';
 $filters = &$ingo_storage->retrieve(Ingo_Storage::ACTION_FILTERS);
 
 /* Run through action handlers. */
-$actionID = Util::getFormData('actionID');
-$edit_number = Util::getFormData('edit');
+$actionID = Horde_Util::getFormData('actionID');
+$edit_number = Horde_Util::getFormData('edit');
 switch ($actionID) {
 case 'create_folder':
 case 'rule_save':
@@ -56,18 +56,18 @@ case 'rule_delete':
     }
 
     $rule = array(
-        'id' => Util::getFormData('id'),
-        'name' => Util::getFormData('name'),
-        'combine' => Util::getFormData('combine'),
+        'id' => Horde_Util::getFormData('id'),
+        'name' => Horde_Util::getFormData('name'),
+        'combine' => Horde_Util::getFormData('combine'),
         'conditions' => array()
     );
 
-    $field = Util::getFormData('field');
-    $match = Util::getFormData('match');
-    $userheader = Util::getFormData('userheader');
-    $value = Util::getFormData('value');
+    $field = Horde_Util::getFormData('field');
+    $match = Horde_Util::getFormData('match');
+    $userheader = Horde_Util::getFormData('userheader');
+    $value = Horde_Util::getFormData('value');
     if ($ingo_script->caseSensitive()) {
-        $casesensitive = Util::getFormData('case');
+        $casesensitive = Horde_Util::getFormData('case');
     }
 
     $valid = true;
@@ -103,16 +103,16 @@ case 'rule_delete':
     }
 
     if ($actionID == 'create_folder') {
-        $rule['action-value'] = Ingo::createFolder(Util::getFormData('new_folder_name'));
+        $rule['action-value'] = Ingo::createFolder(Horde_Util::getFormData('new_folder_name'));
     } else {
-        $rule['action-value'] = Util::getFormData('actionvalue');
+        $rule['action-value'] = Horde_Util::getFormData('actionvalue');
     }
 
-    $rule['action'] = Util::getFormData('action');
-    $rule['stop'] = Util::getFormData('stop');
+    $rule['action'] = Horde_Util::getFormData('action');
+    $rule['stop'] = Horde_Util::getFormData('stop');
 
     $rule['flags'] = 0;
-    $flags = Util::getFormData('flags', array());
+    $flags = Horde_Util::getFormData('flags', array());
     if (!empty($flags)) {
         foreach ($flags as $val) {
             $rule['flags'] |= $val;
@@ -149,7 +149,7 @@ case 'rule_delete':
             header('Location: ' . Horde::applicationUrl('filters.php', true));
             exit;
         }
-        $cond_num = Util::getFormData('conditionnumber');
+        $cond_num = Horde_Util::getFormData('conditionnumber');
         if (!is_null($cond_num)) {
             unset($rule['conditions'][$cond_num]);
             $rule['conditions'] = array_values($rule['conditions']);
@@ -252,7 +252,7 @@ foreach ($rule['conditions'] as $cond_num => $condition) {
             '<option value="' . Ingo::USER_HEADER . '"' . ((!$option_selected) ? ' selected="selected"' : '') . '>' . _("Self-Defined Header") . (($lastfield) ? '' : ':') . "</option>\n";
         if (!$option_selected) {
             $header_entry = true;
-            $userheader = Util::getFormData('userheader');
+            $userheader = Horde_Util::getFormData('userheader');
             if (empty($userheader)) {
                 $userheader = isset($condition['field']) ? $condition['field'] : '';
             } else {
index e873aef..f96d015 100644 (file)
@@ -27,7 +27,7 @@ if ($scriptor) {
 
 /* Activate/deactivate script if requested.
    activateScript() does its own $notification->push() on error. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'action_activate':
     if (!empty($script)) {
index 2a91c9f..41eea1e 100644 (file)
@@ -47,16 +47,13 @@ if (!in_array(Ingo_Storage::ACTION_SPAM, $_SESSION['ingo']['script_categories'])
     exit;
 }
 
-/* Load libraries. */
-require_once 'Horde/Variables.php';
-
 /* Get the spam object and rule. */
 $spam = &$ingo_storage->retrieve(Ingo_Storage::ACTION_SPAM);
 $filters = &$ingo_storage->retrieve(Ingo_Storage::ACTION_FILTERS);
 $spam_id = $filters->findRuleId(Ingo_Storage::ACTION_SPAM);
 $spam_rule = $filters->getRule($spam_id);
 
-$vars = &Variables::getDefaultVariables();
+$vars = &Horde_Variables::getDefaultVariables();
 if ($vars->get('submitbutton') == _("Return to Rules List")) {
     header('Location: ' . Horde::applicationUrl('filters.php', true));
     exit;
index 1ae5a2e..f17b829 100644 (file)
@@ -1,5 +1,5 @@
 <form method="post" name="filters" action="<?php echo Horde::applicationUrl('blacklist.php') ?>">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="rule_update" />
 <input type="hidden" name="new_folder_name" value="" />
 
index 50c2fd3..6e5d520 100644 (file)
@@ -20,4 +20,4 @@ if (!empty($title)) {
 <?php echo Horde::stylesheetLink('ingo') ?>
 </head>
 
-<body<?php if ($bc = Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
+<body<?php if ($bc = Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
index 0fa51cc..18ffc28 100644 (file)
@@ -11,7 +11,7 @@ function moveFromTo(from, to, upurl, downurl)
 }
 </script>
 <form method="post" name="filters" action="<?php echo Horde::applicationUrl('filters.php') ?>">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="" />
 <div class="header">
  <?php echo _("Existing Rules") . ' ' . Help::link('ingo', 'filters_rules') ?>
index 277a37e..4dc135f 100644 (file)
@@ -2,7 +2,7 @@
 
 <?php $flags_val = $prefs->getValue('filter_seen') ?>
 <form method="post" name="filtersettings" action="filters.php">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="settings_save" />
 <h1 class="header">
  <?php echo _("Additional Settings") ?>
index e0bd68d..693191c 100644 (file)
@@ -1,5 +1,5 @@
 <form action="filters.php" method="post" name="rulesetsmenu">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
 <div id="menu">
 <?php if (!empty($ingo_shares) && count($all_rulesets) > 1): ?>
  <div style="float:right">
index 97a003d..44ddd17 100644 (file)
@@ -11,7 +11,7 @@ function delete_condition(num)
 </script>
 
 <form method="post" name="rule" action="<?php echo Horde::applicationUrl('rule.php') ?>">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="rule_update" />
 <input type="hidden" name="conditionnumber" value="-1" />
 <input type="hidden" name="new_folder_name" value="" />
index f8ba5ed..9c7cde5 100644 (file)
@@ -5,21 +5,21 @@
 <?php if ($actionID != 'show_active'): ?>
           <td>
             <form method="post" name="activate_script" action="<?php echo Horde::applicationUrl('script.php') ?>">
-              <?php Util::pformInput() ?>
+              <?php Horde_Util::pformInput() ?>
               <input type="hidden" name="actionID" value="action_activate" />
               <input class="button" type="submit" name="submit" value="<?php echo _("Activate Script") ?>" />
             </form>
           </td>
           <td>
             <form method="post" name="deactivate_script" action="<?php echo Horde::applicationUrl('script.php') ?>">
-              <?php Util::pformInput() ?>
+              <?php Horde_Util::pformInput() ?>
               <input type="hidden" name="actionID" value="action_deactivate" />
               <input class="button" type="submit" name="submit" value="<?php echo _("Deactivate Script") ?>" />
             </form>
           </td>
           <td>
             <form method="post" name="show_active_script" action="<?php echo Horde::applicationUrl('script.php') ?>">
-              <?php Util::pformInput() ?>
+              <?php Horde_Util::pformInput() ?>
               <input type="hidden" name="actionID" value="show_active" />
               <input class="button" type="submit" name="submit" value="<?php echo _("Show Active Script") ?>" />
             </form>
@@ -27,7 +27,7 @@
 <?php else: ?>
           <td>
             <form method="post" name="show_current_script" action="<?php echo Horde::applicationUrl('script.php') ?>">
-              <?php Util::pformInput() ?>
+              <?php Horde_Util::pformInput() ?>
               <input class="button" type="submit" name="submit" value="<?php echo _("Show Current Script") ?>" />
             </form>
           </td>
index 1b14e40..c240a2c 100644 (file)
@@ -1,5 +1,5 @@
 <form method="post" name="filters" action="<?php echo Horde::applicationUrl('whitelist.php') ?>">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="rule_update" />
 <h1 class="header">
   <?php echo _("Whitelist") ?>
index 2103c64..43fa34c 100644 (file)
 require_once dirname(__FILE__) . '/lib/base.load.php';
 include_once HORDE_BASE . '/lib/core.php';
 
-/* We should have loaded the String class, from the Horde_Util
- * package, in core.php. If String:: isn't defined, then we're not
+/* We should have loaded the Horde_String class, from the Horde_Util
+ * package, in core.php. If Horde_String:: isn't defined, then we're not
  * finding some critical libraries. */
-if (!class_exists('String')) {
+if (!class_exists('Horde_String')) {
     echo '<br /><h2 style="color:red">The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the <a href="http://cvs.horde.org/cvs.php/framework">framework</a> module from <a href="http://www.horde.org/source/">Horde CVS</a>, and install the packages in it with the install-packages.php script.</h2>';
     exit;
 }
index 9c76851..ec30f02 100644 (file)
@@ -12,7 +12,6 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 require_once 'Horde/Help.php';
-require_once 'Horde/Variables.php';
 
 /* Redirect if vacation is not available. */
 if (!in_array(Ingo_Storage::ACTION_VACATION, $_SESSION['ingo']['script_categories'])) {
@@ -28,7 +27,7 @@ $vac_id = $filters->findRuleId(Ingo_Storage::ACTION_VACATION);
 $vac_rule = $filters->getRule($vac_id);
 
 /* Load libraries. */
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 if ($vars->get('submitbutton') == _("Return to Rules List")) {
     header('Location: ' . Horde::applicationUrl('filters.php', true));
     exit;
index 2d14cc5..1f9124c 100644 (file)
@@ -24,10 +24,10 @@ if (!in_array(Ingo_Storage::ACTION_WHITELIST, $_SESSION['ingo']['script_categori
 $whitelist = &$ingo_storage->retrieve(Ingo_Storage::ACTION_WHITELIST);
 
 /* Perform requested actions. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 switch ($actionID) {
 case 'rule_update':
-    $ret = $whitelist->setWhitelist(Util::getFormData('whitelist'));
+    $ret = $whitelist->setWhitelist(Horde_Util::getFormData('whitelist'));
     if (is_a($ret, 'PEAR_Error')) {
         $notification->push($ret, $ret->getCode());
     } else {
index ddc77e0..310835a 100644 (file)
 /* Include Horde's core.php file. */
 include_once '../lib/core.php';
 
-/* We should have loaded the String class, from the Horde_Util
-   package, in core.php. If String:: isn't defined, then we're not
+/* We should have loaded the Horde_String class, from the Horde_Util
+   package, in core.php. If Horde_String:: isn't defined, then we're not
    finding some critical libraries. */
-if (!class_exists('String')) {
+if (!class_exists('Horde_String')) {
     echo '<br /><h2 style="color:red">The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the <a href="http://cvs.horde.org/cvs.php/framework">framework</a> module from <a href="http://www.horde.org/source/">Horde CVS</a>, and install the packages in it with the install-packages.php script.</h2>';
     exit;
 }
index 07a8425..9426158 100644 (file)
@@ -53,8 +53,6 @@ class Koward {
         global $registry, $notification, $browser;
 
         /* Horde core classes that aren't autoloaded. */
-        include_once 'Horde/Util.php';
-        include_once 'Horde/String.php';
         include_once 'Horde/NLS.php';
         include_once 'Horde/Auth.php';
         include_once 'Horde/Perms.php';
@@ -248,4 +246,4 @@ class Koward {
 
         return self::$instance;
     }
-}
\ No newline at end of file
+}
index bf426a0..c886491 100644 (file)
@@ -139,9 +139,8 @@ class Koward_Cli extends Horde_Controller_Request_Base
                 /**
                  * FIXME: Allow retrieving the form fields without specifying $vars.
                  */
-                require_once 'Horde/Variables.php';
                 $object = null;
-                $form = new Koward_Form_Object(Variables::getDefaultVariables(), $object);
+                $form = new Koward_Form_Object(Horde_Variables::getDefaultVariables(), $object);
 
                 $fields = array_keys($form->getTypeFields($type));
 
@@ -240,4 +239,4 @@ class Koward_Cli extends Horde_Controller_Request_Base
         return $allParams;
     }
 
-}
\ No newline at end of file
+}
index 60560ff..a488f3f 100644 (file)
@@ -32,8 +32,8 @@ class IndexController extends Koward_Controller_Application
             /* Destroy any existing session on login and make sure to use a
              * new session ID, to avoid session fixation issues. */
             Horde::getCleanSession();
-            if ($this->koward->auth->authenticate(Util::getPost('horde_user'),
-                                                  array('password' => Util::getPost('horde_pass')))) {
+            if ($this->koward->auth->authenticate(Horde_Util::getPost('horde_user'),
+                                                  array('password' => Horde_Util::getPost('horde_pass')))) {
                 $entry = sprintf('Login success for %s [%s] to Horde',
                                  Auth::getAuth(), $_SERVER['REMOTE_ADDR']);
                 Horde::logMessage($entry, __FILE__, __LINE__, PEAR_LOG_NOTICE);
@@ -50,7 +50,7 @@ class IndexController extends Koward_Controller_Application
                 exit;
             } else {
                 $entry = sprintf('FAILED LOGIN for %s [%s] to Horde',
-                                 Util::getFormData('horde_user'), $_SERVER['REMOTE_ADDR']);
+                                 Horde_Util::getFormData('horde_user'), $_SERVER['REMOTE_ADDR']);
                 Horde::logMessage($entry, __FILE__, __LINE__, PEAR_LOG_ERR);
             }
         }
@@ -72,4 +72,4 @@ class IndexController extends Koward_Controller_Application
         header('Location: ' . $this->urlFor(array('controller' => 'index', 'action' => 'login')));
         exit;
     }
-}
\ No newline at end of file
+}
index 61831bf..0ad0e08 100644 (file)
@@ -19,7 +19,6 @@ class ObjectController extends Koward_Controller_Application
     public function listall()
     {
         require_once 'Horde/UI/Tabs.php';
-        require_once 'Horde/Variables.php';
 
         $this->object_type = $this->params->get('id', $this->types[0]);
 
@@ -70,7 +69,7 @@ class ObjectController extends Koward_Controller_Application
             }
         }
 
-        $this->tabs = new Horde_UI_Tabs(null, Variables::getDefaultVariables());
+        $this->tabs = new Horde_UI_Tabs(null, Horde_Variables::getDefaultVariables());
         foreach ($this->koward->objects as $key => $configuration) {
             if (!$this->koward->hasAccess($this->getPermissionId() . '/' . $key)) {
                 continue;
@@ -139,8 +138,6 @@ class ObjectController extends Koward_Controller_Application
                 $this->koward->notification->push(_("The object that should be viewed has not been specified."),
                                                  'horde.error');
             } else {
-                require_once 'Horde/Variables.php';
-
                 $this->object = $this->koward->getObject($this->params->id);
 
                 $this->object_type = $this->koward->getType($this->object);
@@ -201,7 +198,7 @@ class ObjectController extends Koward_Controller_Application
                     }
                 }
 
-                $this->vars = Variables::getDefaultVariables();
+                $this->vars = Horde_Variables::getDefaultVariables();
                 $this->form = new Koward_Form_Object($this->vars, $this->object,
                                                     array('title' => _("View object")));
                 $this->edit = Horde::link(
@@ -241,8 +238,7 @@ class ObjectController extends Koward_Controller_Application
     {
         $this->object = null;
 
-        require_once 'Horde/Util.php';
-        $type = Util::getFormData('type');
+        $type = Horde_Util::getFormData('type');
 
         if (!empty($type)) {
             $this->checkAccess($this->getPermissionId() . '/' . $type,
@@ -277,8 +273,7 @@ class ObjectController extends Koward_Controller_Application
     private function _edit()
     {
         try {
-            require_once 'Horde/Variables.php';
-            $this->vars = Variables::getDefaultVariables();
+            $this->vars = Horde_Variables::getDefaultVariables();
             foreach ($this->params as $key => $value) {
                 if (!$this->vars->exists($key)) {
                     if (is_array($value) && count($value) == 1) {
@@ -314,8 +309,7 @@ class ObjectController extends Koward_Controller_Application
     public function search()
     {
         try {
-            require_once 'Horde/Variables.php';
-            $this->vars = Variables::getDefaultVariables();
+            $this->vars = Horde_Variables::getDefaultVariables();
             $this->form = new Koward_Form_Search($this->vars, $this->object);
 
             $this->allowEdit = $this->koward->hasAccess('object/edit',
@@ -385,4 +379,4 @@ class ObjectController extends Koward_Controller_Application
         $this->render();
     }
 
-}
\ No newline at end of file
+}
index 51d9eb7..022e9b5 100644 (file)
@@ -19,7 +19,7 @@ class Koward_Form_Actions extends Horde_Form {
     {
         $this->koward = &Koward::singleton();
 
-        parent::Horde_Form(Variables::getDefaultVariables());
+        parent::Horde_Form(Horde_Variables::getDefaultVariables());
 
         $this->setTitle(_("Object actions"));
 
@@ -32,9 +32,7 @@ class Koward_Form_Actions extends Horde_Form {
 
     function &execute()
     {
-        require_once 'Horde/Util.php';
-
-        $submit = Util::getFormData('submitbutton');
+        $submit = Horde_Util::getFormData('submitbutton');
         if (!empty($submit)) {
             $type = $this->koward->getType($this->object);
             foreach ($this->koward->objects[$type]['actions'] as $action => $label) {
index c63827a..58f9066 100644 (file)
@@ -11,7 +11,7 @@
 
 <tr>
     <td class="light rightAlign"><strong><?php echo Horde::label('horde_user', _("Username")) ?></strong>&nbsp;</td>
-    <td class="leftAlign"><input type="text" id="horde_user" name="horde_user" value="<?php echo htmlspecialchars(Util::getFormData('horde_user')) ?>" style="direction:ltr" /></td>
+    <td class="leftAlign"><input type="text" id="horde_user" name="horde_user" value="<?php echo htmlspecialchars(Horde_Util::getFormData('horde_user')) ?>" style="direction:ltr" /></td>
 </tr>
 
 <tr>
index 8e74c09..f120ba6 100644 (file)
@@ -2,7 +2,7 @@
 <?= $this->renderPartial('menu'); ?>
 
 <form action="<?= $this->submit_url ?>" method="post" name="delete">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
 
 <div class="headerbox">
 
index 430237f..25de35e 100644 (file)
@@ -428,7 +428,7 @@ $_prefs['moz_sidebar'] = array(
     'type' => 'link',
     'xurl' => sprintf('javascript:if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(\'%s\', \'%s\', \'%s\'); else alert(\'%s\');',
                       $GLOBALS['registry']->get('name', 'horde'),
-                      Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/portal/sidebar.php', true, -1), 'mozbar', '1'),
+                      Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/portal/sidebar.php', true, -1), 'mozbar', '1'),
                       Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/prefs.php', true, -1),
                       addslashes(_("Couldn't find the Mozilla Sidebar. Make sure the sidebar is open."))),
     'desc' => sprintf(_("Add the %s Menu as a Mozilla Sidebar"), $GLOBALS['registry']->get('name', 'horde'))
index 8edc165..8a775da 100644 (file)
@@ -8,8 +8,8 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-if (!Util::getFormData('cancel')) {
-    $targetcalendar = Util::getFormData('targetcalendar');
+if (!Horde_Util::getFormData('cancel')) {
+    $targetcalendar = Horde_Util::getFormData('targetcalendar');
     if (strpos($targetcalendar, ':')) {
         list($calendar_id, $user) = explode(':', $targetcalendar, 2);
     } else {
@@ -39,7 +39,7 @@ if (!Util::getFormData('cancel')) {
 
             $notification->push(sprintf(_("There was an error adding the event: %s"), $message), 'horde.error');
         } else {
-            if (Util::getFormData('sendupdates', false)) {
+            if (Horde_Util::getFormData('sendupdates', false)) {
                 $event = Kronolith::getDriver()->getEvent($result);
                 if (is_a($event, 'PEAR_Error')) {
                     $notification->push($event, 'horde.error');
@@ -51,11 +51,11 @@ if (!Util::getFormData('cancel')) {
     }
 }
 
-if ($url = Util::getFormData('url')) {
+if ($url = Horde_Util::getFormData('url')) {
     header('Location: ' . $url);
 } else {
-    $url = Util::addParameter($prefs->getValue('defaultview') . '.php',
-                              array('month' => Util::getFormData('month'),
-                                    'year' => Util::getFormData('year')));
+    $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php',
+                              array('month' => Horde_Util::getFormData('month'),
+                                    'year' => Horde_Util::getFormData('year')));
     header('Location: ' . Horde::applicationUrl($url, true));
 }
index 4feea97..ef9b2cf 100644 (file)
@@ -56,14 +56,14 @@ function saveEvent($event)
         $GLOBALS['notification']->push($result, 'horde.error');
         return true;
     }
-    $start = new Horde_Date(Util::getFormData('view_start'));
-    $end   = new Horde_Date(Util::getFormData('view_end'));
+    $start = new Horde_Date(Horde_Util::getFormData('view_start'));
+    $end   = new Horde_Date(Horde_Util::getFormData('view_end'));
     $end->hour = 23;
     $end->min = $end->sec = 59;
     Kronolith::addEvents($events, $event, $start, $end, true, true);
     $result = new stdClass;
-    $result->cal = Util::getFormData('cal');
-    $result->view = Util::getFormData('view');
+    $result->cal = Horde_Util::getFormData('cal');
+    $result->view = Horde_Util::getFormData('view');
     $result->sig = $start->dateString() . $end->dateString();
     if (count($events)) {
         $result->events = $events;
@@ -71,10 +71,10 @@ function saveEvent($event)
     return $result;
 }
 
-// Need to load Util:: to give us access to Util::getPathInfo().
+// Need to load Horde_Util:: to give us access to Horde_Util::getPathInfo().
 require_once dirname(__FILE__) . '/base.load.php';
 require_once HORDE_BASE . '/lib/core.php';
-$action = basename(Util::getPathInfo());
+$action = basename(Horde_Util::getPathInfo());
 if (empty($action)) {
     // This is the only case where we really don't return anything, since
     // the frontend can be presumed not to make this request on purpose.
@@ -92,7 +92,7 @@ $session_timeout = 'json';
 require_once KRONOLITH_BASE . '/lib/base.php';
 
 // Process common request variables.
-$cacheid = Util::getPost('cacheid');
+$cacheid = Horde_Util::getPost('cacheid');
 
 // Open an output buffer to ensure that we catch errors that might break JSON
 // encoding.
@@ -104,12 +104,12 @@ try {
 
     switch ($action) {
     case 'ListEvents':
-        $start = new Horde_Date(Util::getFormData('start'));
-        $end   = new Horde_Date(Util::getFormData('end'));
-        $cal   = Util::getFormData('cal');
+        $start = new Horde_Date(Horde_Util::getFormData('start'));
+        $end   = new Horde_Date(Horde_Util::getFormData('end'));
+        $cal   = Horde_Util::getFormData('cal');
         $result = new stdClass;
         $result->cal = $cal;
-        $result->view = Util::getFormData('view');
+        $result->view = Horde_Util::getFormData('view');
         $result->sig = $start->dateString() . $end->dateString();
         if (!($kronolith_driver = getDriver($cal))) {
             break;
@@ -125,11 +125,11 @@ try {
         break;
 
     case 'GetEvent':
-        if (!($kronolith_driver = getDriver(Util::getFormData('cal')))) {
+        if (!($kronolith_driver = getDriver(Horde_Util::getFormData('cal')))) {
             $result = true;
             break;
         }
-        if (is_null($id = Util::getFormData('id'))) {
+        if (is_null($id = Horde_Util::getFormData('id'))) {
             $result = true;
             break;
         }
@@ -149,11 +149,11 @@ try {
         break;
 
     case 'SaveEvent':
-        if (!($kronolith_driver = getDriver(Util::getFormData('cal')))) {
+        if (!($kronolith_driver = getDriver(Horde_Util::getFormData('cal')))) {
             $result = true;
             break;
         }
-        $event = $kronolith_driver->getEvent(Util::getFormData('id'));
+        $event = $kronolith_driver->getEvent(Horde_Util::getFormData('id'));
         if (is_a($event, 'PEAR_Error')) {
             $notification->push($event, 'horde.error');
             $result = true;
@@ -174,10 +174,10 @@ try {
         break;
 
     case 'UpdateEvent':
-        if (!($kronolith_driver = getDriver(Util::getFormData('cal')))) {
+        if (!($kronolith_driver = getDriver(Horde_Util::getFormData('cal')))) {
             break;
         }
-        if (is_null($id = Util::getFormData('id'))) {
+        if (is_null($id = Horde_Util::getFormData('id'))) {
             $result = true;
             break;
         }
@@ -195,7 +195,7 @@ try {
             $result = true;
             break;
         }
-        $attributes = Horde_Serialize::unserialize(Util::getFormData('att'), Horde_Serialize::JSON);
+        $attributes = Horde_Serialize::unserialize(Horde_Util::getFormData('att'), Horde_Serialize::JSON);
         foreach ($attributes as $attribute => $value) {
             switch ($attribute) {
             case 'start_date':
@@ -219,11 +219,11 @@ try {
         break;
 
     case 'DeleteEvent':
-        if (!($kronolith_driver = getDriver(Util::getFormData('cal')))) {
+        if (!($kronolith_driver = getDriver(Horde_Util::getFormData('cal')))) {
             $result = true;
             break;
         }
-        if (is_null($id = Util::getFormData('id'))) {
+        if (is_null($id = Horde_Util::getFormData('id'))) {
             $result = true;
             break;
         }
@@ -254,14 +254,14 @@ try {
         break;
 
     case 'SearchEvents':
-        $query = Horde_Serialize::unserialize(Util::getFormData('query'), Horde_Serialize::JSON);
+        $query = Horde_Serialize::unserialize(Horde_Util::getFormData('query'), Horde_Serialize::JSON);
         if (!isset($query->start)) {
             $query->start = new Horde_Date($_SERVER['REQUEST_TIME']);
         }
         if (!isset($query->end)) {
             $query->end = null;
         }
-        $cals   = Horde_Serialize::unserialize(Util::getFormData('cals'), Horde_Serialize::JSON);
+        $cals   = Horde_Serialize::unserialize(Horde_Util::getFormData('cals'), Horde_Serialize::JSON);
         $events = array();
         foreach ($cals as $cal) {
             if (!($kronolith_driver = getDriver($cal))) {
@@ -278,7 +278,7 @@ try {
         }
         $result = new stdClass;
         $result->view = 'search';
-        $result->query = Util::getFormData('query');
+        $result->query = Horde_Util::getFormData('query');
         if ($events) {
             $result->events = $events;
         }
@@ -286,7 +286,7 @@ try {
 
     case 'SearchCalendars':
         $result = new stdClass;
-        $result->events = 'Searched for calendars: ' . Util::getFormData('title');
+        $result->events = 'Searched for calendars: ' . Horde_Util::getFormData('title');
         break;
 
     case 'SaveCalPref':
@@ -294,10 +294,10 @@ try {
         break;
 
     case 'ChunkContent':
-        $chunk = basename(Util::getPost('chunk'));
+        $chunk = basename(Horde_Util::getPost('chunk'));
         if (!empty($chunk)) {
             $result = new stdClass;
-            $result->chunk = Util::bufferOutput('include', KRONOLITH_TEMPLATES . '/chunks/' . $chunk . '.php');
+            $result->chunk = Horde_Util::bufferOutput('include', KRONOLITH_TEMPLATES . '/chunks/' . $chunk . '.php');
         }
         break;
 
index 4cc5d7d..9ba9b34 100644 (file)
 @define('AUTH_HANDLER', true);
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$cal = Util::getFormData('c');
-$id = Util::getFormData('e');
-$uid = Util::getFormData('i');
-$user = Util::getFormData('u');
+$cal = Horde_Util::getFormData('c');
+$id = Horde_Util::getFormData('e');
+$uid = Horde_Util::getFormData('i');
+$user = Horde_Util::getFormData('u');
 
-switch (Util::getFormData('a')) {
+switch (Horde_Util::getFormData('a')) {
 case 'accept':
     $action = Kronolith::RESPONSE_ACCEPTED;
     $msg = _("You have successfully accepted attendence to this event.");
index 23fcb40..c40cacc 100644 (file)
@@ -9,7 +9,6 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 require_once 'Horde/Identity.php';
-require_once 'Horde/Variables.php';
 
 // Get the current attendees array from the session cache.
 $attendees = (isset($_SESSION['kronolith']['attendees']) &&
@@ -19,11 +18,11 @@ $attendees = (isset($_SESSION['kronolith']['attendees']) &&
 $editAttendee = null;
 
 // Get the action ID and value. This specifies what action the user initiated.
-$actionID = Util::getFormData('actionID');
-if (Util::getFormData('clearAll')) {
+$actionID = Horde_Util::getFormData('actionID');
+if (Horde_Util::getFormData('clearAll')) {
     $actionID =  'clear';
 }
-$actionValue = Util::getFormData('actionValue');
+$actionValue = Horde_Util::getFormData('actionValue');
 
 // Perform the specified action, if there is one.
 switch ($actionID) {
@@ -31,10 +30,10 @@ case 'add':
     $parser = new Mail_RFC822;
     // Add new attendees. Multiple attendees can be seperated on a single line
     // by whitespace and/or commas.
-    $newAttendees = trim(Util::getFormData('newAttendees'));
+    $newAttendees = trim(Horde_Util::getFormData('newAttendees'));
     if (empty($newAttendees)) {
-        if (Util::getFormData('addNewClose')) {
-            Util::closeWindowJS();
+        if (Horde_Util::getFormData('addNewClose')) {
+            Horde_Util::closeWindowJS();
             exit;
         }
         break;
@@ -99,8 +98,8 @@ case 'add':
 
     $_SESSION['kronolith']['attendees'] = $attendees;
 
-    if (Util::getFormData('addNewClose')) {
-        Util::closeWindowJS();
+    if (Horde_Util::getFormData('addNewClose')) {
+        Horde_Util::closeWindowJS();
         exit;
     }
     break;
@@ -151,22 +150,22 @@ case 'changeresp':
 case 'dismiss':
     // Close the attendee window.
     if ($browser->hasFeature('javascript')) {
-        Util::closeWindowJS();
+        Horde_Util::closeWindowJS();
         exit;
     }
 
-    $url = Util::getFormData('url');
+    $url = Horde_Util::getFormData('url');
     if (!empty($url)) {
         $location = Horde::applicationUrl($url, true);
     } else {
-        $url = Util::addParameter($prefs->getValue('defaultview') . '.php',
-                                  'month', Util::getFormData('month'));
-        $url = Util::addParameter($url, 'year', Util::getFormData('year'));
+        $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php',
+                                  'month', Horde_Util::getFormData('month'));
+        $url = Horde_Util::addParameter($url, 'year', Horde_Util::getFormData('year'));
         $location = Horde::applicationUrl($url, true);
     }
 
     // Make sure URL is unique.
-    $location = Util::addParameter($location, 'unique', hash('md5', microtime()));
+    $location = Horde_Util::addParameter($location, 'unique', hash('md5', microtime()));
     header('Location: ' . $location);
     exit;
 
@@ -178,7 +177,7 @@ case 'clear':
 }
 
 // Get the current Free/Busy view; default to the 'day' view if none specified.
-$view = Util::getFormData('view', 'Day');
+$view = Horde_Util::getFormData('view', 'Day');
 
 // Pre-format our delete image/link.
 $delimg = Horde::img('delete.png', _("Remove Attendee"), null,
@@ -186,7 +185,7 @@ $delimg = Horde::img('delete.png', _("Remove Attendee"), null,
 
 $ident = &Identity::singleton();
 $identities = $ident->getAll('id');
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $tabs = new Horde_UI_Tabs(null, $vars);
 $tabs->addTab(_("Day"), 'javascript:switchView(\'Day\')', 'Day');
 $tabs->addTab(_("Work Week"), 'javascript:switchView(\'Workweek\')', 'Workweek');
@@ -244,7 +243,7 @@ foreach ($attendees as $email => $status) {
     }
 }
 
-$date = Util::getFormData('date', date('Ymd')) . '000000';
+$date = Horde_Util::getFormData('date', date('Ymd')) . '000000';
 $date = new Horde_Date($date);
 $vfb_html = $attendee_view->render($date);
 
index 21bade2..e315cc7 100644 (file)
@@ -21,7 +21,7 @@ if (!Auth::getAuth() || $prefs->isLocked('default_share')) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Kronolith_CreateCalendarForm($vars);
 
 // Execute if the form is valid.
index 5c97690..f2d4ec0 100644 (file)
@@ -20,7 +20,7 @@ if (!Auth::getAuth()) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $calendar_id = $vars->get('c');
 if ($calendar_id == Auth::getAuth()) {
     $notification->push(_("This calendar cannot be deleted."), 'horde.warning');
@@ -42,7 +42,7 @@ if (is_a($calendar, 'PEAR_Error')) {
 $form = new Kronolith_DeleteCalendarForm($vars, $calendar);
 
 // Execute if the form is valid (must pass with POST variables only).
-if ($form->validate(new Variables($_POST))) {
+if ($form->validate(new Horde_Variables($_POST))) {
     $result = $form->execute();
     if (is_a($result, 'PEAR_Error')) {
         $notification->push($result, 'horde.error');
index 0a5d97f..af2a43b 100644 (file)
@@ -20,7 +20,7 @@ if (!Auth::getAuth()) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $calendar = $kronolith_shares->getShare($vars->get('c'));
 if (is_a($calendar, 'PEAR_Error')) {
     $notification->push($calendar, 'horde.error');
index 8cf1270..05dd88f 100644 (file)
@@ -49,7 +49,7 @@ $subscribe_url_base = $webdav ?
     Horde::url($registry->get('webroot', 'horde')
                . ($rewrite ? '/rpc/kronolith/' : '/rpc.php/kronolith/'),
                true, -1) :
-    Util::addParameter(Horde::applicationUrl('ics.php', true, -1), 'c', '');
+    Horde_Util::addParameter(Horde::applicationUrl('ics.php', true, -1), 'c', '');
 
 $calendars = array();
 $sorted_calendars = array();
index bd434d1..66edb34 100644 (file)
@@ -21,7 +21,7 @@ if (!Auth::getAuth()) {
 }
 
 $calendar = null;
-$calendarId = Util::getFormData('c');
+$calendarId = Horde_Util::getFormData('c');
 if (strncmp($calendarId, 'remote_', 7) === 0) {
     $calendarId = substr($calendarId, 7);
     $remote_calendars = unserialize($prefs->getValue('remote_cals'));
@@ -42,7 +42,7 @@ if (strncmp($calendarId, 'remote_', 7) === 0) {
                      . ($rewrite ? '/rpc/kronolith/' : '/rpc.php/kronolith/'),
                      true, -1)
           . $calendar->get('owner') . '/' . $calendar->getName() . '.ics'
-        : Util::addParameter(Horde::applicationUrl('ics.php', true, -1), 'c',
+        : Horde_Util::addParameter(Horde::applicationUrl('ics.php', true, -1), 'c',
                              $calendar->getName());
 }
 
index e3afb3c..7b67f11 100644 (file)
@@ -21,7 +21,7 @@ if (!Auth::getAuth() || $prefs->isLocked('remote_cals')) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $url = $vars->get('url');
 
 $remote_calendar = null;
index 84d40cd..7fa12e9 100644 (file)
@@ -21,7 +21,7 @@ if (!Auth::getAuth() || $prefs->isLocked('remote_cals')) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Kronolith_SubscribeRemoteCalendarForm($vars);
 
 // Execute if the form is valid.
index 11dce58..d470c86 100644 (file)
@@ -21,7 +21,7 @@ if (!Auth::getAuth() || $prefs->isLocked('remote_cals')) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $url = $vars->get('url');
 
 $remote_calendar = null;
@@ -41,7 +41,7 @@ if (is_null($remote_calendar)) {
 $form = new Kronolith_UnsubscribeRemoteCalendarForm($vars, $remote_calendar);
 
 // Execute if the form is valid (must pass with POST variables only).
-if ($form->validate(new Variables($_POST))) {
+if ($form->validate(new Horde_Variables($_POST))) {
     $result = $form->execute();
     if (is_a($result, 'PEAR_Error')) {
         $notification->push($result, 'horde.error');
index 78e5c6c..ea6d7f5 100644 (file)
@@ -9,7 +9,7 @@
 require_once dirname(__FILE__) . '/lib/base.php';
 
 if (!Auth::getAuth()) {
-    Util::closeWindowJS();
+    Horde_Util::closeWindowJS();
     exit;
 }
 
@@ -18,7 +18,7 @@ $source_list = $registry->call('contacts/sources');
 
 /* If we self-submitted, use that source. Otherwise, choose a good
  * source. */
-$source = Util::getFormData('source');
+$source = Horde_Util::getFormData('source');
 if (empty($source) || !isset($source_list[$source])) {
     /* We don't just pass the second argument to getFormData() because
      * we want to trap for invalid sources, not just no source. */
@@ -26,7 +26,7 @@ if (empty($source) || !isset($source_list[$source])) {
 }
 
 /* Get the search as submitted (defaults to '' which should list everyone). */
-$search = Util::getFormData('search');
+$search = Horde_Util::getFormData('search');
 $apiargs = array();
 $apiargs['addresses'] = array($search);
 $apiargs['addressbooks'] = array($source);
@@ -61,13 +61,13 @@ if (!is_a($results, 'PEAR_Error')) {
 /* If self-submitted, preserve the currently selected users encoded by
    javascript to pass as value|text. */
 $selected_addresses = array();
-$sa = explode('|', Util::getFormData('sa'));
+$sa = explode('|', Horde_Util::getFormData('sa'));
 for ($i = 0; $i < count($sa) - 1; $i += 2) {
     $selected_addresses[$sa[$i]] = $sa[$i + 1];
 }
 
 /* Set the default list display (name or email). */
-$display = Util::getFormData('display', 'name');
+$display = Horde_Util::getFormData('display', 'name');
 
 /* Display the form. */
 $title = _("Address Book");
index 46cd9d8..83c6afa 100644 (file)
@@ -46,8 +46,8 @@ if (Kronolith::hasPermission('max_events') !== true &&
 }
 
 /* Initial values. */
-$import_step   = Util::getFormData('import_step', 0) + 1;
-$actionID      = Util::getFormData('actionID');
+$import_step   = Horde_Util::getFormData('import_step', 0) + 1;
+$actionID      = Horde_Util::getFormData('actionID');
 $next_step     = Horde_Data::IMPORT_FILE;
 $app_fields    = array('title' => _("Title"),
                        'start_date' => _("Start Date"),
@@ -70,27 +70,27 @@ $time_fields   = array('start_date'     => 'date',
                        'recur_end_date' => 'date');
 $param         = array('time_fields' => $time_fields,
                        'file_types'  => $file_types);
-$import_format = Util::getFormData('import_format', '');
+$import_format = Horde_Util::getFormData('import_format', '');
 $error         = false;
 $kronolith_driver = Kronolith::getDriver();
 
 /* Loop through the action handlers. */
 switch ($actionID) {
 case 'export':
-    if (Util::getFormData('all_events')) {
+    if (Horde_Util::getFormData('all_events')) {
         $start = null;
         $end = null;
     } else {
-        $start->mday = Util::getFormData('start_day');
-        $start->month = Util::getFormData('start_month');
-        $start->year = Util::getFormData('start_year');
-        $end->mday = Util::getFormData('end_day');
-        $end->month = Util::getFormData('end_month');
-        $end->year = Util::getFormData('end_year');
+        $start->mday = Horde_Util::getFormData('start_day');
+        $start->month = Horde_Util::getFormData('start_month');
+        $start->year = Horde_Util::getFormData('start_year');
+        $end->mday = Horde_Util::getFormData('end_day');
+        $end->month = Horde_Util::getFormData('end_month');
+        $end->year = Horde_Util::getFormData('end_year');
     }
 
     $events = array();
-    $calendars = Util::getFormData('exportCal', $display_calendars);
+    $calendars = Horde_Util::getFormData('exportCal', $display_calendars);
     if (!is_array($calendars)) {
         $calendars = array($calendars);
     }
@@ -107,7 +107,7 @@ case 'export':
         break;
     }
 
-    $exportID = Util::getFormData('exportID');
+    $exportID = Horde_Util::getFormData('exportID');
     switch ($exportID) {
     case Horde_Data::EXPORT_CSV:
         $data = array();
@@ -168,7 +168,7 @@ case 'export':
             }
         }
 
-        $iCal->setAttribute('X-WR-CALNAME', String::convertCharset(implode(', ', $calNames), NLS::getCharset(), 'utf-8'));
+        $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset(implode(', ', $calNames), NLS::getCharset(), 'utf-8'));
         $data = $iCal->exportvCalendar();
         $browser->downloadHeaders(_("events.ics"), 'text/calendar', false, strlen($data));
         echo $data;
@@ -177,8 +177,8 @@ case 'export':
     break;
 
 case Horde_Data::IMPORT_FILE:
-    $_SESSION['import_data']['import_cal'] = Util::getFormData('importCal');
-    $_SESSION['import_data']['purge'] = Util::getFormData('purge');
+    $_SESSION['import_data']['import_cal'] = Horde_Util::getFormData('importCal');
+    $_SESSION['import_data']['purge'] = Horde_Util::getFormData('purge');
     break;
 }
 
index 9b52da0..774c42d 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 $view = Kronolith::getView('Day');
 $title = $view->getTime($prefs->getValue('date_format'));
-$print_view = (bool)Util::getFormData('print');
+$print_view = (bool)Horde_Util::getFormData('print');
 
 Horde::addScriptFile('tooltip.js', 'horde', true);
 if (!$print_view) {
index 753353f..ff2e0f0 100644 (file)
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$kronolith_driver = Kronolith::getDriver(null, Util::getFormData('calendar'));
-if ($eventID = Util::getFormData('eventID')) {
+$kronolith_driver = Kronolith::getDriver(null, Horde_Util::getFormData('calendar'));
+if ($eventID = Horde_Util::getFormData('eventID')) {
     $event = $kronolith_driver->getEvent($eventID);
     if (is_a($event, 'PEAR_Error')) {
-        if (($url = Util::getFormData('url')) === null) {
+        if (($url = Horde_Util::getFormData('url')) === null) {
             $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true);
         }
         header('Location: ' . $url);
@@ -27,11 +27,11 @@ if ($eventID = Util::getFormData('eventID')) {
     } else {
         $notification_type = Kronolith::ITIP_CANCEL;
         $instance = null;
-        if (Util::getFormData('future')) {
+        if (Horde_Util::getFormData('future')) {
             $recurEnd = new Horde_Date(array('hour' => 0, 'min' => 0, 'sec' => 0,
-                                             'month' => Util::getFormData('month', date('n')),
-                                             'mday' => Util::getFormData('mday', date('j')) - 1,
-                                             'year' => Util::getFormData('year', date('Y'))));
+                                             'month' => Horde_Util::getFormData('month', date('n')),
+                                             'mday' => Horde_Util::getFormData('mday', date('j')) - 1,
+                                             'year' => Horde_Util::getFormData('year', date('Y'))));
             if ($event->end->compareDate($recurEnd) > 0) {
                 $result = $kronolith_driver->deleteEvent($event->getId());
                 if (is_a($result, 'PEAR_Error')) {
@@ -42,18 +42,18 @@ if ($eventID = Util::getFormData('eventID')) {
                 $event->save();
             }
             $notification_type = Kronolith::ITIP_REQUEST;
-        } elseif (Util::getFormData('current')) {
-            $event->recurrence->addException(Util::getFormData('year'),
-                                             Util::getFormData('month'),
-                                             Util::getFormData('mday'));
+        } elseif (Horde_Util::getFormData('current')) {
+            $event->recurrence->addException(Horde_Util::getFormData('year'),
+                                             Horde_Util::getFormData('month'),
+                                             Horde_Util::getFormData('mday'));
             $event->save();
-            $instance = new Horde_Date(array('year' => Util::getFormData('year'),
-                                             'month' => Util::getFormData('month'),
-                                             'mday' => Util::getFormData('mday')));
+            $instance = new Horde_Date(array('year' => Horde_Util::getFormData('year'),
+                                             'month' => Horde_Util::getFormData('month'),
+                                             'mday' => Horde_Util::getFormData('mday')));
         }
 
         if (!$event->recurs() ||
-            Util::getFormData('all') ||
+            Horde_Util::getFormData('all') ||
             !$event->recurrence->hasActiveRecurrence()) {
             $result = $kronolith_driver->deleteEvent($event->getId());
             if (is_a($result, 'PEAR_Error')) {
@@ -61,17 +61,17 @@ if ($eventID = Util::getFormData('eventID')) {
             }
         }
 
-        if (Util::getFormData('sendupdates', false)) {
+        if (Horde_Util::getFormData('sendupdates', false)) {
             Kronolith::sendITipNotifications($event, $notification, $notification_type, $instance);
         }
     }
 }
 
-if ($url = Util::getFormData('url')) {
+if ($url = Horde_Util::getFormData('url')) {
     $location = $url;
 } else {
-    $url = Util::addParameter($prefs->getValue('defaultview') . '.php',
-                              'date', Util::getFormData('date', date('Ymd')));
+    $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php',
+                              'date', Horde_Util::getFormData('date', date('Ymd')));
     $location = Horde::applicationUrl($url, true);
 }
 
index 2c15608..bd156b6 100644 (file)
@@ -13,10 +13,10 @@ function _save(&$event)
 {
     $res = $event->save();
     $tagger = Kronolith::getTagger();
-    $tagger->replaceTags($event->getUID(), Util::getFormData('tags'));
+    $tagger->replaceTags($event->getUID(), Horde_Util::getFormData('tags'));
     if (is_a($res, 'PEAR_Error')) {
         $GLOBALS['notification']->push(sprintf(_("There was an error editing the event: %s"), $res->getMessage()), 'horde.error');
-    } elseif (Util::getFormData('sendupdates', false)) {
+    } elseif (Horde_Util::getFormData('sendupdates', false)) {
         Kronolith::sendITipNotifications($event, $GLOBALS['notification'], Kronolith::ITIP_REQUEST);
     }
 }
@@ -37,26 +37,26 @@ function _check_max()
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$url = Util::getFormData('url');
+$url = Horde_Util::getFormData('url');
 $kronolith_driver = Kronolith::getDriver();
 
-if ($exception = Util::getFormData('del_exception')) {
-    $calendar = Util::getFormData('calendar');
+if ($exception = Horde_Util::getFormData('del_exception')) {
+    $calendar = Horde_Util::getFormData('calendar');
     $share = &$kronolith_shares->getShare($calendar);
     if (is_a($share, 'PEAR_Error')) {
         $notification->push(sprintf(_("There was an error accessing the calendar: %s"), $share->getMessage()), 'horde.error');
     } else {
         $kronolith_driver->open($calendar);
-        $event = &$kronolith_driver->getEvent(Util::getFormData('eventID'));
+        $event = &$kronolith_driver->getEvent(Horde_Util::getFormData('eventID'));
         $result = sscanf($exception, '%04d%02d%02d', $year, $month, $day);
         if ($result == 3 && !is_a($event, 'PEAR_Error') && $event->recurs()) {
             $event->recurrence->deleteException($year, $month, $day);
             _save($event);
         }
     }
-} elseif (!Util::getFormData('cancel')) {
-    $source = Util::getFormData('existingcalendar');
-    $targetcalendar = Util::getFormData('targetcalendar');
+} elseif (!Horde_Util::getFormData('cancel')) {
+    $source = Horde_Util::getFormData('existingcalendar');
+    $targetcalendar = Horde_Util::getFormData('targetcalendar');
     if (strpos($targetcalendar, ':')) {
         list($target, $user) = explode(':', $targetcalendar, 2);
     } else {
@@ -70,13 +70,13 @@ if ($exception = Util::getFormData('del_exception')) {
     } else {
         $event = false;
 
-        if (($edit_recur = Util::getFormData('edit_recur')) &&
+        if (($edit_recur = Horde_Util::getFormData('edit_recur')) &&
             $edit_recur != 'all' && $edit_recur != 'copy' &&
             _check_max()) {
             /* Get event details. */
             $kronolith_driver->open($source);
-            $event = &$kronolith_driver->getEvent(Util::getFormData('eventID'));
-            $recur_ex = Util::getFormData('recur_ex');
+            $event = &$kronolith_driver->getEvent(Horde_Util::getFormData('eventID'));
+            $recur_ex = Horde_Util::getFormData('recur_ex');
             $exception = new Horde_Date($recur_ex);
 
             switch ($edit_recur) {
@@ -119,7 +119,7 @@ if ($exception = Util::getFormData('del_exception')) {
             $event->setUID(null);
             _save($event);
             $event = null;
-        } elseif (Util::getFormData('saveAsNew') ||
+        } elseif (Horde_Util::getFormData('saveAsNew') ||
                   $edit_recur == 'copy') {
             if (_check_max()) {
                 $kronolith_driver->open($target);
@@ -140,7 +140,7 @@ if ($exception = Util::getFormData('del_exception')) {
                      ($user != Auth::getAuth() &&
                       $share->hasPermission(Auth::getAuth(), PERMS_DELEGATE)))) {
                     $kronolith_driver->open($source);
-                    $res = $kronolith_driver->move(Util::getFormData('eventID'), $target);
+                    $res = $kronolith_driver->move(Horde_Util::getFormData('eventID'), $target);
                     if (is_a($res, 'PEAR_Error')) {
                         $notification->push(sprintf(_("There was an error moving the event: %s"), $res->getMessage()), 'horde.error');
                     } else {
@@ -150,7 +150,7 @@ if ($exception = Util::getFormData('del_exception')) {
             }
 
             $kronolith_driver->open($event_load_from);
-            $event = &$kronolith_driver->getEvent(Util::getFormData('eventID'));
+            $event = &$kronolith_driver->getEvent(Horde_Util::getFormData('eventID'));
         }
 
         if ($event && !is_a($event, 'PEAR_Error')) {
@@ -174,12 +174,12 @@ if ($exception = Util::getFormData('del_exception')) {
 if (!empty($url)) {
     $location = $url;
 } else {
-    $url = Util::addParameter($prefs->getValue('defaultview') . '.php',
-                              array('month' => Util::getFormData('month'),
-                                    'year' => Util::getFormData('year')));
+    $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php',
+                              array('month' => Horde_Util::getFormData('month'),
+                                    'year' => Horde_Util::getFormData('year')));
     $location = Horde::applicationUrl($url, true);
 }
 
 // Make sure URL is unique.
-$location = Util::addParameter($location, 'unique', hash('md5', microtime()), false);
+$location = Horde_Util::addParameter($location, 'unique', hash('md5', microtime()), false);
 header('Location: ' . $location);
index 5774984..85ea4a2 100644 (file)
@@ -11,7 +11,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$viewName = Util::getFormData('view', 'Event');
+$viewName = Horde_Util::getFormData('view', 'Event');
 $view = Kronolith::getView($viewName);
 if (is_a($view->event, 'PEAR_Error')) {
     $notification->push($view->event, 'horde.error');
@@ -24,7 +24,7 @@ case 'DeleteEvent':
     /* Shortcut when we're deleting events and don't want confirmation. */
     if (!$view->event->recurs() &&
         !($prefs->getValue('confirm_delete') ||
-          Util::getFormData('confirm'))) {
+          Horde_Util::getFormData('confirm'))) {
         header('Location: ' . Horde::applicationUrl('delete.php?' . $_SERVER['QUERY_STRING'], true));
         exit;
     }
@@ -33,18 +33,18 @@ case 'DeleteEvent':
 case 'EditEvent':
     if ($view->event->isPrivate() &&
         $view->event->getCreatorId() != Auth::getAuth()) {
-        $url = Util::getFormData('url');
+        $url = Horde_Util::getFormData('url');
         if (empty($url)) {
             $url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true);
         }
-        header('Location: ' . Util::addParameter($url, 'unique', hash('md5', microtime()), false));
+        header('Location: ' . Horde_Util::addParameter($url, 'unique', hash('md5', microtime()), false));
         exit;
     }
     break;
 }
 
 $title = $view->getTitle();
-$print_view = (bool)Util::getFormData('print');
+$print_view = (bool)Horde_Util::getFormData('print');
 if (!$print_view) {
     Horde::addScriptFile('popup.js', 'horde', true);
 }
index 9b602c1..7b2e85f 100644 (file)
@@ -17,13 +17,13 @@ require_once dirname(__FILE__) . '/lib/base.php';
 NLS::setCharset('UTF-8');
 
 // Determine the username to show free/busy time for.
-$cal = Util::getFormData('c');
-$user = Util::getFormData('u');
+$cal = Horde_Util::getFormData('c');
+$user = Horde_Util::getFormData('u');
 if (!empty($cal)) {
     if (is_array($cal)) {
         $cal = implode('|', $cal);
     }
-} elseif ($pathInfo = Util::getPathInfo()) {
+} elseif ($pathInfo = Horde_Util::getPathInfo()) {
     $user = basename($pathInfo);
 }
 
index 17be356..d634bd7 100644 (file)
@@ -31,7 +31,7 @@ require_once KRONOLITH_BASE . '/lib/version.php';
 require_once 'Horde/Identity.php';
 require_once 'Horde/Template.php';
 
-$calendar = Util::getFormData('c');
+$calendar = Horde_Util::getFormData('c');
 $share = $kronolith_shares->getShare($calendar);
 if (is_a($share, 'PEAR_Error')) {
     _no_access(404, 'Not Found',
@@ -66,7 +66,7 @@ if (!$share->hasPermission(Auth::getAuth(), PERMS_READ)) {
     }
 }
 
-$feed_type = basename(Util::getFormData('type'));
+$feed_type = basename(Horde_Util::getFormData('type'));
 if (empty($feed_type)) {
     // If not specified, default to Atom.
     $feed_type = 'atom';
@@ -86,7 +86,7 @@ if (is_a($events, 'PEAR_Error')) {
 if (isset($conf['urls']['pretty']) && $conf['urls']['pretty'] == 'rewrite') {
     $self_url = 'feed/' . $calendar;
 } else {
-    $self_url = Util::addParameter('feed/index.php', 'c', $calendar);
+    $self_url = Horde_Util::addParameter('feed/index.php', 'c', $calendar);
 }
 $self_url = Horde::applicationUrl($self_url, true, -1);
 
index b9e4ccb..99c438a 100644 (file)
@@ -12,7 +12,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$path = Util::getFormData('imple');
+$path = Horde_Util::getFormData('imple');
 if (!$path) {
     exit;
 }
index 7961826..0ec9da3 100644 (file)
@@ -51,7 +51,7 @@ class Horde_Block_Kronolith_month extends Horde_Block {
         }
         $date = new Horde_Date(time());
 
-        return $title . ', ' . Horde::link(Horde::url(Util::addParameter($registry->getInitialPage(), $url_params), true)) . $date->strftime('%B, %Y') . '</a>';
+        return $title . ', ' . Horde::link(Horde::url(Horde_Util::addParameter($registry->getInitialPage(), $url_params), true)) . $date->strftime('%B, %Y') . '</a>';
     }
 
     /**
@@ -174,7 +174,7 @@ class Horde_Block_Kronolith_month extends Horde_Block {
                 $url_params['display_cal'] = $this->_params['calendar'];
             }
             /* Set up the link to the day view. */
-            $url = Util::addParameter(Horde::applicationUrl('day.php', true),
+            $url = Horde_Util::addParameter(Horde::applicationUrl('day.php', true),
                                       $url_params);
 
             $date_stamp = $date_ob->dateString();
index 5c4ce9a..a108c42 100644 (file)
@@ -48,7 +48,7 @@ class Horde_Block_Kronolith_monthlist extends Horde_Block {
         } else {
             $url_params = array();
         }
-        return Horde::link(Horde::url(Util::addParameter($registry->getInitialPage(), $url_params), true)) . _("Upcoming Events") . '</a>';
+        return Horde::link(Horde::url(Horde_Util::addParameter($registry->getInitialPage(), $url_params), true)) . _("Upcoming Events") . '</a>';
     }
 
     /**
index 4c648a5..0ccad97 100644 (file)
@@ -44,7 +44,7 @@ class Horde_Block_Kronolith_prevmonthlist extends Horde_Block {
         } else {
             $url_params = array();
         }
-        return Horde::link(Horde::url(Util::addParameter($GLOBALS['registry']->getInitialPage(), $url_params), true)) . _("Prior Events") . '</a>';
+        return Horde::link(Horde::url(Horde_Util::addParameter($GLOBALS['registry']->getInitialPage(), $url_params), true)) . _("Prior Events") . '</a>';
     }
 
     /**
index 202a5b1..ef3bb2b 100644 (file)
@@ -48,7 +48,7 @@ class Horde_Block_Kronolith_summary extends Horde_Block {
         } else {
             $url_params = array();
         }
-        return Horde::link(Horde::url(Util::addParameter($registry->getInitialPage(), $url_params), true)) . htmlspecialchars($registry->get('name')) . '</a>';
+        return Horde::link(Horde::url(Horde_Util::addParameter($registry->getInitialPage(), $url_params), true)) . htmlspecialchars($registry->get('name')) . '</a>';
     }
 
     /**
@@ -148,7 +148,7 @@ class Horde_Block_Kronolith_summary extends Horde_Block {
                         $url_params['display_cal'] = $this->_params['calendar'];
                     }
                     $daylink = Horde::applicationUrl('day.php', true);
-                    $daylink = Util::addParameter($daylink, $url_params);
+                    $daylink = Horde_Util::addParameter($daylink, $url_params);
                     $html .= Horde::link($daylink, sprintf(_("Goto %s"),
                                                            $dayname));
                     $html .= $dayname . '</a></strong></td></tr>';
index d37a8d7..b5c0fcb 100644 (file)
@@ -864,7 +864,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
      */
     public function convertFromDriver($value)
     {
-        return String::convertCharset($value, $this->_params['charset']);
+        return Horde_String::convertCharset($value, $this->_params['charset']);
     }
 
     /**
@@ -877,7 +877,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
      */
     public function convertToDriver($value)
     {
-        return String::convertCharset($value, NLS::getCharset(), $this->_params['charset']);
+        return Horde_String::convertCharset($value, NLS::getCharset(), $this->_params['charset']);
     }
 
     /**
index 9557248..5544d26 100644 (file)
@@ -379,17 +379,17 @@ abstract class Kronolith_Event
             $vEvent->setAttribute('LAST-MODIFIED', $modified);
         }
 
-        $vEvent->setAttribute('SUMMARY', $v1 ? $this->getTitle() : String::convertCharset($this->getTitle(), NLS::getCharset(), 'utf-8'));
+        $vEvent->setAttribute('SUMMARY', $v1 ? $this->getTitle() : Horde_String::convertCharset($this->getTitle(), NLS::getCharset(), 'utf-8'));
         $name = Kronolith::getUserName($this->getCreatorId());
         if (!$v1) {
-            $name = String::convertCharset($name, NLS::getCharset(), 'utf-8');
+            $name = Horde_String::convertCharset($name, NLS::getCharset(), 'utf-8');
         }
         $vEvent->setAttribute('ORGANIZER',
                               'mailto:' . Kronolith::getUserEmail($this->getCreatorId()),
                               array('CN' => $name));
         if (!$this->isPrivate() || $this->getCreatorId() == Auth::getAuth()) {
             if (!empty($this->description)) {
-                $vEvent->setAttribute('DESCRIPTION', $v1 ? $this->description : String::convertCharset($this->description, NLS::getCharset(), 'utf-8'));
+                $vEvent->setAttribute('DESCRIPTION', $v1 ? $this->description : Horde_String::convertCharset($this->description, NLS::getCharset(), 'utf-8'));
             }
 
             // Tags
@@ -398,12 +398,12 @@ abstract class Kronolith_Event
                 $tags = implode(', ', $tags);
             }
             if (!empty($tags)) {
-                $vEvent->setAttribute('CATEGORIES', $v1 ? $tags : String::convertCharset($tags, NLS::getCharset(), 'utf-8'));
+                $vEvent->setAttribute('CATEGORIES', $v1 ? $tags : Horde_String::convertCharset($tags, NLS::getCharset(), 'utf-8'));
             }
 
             // Location
             if (!empty($this->location)) {
-                $vEvent->setAttribute('LOCATION', $v1 ? $this->location : String::convertCharset($this->location, NLS::getCharset(), 'utf-8'));
+                $vEvent->setAttribute('LOCATION', $v1 ? $this->location : Horde_String::convertCharset($this->location, 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'] = String::convertCharset($status['name'], NLS::getCharset(), 'utf-8');
+                    $params['CN'] = Horde_String::convertCharset($status['name'], NLS::getCharset(), 'utf-8');
                 }
                 if (!empty($email)) {
                     $email = 'mailto:' . $email;
@@ -623,7 +623,7 @@ abstract class Kronolith_Event
         // Class
         $class = $vEvent->getAttribute('CLASS');
         if (!is_array($class) && !is_a($class, 'PEAR_Error')) {
-            $class = String::upper($class);
+            $class = Horde_String::upper($class);
             if ($class == 'PRIVATE' || $class == 'CONFIDENTIAL') {
                 $this->setPrivate(true);
             } else {
@@ -634,7 +634,7 @@ abstract class Kronolith_Event
         // Status.
         $status = $vEvent->getAttribute('STATUS');
         if (!is_array($status) && !is_a($status, 'PEAR_Error')) {
-            $status = String::upper($status);
+            $status = Horde_String::upper($status);
             if ($status == 'DECLINED') {
                 $status = 'CANCELLED';
             }
@@ -1182,7 +1182,7 @@ abstract class Kronolith_Event
                                            'mday' => $match[3]));
         $formatted = $horde_date->strftime($GLOBALS['prefs']->getValue('date_format'));
         return $formatted
-            . Horde::link(Util::addParameter(Horde::applicationUrl('edit.php'), array('calendar' => $this->getCalendar(), 'eventID' => $this->eventID, 'del_exception' => $date, 'url' => Util::getFormData('url'))), sprintf(_("Delete exception on %s"), $formatted))
+            . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('edit.php'), array('calendar' => $this->getCalendar(), 'eventID' => $this->eventID, 'del_exception' => $date, 'url' => Horde_Util::getFormData('url'))), sprintf(_("Delete exception on %s"), $formatted))
             . Horde::img('delete-small.png', _("Delete"), '', $GLOBALS['registry']->getImageDir('horde'))
             . '</a>';
     }
@@ -1447,7 +1447,7 @@ abstract class Kronolith_Event
      */
     public function hasAttendee($email)
     {
-        $email = String::lower($email);
+        $email = Horde_String::lower($email);
         return isset($this->attendees[$email]);
     }
 
@@ -1475,7 +1475,7 @@ abstract class Kronolith_Event
      */
     public function addAttendee($email, $attendance, $response, $name = null)
     {
-        $email = String::lower($email);
+        $email = Horde_String::lower($email);
         if ($attendance == Kronolith::PART_IGNORE) {
             if (isset($this->attendees[$email])) {
                 $attendance = $this->attendees[$email]['attendance'];
@@ -1502,7 +1502,7 @@ abstract class Kronolith_Event
      */
     public function removeAttendee($email)
     {
-        $email = String::lower($email);
+        $email = Horde_String::lower($email);
         if (isset($this->attendees[$email])) {
             unset($this->attendees[$email]);
         }
@@ -1534,7 +1534,7 @@ abstract class Kronolith_Event
         global $prefs, $cManager;
 
         // Event owner.
-        $targetcalendar = Util::getFormData('targetcalendar');
+        $targetcalendar = Horde_Util::getFormData('targetcalendar');
         if (strpos($targetcalendar, ':')) {
             list(, $creator) = explode(':', $targetcalendar, 2);
         } else {
@@ -1543,13 +1543,13 @@ abstract class Kronolith_Event
         $this->setCreatorId($creator);
 
         // Basic fields.
-        $this->setTitle(Util::getFormData('title', $this->title));
-        $this->setDescription(Util::getFormData('description', $this->description));
-        $this->setLocation(Util::getFormData('location', $this->location));
-        $this->setPrivate(Util::getFormData('private'));
+        $this->setTitle(Horde_Util::getFormData('title', $this->title));
+        $this->setDescription(Horde_Util::getFormData('description', $this->description));
+        $this->setLocation(Horde_Util::getFormData('location', $this->location));
+        $this->setPrivate(Horde_Util::getFormData('private'));
 
         // Status.
-        $this->setStatus(Util::getFormData('status', $this->status));
+        $this->setStatus(Horde_Util::getFormData('status', $this->status));
 
         // Attendees.
         if (isset($_SESSION['kronolith']['attendees']) && is_array($_SESSION['kronolith']['attendees'])) {
@@ -1564,8 +1564,8 @@ abstract class Kronolith_Event
         setlocale(LC_TIME, 'C');
 
         // Event start.
-        if ($start_date = Util::getFormData('start_date')) {
-            $start_time = Util::getFormData('start_time');
+        if ($start_date = Horde_Util::getFormData('start_date')) {
+            $start_time = Horde_Util::getFormData('start_time');
             $start = $start_date . ' ' . $start_time;
             $format = $date_format . ' '
                 . ($prefs->getValue('twentyFour') ? '%H:%M' : '%I:%M %p');
@@ -1582,13 +1582,13 @@ abstract class Kronolith_Event
                 $this->start = new Horde_Date($start);
             }
         } else {
-            $start = Util::getFormData('start');
+            $start = Horde_Util::getFormData('start');
             $start_year = $start['year'];
             $start_month = $start['month'];
             $start_day = $start['day'];
-            $start_hour = Util::getFormData('start_hour');
-            $start_min = Util::getFormData('start_min');
-            $am_pm = Util::getFormData('am_pm');
+            $start_hour = Horde_Util::getFormData('start_hour');
+            $start_min = Horde_Util::getFormData('start_min');
+            $am_pm = Horde_Util::getFormData('am_pm');
 
             if (!$prefs->getValue('twentyFour')) {
                 if ($am_pm == 'PM') {
@@ -1600,17 +1600,17 @@ abstract class Kronolith_Event
                 }
             }
 
-            if (Util::getFormData('end_or_dur') == 1) {
-                if (Util::getFormData('whole_day') == 1) {
+            if (Horde_Util::getFormData('end_or_dur') == 1) {
+                if (Horde_Util::getFormData('whole_day') == 1) {
                     $start_hour = 0;
                     $start_min = 0;
                     $dur_day = 0;
                     $dur_hour = 24;
                     $dur_min = 0;
                 } else {
-                    $dur_day = (int)Util::getFormData('dur_day');
-                    $dur_hour = (int)Util::getFormData('dur_hour');
-                    $dur_min = (int)Util::getFormData('dur_min');
+                    $dur_day = (int)Horde_Util::getFormData('dur_day');
+                    $dur_hour = (int)Horde_Util::getFormData('dur_hour');
+                    $dur_min = (int)Horde_Util::getFormData('dur_min');
                 }
             }
 
@@ -1621,9 +1621,9 @@ abstract class Kronolith_Event
                                                 'year' => $start_year));
         }
 
-        if ($end_date = Util::getFormData('end_date')) {
+        if ($end_date = Horde_Util::getFormData('end_date')) {
             // Event end.
-            $end_time = Util::getFormData('end_time');
+            $end_time = Horde_Util::getFormData('end_time');
             $end = $end_date . ' ' . $end_time;
             $format = $date_format . ' '
                 . ($prefs->getValue('twentyFour') ? '%H:%M' : '%I:%M %p');
@@ -1639,7 +1639,7 @@ abstract class Kronolith_Event
             } else {
                 $this->end = new Horde_Date($end);
             }
-        } elseif (Util::getFormData('end_or_dur') == 1) {
+        } elseif (Horde_Util::getFormData('end_or_dur') == 1) {
             // Event duration.
             $this->end = new Horde_Date(array('hour' => $start_hour + $dur_hour,
                                               'min' => $start_min + $dur_min,
@@ -1648,13 +1648,13 @@ abstract class Kronolith_Event
                                               'year' => $start_year));
         } else {
             // Event end.
-            $end = Util::getFormData('end');
+            $end = Horde_Util::getFormData('end');
             $end_year = $end['year'];
             $end_month = $end['month'];
             $end_day = $end['day'];
-            $end_hour = Util::getFormData('end_hour');
-            $end_min = Util::getFormData('end_min');
-            $end_am_pm = Util::getFormData('end_am_pm');
+            $end_hour = Horde_Util::getFormData('end_hour');
+            $end_min = Horde_Util::getFormData('end_min');
+            $end_am_pm = Horde_Util::getFormData('end_am_pm');
 
             if (!$prefs->getValue('twentyFour')) {
                 if ($end_am_pm == 'PM') {
@@ -1679,22 +1679,22 @@ abstract class Kronolith_Event
         setlocale(LC_TIME, $old_locale);
 
         // Alarm.
-        if (!is_null($alarm = Util::getFormData('alarm'))) {
+        if (!is_null($alarm = Horde_Util::getFormData('alarm'))) {
             if ($alarm) {
-                $this->setAlarm(Util::getFormData('alarm_value') * Util::getFormData('alarm_unit'));
+                $this->setAlarm(Horde_Util::getFormData('alarm_value') * Horde_Util::getFormData('alarm_unit'));
                 // Notification.
-                if (Util::getFormData('alarm_change_method')) {
-                    $types = Util::getFormData('event_alarms');
+                if (Horde_Util::getFormData('alarm_change_method')) {
+                    $types = Horde_Util::getFormData('event_alarms');
                     if (!empty($types)) {
                         $methods = array();
                         foreach ($types as $type) {
                             $methods[$type] = array();
                             switch ($type){
                             case 'notify':
-                                $methods[$type]['sound'] = Util::getFormData('event_alarms_sound');
+                                $methods[$type]['sound'] = Horde_Util::getFormData('event_alarms_sound');
                                 break;
                             case 'mail':
-                                $methods[$type]['email'] = Util::getFormData('event_alarms_email');
+                                $methods[$type]['email'] = Horde_Util::getFormData('event_alarms_email');
                                 break;
                             case 'popup':
                                 break;
@@ -1712,13 +1712,13 @@ abstract class Kronolith_Event
         }
 
         // Recurrence.
-        $recur = Util::getFormData('recur');
+        $recur = Horde_Util::getFormData('recur');
         if ($recur !== null && $recur !== '') {
             if (!isset($this->recurrence)) {
                 $this->recurrence = new Horde_Date_Recurrence($this->start);
             }
-            if (Util::getFormData('recur_enddate_type') == 'date') {
-                $recur_enddate = Util::getFormData('recur_enddate');
+            if (Horde_Util::getFormData('recur_enddate_type') == 'date') {
+                $recur_enddate = Horde_Util::getFormData('recur_enddate');
                 if ($this->recurrence->hasRecurEnd()) {
                     $recurEnd = $this->recurrence->recurEnd;
                     $recurEnd->month = $recur_enddate['month'];
@@ -1734,9 +1734,9 @@ abstract class Kronolith_Event
                               'year' => $recur_enddate['year']));
                 }
                 $this->recurrence->setRecurEnd($recurEnd);
-            } elseif (Util::getFormData('recur_enddate_type') == 'count') {
-                $this->recurrence->setRecurCount(Util::getFormData('recur_count'));
-            } elseif (Util::getFormData('recur_enddate_type') == 'none') {
+            } elseif (Horde_Util::getFormData('recur_enddate_type') == 'count') {
+                $this->recurrence->setRecurCount(Horde_Util::getFormData('recur_count'));
+            } elseif (Horde_Util::getFormData('recur_enddate_type') == 'none') {
                 $this->recurrence->setRecurCount(0);
                 $this->recurrence->setRecurEnd(null);
             }
@@ -1744,11 +1744,11 @@ abstract class Kronolith_Event
             $this->recurrence->setRecurType($recur);
             switch ($recur) {
             case Horde_Date_Recurrence::RECUR_DAILY:
-                $this->recurrence->setRecurInterval(Util::getFormData('recur_daily_interval', 1));
+                $this->recurrence->setRecurInterval(Horde_Util::getFormData('recur_daily_interval', 1));
                 break;
 
             case Horde_Date_Recurrence::RECUR_WEEKLY:
-                $weekly = Util::getFormData('weekly');
+                $weekly = Horde_Util::getFormData('weekly');
                 $weekdays = 0;
                 if (is_array($weekly)) {
                     foreach ($weekly as $day) {
@@ -1769,32 +1769,32 @@ abstract class Kronolith_Event
                     }
                 }
 
-                $this->recurrence->setRecurInterval(Util::getFormData('recur_weekly_interval', 1));
+                $this->recurrence->setRecurInterval(Horde_Util::getFormData('recur_weekly_interval', 1));
                 $this->recurrence->setRecurOnDay($weekdays);
                 break;
 
             case Horde_Date_Recurrence::RECUR_MONTHLY_DATE:
-                $this->recurrence->setRecurInterval(Util::getFormData('recur_day_of_month_interval', 1));
+                $this->recurrence->setRecurInterval(Horde_Util::getFormData('recur_day_of_month_interval', 1));
                 break;
 
             case Horde_Date_Recurrence::RECUR_MONTHLY_WEEKDAY:
-                $this->recurrence->setRecurInterval(Util::getFormData('recur_week_of_month_interval', 1));
+                $this->recurrence->setRecurInterval(Horde_Util::getFormData('recur_week_of_month_interval', 1));
                 break;
 
             case Horde_Date_Recurrence::RECUR_YEARLY_DATE:
-                $this->recurrence->setRecurInterval(Util::getFormData('recur_yearly_interval', 1));
+                $this->recurrence->setRecurInterval(Horde_Util::getFormData('recur_yearly_interval', 1));
                 break;
 
             case Horde_Date_Recurrence::RECUR_YEARLY_DAY:
-                $this->recurrence->setRecurInterval(Util::getFormData('recur_yearly_day_interval', 1));
+                $this->recurrence->setRecurInterval(Horde_Util::getFormData('recur_yearly_day_interval', 1));
                 break;
 
             case Horde_Date_Recurrence::RECUR_YEARLY_WEEKDAY:
-                $this->recurrence->setRecurInterval(Util::getFormData('recur_yearly_weekday_interval', 1));
+                $this->recurrence->setRecurInterval(Horde_Util::getFormData('recur_yearly_weekday_interval', 1));
                 break;
             }
 
-            if ($exceptions = Util::getFormData('exceptions')) {
+            if ($exceptions = Horde_Util::getFormData('exceptions')) {
                 foreach ($exceptions as $exception) {
                     $this->recurrence->addException((int)substr($exception, 0, 4),
                                                     (int)substr($exception, 4, 2),
@@ -1804,7 +1804,7 @@ abstract class Kronolith_Event
         }
 
         // Tags.
-        $this->tags = Util::getFormData('tags', $this->tags);
+        $this->tags = Horde_Util::getFormData('tags', $this->tags);
 
         $this->initialized = true;
     }
@@ -2039,7 +2039,7 @@ abstract class Kronolith_Event
             $params['calendar'] = $this->getCalendar();
         }
 
-        return Horde::applicationUrl(Util::addParameter('event.php', $params), $full);
+        return Horde::applicationUrl(Horde_Util::addParameter('event.php', $params), $full);
     }
 
     /**
@@ -2058,7 +2058,7 @@ abstract class Kronolith_Event
             $params['calendar'] = $this->getCalendar();
         }
 
-        return Horde::applicationUrl(Util::addParameter('event.php', $params));
+        return Horde::applicationUrl(Horde_Util::addParameter('event.php', $params));
     }
 
     /**
@@ -2071,7 +2071,7 @@ abstract class Kronolith_Event
         $params['view'] = 'DeleteEvent';
         $params['eventID'] = $this->eventID;
         $params['calendar'] = $this->getCalendar();
-        return Horde::applicationUrl(Util::addParameter('event.php', $params));
+        return Horde::applicationUrl(Horde_Util::addParameter('event.php', $params));
     }
 
     /**
@@ -2090,7 +2090,7 @@ abstract class Kronolith_Event
             $params['calendar'] = $this->getCalendar();
         }
 
-        return Horde::applicationUrl(Util::addParameter('event.php', $params));
+        return Horde::applicationUrl(Horde_Util::addParameter('event.php', $params));
     }
 
     public function getLink($datetime = null, $icons = true, $from_url = null, $full = false)
@@ -2108,7 +2108,7 @@ abstract class Kronolith_Event
         $event_title = $this->getTitle();
         if (isset($this->external) && !empty($this->external_link)) {
             $link = $this->external_link;
-            $link = Horde::linkTooltip(Horde::url($link), '', 'event-tentative', '', '', String::wrap($this->description));
+            $link = Horde::linkTooltip(Horde::url($link), '', 'event-tentative', '', '', Horde_String::wrap($this->description));
         } elseif (isset($this->eventID) && $this->hasPermission(PERMS_READ)) {
             $link = Horde::linkTooltip($this->getViewUrl(array('datetime' => $datetime->strftime('%Y%m%d%H%M%S'), 'url' => $from_url), $full),
                                        $event_title,
@@ -2243,7 +2243,7 @@ abstract class Kronolith_Event
             }
 
             if ($this->description) {
-                $tooltip .= "\n\n" . String::wrap($this->description);
+                $tooltip .= "\n\n" . Horde_String::wrap($this->description);
             }
         }
 
index 1cf83a7..00ce89a 100644 (file)
@@ -42,7 +42,7 @@ class Kronolith_Event_Holidays extends Kronolith_Event
     {
         $this->stored = true;
         $this->initialized = true;
-        $this->setTitle(String::convertCharset($dhEvent->getTitle(), 'UTF-8'));
+        $this->setTitle(Horde_String::convertCharset($dhEvent->getTitle(), 'UTF-8'));
         $this->start = new Horde_Date($dhEvent->_date->getTime());
         $this->end = new Horde_Date($this->start);
         $this->end->mday++;
index b529fce..87c3524 100755 (executable)
@@ -8,9 +8,6 @@
  * @package Kronolith
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index 31cd5f5..1da8099 100644 (file)
@@ -8,9 +8,6 @@
  * @package Kronolith
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index 1698c25..d7cafdc 100644 (file)
@@ -8,9 +8,6 @@
  * @package Kronolith
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index c4f5621..0b35411 100644 (file)
@@ -8,9 +8,6 @@
  * @package Kronolith
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index f49af9d..eb0fe1d 100644 (file)
@@ -8,9 +8,6 @@
  * @package Kronolith
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index 6eb34e4..7e99042 100644 (file)
@@ -8,9 +8,6 @@
  * @package Kronolith
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index dc71d73..69d4101 100644 (file)
@@ -59,9 +59,9 @@ class Kronolith_FreeBusy_View {
         $optimal->merge($optional);
 
         $base_url = Horde::selfUrl();
-        $base_url = Util::removeParameter($base_url, 'date');
-        $base_url = Util::removeParameter($base_url, 'fbview');
-        $base_url = Util::addParameter($base_url, 'fbview', $this->view);
+        $base_url = Horde_Util::removeParameter($base_url, 'date');
+        $base_url = Horde_Util::removeParameter($base_url, 'fbview');
+        $base_url = Horde_Util::addParameter($base_url, 'fbview', $this->view);
 
         $template = new Horde_Template();
         $template->set('title', $this->_title());
index 233934a..4eff67b 100644 (file)
@@ -67,7 +67,7 @@ class Kronolith_Imple_ContactAutoCompleter extends Kronolith_Imple
     {
         // Avoid errors if 'input' isn't set and short-circuit empty searches.
         if (empty($args['input']) ||
-            !($input = Util::getFormData($args['input']))) {
+            !($input = Horde_Util::getFormData($args['input']))) {
             return array();
         }
 
index 0a1f467..c967699 100644 (file)
@@ -100,7 +100,7 @@ class Kronolith_Imple_TagAutoCompleter extends Kronolith_Imple
     {
         // Avoid errors if 'input' isn't set and short-circuit empty searches.
         if (empty($args['input']) ||
-            !($input = Util::getFormData($args['input']))) {
+            !($input = Horde_Util::getFormData($args['input']))) {
             return array();
         }
         return array_map('htmlspecialchars', $this->getTagList($input));
index d6ef194..29977ee 100644 (file)
@@ -143,7 +143,7 @@ class Kronolith
             'URI_AJAX' => Horde::url($kronolith_webroot . '/ajax.php', true, -1),
             'URI_PREFS' => Horde::url($horde_webroot . '/services/prefs/', true, -1),
             'URI_IMG' => $registry->getImageDir() . '/',
-            //'URI_VIEW' => Util::addParameter(Horde::url($imp_webroot . '/view.php', true, -1), array('actionID' => 'view_source', 'id' => 0), null, false),
+            //'URI_VIEW' => Horde_Util::addParameter(Horde::url($imp_webroot . '/view.php', true, -1), array('actionID' => 'view_source', 'id' => 0), null, false),
             'SESSION_ID' => defined('SID') ? SID : '',
             'prefs_url' => str_replace('&amp;', '&', Horde::getServiceLink('options', 'kronolith')),
             'name' => $registry->get('name'),
@@ -585,7 +585,7 @@ class Kronolith
             $calendars = array($driver[0] => array($driver[1]));
         } else {
             $calendars = array(
-                String::ucfirst($GLOBALS['conf']['calendar']['driver']) => $GLOBALS['display_calendars'],
+                Horde_String::ucfirst($GLOBALS['conf']['calendar']['driver']) => $GLOBALS['display_calendars'],
                 'Horde' => $GLOBALS['display_external_calendars'],
                 'Ical' => $GLOBALS['display_remote_calendars']);
             if (!empty($GLOBALS['conf']['holidays']['enable'])) {
@@ -979,7 +979,7 @@ class Kronolith
         /* Update preferences for which calendars to display. If the
          * user doesn't have any selected calendars to view then fall
          * back to an available calendar. */
-        if (($calendarId = Util::getFormData('display_cal')) !== null) {
+        if (($calendarId = Horde_Util::getFormData('display_cal')) !== null) {
             if (is_array($calendarId)) {
                 $calendars = $calendarId;
                 $GLOBALS['display_calendars'] = array();
@@ -1018,7 +1018,7 @@ class Kronolith
         }
 
         /* Check for single "toggle" calendars. */
-        if (($calendarId = Util::getFormData('toggle_calendar')) !== null) {
+        if (($calendarId = Horde_Util::getFormData('toggle_calendar')) !== null) {
             if (strncmp($calendarId, 'remote_', 7) === 0) {
                 $calendarId = substr($calendarId, 7);
                 if (in_array($calendarId, $GLOBALS['display_remote_calendars'])) {
@@ -1358,7 +1358,7 @@ class Kronolith
      */
     public static function responseFromICal($response)
     {
-        switch (String::upper($response)) {
+        switch (Horde_String::upper($response)) {
         case 'ACCEPTED':
             return self::RESPONSE_ACCEPTED;
 
@@ -1473,7 +1473,7 @@ class Kronolith
             $GLOBALS['conf']['urls']['pretty'] == 'rewrite') {
             $feed_url = 'feed/' . $calendar;
         } else {
-            $feed_url = Util::addParameter('feed/index.php', 'c', $calendar);
+            $feed_url = Horde_Util::addParameter('feed/index.php', 'c', $calendar);
         }
         return Horde::applicationUrl($feed_url, true, -1);
     }
@@ -1547,7 +1547,7 @@ class Kronolith
 
         $myemail = $ident->getValue('from_addr');
         if (!$myemail) {
-            $notification->push(sprintf(_("You do not have an email address configured in your Personal Information Options. You must set one %shere%s before event notifications can be sent."), Horde::link(Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php'), array('app' => 'horde', 'group' => 'identities'))), '</a>'), 'horde.error', array('content.raw'));
+            $notification->push(sprintf(_("You do not have an email address configured in your Personal Information Options. You must set one %shere%s before event notifications can be sent."), Horde::link(Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php'), array('app' => 'horde', 'group' => 'identities'))), '</a>'), 'horde.error', array('content.raw'));
             return;
         }
 
@@ -1621,14 +1621,14 @@ class Kronolith
             $message .= _("Attached is an iCalendar file with more information about the event. If your mail client supports iTip requests you can use this file to easily update your local copy of the event.");
 
             if ($action == self::ITIP_REQUEST) {
-                $attend_link = Util::addParameter(Horde::applicationUrl('attend.php', true, -1), array('c' => $event->getCalendar(), 'e' => $event->getId(), 'u' => $email), null, false);
-                $message .= "\n\n" . sprintf(_("If your email client doesn't support iTip requests you can use one of the following links to accept or decline the event.\n\nTo accept the event:\n%s\n\nTo accept the event tentatively:\n%s\n\nTo decline the event:\n%s\n"), Util::addParameter($attend_link, 'a', 'accept', false), Util::addParameter($attend_link, 'a', 'tentative', false), Util::addParameter($attend_link, 'a', 'decline', false));
+                $attend_link = Horde_Util::addParameter(Horde::applicationUrl('attend.php', true, -1), array('c' => $event->getCalendar(), 'e' => $event->getId(), 'u' => $email), null, false);
+                $message .= "\n\n" . sprintf(_("If your email client doesn't support iTip requests you can use one of the following links to accept or decline the event.\n\nTo accept the event:\n%s\n\nTo accept the event tentatively:\n%s\n\nTo decline the event:\n%s\n"), Horde_Util::addParameter($attend_link, 'a', 'accept', false), Horde_Util::addParameter($attend_link, 'a', 'tentative', false), Horde_Util::addParameter($attend_link, 'a', 'decline', false));
             }
 
             /* Build the iCalendar data */
             $iCal = new Horde_iCalendar();
             $iCal->setAttribute('METHOD', $method);
-            $iCal->setAttribute('X-WR-CALNAME', String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8'));
+            $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8'));
             $vevent = $event->toiCalendar($iCal);
             if ($action == self::ITIP_CANCEL && !empty($instance)) {
                 $vevent->setAttribute('RECURRENCE-ID', $instance, array('VALUE' => 'DATE'));
@@ -1856,10 +1856,10 @@ class Kronolith
      */
     public static function currentDate()
     {
-        if ($date = Util::getFormData('date')) {
+        if ($date = Horde_Util::getFormData('date')) {
             return new Horde_Date($date . '000000');
         }
-        if ($date = Util::getFormData('datetime')) {
+        if ($date = Horde_Util::getFormData('datetime')) {
             return new Horde_Date($date);
         }
 
@@ -1901,8 +1901,7 @@ class Kronolith
         $date = self::currentDate();
         $date_stamp = $date->dateString();
 
-        require_once 'Horde/Variables.php';
-        $tabs = new Horde_UI_Tabs('view', Variables::getDefaultVariables());
+        $tabs = new Horde_UI_Tabs('view', Horde_Variables::getDefaultVariables());
         $tabs->preserve('date', $date_stamp);
 
         $tabs->addTab(_("Day"), Horde::applicationUrl('day.php'),
@@ -1932,8 +1931,7 @@ class Kronolith
             return;
         }
 
-        require_once 'Horde/Variables.php';
-        $tabs = new Horde_UI_Tabs('event', Variables::getDefaultVariables());
+        $tabs = new Horde_UI_Tabs('event', Horde_Variables::getDefaultVariables());
 
         $date = self::currentDate();
         $tabs->preserve('datetime', $date->dateString());
@@ -1989,7 +1987,7 @@ class Kronolith
     public static function getDriver($driver = null, $calendar = null)
     {
         if (empty($driver)) {
-            $driver = String::ucfirst($GLOBALS['conf']['calendar']['driver']);
+            $driver = Horde_String::ucfirst($GLOBALS['conf']['calendar']['driver']);
         }
 
         if (!isset(self::$_instances[$driver])) {
@@ -2082,14 +2080,14 @@ class Kronolith
         case 'Event':
             require_once KRONOLITH_BASE . '/lib/Views/Event.php';
 
-            if (Util::getFormData('calendar') == '**remote') {
-                $event = self::getDriver('Ical', Util::getFormData('remoteCal'))
-                    ->getEvent(Util::getFormData('eventID'));
-            } elseif ($uid = Util::getFormData('uid')) {
+            if (Horde_Util::getFormData('calendar') == '**remote') {
+                $event = self::getDriver('Ical', Horde_Util::getFormData('remoteCal'))
+                    ->getEvent(Horde_Util::getFormData('eventID'));
+            } elseif ($uid = Horde_Util::getFormData('uid')) {
                 $event = self::getDriver()->getByUID($uid);
             } else {
-                $event = self::getDriver(null, Util::getFormData('calendar'))
-                    ->getEvent(Util::getFormData('eventID'));
+                $event = self::getDriver(null, Horde_Util::getFormData('calendar'))
+                    ->getEvent(Horde_Util::getFormData('eventID'));
             }
             if (!is_a($event, 'PEAR_Error') &&
                 !$event->hasPermission(PERMS_READ)) {
@@ -2101,12 +2099,12 @@ class Kronolith
         case 'EditEvent':
             require_once KRONOLITH_BASE . '/lib/Views/EditEvent.php';
 
-            if (Util::getFormData('calendar') == '**remote') {
-                $event = self::getDriver('Ical', Util::getFormData('remoteCal'))
-                    ->getEvent(Util::getFormData('eventID'));
+            if (Horde_Util::getFormData('calendar') == '**remote') {
+                $event = self::getDriver('Ical', Horde_Util::getFormData('remoteCal'))
+                    ->getEvent(Horde_Util::getFormData('eventID'));
             } else {
-                $event = self::getDriver(null, Util::getFormData('calendar'))
-                    ->getEvent(Util::getFormData('eventID'));
+                $event = self::getDriver(null, Horde_Util::getFormData('calendar'))
+                    ->getEvent(Horde_Util::getFormData('eventID'));
             }
             if (!is_a($event, 'PEAR_Error') &&
                 !$event->hasPermission(PERMS_EDIT)) {
@@ -2118,8 +2116,8 @@ class Kronolith
         case 'DeleteEvent':
             require_once KRONOLITH_BASE . '/lib/Views/DeleteEvent.php';
 
-            $event = self::getDriver(null, Util::getFormData('calendar'))
-                ->getEvent(Util::getFormData('eventID'));
+            $event = self::getDriver(null, Horde_Util::getFormData('calendar'))
+                ->getEvent(Horde_Util::getFormData('eventID'));
             if (!is_a($event, 'PEAR_Error') &&
                 !$event->hasPermission(PERMS_DELETE)) {
                 $event = PEAR::raiseError(_("Permission Denied"));
@@ -2130,14 +2128,14 @@ class Kronolith
         case 'ExportEvent':
             require_once KRONOLITH_BASE . '/lib/Views/ExportEvent.php';
 
-            if (Util::getFormData('calendar') == '**remote') {
-                $event = self::getDriver('Ical', Util::getFormData('remoteCal'))
-                    ->getEvent(Util::getFormData('eventID'));
-            } elseif ($uid = Util::getFormData('uid')) {
+            if (Horde_Util::getFormData('calendar') == '**remote') {
+                $event = self::getDriver('Ical', Horde_Util::getFormData('remoteCal'))
+                    ->getEvent(Horde_Util::getFormData('eventID'));
+            } elseif ($uid = Horde_Util::getFormData('uid')) {
                 $event = self::getDriver()->getByUID($uid);
             } else {
-                $event = self::getDriver(null, Util::getFormData('calendar'))
-                    ->getEvent(Util::getFormData('eventID'));
+                $event = self::getDriver(null, Horde_Util::getFormData('calendar'))
+                    ->getEvent(Horde_Util::getFormData('eventID'));
             }
             if (!is_a($event, 'PEAR_Error') &&
                 !$event->hasPermission(PERMS_READ)) {
@@ -2245,7 +2243,7 @@ class Kronolith
             (!empty($conf['hooks']['permsdenied']) ||
              self::hasPermission('max_events') === true ||
              self::hasPermission('max_events') > self::countEvents())) {
-            $menu->add(Util::addParameter(Horde::applicationUrl('new.php'), 'url', Horde::selfUrl(true, false, true)), _("_New Event"), 'new.png');
+            $menu->add(Horde_Util::addParameter(Horde::applicationUrl('new.php'), 'url', Horde::selfUrl(true, false, true)), _("_New Event"), 'new.png');
         }
         if ($browser->hasFeature('dom')) {
             Horde::addScriptFile('goto.js', 'kronolith');
@@ -2259,8 +2257,8 @@ class Kronolith
         }
 
         /* Print. */
-        if ($conf['menu']['print'] && ($view = Util::nonInputVar('view'))) {
-            $menu->add(Util::addParameter($view->link(), 'print', 1), _("_Print"), 'print.png', $registry->getImageDir('horde'), '_blank', 'popup(kronolithPrintLink ? kronolithPrintLink : this.href); return false;', '__noselection');
+        if ($conf['menu']['print'] && ($view = Horde_Util::nonInputVar('view'))) {
+            $menu->add(Horde_Util::addParameter($view->link(), 'print', 1), _("_Print"), 'print.png', $registry->getImageDir('horde'), '_blank', 'popup(kronolithPrintLink ? kronolithPrintLink : this.href); return false;', '__noselection');
         }
 
         if ($returnType == 'object') {
index 81890e2..1c6d4ae 100644 (file)
@@ -45,7 +45,7 @@ class Maintenance_Kronolith extends Maintenance {
                 }
                 break;
             } elseif ($val['confirmed'] ||
-                      Util::getFormData($key . '_confirm')) {
+                      Horde_Util::getFormData($key . '_confirm')) {
                 /* Perform maintenance if confirmed. */
                 $mod = &$this->_loadModule($key);
                 $mod->doMaintenance();
index 24be628..fcdedbe 100644 (file)
@@ -151,7 +151,7 @@ class Kronolith_Tagger
         foreach ($existing_tags as $tag_id => $existing_tag) {
             $found = false;
             foreach ($tags as $tag_text) {
-                //if ($existing_tag == String::lower($tag_text, true)) {
+                //if ($existing_tag == Horde_String::lower($tag_text, true)) {
                 if ($existing_tag == $tag_text) {
                     $found = true;
                     break;
index 666c047..c9cab0b 100644 (file)
@@ -93,7 +93,7 @@ class Kronolith_View_Day extends Kronolith_Day {
         echo '<tbody>';
 
         if ($addLinks) {
-            $newEventUrl = Util::addParameter(
+            $newEventUrl = Horde_Util::addParameter(
                 'new.php',
                 array('datetime' => sprintf($this->dateString() . '%02d%02d00',
                                             $this->slots[0]['hour'], $this->slots[0]['min']),
@@ -258,7 +258,7 @@ class Kronolith_View_Day extends Kronolith_Day {
             }
 
             if ($addLinks) {
-                $newEventUrl = Util::addParameter(
+                $newEventUrl = Horde_Util::addParameter(
                     'new.php',
                     array('datetime' => sprintf($this->dateString() . '%02d%02d00',
                                                 $this->slots[$i]['hour'], $this->slots[$i]['min']),
@@ -459,7 +459,7 @@ class Kronolith_View_Day extends Kronolith_Day {
     function link($offset = 0, $full = false)
     {
         return Horde::applicationUrl(
-            Util::addParameter('day.php', 'date', $this->getTime('%Y%m%d', $offset)),
+            Horde_Util::addParameter('day.php', 'date', $this->getTime('%Y%m%d', $offset)),
             $full);
     }
 
index 18d1e69..6a7cbcf 100644 (file)
@@ -38,18 +38,18 @@ class Kronolith_View_DeleteEvent {
             return;
         }
 
-        if ($datetime = Util::getFormData('datetime')) {
+        if ($datetime = Horde_Util::getFormData('datetime')) {
             $datetime = new Horde_Date($datetime);
             $month = $datetime->month;
             $year = $datetime->year;
             $day = $datetime->mday;
         } else {
-            $month = Util::getFormData('month', date('n'));
-            $day = Util::getFormData('mday', date('j'));
-            $year = Util::getFormData('year', date('Y'));
+            $month = Horde_Util::getFormData('month', date('n'));
+            $day = Horde_Util::getFormData('mday', date('j'));
+            $year = Horde_Util::getFormData('year', date('Y'));
         }
 
-        $url = Util::getFormData('url');
+        $url = Horde_Util::getFormData('url');
 
         echo '<div id="DeleteEvent"' . ($active ? '' : ' style="display:none"') . '>';
         if (!$this->event->recurs()) {
index 6ff2cd3..a4c98d3 100644 (file)
@@ -52,16 +52,16 @@ class Kronolith_View_EditEvent {
         }
         $_SESSION['kronolith']['attendees'] = $this->event->getAttendees();
 
-        if ($datetime = Util::getFormData('datetime')) {
+        if ($datetime = Horde_Util::getFormData('datetime')) {
             $datetime = new Horde_Date($datetime);
             $month = $datetime->month;
             $year = $datetime->year;
         } else {
-            $month = Util::getFormData('month', date('n'));
-            $year = Util::getFormData('year', date('Y'));
+            $month = Horde_Util::getFormData('month', date('n'));
+            $year = Horde_Util::getFormData('year', date('Y'));
         }
 
-        $url = Util::getFormData('url');
+        $url = Horde_Util::getFormData('url');
         $perms = PERMS_EDIT;
         if ($this->event->getCreatorId() == Auth::getAuth()) {
             $perms |= PERMS_DELEGATE;
@@ -92,7 +92,7 @@ class Kronolith_View_EditEvent {
         if (isset($url)) {
             $cancelurl = $url;
         } else {
-            $cancelurl = Util::addParameter('month.php', array('month' => $month,
+            $cancelurl = Horde_Util::addParameter('month.php', array('month' => $month,
                                                                'year', $year));
             $cancelurl = Horde::applicationUrl($cancelurl, true);
         }
index 2a315a9..0931423 100644 (file)
@@ -83,13 +83,13 @@ class Kronolith_View_Event {
         $status = Kronolith::statusToString($this->event->getStatus());
         $attendees = $this->event->getAttendees();
 
-        if ($datetime = Util::getFormData('datetime')) {
+        if ($datetime = Horde_Util::getFormData('datetime')) {
             $datetime = new Horde_Date($datetime);
             $month = $datetime->month;
             $year = $datetime->year;
         } else {
-            $month = (int)Util::getFormData('month', date('n'));
-            $year = (int)Util::getFormData('year', date('Y'));
+            $month = (int)Horde_Util::getFormData('month', date('n'));
+            $year = (int)Horde_Util::getFormData('year', date('Y'));
         }
 
         $dateFormat = $prefs->getValue('date_format');
index c29e03d..ff2c97f 100644 (file)
@@ -20,7 +20,7 @@ class Kronolith_View_ExportEvent {
             $share = &$GLOBALS['kronolith_shares']->getShare($event->getCalendar());
             if (!is_a($share, 'PEAR_Error')) {
                 $iCal->setAttribute('X-WR-CALNAME',
-                                    String::convertCharset($share->get('name'),
+                                    Horde_String::convertCharset($share->get('name'),
                                                            NLS::getCharset(),
                                                            'utf-8'));
             }
index 337b8fb..9180fd6 100644 (file)
@@ -169,23 +169,23 @@ class Kronolith_View_Month {
 
                 $html .= '<td class="' . $style . '" height="70" width="14%" valign="top"><div>';
 
-                $url = Util::addParameter(Horde::applicationUrl('day.php'),
+                $url = Horde_Util::addParameter(Horde::applicationUrl('day.php'),
                                           'date', $date->dateString());
                 $html .= '<a class="day" href="' . $url . '">' . $date->mday . '</a>';
 
                 if ($addLinks) {
-                    $url = Util::addParameter(Horde::applicationUrl('new.php'),
+                    $url = Horde_Util::addParameter(Horde::applicationUrl('new.php'),
                                               array('date' => $date->dateString(),
                                                     'url' => $this->link(0, true)));
                     if ($sidebyside) {
-                        $url = Util::addParameter($url, 'calendar', $id);
+                        $url = Horde_Util::addParameter($url, 'calendar', $id);
                     }
                     $html .= Horde::link($url, _("Create a New Event"), 'newEvent') .
                         Horde::img('new_small.png', '+') . '</a>';
                 }
 
                 if ($date->dayOfWeek() == Horde_Date::DATE_MONDAY) {
-                    $url = Util::addParameter('week.php', 'date', $date->dateString());
+                    $url = Horde_Util::addParameter('week.php', 'date', $date->dateString());
                     $html .= Horde::link(Horde::applicationUrl($url), '', 'week') . sprintf(_("Week %d"), $week) . '</a>';
                 }
 
@@ -233,7 +233,7 @@ class Kronolith_View_Month {
     function link($offset = 0, $full = false)
     {
         $month = $this->getMonth($offset);
-        return Horde::applicationUrl(Util::addParameter('month.php', 'date', $month->dateString()), $full);
+        return Horde::applicationUrl(Horde_Util::addParameter('month.php', 'date', $month->dateString()), $full);
     }
 
     function getName()
index bab2526..74d11a4 100644 (file)
@@ -342,7 +342,7 @@ class Kronolith_View_Week {
     function link($offset = 0, $full = false)
     {
         $week = $this->getWeek($offset);
-        return Horde::applicationUrl(Util::addParameter($this->_controller,
+        return Horde::applicationUrl(Horde_Util::addParameter($this->_controller,
                                                         'date',
                                                         $week->dateString()),
                                      $full);
index 001ddeb..6a0fb5d 100644 (file)
@@ -47,7 +47,7 @@ class Kronolith_View_Year {
             // Heading for each month.
             $date = new Horde_Date(sprintf('%04d%02d01010101', $this->year, $month));
             $mtitle = $date->strftime('%B');
-            $url = Util::addParameter(Horde::applicationUrl('month.php'), array('date' => $date->dateString()));
+            $url = Horde_Util::addParameter(Horde::applicationUrl('month.php'), array('date' => $date->dateString()));
             $html .= '<h2 class="smallheader"><a class="smallheader" href="' . $url . '">' . $mtitle . '</a></h2>' .
                 '<table class="nopadding monthgrid" cellspacing="0" width="100%"><thead><tr class="item">';
             if (!$prefs->getValue('week_start_monday')) {
@@ -114,7 +114,7 @@ class Kronolith_View_Year {
 
                     /* Set up the link to the day view. */
                     $url = Horde::applicationUrl('day.php', true);
-                    $url = Util::addParameter($url, 'date', $date->dateString());
+                    $url = Horde_Util::addParameter($url, 'date', $date->dateString());
 
                     if ($date->month != $month) {
                         $cellday = '&nbsp;';
@@ -164,7 +164,7 @@ class Kronolith_View_Year {
 
     function link($offset = 0, $full = false)
     {
-        return Horde::applicationUrl(Util::addParameter('year.php', 'date', $this->year + $offset) . '0101', $full);
+        return Horde::applicationUrl(Horde_Util::addParameter('year.php', 'date', $this->year + $offset) . '0101', $full);
     }
 
     function getName()
index f051a43..6490fcb 100644 (file)
@@ -910,7 +910,7 @@ function _kronolith_export($uid, $contentType)
         $share = &$kronolith_shares->getShare($event->getCalendar());
 
         $iCal = new Horde_iCalendar($version);
-        $iCal->setAttribute('X-WR-CALNAME', String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8'));
+        $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8'));
 
         // Create a new vEvent.
         $vEvent = &$event->toiCalendar($iCal);
@@ -960,7 +960,7 @@ function _kronolith_exportCalendar($calendar, $contentType)
         $share = &$kronolith_shares->getShare($calendar);
 
         $iCal = new Horde_iCalendar($version);
-        $iCal->setAttribute('X-WR-CALNAME', String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8'));
+        $iCal->setAttribute('X-WR-CALNAME', Horde_String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8'));
 
         foreach ($events as $dayevents) {
             foreach ($dayevents as $event) {
@@ -1229,9 +1229,9 @@ function _kronolith_updateAttendee($response, $sender = null)
 
     $found = false;
     $error = _("No attendees have been updated because none of the provided email addresses have been found in the event's attendees list.");
-    $sender_lcase = String::lower($sender);
+    $sender_lcase = Horde_String::lower($sender);
     foreach ($atnames as $index => $attendee) {
-        $attendee = str_replace('mailto:', '', String::lower($attendee));
+        $attendee = str_replace('mailto:', '', Horde_String::lower($attendee));
         $name = isset($atparms[$index]['CN']) ? $atparms[$index]['CN'] : null;
         if ($event->hasAttendee($attendee)) {
             if (is_null($sender) || $sender_lcase == $attendee) {
index d12a128..7768b2f 100644 (file)
@@ -24,7 +24,7 @@ Horde_Autoloader::addClassPath($kronolith_dir);
 Horde_Autoloader::addClassPattern('/^Kronolith_/', $kronolith_dir);
 
 /* Registry. */
-$session_control = Util::nonInputVar('session_control');
+$session_control = Horde_Util::nonInputVar('session_control');
 if ($session_control == 'none') {
     $registry = &Registry::singleton(Registry::SESSION_NONE);
 } elseif ($session_control == 'readonly') {
@@ -85,7 +85,7 @@ if (empty($no_maint) && Kronolith::loginTasksFlag() &&
        $maint->runMaintenance();
     }
     Kronolith::loginTasksFlag(0);
-} elseif (Util::getFormData(MAINTENANCE_DONE_PARAM) &&
+} elseif (Horde_Util::getFormData(MAINTENANCE_DONE_PARAM) &&
           Kronolith::loginTasksFlag()) {
     $maint = Maintenance::factory('kronolith', array('last_maintenance' => $GLOBALS['prefs']->getValue('last_kronolith_maintenance')));
     if (!$maint) {
index 3bde1aa..760e6aa 100644 (file)
@@ -14,10 +14,10 @@ function handle_remote_cal_management($updated)
 {
     global $prefs;
 
-    $calName = Util::getFormData('remote_name');
-    $calUrl  = trim(Util::getFormData('remote_url'));
-    $calUser = trim(Util::getFormData('remote_user'));
-    $calPasswd = trim(Util::getFormData('remote_password'));
+    $calName = Horde_Util::getFormData('remote_name');
+    $calUrl  = trim(Horde_Util::getFormData('remote_url'));
+    $calUser = trim(Horde_Util::getFormData('remote_user'));
+    $calPasswd = trim(Horde_Util::getFormData('remote_password'));
 
     $key = Auth::getCredential('password');
     if ($key) {
@@ -25,7 +25,7 @@ function handle_remote_cal_management($updated)
         $calPasswd = base64_encode(Secret::write($key, $calPasswd));
     }
 
-    $calActionID = Util::getFormData('remote_action', 'add');
+    $calActionID = Horde_Util::getFormData('remote_action', 'add');
 
     if ($calActionID == 'add') {
         if (!empty($calName) && !empty($calUrl)) {
@@ -67,7 +67,7 @@ function handle_remote_cal_management($updated)
 
 function handle_shareselect($updated)
 {
-    $default_share = Util::getFormData('default_share');
+    $default_share = Horde_Util::getFormData('default_share');
     if (!is_null($default_share)) {
         $sharelist = Kronolith::listCalendars();
         if ((is_array($sharelist)) > 0 && isset($sharelist[$default_share])) {
@@ -81,7 +81,7 @@ function handle_shareselect($updated)
 
 function handle_holiday_drivers($updated)
 {
-    $holiday_driversSelected = Util::getFormData('holiday_drivers');
+    $holiday_driversSelected = Horde_Util::getFormData('holiday_drivers');
     $holiday_driversFiltered = array();
 
     if (is_array($holiday_driversSelected)) {
@@ -98,13 +98,13 @@ function handle_sourceselect($updated)
 {
     global $prefs;
 
-    $search_sources = Util::getFormData('search_sources');
+    $search_sources = Horde_Util::getFormData('search_sources');
     if ($search_sources !== null) {
         $prefs->setValue('search_sources', $search_sources);
         $updated = true;
     }
 
-    $search_fields_string = Util::getFormData('search_fields_string');
+    $search_fields_string = Horde_Util::getFormData('search_fields_string');
     if ($search_fields_string !== null) {
         $prefs->setValue('search_fields', $search_fields_string);
         $updated = true;
@@ -115,7 +115,7 @@ function handle_sourceselect($updated)
 
 function handle_fb_cals_select($updated)
 {
-    $fb_calsSelected = Util::getFormData('fb_cals');
+    $fb_calsSelected = Horde_Util::getFormData('fb_cals');
     $fb_cals = Kronolith::listCalendars();
     $fb_calsFiltered = array();
 
@@ -132,7 +132,7 @@ function handle_fb_cals_select($updated)
 function handle_default_alarm_management($updated)
 {
     $GLOBALS['prefs']->setValue('default_alarm',
-                                (int)Util::getFormData('alarm_value') * (int)Util::getFormData('alarm_unit'));
+                                (int)Horde_Util::getFormData('alarm_value') * (int)Horde_Util::getFormData('alarm_unit'));
     return true;
 }
 
index b7e24af..ff25b27 100644 (file)
@@ -19,7 +19,6 @@ $prefs = new Prefs;
 
 require 'Date/Calc.php';
 require 'Horde/Date.php';
-require 'Horde/Util.php';
 require 'Horde/iCalendar.php';
 
 $iCal = new Horde_iCalendar();
index 0deaf65..d119c8b 100644 (file)
@@ -13,7 +13,6 @@ class Driver {
 require 'Date/Calc.php';
 require 'Horde/Date.php';
 require 'Horde/Date/Recurrence.php';
-require 'Horde/Util.php';
 require 'Horde/iCalendar.php';
 
 $iCal = new Horde_iCalendar();
index 7c629cb..181da95 100644 (file)
@@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 $view = Kronolith::getView('Month');
 $title = $view->date->strftime('%B %Y');
-$print_view = (bool)Util::getFormData('print');
+$print_view = (bool)Horde_Util::getFormData('print');
 
 Horde::addScriptFile('tooltip.js', 'horde', true);
 if (!$print_view) {
index 935a6c8..f5815a3 100644 (file)
@@ -18,32 +18,32 @@ if (Kronolith::hasPermission('max_events') !== true &&
         $message = Horde::callHook('_perms_hook_denied', array('kronolith:max_events'), 'horde', $message);
     }
     $notification->push($message, 'horde.error', array('content.raw'));
-    $url = Util::addParameter($prefs->getValue('defaultview') . '.php', array('month' => Util::getFormData('month'),
-                                                                              'year' => Util::getFormData('year')));
+    $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php', array('month' => Horde_Util::getFormData('month'),
+                                                                              'year' => Horde_Util::getFormData('year')));
     header('Location: ' . Horde::applicationUrl($url, true));
     exit;
 }
 
-$calendar_id = Util::getFormData('calendar', Kronolith::getDefaultCalendar(PERMS_EDIT));
+$calendar_id = Horde_Util::getFormData('calendar', Kronolith::getDefaultCalendar(PERMS_EDIT));
 if (!$calendar_id) {
-    $url = Util::addParameter($prefs->getValue('defaultview') . '.php', array('month' => Util::getFormData('month'),
-                                                                              'year' => Util::getFormData('year')));
+    $url = Horde_Util::addParameter($prefs->getValue('defaultview') . '.php', array('month' => Horde_Util::getFormData('month'),
+                                                                              'year' => Horde_Util::getFormData('year')));
     header('Location: ' . Horde::applicationUrl($url, true));
 }
 
 $event = Kronolith::getDriver()->getEvent();
 $_SESSION['kronolith']['attendees'] = $event->getAttendees();
 
-$date = Util::getFormData('datetime');
+$date = Horde_Util::getFormData('datetime');
 if (!$date) {
-    $date = Util::getFormData('date', date('Ymd')) . '000600';
+    $date = Horde_Util::getFormData('date', date('Ymd')) . '000600';
     if ($prefs->getValue('twentyFour')) {
         $event->start->hour = 12;
     }
 }
 $event->start = new Horde_Date($date);
 $event->end = new Horde_Date($event->start);
-if (Util::getFormData('allday')) {
+if (Horde_Util::getFormData('allday')) {
     $event->end->mday++;
 } else {
     // Default to a 1 hour duration.
@@ -53,11 +53,11 @@ $month = $event->start->month;
 $year = $event->start->year;
 
 $buttons = array('<input type="submit" class="button" name="save" value="' . _("Save Event") . '" />');
-$url = Util::getFormData('url');
+$url = Horde_Util::getFormData('url');
 if (isset($url)) {
     $cancelurl = $url;
 } else {
-    $cancelurl = Util::addParameter('month.php', array('month' => $month,
+    $cancelurl = Horde_Util::addParameter('month.php', array('month' => $month,
                                                        'year' => $year));
     $cancelurl = Horde::applicationUrl($cancelurl, true);
 }
index 2956ed9..09af13f 100644 (file)
@@ -17,13 +17,13 @@ $groups = &Group::singleton();
 $auth = &Auth::singleton($conf['auth']['driver']);
 
 $reload = false;
-$actionID = Util::getFormData('actionID', 'edit');
+$actionID = Horde_Util::getFormData('actionID', 'edit');
 switch ($actionID) {
 case 'edit':
-    $share = &$shares->getShareById(Util::getFormData('cid'));
+    $share = &$shares->getShareById(Horde_Util::getFormData('cid'));
     if (!is_a($share, 'PEAR_Error')) {
         $perm = &$share->getPermission();
-    } elseif (($category = Util::getFormData('share')) !== null) {
+    } elseif (($category = Horde_Util::getFormData('share')) !== null) {
         $share = &$shares->getShare($category);
         if (!is_a($share, 'PEAR_Error')) {
             $perm = &$share->getPermission();
@@ -37,7 +37,7 @@ case 'edit':
     break;
 
 case 'editform':
-    $share = &$shares->getShareById(Util::getFormData('cid'));
+    $share = &$shares->getShareById(Horde_Util::getFormData('cid'));
     if (is_a($share, 'PEAR_Error')) {
         $notification->push(_("Attempt to edit a non-existent share."), 'horde.error');
     } else {
@@ -48,7 +48,7 @@ case 'editform':
 
         // Process owner and owner permissions.
         $old_owner = $share->get('owner');
-        $new_owner = Auth::addHook(Util::getFormData('owner', $old_owner));
+        $new_owner = Auth::addHook(Horde_Util::getFormData('owner', $old_owner));
         if ($old_owner !== $new_owner && !empty($new_owner)) {
             if ($old_owner != Auth::getAuth() && !Auth::isAdmin()) {
                 $notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');
@@ -59,93 +59,93 @@ case 'editform':
         }
 
         // Process default permissions.
-        if (Util::getFormData('default_show')) {
+        if (Horde_Util::getFormData('default_show')) {
             $perm->addDefaultPermission(PERMS_SHOW, false);
         } else {
             $perm->removeDefaultPermission(PERMS_SHOW, false);
         }
-        if (Util::getFormData('default_read')) {
+        if (Horde_Util::getFormData('default_read')) {
             $perm->addDefaultPermission(PERMS_READ, false);
         } else {
             $perm->removeDefaultPermission(PERMS_READ, false);
         }
-        if (Util::getFormData('default_edit')) {
+        if (Horde_Util::getFormData('default_edit')) {
             $perm->addDefaultPermission(PERMS_EDIT, false);
         } else {
             $perm->removeDefaultPermission(PERMS_EDIT, false);
         }
-        if (Util::getFormData('default_delete')) {
+        if (Horde_Util::getFormData('default_delete')) {
             $perm->addDefaultPermission(PERMS_DELETE, false);
         } else {
             $perm->removeDefaultPermission(PERMS_DELETE, false);
         }
-        if (Util::getFormData('default_delegate')) {
+        if (Horde_Util::getFormData('default_delegate')) {
             $perm->addDefaultPermission(PERMS_DELEGATE, false);
         } else {
             $perm->removeDefaultPermission(PERMS_DELEGATE, false);
         }
 
         // Process guest permissions.
-        if (Util::getFormData('guest_show')) {
+        if (Horde_Util::getFormData('guest_show')) {
             $perm->addGuestPermission(PERMS_SHOW, false);
         } else {
             $perm->removeGuestPermission(PERMS_SHOW, false);
         }
-        if (Util::getFormData('guest_read')) {
+        if (Horde_Util::getFormData('guest_read')) {
             $perm->addGuestPermission(PERMS_READ, false);
         } else {
             $perm->removeGuestPermission(PERMS_READ, false);
         }
-        if (Util::getFormData('guest_edit')) {
+        if (Horde_Util::getFormData('guest_edit')) {
             $perm->addGuestPermission(PERMS_EDIT, false);
         } else {
             $perm->removeGuestPermission(PERMS_EDIT, false);
         }
-        if (Util::getFormData('guest_delete')) {
+        if (Horde_Util::getFormData('guest_delete')) {
             $perm->addGuestPermission(PERMS_DELETE, false);
         } else {
             $perm->removeGuestPermission(PERMS_DELETE, false);
         }
-        if (Util::getFormData('guest_delegate')) {
+        if (Horde_Util::getFormData('guest_delegate')) {
             $perm->addGuestPermission(PERMS_DELEGATE, false);
         } else {
             $perm->removeGuestPermission(PERMS_DELEGATE, false);
         }
 
         // Process creator permissions.
-        if (Util::getFormData('creator_show')) {
+        if (Horde_Util::getFormData('creator_show')) {
             $perm->addCreatorPermission(PERMS_SHOW, false);
         } else {
             $perm->removeCreatorPermission(PERMS_SHOW, false);
         }
-        if (Util::getFormData('creator_read')) {
+        if (Horde_Util::getFormData('creator_read')) {
             $perm->addCreatorPermission(PERMS_READ, false);
         } else {
             $perm->removeCreatorPermission(PERMS_READ, false);
         }
-        if (Util::getFormData('creator_edit')) {
+        if (Horde_Util::getFormData('creator_edit')) {
             $perm->addCreatorPermission(PERMS_EDIT, false);
         } else {
             $perm->removeCreatorPermission(PERMS_EDIT, false);
         }
-        if (Util::getFormData('creator_delete')) {
+        if (Horde_Util::getFormData('creator_delete')) {
             $perm->addCreatorPermission(PERMS_DELETE, false);
         } else {
             $perm->removeCreatorPermission(PERMS_DELETE, false);
         }
-        if (Util::getFormData('creator_delegate')) {
+        if (Horde_Util::getFormData('creator_delegate')) {
             $perm->addCreatorPermission(PERMS_DELEGATE, false);
         } else {
             $perm->removeCreatorPermission(PERMS_DELEGATE, false);
         }
 
         // Process user permissions.
-        $u_names = Util::getFormData('u_names');
-        $u_show = Util::getFormData('u_show');
-        $u_read = Util::getFormData('u_read');
-        $u_edit = Util::getFormData('u_edit');
-        $u_delete = Util::getFormData('u_delete');
-        $u_delegate = Util::getFormData('u_delegate');
+        $u_names = Horde_Util::getFormData('u_names');
+        $u_show = Horde_Util::getFormData('u_show');
+        $u_read = Horde_Util::getFormData('u_read');
+        $u_edit = Horde_Util::getFormData('u_edit');
+        $u_delete = Horde_Util::getFormData('u_delete');
+        $u_delegate = Horde_Util::getFormData('u_delegate');
 
         foreach ($u_names as $key => $user) {
             // Apply backend hooks
@@ -184,12 +184,12 @@ case 'editform':
         }
 
         // Process group permissions.
-        $g_names = Util::getFormData('g_names');
-        $g_show = Util::getFormData('g_show');
-        $g_read = Util::getFormData('g_read');
-        $g_edit = Util::getFormData('g_edit');
-        $g_delete = Util::getFormData('g_delete');
-        $g_delegate = Util::getFormData('g_delegate');
+        $g_names = Horde_Util::getFormData('g_names');
+        $g_show = Horde_Util::getFormData('g_show');
+        $g_read = Horde_Util::getFormData('g_read');
+        $g_edit = Horde_Util::getFormData('g_edit');
+        $g_delete = Horde_Util::getFormData('g_delete');
+        $g_delegate = Horde_Util::getFormData('g_delegate');
 
         foreach ($g_names as $key => $group) {
             if (empty($group)) {
@@ -231,8 +231,8 @@ case 'editform':
             if (is_a($result, 'PEAR_Error')) {
                 $notification->push($result, 'horde.error');
             } else {
-                if (Util::getFormData('save_and_finish')) {
-                    Util::closeWindowJS();
+                if (Horde_Util::getFormData('save_and_finish')) {
+                    Horde_Util::closeWindowJS();
                     exit;
                 }
                 $notification->push(sprintf(_("Updated \"%s\"."), $share->get('name')), 'horde.success');
index 3daae1c..410fd17 100644 (file)
@@ -14,7 +14,7 @@ require_once HORDE_BASE . '/lib/core.php';
 $registry = &Registry::singleton();
 
 /* Which application. */
-$app = Util::getFormData('app');
+$app = Horde_Util::getFormData('app');
 if (!$app) {
     echo '<ul id="app">';
     foreach ($registry->listApps() as $app) {
@@ -31,7 +31,7 @@ $appbase = $registry->get('fileroot', $app);
 require_once $appbase . '/lib/base.php';
 
 /* Which preference. */
-$pref = Util::getFormData('pref');
+$pref = Horde_Util::getFormData('pref');
 if (!$pref) {
     $_prefs = array();
     if (is_callable(array('Horde', 'loadConfiguration'))) {
@@ -59,9 +59,9 @@ if (!$pref) {
 }
 
 /* Which action. */
-if (Util::getPost('pref') == $pref) {
+if (Horde_Util::getPost('pref') == $pref) {
     /* POST for saving a pref. */
-    $prefs->setValue($pref, Util::getPost('value'));
+    $prefs->setValue($pref, Horde_Util::getPost('value'));
 }
 
 /* GET returns the current value, POST returns the new value. */
index d468f65..9909403 100755 (executable)
@@ -160,7 +160,7 @@ function send_agendas()
                               __FILE__, __LINE__, PEAR_LOG_ERR);
             return;
         }
-        $pad = max(String::length(_("All day")) + 2, $twentyFour ? 6 : 8);
+        $pad = max(Horde_String::length(_("All day")) + 2, $twentyFour ? 6 : 8);
 
         $message = sprintf(_("Your daily agenda for %s"),
                            strftime($dateFormat, $runtime))
index 9727a80..9086f37 100644 (file)
 require_once dirname(__FILE__) . '/lib/base.php';
 
 /* Get search parameters. */
-$search_mode = Util::getFormData('search_mode', 'basic');
-$search_calendar = explode('|', Util::getFormData('calendar', '|__any'), 2);
+$search_mode = Horde_Util::getFormData('search_mode', 'basic');
+$search_calendar = explode('|', Horde_Util::getFormData('calendar', '|__any'), 2);
 $events = null;
 
 if ($search_mode == 'basic') {
-    $desc = Util::getFormData('pattern_desc');
-    $title = Util::getFormData('pattern_title');
+    $desc = Horde_Util::getFormData('pattern_desc');
+    $title = Horde_Util::getFormData('pattern_title');
     if (strlen($desc) || strlen($title)) {
         $event = Kronolith::getDriver()->getEvent();
         $event->setDescription($desc);
@@ -25,7 +25,7 @@ if ($search_mode == 'basic') {
         $event->status = null;
 
         $time1 = $_SERVER['REQUEST_TIME'];
-        $range = Util::getFormData('range');
+        $range = Horde_Util::getFormData('range');
         if ($range == '+') {
             $event->start = new Horde_Date($time1);
             $event->end = null;
@@ -53,10 +53,10 @@ if ($search_mode == 'basic') {
      * a default end date. */
     $event->initialized = true;
 
-    $q_title = Util::getFormData('title');
+    $q_title = Horde_Util::getFormData('title');
     if (strlen($q_title)) {
         $event->readForm();
-        if (Util::getFormData('status') == Kronolith::STATUS_NONE) {
+        if (Horde_Util::getFormData('status') == Kronolith::STATUS_NONE) {
             $event->status = null;
         }
 
index b4a0b23..b650a02 100644 (file)
@@ -31,7 +31,7 @@ function switchDateView(view, date)
 </script>
 
 <form method="post" action="attendees.php" name="attendeesForm">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="add" />
 <input type="hidden" name="actionValue" value="" />
 <input type="hidden" name="view" value="<?php echo htmlspecialchars($view) ?>" />
index 06e90ff..f2d3081 100644 (file)
@@ -7,13 +7,13 @@
 <div id="calendar-list-buttons">
  <?php if (!$prefs->isLocked('default_share')): ?>
  <form method="get" action="create.php">
-  <?php echo Util::formInput() ?>
+  <?php echo Horde_Util::formInput() ?>
   <input type="submit" class="button" value="<?php echo _("Create a new Local Calendar") ?>" />
  </form>
  <?php endif; ?>
 
  <form method="get" action="remote_subscribe.php">
-  <?php echo Util::formInput() ?>
+  <?php echo Horde_Util::formInput() ?>
   <input type="submit" class="button" value="<?php echo _("Subscribe to a Remote Calendar") ?>" />
  </form>
 </div>
 <?php $calendar = $calendars[$calendar_id]; if (is_array($calendar)): ?>
    <td><?php echo htmlspecialchars($calendar['name']) ?></td>
    <td><?php echo _("Remote") ?></td>
-   <td><?php $url = Util::addParameter($display_url_base, 'display_cal', 'remote_' . $calendar['url'], false) ?><a href="<?php echo htmlspecialchars($url) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($url)) ?></a></td>
+   <td><?php $url = Horde_Util::addParameter($display_url_base, 'display_cal', 'remote_' . $calendar['url'], false) ?><a href="<?php echo htmlspecialchars($url) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($url)) ?></a></td>
    <td><a href="<?php echo htmlspecialchars($calendar['url']) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($calendar['url'])) ?></a></td>
-   <td><a href="<?php echo Util::addParameter($remote_edit_url_base, 'url', $calendar['url']) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
+   <td><a href="<?php echo Horde_Util::addParameter($remote_edit_url_base, 'url', $calendar['url']) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
 <?php if (empty($conf['share']['no_sharing'])): ?>
    <td>&nbsp;</td>
 <?php endif; ?>
-   <td><a href="<?php echo Util::addParameter($remote_unsubscribe_url_base, 'url', $calendar['url']) ?>" title="<?php echo _("Unsubscribe") ?>"><?php echo $delete_img ?></a></td>
+   <td><a href="<?php echo Horde_Util::addParameter($remote_unsubscribe_url_base, 'url', $calendar['url']) ?>" title="<?php echo _("Unsubscribe") ?>"><?php echo $delete_img ?></a></td>
 <?php else: ?>
    <td><?php echo htmlspecialchars($calendar->get('name')) ?></td>
    <td><?php echo _("Local") ?></td>
-   <td><?php $url = Util::addParameter($display_url_base, 'display_cal', $calendar->getName(), false) ?><a href="<?php echo htmlspecialchars($url) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($url)) ?></a></td>
-   <td><?php $url = $webdav ? $subscribe_url_base . $calendar->get('owner') . '/' . $calendar->getName() . '.ics' : Util::addParameter($subscribe_url_base, 'c', $calendar->getName(), false) ?><a href="<?php echo htmlspecialchars($url) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($url)) ?></a></td>
-   <td><a href="<?php echo Util::addParameter($edit_url_base, 'c', $calendar->getName()) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
+   <td><?php $url = Horde_Util::addParameter($display_url_base, 'display_cal', $calendar->getName(), false) ?><a href="<?php echo htmlspecialchars($url) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($url)) ?></a></td>
+   <td><?php $url = $webdav ? $subscribe_url_base . $calendar->get('owner') . '/' . $calendar->getName() . '.ics' : Horde_Util::addParameter($subscribe_url_base, 'c', $calendar->getName(), false) ?><a href="<?php echo htmlspecialchars($url) ?>" title="<?php echo _("Click or copy this URL to display this calendar") ?>" target="_blank"><?php echo htmlspecialchars(shorten_url($url)) ?></a></td>
+   <td><a href="<?php echo Horde_Util::addParameter($edit_url_base, 'c', $calendar->getName()) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
 <?php if (empty($conf['share']['no_sharing'])): ?>
-   <td><a onclick="return !popup(this.href);" href="<?php echo Util::addParameter($perms_url_base, 'share', $calendar->getName()) ?>" target="_blank" title="<?php echo _("Change Permissions") ?>"><?php echo $perms_img ?></a></td>
+   <td><a onclick="return !popup(this.href);" href="<?php echo Horde_Util::addParameter($perms_url_base, 'share', $calendar->getName()) ?>" target="_blank" title="<?php echo _("Change Permissions") ?>"><?php echo $perms_img ?></a></td>
 <?php endif; ?>
-   <td><a href="<?php echo Util::addParameter($delete_url_base, 'c', $calendar->getName()) ?>" title="<?php echo _("Delete") ?>"><?php echo $delete_img ?></a></td>
+   <td><a href="<?php echo Horde_Util::addParameter($delete_url_base, 'c', $calendar->getName()) ?>" title="<?php echo _("Delete") ?>"><?php echo $delete_img ?></a></td>
 <?php endif; ?>
   </tr>
 <?php endforeach; ?>
index ddae416..41fe3d6 100644 (file)
@@ -27,7 +27,7 @@ if (!empty($refresh_time) && ($refresh_time > 0) && !empty($refresh_url)) {
 Horde::includeScriptFiles();
 require KRONOLITH_TEMPLATES . '/javascript_defs.php';
 
-$bc = Util::nonInputVar('bodyClass');
+$bc = Horde_Util::nonInputVar('bodyClass');
 if (isset($view) && is_object($view) && $prefs->getValue('show_panel')) {
     if ($bc) {
         $bc .= ' ';
@@ -52,4 +52,4 @@ var kronolithPrintLink = '';
 <?php Kronolith::outputInlineScript(); ?>
 </head>
 
-<body<?php if ($bc) echo ' class="' . $bc . '"'; if ($bi = Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
+<body<?php if ($bc) echo ' class="' . $bc . '"'; if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
index aa722ce..fe2c45b 100644 (file)
@@ -133,7 +133,7 @@ window.onload = function() {
 </script>
 <form method="post" name="contacts" onsubmit="passAddresses();" action="contacts.php?nocache=<?php echo hash('md5', mt_rand()) ?>">
 <input type="hidden" name="sa" />
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 
 <div class="header"><?php echo _("Address Book") ?></div>
 
index 50c2d0a..1097ae1 100644 (file)
@@ -1,5 +1,5 @@
 <form method="post" name="export" action="<?php echo Horde::downloadUrl(_("events.csv"), null, 'data.php') ?>">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="export" />
 
 <br class="spacer" />
index dbaf567..595ff1a 100644 (file)
@@ -1,5 +1,5 @@
 <form method="post" name="import_form" enctype="multipart/form-data" action="data.php">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="<?php echo htmlspecialchars($next_step) ?>" />
 <input type="hidden" name="import_step" value="<?php echo (int)$import_step ?>" />
 
index 8f8ddff..a973f7d 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 if (empty($url)) {
-    $url = Util::addParameter('month.php', array('month' => $month,
+    $url = Horde_Util::addParameter('month.php', array('month' => $month,
                                                  'year' => $year));
     $url = Horde::applicationUrl($url, true);
 }
 ?>
 <form action="delete.php" method="post" id="deleteform" name="delete">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
 <input type="hidden" name="year" value="<?php if (isset($year)) echo htmlspecialchars($year) ?>" />
 <input type="hidden" name="month" value="<?php if (isset($month)) echo htmlspecialchars($month) ?>" />
 <input type="hidden" name="mday" value="<?php if (isset($day)) echo htmlspecialchars($day) ?>" />
index 3826ba9..cb96503 100644 (file)
@@ -1,18 +1,18 @@
 <?php
 if (empty($url)) {
-    $url = Util::addParameter('month.php', array('month' => $month,
+    $url = Horde_Util::addParameter('month.php', array('month' => $month,
                                                  'year' => $year));
     $url = Horde::applicationUrl($url, true);
 }
 ?>
 <form action="delete.php" method="post" name="delete">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
 <input type="hidden" name="year" value="<?php if (isset($year)) echo htmlspecialchars($year) ?>" />
 <input type="hidden" name="month" value="<?php if (isset($month)) echo htmlspecialchars($month) ?>" />
 <input type="hidden" name="mday" value="<?php if (isset($day)) echo htmlspecialchars($day) ?>" />
 <input type="hidden" name="url" value="<?php echo htmlspecialchars($url) ?>" />
 <input type="hidden" name="eventID" value="<?php echo htmlspecialchars($this->event->getId()) ?>" />
-<input type="hidden" name="calendar" value="<?php echo htmlspecialchars(Util::getFormData('calendar')) ?>" />
+<input type="hidden" name="calendar" value="<?php echo htmlspecialchars(Horde_Util::getFormData('calendar')) ?>" />
 
 <div class="headerbox">
 <?php if (!empty($this->event->attendees)): ?>
index 05008d7..ac0c137 100644 (file)
@@ -1,6 +1,6 @@
 <?php $showCalSelect = (!$GLOBALS['prefs']->isLocked('default_share') && count($calendars) > 1); ?>
 <form action="<?php echo ($event->isInitialized() && !$event->isRemote() ? 'edit.php' : 'add.php') ?>" method="post" name="eventform" id="eventform">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="year" value="<?php if (isset($year)) echo htmlspecialchars($year) ?>" />
 <input type="hidden" name="month" value="<?php if (isset($month)) echo htmlspecialchars($month) ?>" />
 <input type="hidden" name="mday" value="<?php if (isset($day)) echo htmlspecialchars($day) ?>" />
@@ -37,7 +37,7 @@
   <input type="radio" name="edit_recur" value="future" id="edit_future" onclick="KronolithEventForm.setStartDate($F('recur_ex'))" /> <?php echo Horde::label('edit_future', _("Future")) ?>
   <input type="radio" name="edit_recur" value="all" id="edit_all" checked="checked" /> <?php echo Horde::label('edit_all', _("All")) ?>
   <input type="radio" name="edit_recur" value="copy" id="edit_copy" /> <?php echo Horde::label('edit_copy', _("Save As New")) ?>
-  <input type="hidden" name="recur_ex" id="recur_ex" value="<?php echo Util::getFormData('datetime') ?>" />
+  <input type="hidden" name="recur_ex" id="recur_ex" value="<?php echo Horde_Util::getFormData('datetime') ?>" />
  </td>
 </tr>
 <?php endif; ?>
@@ -407,4 +407,4 @@ endif;
 </form>
 <script type="text/javascript">
 document.eventform.title.focus();
-</script>
\ No newline at end of file
+</script>
index 5157b92..710ce14 100644 (file)
@@ -1,7 +1,7 @@
 <script type="text/javascript">
 KronolithEventForm = new Object();
 
-<?php if (!Util::nonInputVar('issearch')): ?>
+<?php if (!Horde_Util::nonInputVar('issearch')): ?>
 KronolithEventForm.setInterval = function(field)
 {
     elt = document.eventform[field];
@@ -79,7 +79,7 @@ KronolithEventForm.updateWday = function(span)
         day = $('end_day').value;
         month = $('end_month').value - 1;
         year = $('end_year').value;
-<?php if (!Util::nonInputVar('issearch')): ?>
+<?php if (!Horde_Util::nonInputVar('issearch')): ?>
     } else if (span == 'recur_end_wday') {
         spanObj = $('recur_end_wday');
         day = $('recur_enddate_day').value;
@@ -248,7 +248,7 @@ KronolithEventForm.setStartDate = function(date)
     $('su').checked = false;
 }
 
-<?php if (Util::getFormData('allday') == 1): ?>
+<?php if (Horde_Util::getFormData('allday') == 1): ?>
 Event.observe(window, 'load', function() {
     $('allday').click;
 });
index d4cedc1..e5fcbf2 100644 (file)
@@ -34,7 +34,7 @@ $tagger = Kronolith::getTagger();
 
 <div id="pageControlsInner">
 <form action="<?php echo Horde::selfUrl() ?>" method="post">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
  <h4><?php echo _("Search for Calendars:") ?></h4>
  <p>
   <input id="calendarSearch" type="text" for="mycalendars,sharedcalendars,remotecalendars,externalcalendars" />
index 4ca65a6..26413ab 100644 (file)
@@ -1,5 +1,5 @@
 <form name="edit" method="post" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF']) ?>">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="editform" />
 <input type="hidden" name="cid" value="<?php echo htmlspecialchars($share->getId()) ?>" />
 <table width="100%" cellspacing="0">
index f0a9130..ac0e224 100644 (file)
@@ -6,7 +6,7 @@
   <?php echo _("Copy this URL for use wherever you need your Free/Busy URL:") ?>
  </div>
  <p class="text">
-  <?php echo Util::addParameter(Horde::applicationUrl('fb.php', true, -1), 'u', Auth::getAuth()) ?>
+  <?php echo Horde_Util::addParameter(Horde::applicationUrl('fb.php', true, -1), 'u', Auth::getAuth()) ?>
  </p>
 </div>
 
index 716cf45..c0fb532 100644 (file)
@@ -1,12 +1,12 @@
 <form method="post" name="eventform" action="search.php">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="search_calendar" />
 <input type="hidden" name="search_mode" value="basic" />
 
 <br /><br />
 <h1 class="header">
  <span class="smallheader rightFloat">
-  <?php echo Horde::widget(Util::addParameter(Horde::applicationUrl('search.php'), 'search_mode', 'advanced'), _("Advanced Search"), 'smallheader', '', '', _("Ad_vanced Search")) ?>
+  <?php echo Horde::widget(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_mode', 'advanced'), _("Advanced Search"), 'smallheader', '', '', _("Ad_vanced Search")) ?>
  </span>
  <?php echo _("Basic Search") ?>
 </h1>
@@ -18,7 +18,7 @@
     <strong><?php echo Horde::label('pattern_title', _("Title")) ?></strong>
   </td>
   <td>
-    <input name="pattern_title" id="pattern_title" type="text" value="<?php echo htmlspecialchars(Util::getFormData('pattern_title')) ?>" size="50" maxlength="100" />
+    <input name="pattern_title" id="pattern_title" type="text" value="<?php echo htmlspecialchars(Horde_Util::getFormData('pattern_title')) ?>" size="50" maxlength="100" />
   </td>
 </tr>
 <tr>
@@ -26,7 +26,7 @@
     <strong><?php echo Horde::label('pattern_desc', _("Descri_ption")) ?></strong>
   </td>
   <td>
-    <input name="pattern_desc" id="pattern_desc" type="text" value="<?php echo htmlspecialchars(Util::getFormData('pattern_desc')) ?>" size="50" maxlength="100" />
+    <input name="pattern_desc" id="pattern_desc" type="text" value="<?php echo htmlspecialchars(Horde_Util::getFormData('pattern_desc')) ?>" size="50" maxlength="100" />
   </td>
 </tr>
 <!-- range -->
@@ -40,7 +40,7 @@
 function range_option_string($thisrange, $descr)
 {
     echo '<option ';
-    if (Util::getFormData('range') == $thisrange) {
+    if (Horde_Util::getFormData('range') == $thisrange) {
         echo "value=\"$thisrange\" selected=\"selected\"";
     } else {
         echo "value=\"$thisrange\"";
index 3f4973a..c91df96 100644 (file)
@@ -3,14 +3,14 @@ $issearch = true;
 require KRONOLITH_TEMPLATES . '/edit/javascript.inc';
 ?>
 <form method="post" name="eventform" action="search.php">
-<?php Util::pformInput() ?>
+<?php Horde_Util::pformInput() ?>
 <input type="hidden" name="actionID" value="search_calendar" />
 <input type="hidden" name="search_mode" value="advanced" />
 
 <br /><br />
 <h1 class="header">
  <span class="smallheader rightFloat">
-  <?php echo Horde::widget(Util::addParameter(Horde::applicationUrl('search.php'), 'search_mode', 'basic'), _("Basic Search"), 'smallheader', '', '', _("_Basic Search")) ?>
+  <?php echo Horde::widget(Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'search_mode', 'basic'), _("Basic Search"), 'smallheader', '', '', _("_Basic Search")) ?>
  </span>
  <?php echo _("Advanced Search") ?>
 </h1>
index e49b048..80f8de3 100644 (file)
@@ -22,7 +22,7 @@ if (Kronolith::getDefaultCalendar(PERMS_EDIT) &&
     (!empty($conf['hooks']['permsdenied']) ||
      Kronolith::hasPermission('max_events') === true ||
      Kronolith::hasPermission('max_events') > Kronolith::countEvents())) {
-    $addurl = Util::addParameter('new.php',
+    $addurl = Horde_Util::addParameter('new.php',
                                  array('date' => $day->dateString(),
                                        'url' => $this->link(0, true)));
     echo Horde::link(Horde::applicationUrl($addurl), _("Create a New Event"), 'iconAdd')
index de0ccf1..5f6ae40 100644 (file)
@@ -3,10 +3,10 @@
 require_once dirname(__FILE__) . '/lib/base.load.php';
 include_once HORDE_BASE . '/lib/core.php';
 
-/* We should have loaded the String class, from the Horde_Util package, in
- * core.php. If String:: isn't defined, then we're not finding some critical
+/* We should have loaded the Horde_String class, from the Horde_Util package, in
+ * core.php. If Horde_String:: isn't defined, then we're not finding some critical
  * libraries. */
-if (!class_exists('String')) {
+if (!class_exists('Horde_String')) {
     echo '<br /><h2 style="color:red">The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the <a href="http://cvs.horde.org/cvs.php/framework">framework</a> module from <a href="http://www.horde.org/source/">Horde CVS</a>, and install the packages in it with the install-packages.php script.</h2>';
     exit;
 }
index 34684d4..921a8f5 100644 (file)
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$view = Kronolith::getView(Util::getFormData('view'));
+$view = Kronolith::getView(Horde_Util::getFormData('view'));
 if ($view) {
     $print_view = false;
-    Kronolith::tabs(strtolower(str_replace('kronolith_view_', '', String::lower(get_class($view)))));
+    Kronolith::tabs(strtolower(str_replace('kronolith_view_', '', Horde_String::lower(get_class($view)))));
     $view->html();
-    echo '<div style="display:none" id="view_vars" view="' . htmlspecialchars(Util::getFormData('view')) . '" date="' . Kronolith::currentDate()->format(DATE_RFC2822) . '" print="' . Util::addParameter($view->link(), 'print', 1) . '">';
+    echo '<div style="display:none" id="view_vars" view="' . htmlspecialchars(Horde_Util::getFormData('view')) . '" date="' . Kronolith::currentDate()->format(DATE_RFC2822) . '" print="' . Horde_Util::addParameter($view->link(), 'print', 1) . '">';
 }
index bd707ce..a82ecba 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 $view = Kronolith::getView('Week');
 $title = sprintf(_("Week %d"), $view->week);
-$print_view = (bool)Util::getFormData('print');
+$print_view = (bool)Horde_Util::getFormData('print');
 
 Horde::addScriptFile('tooltip.js', 'horde', true);
 if (!$print_view) {
index ef76f07..1fa6ff6 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 $view = Kronolith::getView('WorkWeek');
 $title = sprintf(_("Week %d"), $view->week);
-$print_view = (bool)Util::getFormData('print');
+$print_view = (bool)Horde_Util::getFormData('print');
 
 Horde::addScriptFile('tooltip.js', 'horde', true);
 if (!$print_view) {
index 3330c70..c8597b7 100644 (file)
@@ -13,7 +13,7 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 $view = Kronolith::getView('Year');
 $title = $view->year;
-$print_view = (bool)Util::getFormData('print');
+$print_view = (bool)Horde_Util::getFormData('print');
 
 Horde::addScriptFile('tooltip.js', 'horde', true);
 if (!$print_view) {
index 7cd11b1..4df3744 100644 (file)
@@ -14,7 +14,6 @@
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 /**
  * This routine removes all attributes from a given tag except
@@ -97,11 +96,11 @@ if (!Auth::isAuthenticated()) {
 // Default vars
 $title = _("Add news");
 $default_lang = News::getLang();
-$id = Util::getFormData('id', false);
-$return = Util::getFormData('return', false);
+$id = Horde_Util::getFormData('id', false);
+$return = Horde_Util::getFormData('return', false);
 
 // We just delete default image?
-if ($id && Util::getFormData('submitbutton') == _("Delete existing picture")) {
+if ($id && Horde_Util::getFormData('submitbutton') == _("Delete existing picture")) {
     $result = $news->write_db->query('UPDATE ' . $news->prefix . ' SET picture = ? WHERE id = ?', array(0, $id));
     if ($sources instanceof PEAR_Error) {
         $notification->push($sources);
@@ -113,7 +112,7 @@ if ($id && Util::getFormData('submitbutton') == _("Delete existing picture")) {
 }
 
 // Prepare form
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Horde_Form($vars, '', 'addnews');
 $form->addHidden('', 'return', 'text', false, true);
 
@@ -432,7 +431,7 @@ if ($form->validate()) {
 
         // Do we have a gallery?
         if (empty($info['gallery'])) {
-            $abbr = String::substr(strip_tags($info['body'][$default_lang]['content']), 0, $conf['preview']['list_content']);
+            $abbr = Horde_String::substr(strip_tags($info['body'][$default_lang]['content']), 0, $conf['preview']['list_content']);
             $result = $registry->call('images/createGallery',
                                         array(null,
                                                 array('name' => $info['body'][$default_lang]['title'],
@@ -510,7 +509,7 @@ if ($form->validate()) {
                                             . '(id, lang, title, abbreviation, content, picture_comment, tags) VALUES (?, ?, ?, ?, ?, ?, ?)');
 
     foreach ($info['body'] as $lang => $values) {
-        $abbr = String::substr(strip_tags($values['content']), 0, $conf['preview']['list_content']);
+        $abbr = Horde_String::substr(strip_tags($values['content']), 0, $conf['preview']['list_content']);
         $news->write_db->execute($query_body, array($id, $lang, $values['title'], $abbr, $values['content'], $values['caption'], $values['tags']));
     }
 
@@ -537,7 +536,7 @@ if ($form->validate()) {
         $url = $return;
     } elseif (in_array($info['category1'], $allowed_cats) ||
               in_array($info['category2'], $allowed_cats)) {
-        $url = Util::addParameter(Horde::applicationUrl('edit.php'), 'id', $id);
+        $url = Horde_Util::addParameter(Horde::applicationUrl('edit.php'), 'id', $id);
     } else {
         $url = Horde::applicationUrl('browse.php');
     }
@@ -602,6 +601,6 @@ require_once NEWS_TEMPLATES . '/common-header.inc';
 require_once NEWS_TEMPLATES . '/menu.inc';
 require_once NEWS_TEMPLATES . '/add/before.inc';
 
-$form->renderActive(null, null, Util::addParameter(Horde::applicationUrl('add.php'), 'id', $id, false), 'post');
+$form->renderActive(null, null, Horde_Util::addParameter(Horde::applicationUrl('add.php'), 'id', $id, false), 'post');
 
 require_once $registry->get('templates', 'horde') . '/common-footer.inc';
index 2a1a30a..85c969f 100644 (file)
@@ -13,15 +13,15 @@ define('NEWS_BASE', dirname(__FILE__) . '/../..');
 require_once NEWS_BASE . '/lib/base.php';
 require NEWS_BASE . '/admin/tabs.php';
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Horde_Form($vars, _("Do you really wont to delete this category?"), 'delete');
 $form->setButtons(array(_("Remove"), _("Cancel")));
 
-$category_id = Util::getFormData('category_id');
+$category_id = Horde_Util::getFormData('category_id');
 $form->addHidden('', 'category_id', 'int', $category_id);
 
 if ($form->validate()) {
-    if (Util::getFormData('submitbutton') == _("Remove")) {
+    if (Horde_Util::getFormData('submitbutton') == _("Remove")) {
         $news_cat->deleteCategory($category_id);
         if ($result instanceof PEAR_Error) {
             $notification->push(_("Category was not deleted.") . ' ' . $result->getMessage(), 'horde.error');
index 41f1476..1e0d83c 100644 (file)
@@ -14,9 +14,9 @@ define('NEWS_BASE', dirname(__FILE__) . '/../..');
 require_once NEWS_BASE . '/lib/base.php';
 require NEWS_BASE . '/admin/tabs.php';
 
-$category_id = Util::getFormData('category_id');
+$category_id = Horde_Util::getFormData('category_id');
 $title = !empty($category_id) ? _("Edit category") : _("Add category");
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Horde_Form($vars, $title, 'editcategory');
 
 if ($category_id && !$form->isSubmitted()) {
index fa65fa5..fc2c5f3 100644 (file)
@@ -29,9 +29,9 @@ $delete_url = Horde::applicationUrl('admin/categories/delete.php');
 $delete_img = Horde::img('delete.png', _("Delete"), '', $registry->getImageDir('horde'));
 
 foreach ($categories as $category_id => $category) {
-    $categories[$category_id]['actions'][] = Horde::link(Util::addParameter($delete_url, 'category_id', $category_id), _("Delete")) .
+    $categories[$category_id]['actions'][] = Horde::link(Horde_Util::addParameter($delete_url, 'category_id', $category_id), _("Delete")) .
                                     $delete_img . '</a>';
-    $categories[$category_id]['actions'][] = Horde::link(Util::addParameter($edit_url, 'category_id', $category_id), _("Edit")) .
+    $categories[$category_id]['actions'][] = Horde::link(Horde_Util::addParameter($edit_url, 'category_id', $category_id), _("Edit")) .
                                      $edit_img . '</a>';
 }
 
index 59f940c..861788f 100644 (file)
@@ -14,15 +14,15 @@ define('NEWS_BASE', dirname(__FILE__) . '/../..');
 require_once NEWS_BASE . '/lib/base.php';
 require '../tabs.php';
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Horde_Form($vars, _("Do you really wont to delete this source?"), 'delete');
 $form->setButtons(array(_("Remove"), _("Cancel")));
 
-$source_id = Util::getFormData('source_id');
+$source_id = Horde_Util::getFormData('source_id');
 $form->addHidden('', 'source_id', 'int', $source_id);
 
 if ($form->validate()) {
-    if (Util::getFormData('submitbutton') == _("Remove")) {
+    if (Horde_Util::getFormData('submitbutton') == _("Remove")) {
         $news->deleteSource($source_id);
         if ($result instanceof PEAR_Error) {
             $notification->push(_("Source was not deleted.") . ' ' . $result->getMessage(), 'horde.error');
index 5d54270..aa69e69 100644 (file)
@@ -14,7 +14,7 @@ define('NEWS_BASE', dirname(__FILE__) . '/../..');
 require_once NEWS_BASE . '/lib/base.php';
 require '../tabs.php';
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $source_id = $vars->get('source_id');
 $title = !empty($source_id) ? _("Edit Source") : _("Add Source");
 
index 0da38e9..d03b78e 100644 (file)
@@ -29,11 +29,11 @@ $view_url = Horde::applicationUrl('browse.php');
 $view_img = Horde::img('category.png', _("View items"), '', $registry->getImageDir('horde'));
 
 foreach ($sources as $source_id => $source) {
-    $sources[$source_id]['actions'][] = Horde::link(Util::addParameter($view_url, 'source_id', $source_id), _("View articles")) .
+    $sources[$source_id]['actions'][] = Horde::link(Horde_Util::addParameter($view_url, 'source_id', $source_id), _("View articles")) .
                                         $view_img . '</a>';
-    $sources[$source_id]['actions'][] = Horde::link(Util::addParameter($delete_url, 'source_id', $source_id), _("Delete")) .
+    $sources[$source_id]['actions'][] = Horde::link(Horde_Util::addParameter($delete_url, 'source_id', $source_id), _("Delete")) .
                                         $delete_img . '</a>';
-    $sources[$source_id]['actions'][] = Horde::link(Util::addParameter($edit_url, 'source_id', $source_id), _("Edit")) .
+    $sources[$source_id]['actions'][] = Horde::link(Horde_Util::addParameter($edit_url, 'source_id', $source_id), _("Edit")) .
                                         $edit_img . '</a>';
 }
 
index 81d0a61..b16d943 100644 (file)
@@ -16,9 +16,7 @@ if (!Auth::isAdmin('news:admin')) {
     Horde::authenticationFailureRedirect();
 }
 
-require_once 'Horde/Variables.php';
-
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $tabs = new Horde_UI_Tabs('admin', $vars);
 
 $tabs->addTab(_("Sources"), Horde::applicationUrl('admin/sources/index.php'), 'sources');
index 4f8fd5f..5de891e 100644 (file)
@@ -17,15 +17,15 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 // Default vars
 $title = _("Browse");
-$page = Util::getGet('news_page', 0);
+$page = Horde_Util::getGet('news_page', 0);
 $per_page = $prefs->getValue('per_page');
 $browse_url = Horde::applicationUrl('browse.php');
-$cid = Util::getGet('cid');
+$cid = Horde_Util::getGet('cid');
 
 // Define creteria
 if (!empty($_GET)) {
     $criteria = $_GET;
-    $browse_url = Util::addParameter($browse_url, $_GET);
+    $browse_url = Horde_Util::addParameter($browse_url, $_GET);
 } else {
     $criteria = array();
 }
index 75255f4..bb3878a 100644 (file)
@@ -18,9 +18,9 @@ $blocks = &Horde_Block_Collection::singleton('news_layout', array('news'));
 $layout = &Horde_Block_Layout_Manager::singleton('news_layout', $blocks, unserialize($prefs->getValue('news_layout')));
 
 // Handle requested actions.
-$layout->handle(Util::getFormData('action'),
-                (int)Util::getFormData('row'),
-                (int)Util::getFormData('col'));
+$layout->handle(Horde_Util::getFormData('action'),
+                (int)Horde_Util::getFormData('row'),
+                (int)Horde_Util::getFormData('col'));
 if ($layout->updated()) {
     $prefs->setValue('news_layout', $layout->serialize());
 }
index 2694d30..30af249 100644 (file)
@@ -14,7 +14,6 @@
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 if (!Auth::isAdmin('news:admin')) {
     $notification->push(_("Only admin can delete a news."));
@@ -22,11 +21,11 @@ if (!Auth::isAdmin('news:admin')) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Horde_Form($vars, _("Are you sure you want to delete this news?"), 'delete');
 $form->setButtons(array(_("Remove"), _("Cancel")));
 
-$id = (int)Util::getFormData('id');
+$id = (int)Horde_Util::getFormData('id');
 $form->addHidden('', 'id', 'int', $id);
 
 $row = $news->get($id);
@@ -35,7 +34,7 @@ $form->addVariable($row['content'], 'content', 'description', true);
 
 if ($form->validate()) {
 
-    if (Util::getFormData('submitbutton') == _("Remove")) {
+    if (Horde_Util::getFormData('submitbutton') == _("Remove")) {
 
         // Delete attachment
         $sql = 'SELECT file_id FROM ' . $news->prefix . '_files WHERE news_id = ?';
index 8c5bbf5..02383be 100644 (file)
@@ -14,7 +14,6 @@
  */
 
 require_once dirname(__FILE__) . '/lib/base.php';
-require_once 'Horde/Variables.php';
 
 if (!Auth::isAdmin('news:admin')) {
     $notification->push(_("Only admin can delete a news."));
@@ -22,17 +21,17 @@ if (!Auth::isAdmin('news:admin')) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Horde_Form($vars, _("Are you sure you want to delete file?"), 'delete');
 $form->setButtons(array(_("Remove"), _("Cancel")));
 
-$news_id = (int)Util::getFormData('news_id');
+$news_id = (int)Horde_Util::getFormData('news_id');
 $form->addHidden('', 'news_id', 'int', true);
 
-$news_lang = Util::getFormData('lang', News::getLang());
+$news_lang = Horde_Util::getFormData('lang', News::getLang());
 $form->addHidden('', 'news_lang', 'text', false);
 
-$file_id = Util::getFormData('file_id');
+$file_id = Horde_Util::getFormData('file_id');
 $form->addHidden('', 'file_id', 'text', true);
 
 $article = $news->get($news_id);
@@ -50,7 +49,7 @@ $form->addVariable($article['content'], 'content', 'description', false);
 
 if ($form->validate()) {
 
-    if (Util::getFormData('submitbutton') == _("Remove")) {
+    if (Horde_Util::getFormData('submitbutton') == _("Remove")) {
         $result = News::deleteFile($file_id);
         if ($result instanceof PEAR_Error) {
 
@@ -93,4 +92,4 @@ require NEWS_TEMPLATES . '/menu.inc';
 
 $form->renderActive(null, null, null, 'post');
 
-require $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 86eac00..29aea36 100644 (file)
 require_once dirname(__FILE__) . '/lib/base.php';
 
 $title = _("Diff");
-$id = Util::getFormData('id', 0);
-$version = Util::getFormData('version', 0);
+$id = Horde_Util::getFormData('id', 0);
+$version = Horde_Util::getFormData('version', 0);
 
 /* Set up the diff renderer. */
-$render_type = Util::getFormData('render', 'inline');
+$render_type = Horde_Util::getFormData('render', 'inline');
 $class = 'Text_Diff_Renderer_' . $render_type;
 $renderer = &new $class();
 
index 95e0d3a..04d6646 100644 (file)
@@ -23,13 +23,13 @@ if (empty($allowed_cats)) {
     exit;
 }
 
-$id = (int)Util::getFormData('id', 0);
-$page = (int)Util::getFormData('page', 0);
-$browse_url = Util::addParameter(Horde::applicationUrl('edit.php'), array('page' => $page, 'id' => $id), null, false);
+$id = (int)Horde_Util::getFormData('id', 0);
+$page = (int)Horde_Util::getFormData('page', 0);
+$browse_url = Horde_Util::addParameter(Horde::applicationUrl('edit.php'), array('page' => $page, 'id' => $id), null, false);
 $edit_url = Horde::applicationUrl('add.php');
 $read_url = Horde::applicationUrl('reads.php');
 $has_comments = $registry->hasMethod('forums/doComments');
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 
 // save as future version
 if (!empty($actionID) && $id > 0) {
@@ -112,7 +112,7 @@ case 'unlock';
 break;
 case 'renew';
 
-    $version = Util::getFormData('version');
+    $version = Horde_Util::getFormData('version');
 
     $version_data = $news->db->getRow('SELECT content FROM ' . $news->prefix . '_versions WHERE id = ? AND version = ?',
                                       array($id, $version), DB_FETCHMODE_ASSOC);
@@ -152,7 +152,7 @@ break;
 }
 
 $title = _("Edit");
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new News_Search($vars);
 $form->getInfo(null, $info);
 
@@ -179,7 +179,7 @@ if ($count instanceof PEAR_Error) {
 }
 
 // Select rows
-$page = Util::getGet('news_page', 0);
+$page = Horde_Util::getGet('news_page', 0);
 $per_page = $prefs->getValue('per_page');
 $sql = $news->db->modifyLimitQuery($sql, $page*$per_page, $per_page);
 $rows = $news->db->getAll($sql, $binds[1], DB_FETCHMODE_ASSOC);
index b88e55e..d3590eb 100644 (file)
@@ -27,7 +27,7 @@ function _getStories($feed_id)
     }
 }
 
-$feed_id = Util::getPost('feed_id');
+$feed_id = Horde_Util::getPost('feed_id');
 $stories = _getStories($feed_id);
 $df = $GLOBALS['prefs']->getValue('date_format');
 foreach ($stories as $story) {
index 8f136b9..6bbd37e 100644 (file)
 $no_compress = true;
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$news_id = Util::getFormData('news_id', false);
-$actionID = Util::getFormData('actionID');
-$file_id = Util::getFormData('file_id');
-$file_name = Util::getFormData('file_name');
-$news_lang = Util::getFormData('news_lang', News::getLang());
-$file_type = Util::getFormData('file_type');
-$file_size = Util::getFormData('file_size');
+$news_id = Horde_Util::getFormData('news_id', false);
+$actionID = Horde_Util::getFormData('actionID');
+$file_id = Horde_Util::getFormData('file_id');
+$file_name = Horde_Util::getFormData('file_name');
+$news_lang = Horde_Util::getFormData('news_lang', News::getLang());
+$file_type = Horde_Util::getFormData('file_type');
+$file_size = Horde_Util::getFormData('file_size');
 
 /* Run through action handlers. */
 switch ($actionID) {
index e8694fb..fdb5cf1 100755 (executable)
@@ -16,7 +16,7 @@ class Horde_Block_News_category extends Horde_Block {
     {
         require_once dirname(__FILE__) . '/../base.php';
 
-        $url = Util::addParameter(Horde::applicationUrl('browse.php'), 'category', $this->_params['category']);
+        $url = Horde_Util::addParameter(Horde::applicationUrl('browse.php'), 'category', $this->_params['category']);
         $name = $GLOBALS['news_cat']->getName($this->_params['category']);
         $html = Horde::link($url, sprintf(_("Last news in %s"), $name), 'header');
         $html .= sprintf(_("Last news in %s"), $name) . '</a>';
@@ -56,8 +56,8 @@ class Horde_Block_News_category extends Horde_Block {
 
         $view = new News_View();
         $view->news = $rows;
-        $view->moreurl = Util::addParameter(Horde::applicationUrl('browse.php'), 'category', $this->_params['category']);
+        $view->moreurl = Horde_Util::addParameter(Horde::applicationUrl('browse.php'), 'category', $this->_params['category']);
 
         return $view->render('/block/news.php');
     }
-}
\ No newline at end of file
+}
index 44817af..0f8c40d 100755 (executable)
@@ -35,10 +35,10 @@ class Horde_Block_News_sources extends Horde_Block {
         $url = Horde::applicationUrl('browse.php');
         foreach ($sources as $source_id => $source_name) {
             $html .= '- ' 
-                  . Horde::link(Util::addparameter($url, 'source_id', $source_id), '', '', '_blank')
+                  . Horde::link(Horde_Util::addparameter($url, 'source_id', $source_id), '', '', '_blank')
                   . $source_name . '</a><br />';
         }
 
         return $html;
     }
-}
\ No newline at end of file
+}
index 07baa8e..10d6c74 100644 (file)
@@ -487,14 +487,14 @@ class News_Categories {
         foreach ($cats as $cid => $category) {
 
             if ($click_url !== null) {
-                $name = Horde::link(Util::addParameter($click_url, 'cid', $cid), _("Select Category")) . $category['category_name'] . '</a>';
+                $name = Horde::link(Horde_Util::addParameter($click_url, 'cid', $cid), _("Select Category")) . $category['category_name'] . '</a>';
             } else {
                 $name = $category['category_name'];
             }
 
             $links = array();
             if ($have_add_item) {
-                $links[] = Horde::link(Util::addParameter($add_item, 'cid', $cid), _("Add New Item")) . $add_img . '</a>';
+                $links[] = Horde::link(Horde_Util::addParameter($add_item, 'cid', $cid), _("Add New Item")) . $add_img . '</a>';
             }
 
             $parent_id = $category['category_parentid'] ? $category['category_parentid'] : null;
@@ -535,7 +535,7 @@ class News_Categories {
                                 's' => 'vfs',
                                 'p' => self::VFS_PATH . '/images/categories/',
                                 'c' => 'news');
-            return Util::addParameter(Horde::url('/services/images/view.php'), $img_params);
+            return Horde_Util::addParameter(Horde::url('/services/images/view.php'), $img_params);
         }
     }
 
index 6f04bf8..054bf25 100644 (file)
@@ -619,7 +619,7 @@ class News_Driver_sql extends News_Driver {
         $tag_link = Horde::applicationUrl('search.php');
         foreach ($tags_elemets as $tag => $time) {
             sort($time);
-            $tags->addElement($tag, Util::addParameter($tag_link, array('word' => $tag)),
+            $tags->addElement($tag, Horde_Util::addParameter($tag_link, array('word' => $tag)),
                               count($tags_elemets[$tag]), $time[0]);
         }
 
index 9493aff..9b84762 100644 (file)
@@ -1,7 +1,4 @@
 <?php
-
-require_once 'Horde/Variables.php';
-
 /**
  * News search form
  *
@@ -64,7 +61,7 @@ class News_Search extends Horde_Form {
     public function getPager($info, $count, $url)
     {
         $pager = new Horde_UI_Pager('news_page',
-                                    Variables::getDefaultVariables(),
+                                    Horde_Variables::getDefaultVariables(),
                                     array('num' => $count,
                                           'url' => $url,
                                           'page_count' => 10,
@@ -85,7 +82,7 @@ class News_Search extends Horde_Form {
     /**
      * Fetch the field values of the submitted form.
      *
-     * @param Variables $vars  A Variables instance, optional since Horde 3.2.
+     * @param Horde_Variables $vars  A Horde_Variables instance, optional since Horde 3.2.
      * @param array $info      Array to be filled with the submitted field
      *                         values.
      */
@@ -101,7 +98,7 @@ class News_Search extends Horde_Form {
      *
      * @param array  $variables  An array of Horde_Form_Variable objects to
      *                           fetch from.
-     * @param object $vars       The Variables object.
+     * @param object $vars       The Horde_Variables object.
      * @param array  $info       The array to be filled with the submitted
      *                           field values.
      */
index 113d7fa..d031032 100644 (file)
@@ -94,21 +94,21 @@ class News {
 
         case 'news':
             if (empty($GLOBALS['conf']['urls']['pretty'])) {
-                return Util::addParameter(Horde::applicationUrl('news.php', $full, $append_session), 'id', $data);
+                return Horde_Util::addParameter(Horde::applicationUrl('news.php', $full, $append_session), 'id', $data);
             } else {
                 return Horde::applicationUrl('article/' . $data, $full, $append_session);
             }
 
         case 'category':
             if (empty($GLOBALS['conf']['urls']['pretty'])) {
-                return Util::addParameter(Horde::applicationUrl('browse.php', $full, $append_session), 'category', $data);
+                return Horde_Util::addParameter(Horde::applicationUrl('browse.php', $full, $append_session), 'category', $data);
             } else {
                 return Horde::applicationUrl('category/' . $data, $full, $append_session);
             }
 
         case 'source':
             if (empty($GLOBALS['conf']['urls']['pretty'])) {
-                return Util::addParameter(Horde::applicationUrl('browse.php', $full, $append_session), 'source', $data);
+                return Horde_Util::addParameter(Horde::applicationUrl('browse.php', $full, $append_session), 'source', $data);
             } else {
                 return Horde::applicationUrl('source/' . $data, $full, $append_session);
             }
@@ -201,18 +201,18 @@ class News {
         $view_url = Horde::applicationUrl('files.php');
 
         $html = '<table><tr valign="top"><td>';
-        $html .= Horde::link(Util::addParameter($view_url, array('actionID' => 'download_zip_all', 'news_id' => $id)), _("Compress and dowload all files at once")) . $dowload_zip . '</a> ' . "\n";
+        $html .= Horde::link(Horde_Util::addParameter($view_url, array('actionID' => 'download_zip_all', 'news_id' => $id)), _("Compress and dowload all files at once")) . $dowload_zip . '</a> ' . "\n";
         $html .= _("Attached files: ") . '</td><td>' . "\n";
 
         foreach ($files as $file) {
-            $view_url = Util::addParameter($view_url, $file);
+            $view_url = Horde_Util::addParameter($view_url, $file);
             $html .= ' -  ' . "\n";
-            $html .= Horde::link(Util::addParameter($view_url, 'actionID', 'download_zip'), sprintf(_("Compress and dowload %s"), $file['file_name'])) . $dowload_zip . '</a> ' . "\n";
-            $html .= Horde::link(Util::addParameter($view_url, 'actionID', 'download_file'), sprintf(_("Dowload %s"), $file['file_name'])) . $dowload_img . '</a> ' . "\n";
-            $html .= Horde::link(Util::addParameter($view_url, 'actionID', 'view_file'), sprintf(_("Preview %s"), $file['file_name']), '', '_file_view');
+            $html .= Horde::link(Horde_Util::addParameter($view_url, 'actionID', 'download_zip'), sprintf(_("Compress and dowload %s"), $file['file_name'])) . $dowload_zip . '</a> ' . "\n";
+            $html .= Horde::link(Horde_Util::addParameter($view_url, 'actionID', 'download_file'), sprintf(_("Dowload %s"), $file['file_name'])) . $dowload_img . '</a> ' . "\n";
+            $html .= Horde::link(Horde_Util::addParameter($view_url, 'actionID', 'view_file'), sprintf(_("Preview %s"), $file['file_name']), '', '_file_view');
             $html .= Horde::img(Horde_Mime_Viewer::getIcon($file['file_type']), $file['file_name'], 'width="16" height="16"', '') . ' ';
             if (Auth::isAdmin('news:admin')) {
-                $html .= Horde::link(Util::addParameter($delete_url, $file), sprintf(_("Delete %s"), $file['file_name'])) . $delete_img . '</a> ' . "\n";
+                $html .= Horde::link(Horde_Util::addParameter($delete_url, $file), sprintf(_("Delete %s"), $file['file_name'])) . $delete_img . '</a> ' . "\n";
             }
             $html .= $file['file_name'] . '</a> ' . "\n";
             $html .= ' (' . self::format_filesize($file['file_size']) . ')';
@@ -402,7 +402,7 @@ class News {
     static public function getImageUrl($id, $view = 'small', $type = 'news')
     {
         if (empty($GLOBALS['conf']['images']['direct'])) {
-            return Util::addParameter(Horde::applicationUrl('view.php'),
+            return Horde_Util::addParameter(Horde::applicationUrl('view.php'),
                                      array('type' => $type,
                                            'view' => $view,
                                            'id' => $id),
index a22f7a0..20305ee 100644 (file)
@@ -1,7 +1,4 @@
 <?php
-
-require_once 'Horde/Variables.php';
-
 /**
  * News search form
  *
@@ -67,7 +64,7 @@ class News_Search extends Horde_Form {
     static public function getPager($info, $count, $url)
     {
         $pager = new Horde_UI_Pager('news_page',
-                                    Variables::getDefaultVariables(),
+                                    Horde_Variables::getDefaultVariables(),
                                     array('num' => $count,
                                           'url' => $url,
                                           'page_count' => 10,
@@ -88,7 +85,7 @@ class News_Search extends Horde_Form {
     /**
      * Fetch the field values of the submitted form.
      *
-     * @param Variables $vars  A Variables instance, optional since Horde 3.2.
+     * @param Horde_Variables $vars  A Horde_Variables instance, optional since Horde 3.2.
      * @param array $info      Array to be filled with the submitted field
      *                         values.
      */
@@ -104,7 +101,7 @@ class News_Search extends Horde_Form {
      *
      * @param array  $variables  An array of Horde_Form_Variable objects to
      *                           fetch from.
-     * @param object $vars       The Variables object.
+     * @param object $vars       The Horde_Variables object.
      * @param array  $info       The array to be filled with the submitted
      *                           field values.
      */
index 193e9db..301272f 100644 (file)
@@ -65,10 +65,10 @@ class News_View extends Horde_View {
         $search = Horde::applicationUrl('search.php');
         foreach (explode(' ', $tags) as $tag) {
             $html .= '<a href="'
-                    . Util::addParameter($search, array('word' => $tag))
+                    . Horde_Util::addParameter($search, array('word' => $tag))
                      . '">' . $tag . '</a> ';
         }
 
         return $html;
     }
-}
\ No newline at end of file
+}
index c595d22..fc4e2e6 100644 (file)
@@ -55,6 +55,6 @@ $GLOBALS['news'] = News_Driver::factory();
 $GLOBALS['news_cat'] = new News_Categories();
 
 // Start compression.
-if (!Util::nonInputVar('no_compress')) {
+if (!Horde_Util::nonInputVar('no_compress')) {
     Horde::compressOutput();
 }
index 2ae563c..c9e0128 100644 (file)
@@ -15,7 +15,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$id = Util::getFormData('id');
+$id = Horde_Util::getFormData('id');
 $row = $news->get($id);
 if ($row instanceof PEAR_Error) {
     $notification->push($row);
@@ -35,7 +35,7 @@ if (!Auth::isAuthenticated()) {
     _error(_("Only authenticated users can send mails."));
 }
 
-$to = Util::getFormData('email');
+$to = Horde_Util::getFormData('email');
 if (empty($to)) {
     _error(_("No mail entered."));
     exit;
@@ -62,4 +62,4 @@ if ($result instanceof PEAR_Error) {
 }
 
 header('Location: ' . News::getUrlFor('news', $id));
-exit;
\ No newline at end of file
+exit;
index da83e76..5057fc9 100644 (file)
@@ -15,7 +15,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$id = Util::getFormData('id');
+$id = Horde_Util::getFormData('id');
 $row = $news->get($id);
 
 // check if the news exists
@@ -26,7 +26,7 @@ if ($row instanceof PEAR_Error) {
 }
 
 // check if the news exists
-if (($version = Util::getFormData('version')) !== null) {
+if (($version = Horde_Util::getFormData('version')) !== null) {
     $sql = 'SELECT created, user_uid, content FROM ' . $news->prefix . '_versions WHERE id = ? AND version = ?';
     $version_data = $news->db->getRow($sql, array($id, $version), DB_FETCHMODE_ASSOC);
     if (empty($version_data)) {
@@ -53,4 +53,4 @@ require_once NEWS_TEMPLATES . '/menu.inc';
 
 require $template_path . 'news.php';
 
-require_once $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require_once $registry->get('templates', 'horde') . '/common-footer.inc';
index 2383d62..5a1e272 100644 (file)
@@ -15,7 +15,7 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$id = Util::getFormData('id');
+$id = Horde_Util::getFormData('id');
 $row = $news->get($id);
 if ($row instanceof PEAR_Error) {
     $notification->push($row);
@@ -44,4 +44,4 @@ if ($res instanceof PEAR_Error) {
     $notification->push(_("News sucessfuly added to you notes."), 'horde.success');
     header('Location: ' . $registry->getInitialPage('mnemo'));
     exit;
-}
\ No newline at end of file
+}
index fda14f6..7e4bbe0 100644 (file)
@@ -16,7 +16,7 @@
 $no_compress = true;
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$id = Util::getFormData('id');
+$id = Horde_Util::getFormData('id');
 $row = $news->get($id);
 
 // Check if the news exists
@@ -53,7 +53,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, String::convertCharset(strip_tags($row['content']), NLS::getCharset(), 'UTF-8'));
+$pdf->multiCell(0, 12, Horde_String::convertCharset(strip_tags($row['content']), NLS::getCharset(), 'UTF-8'));
 
 $browser->downloadHeaders($id . '.pdf', 'application/pdf');
 echo $pdf->getOutput();
index fca0961..92db2f6 100644 (file)
@@ -15,8 +15,8 @@
 
 require_once dirname(__FILE__) . '/lib/base.php';
 
-$id = Util::getFormData('id');
-$version = Util::getFormData('version', false);
+$id = Horde_Util::getFormData('id');
+$version = Horde_Util::getFormData('version', false);
 $row = $news->get($id);
 $template_path = News::getTemplatePath($row['category1'], 'news');
 
index 11dc61a..2bef1b1 100644 (file)
@@ -17,8 +17,8 @@ if (!Auth::isAuthenticated()) {
     Horde::authenticationFailureRedirect();
 }
 
-$id = Util::getFormData('id', 0);
-$actionID = Util::getFormData('actionID', false);
+$id = Horde_Util::getFormData('id', 0);
+$actionID = Horde_Util::getFormData('actionID', false);
 $url = Horde::applicationUrl('reads.php');
 
 $sql = 'SELECT id, user, ip, readdate FROM ' . $news->prefix . '_user_reads WHERE ';
index dfca090..bb9730e 100644 (file)
@@ -15,12 +15,12 @@ require_once dirname(__FILE__) . '/lib/base.php';
 
 // Default vars
 $title = _("Browse");
-$page = Util::getGet('news_page', 0);
+$page = Horde_Util::getGet('news_page', 0);
 $per_page = $prefs->getValue('per_page');
 $browse_url = Horde::applicationUrl('browse.php');
-$cid = Util::getGet('cid');
+$cid = Horde_Util::getGet('cid');
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new News_Search($vars);
 $form->getInfo(null, $criteria);
 
@@ -61,4 +61,4 @@ foreach ($rows as $row) {
 }
 require_once $browse_template_path . '/footer.inc';
 
-require_once $registry->get('templates', 'horde') . '/common-footer.inc';
\ No newline at end of file
+require_once $registry->get('templates', 'horde') . '/common-footer.inc';
index 4310956..55ddfe3 100644 (file)
@@ -20,7 +20,7 @@ $remove = array("!", "'", '"', "?", ".", ",", ";", ":", ')', '(', 1, 2, 3, 4, 5,
 $result = $news->db->query('UPDATE news_body SET tags = ""');
 $result = $news->db->query('SELECT id, title FROM news_body WHERE tags = "" ORDER BY id ASC');
 while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
-    $row['title'] = String::lower($row['title'], true);
+    $row['title'] = Horde_String::lower($row['title'], true);
     $row['title'] = str_replace($remove, '', $row['title']);
     $tags = explode(' ', $row['title']);
     foreach ($tags as $i => $tag) {
@@ -37,4 +37,4 @@ while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
     $news->db->query('UPDATE news_body SET tags = ? WHERE id = ?', $params);
 }
 
-echo 'done';
\ No newline at end of file
+echo 'done';
index ef1f608..badaa78 100644 (file)
@@ -28,4 +28,4 @@ Horde::includeScriptFiles();
 <?php echo Horde::stylesheetLink('news') ?>
 </head>
 
-<body<?php if ($bc = Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
+<body<?php if ($bc = Horde_Util::nonInputVar('bodyClass')) echo ' class="' . $bc . '"' ?><?php if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
index c21c762..1f50548 100644 (file)
@@ -8,7 +8,7 @@
 <a href="<?php echo News::getImageUrl($id, 'big'); ?>" target="_blank" title="<?php echo _("Click for full picture") ?>">
     <img src="<?php echo News::getImageUrl($id, 'small'); ?>" style="height: 50px; width: 50px;" />
 </a><br />
-<a href="<?php echo Util::addParameter($browse_url, array('id' => $id, 'actionID' => 'deletepicture')) ?>" onclick="confirm('<?php echo _("Do you really want to delete this picture?") ?>');"><?php echo _("Delete picture") ?></a>
+<a href="<?php echo Horde_Util::addParameter($browse_url, array('id' => $id, 'actionID' => 'deletepicture')) ?>" onclick="confirm('<?php echo _("Do you really want to delete this picture?") ?>');"><?php echo _("Delete picture") ?></a>
 <?php endif; ?>
 </td>
 <td>
@@ -102,13 +102,13 @@ if (sizeof($versions)>0) {
         }
         echo _(" by ") . $version['user_uid'] . _(" at ") . $version['created'] . "\n(";
 
-        $url = Util::addParameter(Horde::applicationUrl('news.php'), array('id' => $id, 'version' => $version['version']));
+        $url = Horde_Util::addParameter(Horde::applicationUrl('news.php'), array('id' => $id, 'version' => $version['version']));
         echo Horde::link($url, _("View"), '', '_blank', '', _("View")) . _("View") . '</a> | ';
 
-        $url = Util::addParameter(Horde::applicationUrl('edit.php'), array('id' => $id, 'actionID' => 'renew'));
-        echo Horde::link(Util::addParameter($url,'version', $version['version']),_("Renew")) . _("Renew") . '</a> | ';
+        $url = Horde_Util::addParameter(Horde::applicationUrl('edit.php'), array('id' => $id, 'actionID' => 'renew'));
+        echo Horde::link(Horde_Util::addParameter($url,'version', $version['version']),_("Renew")) . _("Renew") . '</a> | ';
 
-        $url = Util::addParameter(Horde::applicationUrl('diff.php'), array('id' => $id, 'version' => $version['version']));
+        $url = Horde_Util::addParameter(Horde::applicationUrl('diff.php'), array('id' => $id, 'version' => $version['version']));
         echo Horde::link('#', _("Diff"), '', '', "popup('$url')") . _("Diff") . '</a> ';
 
         echo ')<br />' . "\n";
index 20cf1ac..9027a1f 100644 (file)
@@ -2,31 +2,31 @@
 <td nowrap="nowrap">
 <?php
 
-$url = Util::addParameter($edit_url, array('page' => $page, 'id' => $row['id']));
+$url = Horde_Util::addParameter($edit_url, array('page' => $page, 'id' => $row['id']));
 echo Horde::link($url,_("Edit")) .
      Horde::img('edit.png', _("Edit"), '', $img_dir) . '</a>  &nbsp;';
 
-echo Horde::link(Util::addParameter($browse_url, 'id', $row['id']), _("Info")) .
+echo Horde::link(Horde_Util::addParameter($browse_url, 'id', $row['id']), _("Info")) .
      Horde::img('devel.png', _("Info"), '', $img_dir). '</a>  &nbsp;';
 
 /* admins options */
 if (Auth::isAdmin() || isset($allowed_cats[$row['category1']]) || isset($allowed_cats[$row['category2']])) {
 
     if ($row['status'] == News::CONFIRMED) {
-        $url = Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'deactivate', 'id' =>  $row['id']));
+        $url = Horde_Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'deactivate', 'id' =>  $row['id']));
         echo Horde::link($url,_("Deactivate")) . Horde::img('cross.png', _("Deactivate"), '', $img_dir) . '</a> ';
     } else {
-        $url = Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'activate', 'id' => $row['id']));
+        $url = Horde_Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'activate', 'id' => $row['id']));
         echo Horde::link($url,_("Activate")) . Horde::img('tick.png', _("Activate"), '', $img_dir) . '</a> ';
 
-        $url = Util::addParameter(Horde::applicationUrl('delete.php'), 'id',  $row['id']);
+        $url = Horde_Util::addParameter(Horde::applicationUrl('delete.php'), 'id',  $row['id']);
         echo Horde::link($url,_("Delete"), '', '', '', _("Delete")) . Horde::img('delete.png', _("Delete"), '', $img_dir) . '</a>  &nbsp;';
 
         if ($row['status'] == News::LOCKED) {
-            $url = Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'unlock', 'id' => $row['id']));
+            $url = Horde_Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'unlock', 'id' => $row['id']));
             echo Horde::link($url,_("Unlock")) . Horde::img('map.png', '', '', $img_dir) . '</a> ';
         } else {
-            $url = Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'lock', 'id' => $row['id']));
+            $url = Horde_Util::addParameter($browse_url, array('page' => $page, 'actionID' => 'lock', 'id' => $row['id']));
             echo Horde::link($url,_("Lock")) . Horde::img('locked.png', '', '', $img_dir) . '</a> ';
         }
     }
@@ -56,7 +56,7 @@ case News::LOCKED:
 <td><?php echo $row['user'] ?></td>
 <td>
 <?php
-$url = Util::addParameter($read_url, 'id', $row['id']);
+$url = Horde_Util::addParameter($read_url, 'id', $row['id']);
 echo Horde::link('javascript:void(0)', $row['view_count'], '', '', "popup('$url')", $row['view_count']) . number_format($row['view_count']) . '</a>';
 ?>
 </td>
@@ -65,4 +65,4 @@ if ($has_comments) {
     echo '<td>' . $row['comments'] . '</td>';
 }
 ?>
-</tr>
\ No newline at end of file
+</tr>
index d56160d..0864279 100644 (file)
@@ -12,7 +12,7 @@ if (!empty($row['trackback'])) {
     echo '</ul><br />';
 }
 
-$trackback_url = Util::addParameter(Horde::applicationUrl('trackback.php', true), 'id', $id);
+$trackback_url = Horde_Util::addParameter(Horde::applicationUrl('trackback.php', true), 'id', $id);
 echo _("Use the following link to trackback from your own site: ") .
     '<br> <input value="' . $trackback_url . '" /><br />';
 
index 2bb07a1..ef3ae64 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 echo '<div class="header">' . _("News data") . '</div>';
-echo _("By") . ': ' .  Horde::link(Util::addParameter($browse_url, 'user', $row['user'])) . $row['user'] . '</a><br />';
-echo _("On") . ': ' .  Horde::link(Util::addParameter($browse_url, 'publish', $row['publish'])) . News::dateFormat($row['publish']) . '</a><br />';
-echo _("Category") . ': ' . Horde::link(Util::addParameter($browse_url, 'cid', $row['category1'])) . $GLOBALS['news_cat']->getName($row['category1']) . '</a><br />';
+echo _("By") . ': ' .  Horde::link(Horde_Util::addParameter($browse_url, 'user', $row['user'])) . $row['user'] . '</a><br />';
+echo _("On") . ': ' .  Horde::link(Horde_Util::addParameter($browse_url, 'publish', $row['publish'])) . News::dateFormat($row['publish']) . '</a><br />';
+echo _("Category") . ': ' . Horde::link(Horde_Util::addParameter($browse_url, 'cid', $row['category1'])) . $GLOBALS['news_cat']->getName($row['category1']) . '</a><br />';
 
 $plain = preg_replace('/\s\s+/', ' ', trim(strip_tags($row['content'])));
 echo _("Chars") . ': ' . number_format(strlen($plain)) . '<br />';
@@ -17,4 +17,4 @@ if ($row['source']) {
     $sources = $news->getSources(true);
     echo _("Source media") . ': ' .  Horde::externalUrl($sources[$row['source']]['source_url'], true) .
                                      $sources[$row['source']]['source_name'] . '</a><br />';
-}
\ No newline at end of file
+}
index 9608650..17c0c33 100644 (file)
@@ -2,12 +2,12 @@
 
 echo '<br /><div class="header">' . _("On this day") . '</div>';
 $img = Horde::img('news.png', '', '', $registry->getImageDir('news'));
-echo $img . ' ' . Horde::link(Util::addParameter($browse_url, 'date', $row['publish'])) . _("News of this day.") . '</a><br />';
+echo $img . ' ' . Horde::link(Horde_Util::addParameter($browse_url, 'date', $row['publish'])) . _("News of this day.") . '</a><br />';
 
 if ($registry->hasInterface('schedul')) {
     $img = Horde::img('schedul.png', '', '', $registry->getImageDir('schedul'));
     $url = $registry->get('webroot', 'schedul') . '/browse.php';
-    $url = Util::addParameter($url, array('actionID' => 'date', 'date' => $row['publish']));
+    $url = Horde_Util::addParameter($url, array('actionID' => 'date', 'date' => $row['publish']));
     echo $img . ' ' . Horde::link($url) . _("Events on this day.") . '</a><br />';
 }
 
index 177be3f..6818e7e 100644 (file)
@@ -6,7 +6,7 @@ $img = Horde::img('print.png', '', '', $registry->getImageDir('horde'));
 echo $img . ' ' . Horde::link('javascript:window.print()') . _("Printer firendly") . '</a><br />';
 
 $img = Horde::img('mime/pdf.png', '', '', $registry->getImageDir('horde'));
-echo $img . ' ' . Horde::link(Util::addParameter(Horde::applicationUrl('pdf.php'), 'id', $id)) . _("PDF") . '</a><br />';
+echo $img . ' ' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('pdf.php'), 'id', $id)) . _("PDF") . '</a><br />';
 
 /* Bookmark link */
 if ($registry->hasMethod('bookmarks/getAddUrl')) {
@@ -20,6 +20,6 @@ if ($registry->hasMethod('bookmarks/getAddUrl')) {
 
 if ($registry->hasInterface('notes')) {
     $img = Horde::img('mnemo.png', '', '', $registry->getImageDir('mnemo'));
-    $url = Util::addParameter(Horde::applicationUrl('note.php', true), 'id', $id);
+    $url = Horde_Util::addParameter(Horde::applicationUrl('note.php', true), 'id', $id);
     echo $img . ' ' . Horde::link($url) . _("Add to notes.") . '</a><br />';
-}
\ No newline at end of file
+}
index 38ac7cb..56d7588 100755 (executable)
@@ -1,6 +1,6 @@
 <tr>
-<td><?php echo Horde::link(Util::addParameter($url, 'id', $row['id']), $row['title']) . $row['id'] . '</a>'; ?></td>
-<td><?php echo Horde::link(Util::addParameter($url, 'actionID', $row['user']), $row['user']) . $row['user'] . '</a>'; ?></td>
+<td><?php echo Horde::link(Horde_Util::addParameter($url, 'id', $row['id']), $row['title']) . $row['id'] . '</a>'; ?></td>
+<td><?php echo Horde::link(Horde_Util::addParameter($url, 'actionID', $row['user']), $row['user']) . $row['user'] . '</a>'; ?></td>
 <td><?php echo $row['ip'] ?></td>
 <td><?php echo $row['readdate'] ?></td>
 </tr>
index 0b454ce..bc5f55f 100644 (file)
@@ -22,12 +22,12 @@ header('Content-type: text/xml');
 
 /* Try to create object */
 $trackback_data = array(
-    'id'        => Util::getFormData('id'),
+    'id'        => Horde_Util::getFormData('id'),
     'host'      => $_SERVER['REMOTE_ADDR'],
-    'title'     => Util::getFormData('title'),
-    'excerpt'   => Util::getFormData('excerpt'),
-    'url'       => Util::getFormData('url'),
-    'blog_name' => Util::getFormData('blog_name')
+    'title'     => Horde_Util::getFormData('title'),
+    'excerpt'   => Horde_Util::getFormData('excerpt'),
+    'url'       => Horde_Util::getFormData('url'),
+    'blog_name' => Horde_Util::getFormData('blog_name')
 );
 
 $trackback = News::loadTrackback($trackback_data);
index 4ce9cf4..59dfb7d 100644 (file)
@@ -21,7 +21,7 @@ if (count(Skoli::listClasses(false, PERMS_EDIT)) == 0 && Auth::getAuth()) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Skoli_EntryForm($vars);
 
 // Execute if the form is valid.
@@ -33,7 +33,7 @@ if ($form->validate($vars)) {
         $notification->push(sprintf(_("The new entry for \"%s\" has been added."), $result), 'horde.success');
     }
 
-    header('Location: ' . Horde::applicationUrl(Util::addParameter('add.php', 'class', $vars->get('class_id')), true));
+    header('Location: ' . Horde::applicationUrl(Horde_Util::addParameter('add.php', 'class', $vars->get('class_id')), true));
     exit;
 }
 
index 328b949..b510a2e 100644 (file)
@@ -26,7 +26,7 @@ if (!count(Skoli_School::listAddressBooks())) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $form = new Skoli_CreateClassForm($vars);
 
 // Execute if the form is valid.
index 3db6caf..0aace38 100644 (file)
@@ -18,7 +18,7 @@ if (!Auth::getAuth()) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $class_id = $vars->get('c');
 
 $class = $skoli_shares->getShare($class_id);
@@ -35,7 +35,7 @@ if (is_a($class, 'PEAR_Error')) {
 $form = new Skoli_DeleteClassForm($vars, $class);
 
 // Execute if the form is valid (must pass with POST variables only).
-if ($form->validate(new Variables($_POST))) {
+if ($form->validate(new Horde_Variables($_POST))) {
     $result = $form->execute();
     if (is_a($result, 'PEAR_Error')) {
         $notification->push($result, 'horde.error');
index 2c594e7..a6558f2 100644 (file)
@@ -18,7 +18,7 @@ if (!Auth::getAuth()) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $class = $skoli_shares->getShare($vars->get('c'));
 if (is_a($class, 'PEAR_Error')) {
     $notification->push($class, 'horde.error');
index 145890e..316225d 100644 (file)
@@ -31,7 +31,7 @@ if (count($classes) == 0) {
 
 $class_options = array();
 foreach ($classes as $key=>$class) {
-    $class_options[] = '<option value="' . htmlspecialchars($key) . '"' . (Util::getFormData('class') == $key ? ' selected="selected"' : '') . '>' .
+    $class_options[] = '<option value="' . htmlspecialchars($key) . '"' . (Horde_Util::getFormData('class') == $key ? ' selected="selected"' : '') . '>' .
                        htmlspecialchars($class->get('name')) . "</option>\n";
 }
 
@@ -39,8 +39,8 @@ $wholeclass_option = '<option value="all">' .
                      htmlspecialchars(_("Whole class")) . "</option>\n";
 $student_options = array();
 $student_options[] = $wholeclass_option;
-if (Util::getFormData('class') != '') {
-    $class = Util::getFormData('class');
+if (Horde_Util::getFormData('class') != '') {
+    $class = Horde_Util::getFormData('class');
 } else {
     reset($classes);
     $class = key($classes);
@@ -51,14 +51,14 @@ foreach ($export_class['_students'] as $address) {
                          htmlspecialchars($address[$conf['addresses']['name_field']]) . "</option>\n";
 }
 
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 
 /* Loop through the action handlers. */
 switch ($actionID) {
 case 'export':
     $data = array();
     $driver = &Skoli_Driver::singleton($class);
-    if (Util::getFormData('student') == 'all') {
+    if (Horde_Util::getFormData('student') == 'all') {
         /* Export whole class. */
         $subjects = $driver->getSubjects('mark');
         foreach ($export_class['_students'] as $student) {
@@ -107,7 +107,7 @@ case 'export':
         $subjects = $driver->getSubjects('mark');
         foreach ($subjects as $subject) {
             $params = array(array('name' => 'subject', 'value' => $subject, 'strict' => 1));
-            $marks = Skoli::listEntries($class, Util::getFormData('student'), 'mark', $params, SKOLI_SORT_DATE, SKOLI_SORT_DESCEND);
+            $marks = Skoli::listEntries($class, Horde_Util::getFormData('student'), 'mark', $params, SKOLI_SORT_DATE, SKOLI_SORT_DESCEND);
             foreach ($marks as $mark) {
                 $data[] = array($subject, $mark['date'], $mark['title'], Skoli::convertNumber($mark['mark']), Skoli::convertNumber($mark['weight']));
             }
@@ -117,14 +117,14 @@ case 'export':
         $subjects = $driver->getSubjects('objective');
         foreach ($subjects as $subject) {
             $params = array(array('name' => 'subject', 'value' => $subject, 'strict' => 1));
-            $objectives = Skoli::listEntries($class, Util::getFormData('student'), 'objective', $params, SKOLI_SORT_DATE, SKOLI_SORT_DESCEND);
+            $objectives = Skoli::listEntries($class, Horde_Util::getFormData('student'), 'objective', $params, SKOLI_SORT_DATE, SKOLI_SORT_DESCEND);
             foreach ($objectives as $objective) {
                 $data[] = array($subject, $objective['date'], $objective['category'], $objective['objective']);
             }
         }
 
         $data[] = array(_("Outcomes"));
-        $outcomes = Skoli::listEntries($class, Util::getFormData('student'), 'outcome', null, SKOLI_SORT_DATE, SKOLI_SORT_DESCEND);
+        $outcomes = Skoli::listEntries($class, Horde_Util::getFormData('student'), 'outcome', null, SKOLI_SORT_DATE, SKOLI_SORT_DESCEND);
         foreach ($outcomes as $outcome) {
             $completed = isset($outcome['completed']) && $outcome['completed'] != '' ? _("Completed") : _("Open");
             $comment = isset($outcome['comment']) ? $outcome['comment'] : '';
@@ -132,7 +132,7 @@ case 'export':
         }
 
         $data[] = array(_("Absences"));
-        $absences = Skoli::listEntries($class, Util::getFormData('student'), 'absence', null, SKOLI_SORT_DATE, SKOLI_SORT_DESCEND);
+        $absences = Skoli::listEntries($class, Horde_Util::getFormData('student'), 'absence', null, SKOLI_SORT_DATE, SKOLI_SORT_DESCEND);
         foreach ($absences as $absence) {
             $excused = isset($absence['excused']) && $absence['excused'] != '' ? _("Excused") : _("Not excused");
             $comment = isset($absence['comment']) ? $absence['comment'] : '';
@@ -159,15 +159,15 @@ case 'export':
         break;
     }
 
-    switch (Util::getFormData('exportID')) {
+    switch (Horde_Util::getFormData('exportID')) {
     case EXPORT_CSV:
         $csv = &Horde_Data::singleton('csv');
-        $csv->exportFile(_("class.csv"), $data, (Util::getFormData('student') == 'all'));
+        $csv->exportFile(_("class.csv"), $data, (Horde_Util::getFormData('student') == 'all'));
         exit;
 
     case EXPORT_TSV:
         $tsv = &Horde_Data::singleton('tsv');
-        $tsv->exportFile(_("class.tsv"), $data, (Util::getFormData('student') == 'all'));
+        $tsv->exportFile(_("class.tsv"), $data, (Horde_Util::getFormData('student') == 'all'));
         exit;
 
     }
index 3d971de..d9f0c52 100644 (file)
@@ -12,7 +12,6 @@
 
 @define('SKOLI_BASE', dirname(__FILE__));
 require_once SKOLI_BASE . '/lib/base.php';
-require_once 'Horde/Variables.php';
 require_once 'Horde/UI/Tabs.php';
 
 // Exit if this isn't an authenticated user.
@@ -21,7 +20,7 @@ if (!Auth::getAuth()) {
     exit;
 }
 
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 $driver = &Skoli_Driver::singleton();
 $entry = $driver->getEntry($vars->get('entry'));
 if (is_a($entry, 'PEAR_Error') || !count($entry)) {
@@ -34,14 +33,14 @@ $share = $GLOBALS['skoli_shares']->getShare($entry['class_id']);
 // Check permissions
 if (!$share->hasPermission(Auth::getAuth(), PERMS_READ)) {
     $notification->push(_("You are not allowed to view this entry."), 'horde.error');
-    header('Location: ' . Util::addParameter(Horde::applicationUrl('search.php', true), 'actionID', 'search'));
+    header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('search.php', true), 'actionID', 'search'));
     exit;
 }
 
 $studentdetails = Skoli::getStudent($share->get('address_book'), $entry['student_id']);
 
 // Get view.
-$viewName = Util::getFormData('view', 'Entry');
+$viewName = Horde_Util::getFormData('view', 'Entry');
 
 if ($viewName != 'DeleteEntry') {
     require_once SKOLI_BASE . '/lib/Forms/Entry.php';
@@ -64,7 +63,7 @@ if ($viewName != 'DeleteEntry') {
                 $notification->push(sprintf(_("Couldn't update this entry: %s"), $result->getMessage()), 'horde.error');
             } else {
                 $notification->push(sprintf(_("The entry for \"%s\" has been saved."), $studentdetails[$conf['addresses']['name_field']]), 'horde.success');
-                header('Location: ' . Util::addParameter(Horde::applicationUrl('search.php', true), 'actionID', 'search'));
+                header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('search.php', true), 'actionID', 'search'));
                 exit;
             }
         }
@@ -72,19 +71,19 @@ if ($viewName != 'DeleteEntry') {
 }
 
 // Entry actions.
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 if ($actionID == 'delete') {
     if (is_a($deleted = $driver->deleteEntry($entry['object_id']), 'PEAR_Error')) {
         $notification->push(sprintf(_("There was an error deleting this entry: %s"), $deleted->getMessage()), 'horde.error');
     } else {
         $notification->push(sprintf(_("The entry for \"%s\" has been deleted."), $studentdetails[$conf['addresses']['name_field']]), 'horde.success');
-        header('Location: ' . Util::addParameter(Horde::applicationUrl('search.php', true), 'actionID', 'search'));
+        header('Location: ' . Horde_Util::addParameter(Horde::applicationUrl('search.php', true), 'actionID', 'search'));
         exit;
     }
 }
 
 // Get tabs.
-$url = Util::addParameter(Horde::applicationUrl('entry.php'), 'entry', $entry['object_id']);
+$url = Horde_Util::addParameter(Horde::applicationUrl('entry.php'), 'entry', $entry['object_id']);
 $tabs = new Horde_UI_Tabs('view', $vars);
 $tabs->addTab(_("View"), $url, array('tabname' => 'Entry', 'id' => 'tabEntry'));
 if ($share->hasPermission(Auth::getAuth(), PERMS_EDIT)) {
index 0c8fcf0..3bf6437 100644 (file)
@@ -41,7 +41,7 @@ class Horde_Block_skoli_tree_menu extends Horde_Block {
                                false,
                                array('icon' => 'add.png',
                                      'icondir' => $icondir,
-                                     'url' => Util::addParameter($add, array('class' => $name))));
+                                     'url' => Horde_Util::addParameter($add, array('class' => $name))));
             }
             $tree->addNode($parent . '__search',
                            $parent,
index b5ea2bb..9e4768e 100644 (file)
@@ -10,9 +10,6 @@
  * @package Skoli
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index 7a0a947..d45267f 100644 (file)
@@ -10,9 +10,6 @@
  * @package Skoli
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index cea9c12..3825cd1 100644 (file)
@@ -10,9 +10,6 @@
  * @package Skoli
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index 0c0acef..d10624e 100644 (file)
@@ -10,9 +10,6 @@
  * @package Skoli
  */
 
-/** Variables */
-require_once 'Horde/Variables.php';
-
 /** Horde_Form */
 require_once 'Horde/Form.php';
 
index 838633a..3edf554 100644 (file)
@@ -105,7 +105,7 @@ class Skoli {
         if (!$GLOBALS['display_classes']) {
             $GLOBALS['display_classes'] = array();
         }
-        if (($classId = Util::getFormData('display_class')) !== null) {
+        if (($classId = Horde_Util::getFormData('display_class')) !== null) {
             if (is_array($classId)) {
                 $GLOBALS['display_classes'] = $classId;
             } else {
@@ -116,7 +116,7 @@ class Skoli {
                     $GLOBALS['display_classes'][] = $classId;
                 }
             }
-            $GLOBALS['prefs']->setValue('show_students', Util::getFormData('show_students') ? 1 : 0);
+            $GLOBALS['prefs']->setValue('show_students', Horde_Util::getFormData('show_students') ? 1 : 0);
         }
 
         $GLOBALS['prefs']->setValue('display_classes', serialize($GLOBALS['display_classes']));
@@ -496,7 +496,7 @@ class Skoli {
         $menu = new Menu(HORDE_MENU_MASK_ALL);
         $menu->add(Horde::applicationUrl('list.php'), _("List Classes"), 'skoli.png', null, null, null, basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null);
         if (count(Skoli::listClasses(false, PERMS_EDIT))) {
-            $menu->add(Horde::applicationUrl('add.php'), _("_New Entry"), 'add.png', null, null, null, Util::getFormData('entry') ? '__noselection' : null);
+            $menu->add(Horde::applicationUrl('add.php'), _("_New Entry"), 'add.png', null, null, null, Horde_Util::getFormData('entry') ? '__noselection' : null);
         }
 
         /* Search. */
@@ -512,7 +512,7 @@ class Skoli {
          * Show this item only if an application provides 'calendar/show' and we have permissions to view it.
         $app = $registry->hasMethod('calendar/show');
         if ($app !== false && $registry->get('status', $app) != 'inactive' && $registry->hasPermission($app, PERMS_EDIT)) {
-            $menu->add(Horde::applicationUrl(Util::addParameter('timetable.php', 'actionID', 'new_timetable')), _("_New Timetable"), 'timetable.png');
+            $menu->add(Horde::applicationUrl(Horde_Util::addParameter('timetable.php', 'actionID', 'new_timetable')), _("_New Timetable"), 'timetable.png');
         }
         */
 
index 65e0804..566f358 100644 (file)
@@ -16,14 +16,13 @@ require_once SKOLI_BASE . '/lib/base.php';
 $title = _("My Classes");
 
 /* Get and set Variables */
-require_once 'Horde/Variables.php';
-$vars = Variables::getDefaultVariables();
+$vars = Horde_Variables::getDefaultVariables();
 
 /* Get the current action ID. */
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 
 /* Sort out the sorting values */
-if (($sortby_class = Util::getFormData('sortby_class')) !== null) {
+if (($sortby_class = Horde_Util::getFormData('sortby_class')) !== null) {
     if ($sortby_class == $prefs->getValue('sortby_class')) {
         $prefs->setValue('sortdir_class', !$prefs->getValue('sortdir_class'));
     } else {
@@ -39,7 +38,7 @@ if (($sortby_class = Util::getFormData('sortby_class')) !== null) {
         $prefs->setValue('sortby_student', $sortby_class);
     }
 }
-if (($sortby_student = Util::getFormData('sortby_student')) !== null) {
+if (($sortby_student = Horde_Util::getFormData('sortby_student')) !== null) {
     $prefs->setValue('sortby_student', $sortby_student);
     if ($sortby_student == $prefs->getValue('sortby_student')) {
         $prefs->setValue('sortdir_student', !$prefs->getValue('sortdir_student'));
@@ -64,7 +63,7 @@ if (count(Skoli::listClasses()) == 0 && Auth::getAuth()) {
 switch ($actionID) {
 case 'search_classes':
     /* Get the search parameters. */
-    $search_pattern = Util::getFormData('search_pattern');
+    $search_pattern = Horde_Util::getFormData('search_pattern');
 
     /* Get the full, sorted student list for all classes. */
     $list = Skoli::listStudents(null,
@@ -125,7 +124,7 @@ if (count($list) > 0) {
 
     $baseurl = 'list.php';
     if ($actionID == 'search_classes') {
-        $baseurl = Util::addParameter(
+        $baseurl = Horde_Util::addParameter(
             $baseurl,
             array('actionID' => 'search_classes',
                   'search_pattern' => $search_pattern));
index 52c6dae..941e9de 100644 (file)
@@ -16,7 +16,7 @@ require_once HORDE_BASE . '/lib/core.php';
 $registry = &Registry::singleton();
 
 /* Which application. */
-$app = Util::getFormData('app');
+$app = Horde_Util::getFormData('app');
 if (!$app) {
     echo '<ul id="app">';
     foreach ($registry->listApps() as $app) {
@@ -33,7 +33,7 @@ $appbase = $registry->get('fileroot', $app);
 require_once $appbase . '/lib/base.php';
 
 /* Which preference. */
-$pref = Util::getFormData('pref');
+$pref = Horde_Util::getFormData('pref');
 if (!$pref) {
     $_prefs = array();
     if (is_callable(array('Horde', 'loadConfiguration'))) {
@@ -61,9 +61,9 @@ if (!$pref) {
 }
 
 /* Which action. */
-if (Util::getPost('pref') == $pref) {
+if (Horde_Util::getPost('pref') == $pref) {
     /* POST for saving a pref. */
-    $prefs->setValue($pref, Util::getPost('value'));
+    $prefs->setValue($pref, Horde_Util::getPost('value'));
 }
 
 /* GET returns the current value, POST returns the new value. */
index f67c933..0193299 100644 (file)
@@ -23,39 +23,39 @@ if (count($classes) == 0) {
     exit;
 }
 
-$actionID = Util::getFormData('actionID');
+$actionID = Horde_Util::getFormData('actionID');
 
 if (!isset($_SESSION['skoli'])) {
     $_SESSION['skoli'] = array();
 }
 
-if (($classid = Util::getFormData('class')) !== null) {
+if (($classid = Horde_Util::getFormData('class')) !== null) {
     $_SESSION['skoli']['search_classid'] = $classid;
 } else if (isset($_SESSION['skoli']['search_classid'])) {
     $classid = $_SESSION['skoli']['search_classid'];
 }
-if (($studentid = Util::getFormData('student')) !== null) {
+if (($studentid = Horde_Util::getFormData('student')) !== null) {
     $_SESSION['skoli']['search_studentid'] = $studentid;
 } else if (isset($_SESSION['skoli']['search_studentid'])) {
     $studentid = $_SESSION['skoli']['search_studentid'];
 }
-if (($type = Util::getFormData('type')) !== null) {
+if (($type = Horde_Util::getFormData('type')) !== null) {
     $_SESSION['skoli']['search_type'] = $type;
 } else if (isset($_SESSION['skoli']['search_type'])) {
     $type = $_SESSION['skoli']['search_type'];
 }
-if (($search = Util::getFormData('stext')) !== null) {
+if (($search = Horde_Util::getFormData('stext')) !== null) {
     $_SESSION['skoli']['search_stext'] = $search;
 } else if (isset($_SESSION['skoli']['search_stext'])) {
     $search = $_SESSION['skoli']['search_stext'];
 }
 
 /* Sort out the sorting values */
-$sortby = Util::getFormData('sortby');
-$sortdir = Util::getFormData('sortdir');
+$sortby = Horde_Util::getFormData('sortby');
+$sortdir = Horde_Util::getFormData('sortdir');
 if ($sortby === null) {
     $sortby = SKOLI_SORT_CLASS;
-} else if ($sortby == Util::getFormData('sortby')) {
+} else if ($sortby == Horde_Util::getFormData('sortby')) {
     $sortdir = !$sortdir;
 }
 if ($sortdir === null) {
@@ -137,7 +137,7 @@ if ($actionID == 'search') {
 
     $dynamic_sort = false;
     $params = array('actionID' => 'search');
-    $baseurl = Util::addParameter('search.php', $params);
+    $baseurl = Horde_Util::addParameter('search.php', $params);
     echo '<div id="page">';
     require SKOLI_TEMPLATES . '/search/header.inc';
     if (count($list) > 0) {
@@ -169,7 +169,7 @@ if ($actionID == 'search') {
                            (isset($entry['comment']) && $entry['comment'] != '' ? ', ' . $entry['comment'] : '');
                 break;
             }
-            $detailswrapped = String::wordwrap($details, $prefs->getValue('entry_details_wrap'), '<br />', true);
+            $detailswrapped = Horde_String::wordwrap($details, $prefs->getValue('entry_details_wrap'), '<br />', true);
             $entry['details'] = current(explode('<br />', $detailswrapped));
             require SKOLI_TEMPLATES . '/search/entries.inc';
         }
index c8b7a05..b833b50 100644 (file)
@@ -4,7 +4,7 @@
 
 <div id="class-list-buttons">
  <form method="get" action="create.php">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
   <input type="submit" class="button" value="<?php echo _("Create a new Class") ?>" />
  </form>
 </div>
  <?php $class = $classes[$class_id] ?>
   <tr>
    <td><?php echo htmlspecialchars($class->get('name')) ?></td>
-   <td><a href="<?php echo Util::addParameter($edit_url_base, 'c', $class->getName()) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
+   <td><a href="<?php echo Horde_Util::addParameter($edit_url_base, 'c', $class->getName()) ?>" title="<?php echo _("Edit") ?>"><?php echo $edit_img ?></a></td>
 <?php if (empty($conf['share']['no_sharing'])): ?>
-   <td><a onclick="return !popup(this.href);" href="<?php echo Util::addParameter($perms_url_base, 'share', $class->getName()) ?>" target="_blank" title="<?php echo _("Change Permissions") ?>"><?php echo $perms_img ?></a></td>
+   <td><a onclick="return !popup(this.href);" href="<?php echo Horde_Util::addParameter($perms_url_base, 'share', $class->getName()) ?>" target="_blank" title="<?php echo _("Change Permissions") ?>"><?php echo $perms_img ?></a></td>
 <?php endif; ?>
-   <td><a href="<?php echo Util::addParameter($delete_url_base, 'c', $class->getName()) ?>" title="<?php echo _("Delete") ?>"><?php echo $delete_img ?></a></td>
+   <td><a href="<?php echo Horde_Util::addParameter($delete_url_base, 'c', $class->getName()) ?>" title="<?php echo _("Delete") ?>"><?php echo $delete_img ?></a></td>
   </tr>
 <?php endforeach; ?>
  </tbody>
index eac8f93..fe08839 100644 (file)
@@ -20,7 +20,7 @@ if (!empty($refresh_time) && ($refresh_time > 0) && !empty($refresh_url)) {
 
 Horde::includeScriptFiles();
 
-$bc = Util::nonInputVar('bodyClass');
+$bc = Horde_Util::nonInputVar('bodyClass');
 if ($prefs->getValue('show_panel')) {
     if ($bc) {
         $bc .= ' ';
@@ -35,4 +35,4 @@ if ($prefs->getValue('show_panel')) {
 <link href="<?php echo Horde::applicationUrl('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
 </head>
 
-<body<?php if ($bc) echo ' class="' . $bc . '"' ?><?php if ($bi = Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
+<body<?php if ($bc) echo ' class="' . $bc . '"' ?><?php if ($bi = Horde_Util::nonInputVar('bodyId')) echo ' id="' . $bi . '"'; ?>>
index 575ef83..103e6a1 100644 (file)
@@ -8,8 +8,8 @@
 <div class="item" style="padding:1em">
  <?php echo Horde::label('exportID', _("Select the export format:")) ?><br />
  <select name="exportID" id="exportID">
-  <option value="<?php echo EXPORT_CSV ?>"<?php echo Util::getFormData('exportID') == EXPORT_CSV ? ' selected="selected"' : '' ?>><?php echo _("Comma separated values (CSV)") ?></option>
-  <option value="<?php echo EXPORT_TSV ?>"<?php echo Util::getFormData('exportID') == EXPORT_TSV ? ' selected="selected"' : '' ?>><?php echo _("Tab separated values (TSV)") ?></option>
+  <option value="<?php echo EXPORT_CSV ?>"<?php echo Horde_Util::getFormData('exportID') == EXPORT_CSV ? ' selected="selected"' : '' ?>><?php echo _("Comma separated values (CSV)") ?></option>
+  <option value="<?php echo EXPORT_TSV ?>"<?php echo Horde_Util::getFormData('exportID') == EXPORT_TSV ? ' selected="selected"' : '' ?>><?php echo _("Tab separated values (TSV)") ?></option>
  </select><br />
 
 <?php if (count($classes) > 1): ?>
index d2db778..c46ac27 100644 (file)
@@ -1,5 +1,5 @@
 <form action="entry.php" method="post">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
 <input type="hidden" name="actionID" value="delete" />
 <input type="hidden" name="entry" value="<?php echo $entry['object_id'] ?>" />
 <input type="hidden" name="view" value="<?php echo $viewName ?>" />
index 6480e47..78963e7 100644 (file)
@@ -3,7 +3,7 @@
     <?php
     if ($class['_edit']) {
         $label = _("New Entry");
-        echo Horde::link(Util::addParameter(Horde::applicationUrl('add.php'), 'class', $class['_id']), $label) . Horde::img('add.png', $label, null, $registry->getImageDir('skoli')) . '</a>';
+        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), 'class', $class['_id']), $label) . Horde::img('add.png', $label, null, $registry->getImageDir('skoli')) . '</a>';
     }
     ?>
   </td>
@@ -11,7 +11,7 @@
     <?php
     if ($class['_edit']) {
         $label = sprintf(_("Edit \"%s\""), $class['name']);
-        echo Horde::link(Util::addParameter(Horde::applicationUrl('classes/edit.php'), 'c', $class['_id']), $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('classes/edit.php'), 'c', $class['_id']), $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
     }
     ?>
   </td>
@@ -28,7 +28,7 @@
         'class'    => $class['_id'],
         'student'  => 'all'
     );
-    echo Horde::link(Util::addParameter(Horde::applicationUrl('search.php'), $params), $label) . htmlspecialchars($class['name']) . '</a>';
+    echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), $params), $label) . htmlspecialchars($class['name']) . '</a>';
     ?>
   </td>
 <?php if (in_array('lastentry', $student_columns)): ?>
index c6a9c42..68fe09d 100644 (file)
@@ -45,47 +45,47 @@ function doPrefsUpdate(column, sortDown)
   </th>
 <?php if (in_array('semesterstart', $class_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_SEMESTERSTART ?>"<?php if ($sortby_class == SKOLI_SORT_SEMESTERSTART) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTERSTART)), _("Sort by Semester Start Date"), 'sortlink', '', '', _("Semester Start")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTERSTART)), _("Sort by Semester Start Date"), 'sortlink', '', '', _("Semester Start")) ?>&nbsp;
   </th>
 <?php endif; if (in_array('semesterend', $class_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_SEMESTEREND ?>"<?php if ($sortby_class == SKOLI_SORT_SEMESTEREND) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTEREND)), _("Sort by Semester End Date"), 'sortlink', '', '', _("Semester End")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTEREND)), _("Sort by Semester End Date"), 'sortlink', '', '', _("Semester End")) ?>&nbsp;
   </th>
 <?php endif; ?>
   <th id="s<?php echo SKOLI_SORT_NAME ?>"<?php if ($sortby_class == SKOLI_SORT_NAME) echo ' class="' . $sortdirclass_class . '"' ?>>
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_NAME)), _("Sort by Name"), 'sortlink', '', '', _("Name")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_NAME)), _("Sort by Name"), 'sortlink', '', '', _("Name")) ?>&nbsp;
   </th>
 <?php if (in_array('lastentry', $student_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_LASTENTRY ?>"<?php if ($sortby_student == SKOLI_SORT_LASTENTRY) echo ' class="' . $sortdirclass_student . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_LASTENTRY)), _("Sort by Last Entry"), 'sortlink', '', '', _("Last Entry")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_LASTENTRY)), _("Sort by Last Entry"), 'sortlink', '', '', _("Last Entry")) ?>&nbsp;
   </th>
 <?php endif; if (in_array('summarks', $student_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_SUMMARKS ?>"<?php if ($sortby_student == SKOLI_SORT_SUMMARKS) echo ' class="' . $sortdirclass_student . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_SUMMARKS)), _("Sort by Mark"), 'sortlink', '', '', _("Mark average")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_SUMMARKS)), _("Sort by Mark"), 'sortlink', '', '', _("Mark average")) ?>&nbsp;
   </th>
 <?php endif; if (in_array('sumabsences', $student_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_SUMABSENCES ?>"<?php if ($sortby_student == SKOLI_SORT_SUMABSENCES) echo ' class="' . $sortdirclass_student . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_SUMABSENCES)), _("Sort by Absences"), 'sortlink', '', '', _("Absences")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_student', SKOLI_SORT_SUMABSENCES)), _("Sort by Absences"), 'sortlink', '', '', _("Absences")) ?>&nbsp;
   </th>
 <?php endif; if (in_array('grade', $class_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_GRADE ?>"<?php if ($sortby_class == SKOLI_SORT_GRADE) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_GRADE)), _("Sort by Grade"), 'sortlink', '', '', _("Grade")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_GRADE)), _("Sort by Grade"), 'sortlink', '', '', _("Grade")) ?>&nbsp;
   </th>
 <?php endif; if (in_array('semester', $class_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_SEMESTER ?>"<?php if ($sortby_class == SKOLI_SORT_SEMESTER) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTER)), _("Sort by Semester"), 'sortlink', '', '', _("Semester")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_SEMESTER)), _("Sort by Semester"), 'sortlink', '', '', _("Semester")) ?>&nbsp;
   </th>
 <?php endif; if (in_array('location', $class_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_LOCATION ?>"<?php if ($sortby_class == SKOLI_SORT_LOCATION) echo ' class="' . $sortdirclass_class . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_LOCATION)), _("Sort by Location"), 'sortlink', '', '', _("Location")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_LOCATION)), _("Sort by Location"), 'sortlink', '', '', _("Location")) ?>&nbsp;
   </th>
 <?php endif; if (in_array('category', $class_columns)): ?>
   <th id="s<?php echo SKOLI_SORT_CATEGORY ?>"<?php if ($sortby_class == SKOLI_SORT_CATEGORY) echo ' class="' . $sortdirclass_class . '"' ?> width="10%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("Category")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby_class', SKOLI_SORT_CATEGORY)), _("Sort by Category"), 'sortlink', '', '', _("Category")) ?>&nbsp;
    <?php
    if (Auth::getAuth() && (!$GLOBALS['prefs']->isLocked('categories') ||
                            !$GLOBALS['prefs']->isLocked('category_colors'))) {
-       $categoryUrl = Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php'), array('app' => 'horde', 'group' => 'categories'));
+       $categoryUrl = Horde_Util::addParameter(Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs.php'), array('app' => 'horde', 'group' => 'categories'));
        echo ' ' . Horde::link($categoryUrl, _("Edit categories and colors"), '', '_blank', 'popup(this.href); return false;') . Horde::img('colorpicker.png', _("Edit categories and colors"), '', $GLOBALS['registry']->getImageDir('horde')) . '</a>';
    }
    ?>
index c483559..a7e7c2c 100644 (file)
@@ -3,7 +3,7 @@
     <?php
     if ($class['_edit']) {
         $label = _("New Entry");
-        echo Horde::link(Util::addParameter(Horde::applicationUrl('add.php'), array('class'=>$class['_id'], 'student'=>$student['__key'])), $label) . Horde::img('add.png', $label, null, $registry->getImageDir('skoli')) . '</a>';
+        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('add.php'), array('class'=>$class['_id'], 'student'=>$student['__key'])), $label) . Horde::img('add.png', $label, null, $registry->getImageDir('skoli')) . '</a>';
     }
     ?>
   </td>
@@ -30,7 +30,7 @@
         'class'    => $class['_id'],
         'student'  => $student['__key']
     );
-    echo $treeIcon . '&nbsp;' . Horde::link(Util::addParameter(Horde::applicationUrl('search.php'), $params), $label) . htmlspecialchars($student[$conf['addresses']['name_field']]) . '</a>';
+    echo $treeIcon . '&nbsp;' . Horde::link(Horde_Util::addParameter(Horde::applicationUrl('search.php'), $params), $label) . htmlspecialchars($student[$conf['addresses']['name_field']]) . '</a>';
     ?>
   </td>
 <?php if (in_array('lastentry', $student_columns)): ?>
index 3ea432c..a7aa45a 100644 (file)
@@ -35,7 +35,7 @@ function sbarToggle()
 
 <div id="pageControlsInner">
 <form action="<?php echo Horde::selfUrl() ?>" method="post">
-<?php echo Util::formInput() ?>
+<?php echo Horde_Util::formInput() ?>
  <h4><?php echo _("Search for Classes:") ?></h4>
  <p>
   <input id="classSearch" type="text" for="myclasses,sharedclasses" />
index 7d85afe..0b976ce 100644 (file)
@@ -7,7 +7,7 @@
             'view'  => 'EditEntry',
             'entry' => $entry['_id']
         );
-        echo Horde::link(Util::addParameter(Horde::applicationUrl('entry.php'), $params), $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
+        echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('entry.php'), $params), $label) . Horde::img('edit.png', $label, null, $registry->getImageDir('horde')) . '</a>';
     }
     ?>
   </td>
@@ -18,7 +18,7 @@
         'view'  => 'Entry',
         'entry' => $entry['_id']
     );
-    echo Horde::link(Util::addParameter(Horde::applicationUrl('entry.php'), $params), _("View Entry")) . htmlspecialchars($entry['student']) . '</a>&nbsp;';
+    echo Horde::link(Horde_Util::addParameter(Horde::applicationUrl('entry.php'), $params), _("View Entry")) . htmlspecialchars($entry['student']) . '</a>&nbsp;';
     ?>
  </td>
   <td><?php echo htmlspecialchars($entry['date']) ?>&nbsp;</td>
index fc9cb5a..601d5ab 100644 (file)
@@ -31,16 +31,16 @@ function doPrefsUpdate(column, sortDown)
    <?php echo Horde::img('edit.png', _("Edit Class"), null, $registry->getImageDir('horde')) ?>
   </th>
   <th id="s<?php echo SKOLI_SORT_CLASS ?>"<?php if ($sortby == SKOLI_SORT_CLASS) echo ' class="' . $sortdir_class . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', SKOLI_SORT_CLASS)), _("Sort by Class"), 'sortlink', '', '', _("Class")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_CLASS)), _("Sort by Class"), 'sortlink', '', '', _("Class")) ?>&nbsp;
   </th>
   <th id="s<?php echo SKOLI_SORT_STUDENT ?>"<?php if ($sortby == SKOLI_SORT_STUDENT) echo ' class="' . $sortdir_class . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', SKOLI_SORT_STUDENT)), _("Sort by Student Name"), 'sortlink', '', '', _("Student")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_STUDENT)), _("Sort by Student Name"), 'sortlink', '', '', _("Student")) ?>&nbsp;
   </th>
   <th id="s<?php echo SKOLI_SORT_DATE ?>"<?php if ($sortby == SKOLI_SORT_DATE) echo ' class="' . $sortdir_class . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', SKOLI_SORT_DATE)), _("Sort by Date"), 'sortlink', '', '', _("Date")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_DATE)), _("Sort by Date"), 'sortlink', '', '', _("Date")) ?>&nbsp;
   </th>
   <th id="s<?php echo SKOLI_SORT_TYPE ?>"<?php if ($sortby == SKOLI_SORT_TYPE) echo ' class="' . $sortdir_class . '"' ?> width="2%">
-   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($baseurl, 'sortby', SKOLI_SORT_TYPE)), _("Sort by Type"), 'sortlink', '', '', _("Type")) ?>&nbsp;
+   <?php echo Horde::widget(Horde::applicationUrl(Horde_Util::addParameter($baseurl, 'sortby', SKOLI_SORT_TYPE)), _("Sort by Type"), 'sortlink', '', '', _("Type")) ?>&nbsp;
   </th>
   <th class="nosort">
    <?php echo _("Entry") ?>&nbsp;
index 929ec53..2c43ce9 100644 (file)
@@ -182,30 +182,30 @@ class TimeObjects_Driver_Weatherdotcom extends TimeObjects_Driver
             // simplify and just check for it's presence or use night.
             $title = sprintf("%s %d%s/%d%s", (!empty($data['day']['condition']) ? $data['day']['condition'] : $data['night']['condition']),
                                              $data['temperatureHigh'],
-                                             String::upper($units['temp']),
+                                             Horde_String::upper($units['temp']),
                                              $data['temperatureLow'],
-                                             String::upper($units['temp']));
+                                             Horde_String::upper($units['temp']));
             $daytime = sprintf(_("Conditions: %s\nHigh: %d%s\nPrecipitation: %d%%\nHumidity: %d%%\nWinds: From the %s at %d%s"),
                            $data['day']['condition'],
-                           $data['temperatureHigh'], String::upper($units['temp']),
+                           $data['temperatureHigh'], Horde_String::upper($units['temp']),
                            $data['day']['precipitation'],
                            $data['day']['humidity'],
                            $data['day']['windDirection'],
                            $data['day']['wind'],
-                           String::upper($units['wind']));
+                           Horde_String::upper($units['wind']));
              if (!empty($data['day']['windGust']) && $data['day']['windgust'] > 0) {
-                 $daytime .= sprintf(_(" gusting %d%s"), $data['day']['windgust'], String::upper($units['wind']));
+                 $daytime .= sprintf(_(" gusting %d%s"), $data['day']['windgust'], Horde_String::upper($units['wind']));
              }
              $nighttime = sprintf(_("Conditions: %s\nLow: %d%s\nPrecipitation: %d%%\nHumidity: %d%%\nWinds: From the %s at %d%s"),
                            $data['night']['condition'],
-                           $data['temperatureLow'], String::upper($units['temp']),
+                           $data['temperatureLow'], Horde_String::upper($units['temp']),
                            $data['night']['precipitation'],
                            $data['night']['humidity'],
                            $data['night']['windDirection'],
                            $data['night']['wind'],
-                           String::upper($units['wind']));
+                           Horde_String::upper($units['wind']));
              if (!empty($data['night']['windGust']) && $data['night']['windgust'] > 0) {
-                 $nighttime .= sprintf(_(" gusting %d%s"), $data['night']['windgust'], String::upper($units['wind']));
+                 $nighttime .= sprintf(_(" gusting %d%s"), $data['night']['windgust'], Horde_String::upper($units['wind']));
              }
             $description = sprintf(_("Location: %s\nSunrise: %sAM Sunset: %sPM\n\nDay:\n%s\n\nEvening:\n%s"),
                                    $location['name'],
@@ -235,4 +235,4 @@ class TimeObjects_Driver_Weatherdotcom extends TimeObjects_Driver
         return $objects;
     }
 
-}
\ No newline at end of file
+}
index 59a65f4..82c5867 100644 (file)
@@ -23,7 +23,7 @@ Horde_Autoloader::addClassPath($rto_dir);
 Horde_Autoloader::addClassPattern('/^TimeObjects_/', $rto_dir);
 
 /* Registry. */
-$session_control = Util::nonInputVar('session_control');
+$session_control = Horde_Util::nonInputVar('session_control');
 if ($session_control == 'none') {
     $registry = &Registry::singleton(Registry::SESSION_NONE);
 } elseif ($session_control == 'readonly') {
@@ -41,4 +41,4 @@ if (is_a(($pushed = $registry->pushApp('timeobjects', !defined('AUTH_HANDLER')))
 
 if (!defined('TIMEOBJECTS_BASE')) {
     define('TIMEOBJECTS_BASE', $rto_dir . '/..');
-}
\ No newline at end of file
+}