From e4f8b579a8c6e4b45b1774cff1f616affc688e34 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Sat, 2 Jan 2010 17:05:30 -0500 Subject: [PATCH] Shout: prune a lot of dead code --- shout/dialplan.php | 57 ------------------------ shout/dialplan/edit.php | 47 ------------------- shout/moh.php | 26 ----------- shout/security.php | 29 ------------ shout/templates/content_page | 8 ---- shout/templates/dialplan/contexttree.inc | 9 ---- shout/templates/dialplan/dialplanlist.inc | 56 ----------------------- shout/templates/dialplan/extensiondetail.inc | 56 ----------------------- shout/templates/dialplan/manager.inc | 14 ------ shout/templates/dialplan/priority-form-begin.inc | 7 --- shout/templates/dialplan/priority-form-end.inc | 2 - shout/templates/dialplan/priority-form-line.inc | 11 ----- 12 files changed, 322 deletions(-) delete mode 100644 shout/dialplan.php delete mode 100644 shout/dialplan/edit.php delete mode 100644 shout/moh.php delete mode 100644 shout/security.php delete mode 100644 shout/templates/content_page delete mode 100644 shout/templates/dialplan/contexttree.inc delete mode 100644 shout/templates/dialplan/dialplanlist.inc delete mode 100644 shout/templates/dialplan/extensiondetail.inc delete mode 100644 shout/templates/dialplan/manager.inc delete mode 100644 shout/templates/dialplan/priority-form-begin.inc delete mode 100644 shout/templates/dialplan/priority-form-end.inc delete mode 100644 shout/templates/dialplan/priority-form-line.inc diff --git a/shout/dialplan.php b/shout/dialplan.php deleted file mode 100644 index 883d2c1cd..000000000 --- a/shout/dialplan.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * See the enclosed file COPYING for license information (GPL). If you - * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. - * - * @package shout - */ - -if (!isset($SHOUT_RUNNING) || !$SHOUT_RUNNING) { - header('Location: /'); - exit(); -} - -require_once SHOUT_BASE . '/lib/Dialplan.php'; -$dialplan = &$shout->getDialplan($context); - -// Set up the tree. -$dpgui = Shout_Dialplan::singleton('x', $dialplan); - -//$action = Horde_Util::getFormData("action"); -// $action = 'manager'; - -$title = _("Dialplan Manager"); - -require SHOUT_TEMPLATES . '/common-header.inc'; -require SHOUT_TEMPLATES . '/menu.inc'; - -$notification->notify(); - -echo $tabs->render($section); - -// require SHOUT_BASE . "/dialplan/$action.php"; - -require SHOUT_TEMPLATES . '/dialplan/manager.inc'; - -// Horde::addScriptFile('httpclient.js', 'horde', true); -// Horde::addScriptFile('hideable.js', 'horde', true); -// require HORDE_TEMPLATES . '/common-header.inc'; -// require HORDE_TEMPLATES . '/portal/sidebar.inc'; - - -// require SHOUT_TEMPLATES . "/dialplan/dialplanlist.inc"; - - - - - - - - - - -require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file diff --git a/shout/dialplan/edit.php b/shout/dialplan/edit.php deleted file mode 100644 index 18ef2b4c9..000000000 --- a/shout/dialplan/edit.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * See the enclosed file LICENSE for license information (GPL). If you - * did not receive this file, see http://www.horde.org/licenses/gpl.php. - */ -@define('SHOUT_BASE', dirname(__FILE__) . '/..'); -require_once SHOUT_BASE . '/lib/Dialplan.php'; -require_once 'Horde/Variables.php'; - -$RENDERER = &new Horde_Form_Renderer(); - -$empty = ''; - -$vars = &Variables::getDefaultVariables($empty); -$formname = $vars->get('formname'); -$context = $vars->get('context'); -$extension = $vars->get('extension'); -$dialplan = &$shout->getDialplan($context); - -$ExtensionDetailsForm = &Horde_Form::singleton('ExtensionDetailsForm', $vars); -$ExtensionDetailsFormValid = $ExtensionDetailsForm->validate($vars, true); - -$ExtensionDetailsForm->open($RENDERER, $vars, 'dialplan.php', 'post'); -$ExtensionDetailsForm->preserveVarByPost($vars, "section"); -$ExtensionDetailsForm->preserve($vars); -require SHOUT_TEMPLATES . '/table-limiter-begin.inc'; -$RENDERER->beginActive($ExtensionDetailsForm->getTitle()); -$RENDERER->renderFormActive($ExtensionDetailsForm, $vars); -# FIXME Maybe this should be a subclass inheriting from the From/Renderer object -# instead of a simple include? -$i = 0; -require SHOUT_TEMPLATES . '/dialplan/priority-form-begin.inc'; -foreach ($dialplan['extensions'][$extension] as $priority => $application) { - require SHOUT_TEMPLATES . '/dialplan/priority-form-line.inc'; - $i++; -} -require SHOUT_TEMPLATES . '/dialplan/priority-form-end.inc'; -$RENDERER->submit('Add Priority'); -$RENDERER->submit('Add 5 Priorities'); -$RENDERER->submit('Save'); -$RENDERER->end(); -$ExtensionDetailsForm->close($RENDERER); -require SHOUT_TEMPLATES . '/table-limiter-end.inc'; \ No newline at end of file diff --git a/shout/moh.php b/shout/moh.php deleted file mode 100644 index 3c89ebd82..000000000 --- a/shout/moh.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * See the enclosed file COPYING for license information (GPL). If you - * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. - * - * @package shout - */ -if (!isset($SHOUT_RUNNING) || !$SHOUT_RUNNING) { - header('Location: /'); - exit(); -} - -$title = _('Music on Hold'); - -require SHOUT_TEMPLATES . '/common-header.inc'; -require SHOUT_TEMPLATES . '/menu.inc'; - -$notification->notify(); - -$tabs->render($section); - -require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file diff --git a/shout/security.php b/shout/security.php deleted file mode 100644 index 11f312697..000000000 --- a/shout/security.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * See the enclosed file COPYING for license information (GPL). If you - * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. - * - * @package shout - */ - -if (!isset($SHOUT_RUNNING) || !$SHOUT_RUNNING) { - header('Location: /'); - exit(); -} - -$title = _('Security'); - -require SHOUT_TEMPLATES . '/common-header.inc'; -require SHOUT_TEMPLATES . '/menu.inc'; - -$notification->notify(); - -$tabs->render($section); - -Shout::getApplist(); - -require $registry->get('templates', 'horde') . '/common-footer.inc'; \ No newline at end of file diff --git a/shout/templates/content_page b/shout/templates/content_page deleted file mode 100644 index 66fd553b8..000000000 --- a/shout/templates/content_page +++ /dev/null @@ -1,8 +0,0 @@ - -
Context:
- - -
-renderTree(true); ?> -
-Back to Top -
diff --git a/shout/templates/dialplan/dialplanlist.inc b/shout/templates/dialplan/dialplanlist.inc deleted file mode 100644 index 7ede9d86a..000000000 --- a/shout/templates/dialplan/dialplanlist.inc +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/shout/templates/dialplan/extensiondetail.inc b/shout/templates/dialplan/extensiondetail.inc deleted file mode 100644 index a7ba902c4..000000000 --- a/shout/templates/dialplan/extensiondetail.inc +++ /dev/null @@ -1,56 +0,0 @@ - // --> - - -
Context:
 
