Shout: prune a lot of dead code
authorBen Klang <ben@alkaloid.net>
Sat, 2 Jan 2010 22:05:30 +0000 (17:05 -0500)
committerBen Klang <ben@alkaloid.net>
Sat, 2 Jan 2010 22:05:30 +0000 (17:05 -0500)
12 files changed:
shout/dialplan.php [deleted file]
shout/dialplan/edit.php [deleted file]
shout/moh.php [deleted file]
shout/security.php [deleted file]
shout/templates/content_page [deleted file]
shout/templates/dialplan/contexttree.inc [deleted file]
shout/templates/dialplan/dialplanlist.inc [deleted file]
shout/templates/dialplan/extensiondetail.inc [deleted file]
shout/templates/dialplan/manager.inc [deleted file]
shout/templates/dialplan/priority-form-begin.inc [deleted file]
shout/templates/dialplan/priority-form-end.inc [deleted file]
shout/templates/dialplan/priority-form-line.inc [deleted file]

diff --git a/shout/dialplan.php b/shout/dialplan.php
deleted file mode 100644 (file)
index 883d2c1..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- * $Id$
- *
- * Copyright 2005-2006 Ben Klang <ben@alkaloid.net>
- *
- * 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 (file)
index 18ef2b4..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
- * $Id$
- *
- * Copyright 2005 Ben Klang <ben@alkaloid.net>
- *
- * 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 (file)
index 3c89ebd..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * $Id$
- *
- * Copyright 2005-2006 Ben Klang <ben@alkaloid.net>
- *
- * 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 (file)
index 11f3126..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * $Id$
- *
- * Copyright 2005-2006 Ben Klang <ben@alkaloid.net>
- *
- * 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 (file)
index 66fd553..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-if (!defined(SHOUT_BASE)) {
-    define(SHOUT_BASE, dirname($_SELF['PHP_SELF']));
-}
-
-require_once SHOUT_BASE."/lib/defines.php";
-require_once SHOUT_BASE."/lib/base.php";
\ No newline at end of file
diff --git a/shout/templates/dialplan/contexttree.inc b/shout/templates/dialplan/contexttree.inc
deleted file mode 100644 (file)
index dafbe7e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<div class="header">
-    <div class="contextHeader">Context: <?php echo $context; ?></div>
-</div>
-
-<div id='contextTree'>
-<?php $tree->renderTree(true); ?>
-<br />
-<a href="#top" class="small">Back to Top</a>
-</div>
diff --git a/shout/templates/dialplan/dialplanlist.inc b/shout/templates/dialplan/dialplanlist.inc
deleted file mode 100644 (file)
index 7ede9d8..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<table width="95%" border="0" cellpadding="0" cellspacing="0" class="item">
-  <tr valign="bottom" class="header">
-   <td colspan="2"><font size="3">Context: <?php echo $context; ?></font></td>
-  </tr>
-  <tr class="body"><td colspan="2">&nbsp;</td></tr>
-  <tr class="body"><td colspan="2" align="center">
-  <table width="95%" border="0" cellpadding="0" cellspacing="0" class="item">
-  <?php
-    $line = 0;
-    if (isset($dialplan['extensions']) &&
-        (count($dialplan['extensions']) > 0)) {
-        foreach ($dialplan['extensions'] as $extension => $priorities) {
-            $extname = Shout::exten2name($extension);
-            ?>
-            <tr class="header">
-              <th colspan="2" class="header">
-                <?php
-                if (isset($extname)) {
-                    echo $extname;
-                } else {
-                    echo "Extension $extension";
-                }
-                $editurl = Horde::applicationUrl("dialplan.php");
-                $editurl = Util::addParameter($editurl, "context=$context");
-                $editurl = Util::addParameter($editurl, "action=edit");
-                $editurl = Util::addParameter($editurl, "section=dialplan");
-                $editurl = Util::addParameter($editurl, "extension=$extension");
-                ?>&nbsp;<a class="lighthint" href="<?php
-                    echo $editurl;
-                ?>">edit</a>
-              </th>
-            </tr>
-            <tr class="smallheader">
-              <th align="left">Priority</th>
-              <th align="left">Application</th>
-            </tr>
-            <?php
-            foreach ($priorities as $priority => $application) {
-                $rowcolor = $line % 2;
-                $line++;
-                ?>
-                <tr class="item<?php echo $rowcolor; ?>">
-                    <td align="center"><?php echo $priority; ?></td>
-                    <td align="left"><?php echo $application; ?></td>
-                </tr>
-                <?php
-            }
-            ?>
-            <tr class="body"><td colspan="2">&nbsp;</td></tr>
-            <?php
-        }
-    }
-  ?>
-  </table>
-  </td></tr>
-</>
\ No newline at end of file
diff --git a/shout/templates/dialplan/extensiondetail.inc b/shout/templates/dialplan/extensiondetail.inc
deleted file mode 100644 (file)
index a7ba902..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-    // -->
-    </script>
-    <?php
-}
-?>
-<table class="pList" cellspacing="0">
-                    <?php
-                    $p = 0;
-                    foreach($priorities as $priority => $data) {
-                        ?>
-                        <tr class="priority">
-                            <td class="pButtons"
-                                id="<?php echo "pButtons-$extension-$priority"; ?>"
-                                name="<?php echo "pButtons-$extension-$priority"; ?>">
-                                <span class="add"
-                                    onclick="javascript:dp.addPrio('<?php
-                                        echo $extension; ?>', '<?php echo $priority; ?>');">+</span>
-                                <span class="remove"
-                                    onclick="javascript:dp.delPrio('<?php
-                                        echo $extension; ?>', '<?php echo $priority; ?>');">-</span>
-                            </td>
-                            <td class="pElement"
-                                id="<?php echo "pNumber-$extension-$priority"; ?>"
-                                name="<?php echo "pNumber-$extension-$priority"; ?>"
-                                onclick="javascript:dp.activatePriority('<?php
-                                    echo $extension; ?>', '<?php
-                                    echo $priority; ?>')">
-                                <span class="priorityBox">
-                                    <?php echo $priority; ?>
-                                </span>
-                            </td>
-                            <td class="pElement"
-                                id="<?php echo "pApp-$extension-$priority"; ?>"
-                                name="<?php echo "pApp-$extension-$priority"; ?>">
-                                <span class="applicationBox">
-                                    <select
-                                        name="app[<?php echo $extension; ?>][<?php echo $priority; ?>]"
-                                        id="app[<?php echo $extension; ?>][<?php echo $priority; ?>]">
-                                        <option value="<?php echo $data['application']; ?>">
-                                            <?php echo $data['application']; ?></option>
-                                    </select>
-                                </span>
-                            </td>
-                            <td class="pElement"
-                                id="<?php echo "pArgs-$extension-$priority"; ?>"
-                                name="<?php echo "pArgs-$extension-$priority"; ?>">
-                                <span class="argBox">
-                                    <?php echo $data['args']; ?>
-                                </span>
-                            </td>
-                        </tr>
-                        <?php
-                        $p++;
-                    }
-                    ?>
-                </table>
\ No newline at end of file
diff --git a/shout/templates/dialplan/manager.inc b/shout/templates/dialplan/manager.inc
deleted file mode 100644 (file)
index 6cf4e6c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<div class="header">
-    <div class="contextHeader">Context: <?php echo $context; ?></div>
-</div>
-
-<?php
-$dpgui->renderNavTree();
-$dpgui->generateAppList();
-$dpgui->renderExtensions();
-?>
-<script language="javascript" type="text/javascript">
-<!--
-// shout_dialplan_object_x.drawInitial();
-//-->
-</script>
\ 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 (file)
index 3efb743..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<div id="_section___priority<?php echo $i; ?>" style="display:block;">
-    <table class="item" cellspacing="0">
-        <tr valign="top">
-            <td colspan="2" align="center" class="smallheader">
-                Priorities
-            </td>
-        </tr>
\ 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 (file)
index 55d12e0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-    </table>
-</div>
\ 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 (file)
index 123df5a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<tr valign="top">
-    <td width="15%" align="right" class="item<?php echo $i % 2; ?>">
-        <input type="text"
-            name="priority[<?php echo $i; ?>]" value="<?php echo $priority; ?>"
-            size="3" id="priority[<?php echo $i; ?>]" /></td>
-    <td class="item<?php echo $i % 2; ?>">
-        <input type="text" name="application[<?php echo $i; ?>]"
-            size="40" value="<?php echo $application; ?>"
-            id="application[<?php echo $i; ?>]" />
-    </td>
-</tr>
\ No newline at end of file