From ce63c60bb55a084474224226e37112091bf1d98c Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Sat, 2 Jan 2010 17:13:56 -0500 Subject: [PATCH] Shout: Remove last of the dead code (hopefully) --- shout/lib/Dialplan.php | 227 ------------------------------------------------- shout/lib/version.php | 1 - 2 files changed, 228 deletions(-) delete mode 100644 shout/lib/Dialplan.php delete mode 100644 shout/lib/version.php diff --git a/shout/lib/Dialplan.php b/shout/lib/Dialplan.php deleted file mode 100644 index 0549b3294..000000000 --- a/shout/lib/Dialplan.php +++ /dev/null @@ -1,227 +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. - * - * @package Shout - */ -// {{{ -/** - * The Shout_Dialplan:: class provides an interactive view of an Asterisk dialplan. - * It allows for expanding/collapsing of extensions and priorities and maintains their state. - * It can work together with the Horde_Tree javascript class to achieve this in - * DHTML on supported browsers. - * - * Copyright 2005 Ben Klang - * - * See the enclosed file COPYING for license information (LGPL). If you - * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. - * - * $Id$ - * - * @author Ben Klang - * @package Shout_Dialplan - * @since Shout 0.1 - */ -class Shout_Dialplan -{ - /** - * The name of this instance. - * - * @var string - */ - var $_instance = null; - - /** - * The array of dialplan information to render the form - * - * @var array - */ - var $_dialplan = array(); - - /** - * Object containing the instantiation of the Horde_Tree class - * - * @var object - */ - var $_tree = null; - - /** - * Create or return a unique instance of the Shout_Dialplan object - * - * @param string $instance Unique identifier for this instance - * @param array $dialplan Dialplan array as returned by the driver - * @return object Instantiation of the Shout_Dialplan object - */ - function &singleton($instance, $dialplan) - { - static $instances = array(); - - if (isset($instances[$instance])) { - return $instances[$instance]; - } - $instances[$instance] = new Shout_Dialplan($instance, $dialplan); - return $instances[$instance]; - } - - /** - * Instantiator for the Shout_Dialplan - * - * @param string $instance Unique identifier for this instance - * @param array $dialplan Dialplan array as returned by the driver - * @return Shout_Dialplan Instantiation of the Shout_Dialplan object - */ - function Shout_Dialplan($instance, $dialplan) - { - require_once 'Horde/Tree.php'; - require_once 'Horde/Block.php'; - require_once 'Horde/Block/Collection.php'; - - $this->_instance = $instance; - $this->_dialplan = $dialplan; - $this->_tree = Horde_Tree::singleton('shout_dialplan_nav_'.$instance, 'javascript'); - - foreach ($this->_dialplan as $linetype => $linedata) { - switch($linetype) { - case 'extensions': - $url = '#top'; - $this->_tree->addNode('extensions', null, 'Extensions', null, array('url' => $url)); - foreach ($linedata as $extension => $priorities) { - $nodetext = Shout::exten2name($extension); - $url = Horde::applicationUrl('index.php?section=dialplan' . - '&extension=' . $extension . '&context=' . $this->_dialplan['name']); - $url = "#$extension"; - $this->_tree->addNode("extension_".$extension, 'extensions', $nodetext, - null, false, - array( - 'url' => $url, - 'onclick' => - 'shout_dialplan_object_'.$this->_instance. - '.highlightExten(\''.$extension.'\')', - ) - ); - // foreach ($priorities as $priority => $application) { - // $this->_tree->addNode("$extension-$priority", $extension, "$priority: $application", null); - // } - } - break; - - case 'includes': - $this->_tree->addNode('includes', null, 'Includes', null); - foreach ($linedata as $include) { - $url = Horde::applicationUrl('index.php?section=dialplan&context='.$include); - $this->_tree->addNode("include_$include", 'includes', $include, null, - true, array('url' => $url)); - } - break; - - # TODO Ignoring ignorepat lines for now - - case 'barelines': - $this->_tree->addNode('barelines', null, 'Extra Settings', null); - $i = 0; - foreach ($linedata as $bareline) { - $this->_tree->addNode("bareline_".$i, 'barelines', $bareline, null); - $i++; - } - break; - } - } - } - - /** - * Render dialplan side navigation tree - */ - function renderNavTree() - { - print '
'."\n"; - $this->_tree->renderTree(true); - print '
'."\n"; - print ' Back to Top'."\n"; - print '
'."\n"; - return true; - } - - function generateAppList() - { - $applist = Shout::getApplist(); - print ''."\n"; - return true; - } - - function renderExtensions() - { - if(!isset($this->_dialplan['extensions'])) { - print '
'."\n"; - print '
No Configured Extensions
'."\n"; - print '
'."\n"; - } else { - print ''."\n"; - print ''."\n"; - - print '
'."\n"; - print '
'."\n"; - $e = 0; - foreach($this->_dialplan['extensions'] as $extension => $priorities) { - print '
'; - print ''."\n"; - print '
'."\n"; - print '
'."\n"; - $e++; - print '
'."\n"; - print '
'."\n"; - print ''."\n"; - } - print '
'."\n"; - print '
'."\n"; - } - } -} \ No newline at end of file diff --git a/shout/lib/version.php b/shout/lib/version.php deleted file mode 100644 index b855f6a05..000000000 --- a/shout/lib/version.php +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file -- 2.11.0