- - 0)) { - foreach ($dialplan['extensions'] as $extension => $priorities) { - $extname = Shout::exten2name($extension); - ?> - - - - - - - - $application) { - $rowcolor = $line % 2; - $line++; - ?> - - - - - - - -
-  edit -
PriorityApplication
 
-
- $data) { - ?> - - - - - - - -
" - name=""> - + - - - " - name="" - onclick="javascript:dp.activatePriority('', '')"> - - - - " - name=""> - - - - " - name=""> - - - -
\ No newline at end of file diff --git a/shout/templates/dialplan/manager.inc b/shout/templates/dialplan/manager.inc deleted file mode 100644 index 6cf4e6cb7..000000000 --- a/shout/templates/dialplan/manager.inc +++ /dev/null @@ -1,14 +0,0 @@ -
-
Context:
-
- -renderNavTree(); -$dpgui->generateAppList(); -$dpgui->renderExtensions(); -?> - \ No newline at end of file diff --git a/shout/templates/dialplan/priority-form-begin.inc b/shout/templates/dialplan/priority-form-begin.inc deleted file mode 100644 index 3efb74320..000000000 --- a/shout/templates/dialplan/priority-form-begin.inc +++ /dev/null @@ -1,7 +0,0 @@ -
- - - - \ No newline at end of file diff --git a/shout/templates/dialplan/priority-form-end.inc b/shout/templates/dialplan/priority-form-end.inc deleted file mode 100644 index 55d12e0f5..000000000 --- a/shout/templates/dialplan/priority-form-end.inc +++ /dev/null @@ -1,2 +0,0 @@ -
- Priorities -
-
\ No newline at end of file diff --git a/shout/templates/dialplan/priority-form-line.inc b/shout/templates/dialplan/priority-form-line.inc deleted file mode 100644 index 123df5af2..000000000 --- a/shout/templates/dialplan/priority-form-line.inc +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - \ No newline at end of file -- 2.11.0