From: Michael M Slusarz Date: Tue, 9 Jun 2009 23:16:59 +0000 (-0600) Subject: Convert to new Horde_Util package X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=78fd3f9eaf63e8d7c79a458a73e2a14a3ae7ca97;p=horde.git Convert to new Horde_Util package --- diff --git a/babel/edit.php b/babel/edit.php index fa642bb9f..dc2ccf2f9 100644 --- a/babel/edit.php +++ b/babel/edit.php @@ -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); diff --git a/babel/extract.php b/babel/extract.php index 1ab3aba08..2c60a5c20 100644 --- a/babel/extract.php +++ b/babel/extract.php @@ -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'); diff --git a/babel/lib/Babel.php b/babel/lib/Babel.php index 8037f0262..0197732ff 100644 --- a/babel/lib/Babel.php +++ b/babel/lib/Babel.php @@ -57,7 +57,7 @@ class Babel { continue; } - if (Util::getFormData('module') == $app) { + if (Horde_Util::getFormData('module') == $app) { $html .= '