From 15803a5314228be2a466a7c0b7487e7be589e343 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 23 Nov 2009 23:47:08 -0700 Subject: [PATCH] Missed some CategoryManager conversions --- ansel/gallery.php | 3 +-- ansel/templates/gallery/gallery.inc | 4 ++-- ansel/templates/prefs/default_category_select.inc | 3 +-- beatnik/listzones.php | 3 +-- nag/data.php | 3 +-- nag/lib/Block/summary.php | 3 +-- nag/lib/Forms/task.php | 4 +--- nag/task.php | 3 +-- nag/themes/categoryCSS.php | 4 +--- skoli/lib/Forms/CreateClass.php | 3 +-- skoli/lib/Forms/EditClass.php | 3 +-- skoli/themes/categoryCSS.php | 3 +-- turba/data.php | 3 +-- turba/lib/Api.php | 7 ++++--- turba/lib/Driver.php | 3 +-- vilma/users/index.php | 1 - 16 files changed, 19 insertions(+), 34 deletions(-) diff --git a/ansel/gallery.php b/ansel/gallery.php index a9de34f17..93cd0d040 100644 --- a/ansel/gallery.php +++ b/ansel/gallery.php @@ -9,7 +9,6 @@ */ require_once dirname(__FILE__) . '/lib/base.php'; -require_once 'Horde/Prefs/CategoryManager.php'; // Redirect to the gallery list if no action has been requested. $actionID = Horde_Util::getFormData('actionID'); @@ -139,7 +138,7 @@ case 'save': $gallery_mode = Horde_Util::getFormData('view_mode', 'Normal'); $gallery_passwd = Horde_Util::getFormData('gallery_passwd'); if ($new_category = Horde_Util::getFormData('new_category')) { - $cManager = new Prefs_CategoryManager(); + $cManager = new Horde_Prefs_CategoryManager(); $new_category = $cManager->add($new_category); if ($new_category) { $gallery_category = $new_category; diff --git a/ansel/templates/gallery/gallery.inc b/ansel/templates/gallery/gallery.inc index aeb93c9df..a881b31e8 100644 --- a/ansel/templates/gallery/gallery.inc +++ b/ansel/templates/gallery/gallery.inc @@ -26,8 +26,8 @@   - + diff --git a/ansel/templates/prefs/default_category_select.inc b/ansel/templates/prefs/default_category_select.inc index e6dbdc95a..ca804a9cb 100644 --- a/ansel/templates/prefs/default_category_select.inc +++ b/ansel/templates/prefs/default_category_select.inc @@ -1,7 +1,6 @@ getSelect('default_category_select', $GLOBALS['prefs']->getValue('default_category')); echo _("Default category for galleries"); diff --git a/beatnik/listzones.php b/beatnik/listzones.php index fe199fa1d..68451c7b3 100644 --- a/beatnik/listzones.php +++ b/beatnik/listzones.php @@ -7,13 +7,12 @@ */ require_once dirname(__FILE__) . '/lib/base.php'; -require_once 'Horde/Prefs/CategoryManager.php'; // Unset the current domain since we are generating a zone list $_SESSION['beatnik']['curdomain'] = null; // Set up categories -$cManager = new Prefs_CategoryManager(); +$cManager = new Horde_Prefs_CategoryManager(); $categories = $cManager->get(); $colors = $cManager->colors(); $fgcolors = $cManager->fgColors(); diff --git a/nag/data.php b/nag/data.php index 0670a8255..c44e9d401 100644 --- a/nag/data.php +++ b/nag/data.php @@ -153,8 +153,7 @@ if (!$error) { /* We have a final result set. */ if (is_array($next_step)) { /* Create a category manager. */ - require_once 'Horde/Prefs/CategoryManager.php'; - $cManager = new Prefs_CategoryManager(); + $cManager = new Horde_Prefs_CategoryManager(); $categories = $cManager->get(); /* Create a Nag storage instance. */ diff --git a/nag/lib/Block/summary.php b/nag/lib/Block/summary.php index 9b3350344..74536cace 100644 --- a/nag/lib/Block/summary.php +++ b/nag/lib/Block/summary.php @@ -24,8 +24,7 @@ class Horde_Block_nag_summary extends Horde_Block { function _params() { require_once dirname(__FILE__) . '/../base.php'; - require_once 'Horde/Prefs/CategoryManager.php'; - $cManager = new Prefs_CategoryManager(); + $cManager = new Horde_Prefs_CategoryManager(); $categories = array(); foreach ($cManager->get() as $c) { $categories[$c] = $c; diff --git a/nag/lib/Forms/task.php b/nag/lib/Forms/task.php index 6efc6a6be..7bd94b556 100644 --- a/nag/lib/Forms/task.php +++ b/nag/lib/Forms/task.php @@ -85,9 +85,7 @@ class Nag_TaskForm extends Horde_Form { if (class_exists('Horde_Form_Type_category')) { $this->addVariable(_("Category"), 'category', 'category', false); } else { - require_once 'Horde/Prefs/CategoryManager.php'; - require_once 'Horde/Array.php'; - $values = Horde_Array::valuesToKeys(Prefs_CategoryManager::get()); + $values = Horde_Array::valuesToKeys(Horde_Prefs_CategoryManager::get()); $this->addVariable(_("Category"), 'category', 'enum', false, false, false, array($values, _("Unfiled"))); } diff --git a/nag/task.php b/nag/task.php index aa097afdd..71d17d2d6 100644 --- a/nag/task.php +++ b/nag/task.php @@ -134,8 +134,7 @@ case 'save_task': /* Add new category. */ if ($info['category']['new']) { - require_once 'Horde/Prefs/CategoryManager.php'; - $cManager = new Prefs_CategoryManager(); + $cManager = new Horde_Prefs_CategoryManager(); $cManager->add($info['category']['value']); } diff --git a/nag/themes/categoryCSS.php b/nag/themes/categoryCSS.php index 878781fc3..71313267b 100644 --- a/nag/themes/categoryCSS.php +++ b/nag/themes/categoryCSS.php @@ -11,12 +11,10 @@ @define('AUTH_HANDLER', true); @define('NAG_BASE', dirname(__FILE__) . '/..'); require_once NAG_BASE . '/lib/base.php'; -require_once 'Horde/Image.php'; -require_once 'Horde/Prefs/CategoryManager.php'; header('Content-Type: text/css'); -$cManager = new Prefs_CategoryManager(); +$cManager = new Horde_Prefs_CategoryManager(); $colors = $cManager->colors(); $fgColors = $cManager->fgColors(); diff --git a/skoli/lib/Forms/CreateClass.php b/skoli/lib/Forms/CreateClass.php index 30e3ee864..90f10b486 100644 --- a/skoli/lib/Forms/CreateClass.php +++ b/skoli/lib/Forms/CreateClass.php @@ -162,8 +162,7 @@ class Skoli_CreateClassForm extends Horde_Form { /* Add new category. */ if (strpos($this->_vars->get('category'), '*new*') !== false || $this->_vars->get('category') == $this->_vars->get('new_category')) { - require_once 'Horde/Prefs/CategoryManager.php'; - $cManager = new Prefs_CategoryManager(); + $cManager = new Horde_Prefs_CategoryManager(); $cManager->add($this->_vars->get('new_category')); $this->_vars->set('category', $this->_vars->get('new_category')); } diff --git a/skoli/lib/Forms/EditClass.php b/skoli/lib/Forms/EditClass.php index dc09c6afd..70812751e 100644 --- a/skoli/lib/Forms/EditClass.php +++ b/skoli/lib/Forms/EditClass.php @@ -131,8 +131,7 @@ class Skoli_EditClassForm extends Horde_Form { /* Add new category. */ if (strpos($this->_vars->get('category'), '*new*') !== false || $this->_vars->get('category') == $this->_vars->get('new_category')) { - require_once 'Horde/Prefs/CategoryManager.php'; - $cManager = new Prefs_CategoryManager(); + $cManager = new Horde_Prefs_CategoryManager(); $cManager->add($this->_vars->get('new_category')); $this->_vars->set('category', $this->_vars->get('new_category')); } diff --git a/skoli/themes/categoryCSS.php b/skoli/themes/categoryCSS.php index 4947e4897..b3668af65 100644 --- a/skoli/themes/categoryCSS.php +++ b/skoli/themes/categoryCSS.php @@ -10,11 +10,10 @@ $skoli_authentication = 'none'; require_once dirname(__FILE__) . '/../lib/base.php'; -require_once 'Horde/Prefs/CategoryManager.php'; header('Content-Type: text/css'); -$cManager = new Prefs_CategoryManager(); +$cManager = new Horde_Prefs_CategoryManager(); $colors = $cManager->colors(); $fgColors = $cManager->fgColors(); diff --git a/turba/data.php b/turba/data.php index 2fbe3fbf3..7d0114994 100644 --- a/turba/data.php +++ b/turba/data.php @@ -410,8 +410,7 @@ if (!$error && !empty($import_format)) { /* We have a final result set. */ if (is_array($next_step)) { /* Create a category manager. */ - require_once 'Horde/Prefs/CategoryManager.php'; - $cManager = new Prefs_CategoryManager(); + $cManager = new Horde_Prefs_CategoryManager(); $categories = $cManager->get(); /* Create a Turba storage instance. */ diff --git a/turba/lib/Api.php b/turba/lib/Api.php index 7c37bdfd2..a4121d792 100644 --- a/turba/lib/Api.php +++ b/turba/lib/Api.php @@ -627,7 +627,9 @@ class Turba_Api extends Horde_Registry_Api // Check existance of and permissions on the specified source. if (!isset($cfgSources[$import_source])) { - return PEAR::raiseError(sprintf(_("Invalid address book: %s"), + print_r($cfgSources); + exit; + return PEAR::raiseError(sprintf(_("aInvalid address book: %s"), $import_source), 'horde.warning'); } @@ -642,8 +644,7 @@ class Turba_Api extends Horde_Registry_Api } /* Create a category manager. */ - require_once 'Horde/Prefs/CategoryManager.php'; - $cManager = new Prefs_CategoryManager(); + $cManager = new Horde_Prefs_CategoryManager(); $categories = $cManager->get(); if (!is_a($content, 'Horde_iCalendar_vcard')) { diff --git a/turba/lib/Driver.php b/turba/lib/Driver.php index e4e64edbe..9891c85d8 100644 --- a/turba/lib/Driver.php +++ b/turba/lib/Driver.php @@ -172,8 +172,7 @@ class Turba_Driver /* Handle category. */ if (!empty($hash['category'])) { if (!empty($hash['category']['new'])) { - require_once 'Horde/Prefs/CategoryManager.php'; - $cManager = new Prefs_CategoryManager(); + $cManager = new Horde_Prefs_CategoryManager(); $cManager->add($hash['category']['value']); } $hash['category'] = $hash['category']['value']; diff --git a/vilma/users/index.php b/vilma/users/index.php index 283236282..e0808975e 100644 --- a/vilma/users/index.php +++ b/vilma/users/index.php @@ -12,7 +12,6 @@ @define('VILMA_BASE', dirname(__FILE__) . '/..'); require_once VILMA_BASE . '/lib/base.php'; -require_once 'Horde/Prefs/CategoryManager.php'; /* Only admin should be using this. */ if (!Vilma::hasPermission($curdomain)) { -- 2.11.0