From: Ben Klang Date: Fri, 8 Jan 2010 15:54:37 +0000 (-0500) Subject: Hylax: Fix warnings X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7d6759f9bcf3686542ed8e348564abd66c74d730;p=horde.git Hylax: Fix warnings * Get rid of getInbox() in favor of a public getFolder() * Return an empty array if we can return a real list (SpanDSP for now...) --- diff --git a/hylax/folder.php b/hylax/folder.php index c0e6adbbe..d41da1983 100644 --- a/hylax/folder.php +++ b/hylax/folder.php @@ -15,7 +15,7 @@ $path = Horde_Util::getFormData('path'); $base_folders = Hylax::getBaseFolders(); /* Get the list of faxes in folder. */ -$folder_list = $hylax_storage->listFaxes($folder); +$folder_list = $hylax->storage->listFaxes($folder); /* Set up URLs which will be used in the list. */ $view_url = Horde::applicationUrl('view.php'); diff --git a/hylax/lib/Driver/hylafax.php b/hylax/lib/Driver/hylafax.php index 8cedc8118..5c3091837 100644 --- a/hylax/lib/Driver/hylafax.php +++ b/hylax/lib/Driver/hylafax.php @@ -20,7 +20,7 @@ class Hylax_Driver_hylafax extends Hylax_Driver { public function __construct($params) { - parent::Hylax_Driver($params); + parent::__construct($params); $this->_states = Hylax::getStates(); $this->_stat_cols = Hylax::getStatCols(); @@ -71,12 +71,7 @@ class Hylax_Driver_hylafax extends Hylax_Driver { //return count($outbox); } - public function getInbox() - { - return $this->_getFolder('inbox'); - } - - public function _getFolder($folder, $path = null) + public function getFolder($folder, $path = null) { switch ($folder) { case 'inbox': diff --git a/hylax/lib/Driver/spandsp.php b/hylax/lib/Driver/spandsp.php index 2c7478069..37e72c797 100644 --- a/hylax/lib/Driver/spandsp.php +++ b/hylax/lib/Driver/spandsp.php @@ -20,7 +20,7 @@ class Hylax_Driver_spandsp extends Hylax_Driver { public function __construct($params) { - parent::Hylax_Driver($params); + parent::__construct($params); $this->_states = Hylax::getStates(); $this->_stat_cols = Hylax::getStatCols(); @@ -71,28 +71,27 @@ class Hylax_Driver_spandsp extends Hylax_Driver { //return count($outbox); } - public function getInbox() - { - // return $this->_getFolder('inbox'); - } - - protected function _getFolder($folder, $path = null) + public function getFolder($folder, $path = null) { + // FIXME: This method is intended to return an array of items in the + // specified folder. + // Need to figure out how to make this work with SpanDSP. switch ($folder) { case 'inbox': - // return $this->_parseFaxStat($this->_exec('faxstat -r')); + return array(); break; case 'outbox': - // return $this->_parseFaxStat($this->_exec('faxstat -s')); + return array(); break; case 'sent': - // return $this->_parseFaxStat($this->_exec('faxstat -d')); + return array(); break; case 'archive': //return $GLOBALS['storage']->getFolder($path); + return array(); break; } } diff --git a/hylax/summary.php b/hylax/summary.php index 5c7f6e4c7..aa8586823 100644 --- a/hylax/summary.php +++ b/hylax/summary.php @@ -12,13 +12,13 @@ require_once dirname(__FILE__) . '/lib/Application.php'; $hylax = new Hylax_Application(array('init' => true)); $fmt_inbox = array(); -$inbox = $hylax->gateway->getInbox(); +$inbox = $hylax->gateway->getFolder('inbox'); foreach ($inbox as $item) { $fmt_inbox[] = array('owner' => $item[2]); } $fmt_outbox = array(); -//$outbox = $fax->getOutbox(); +$outbox = $hylax->gateway->getFolder('outbox'); foreach ($outbox as $item) { $fmt_outbox[] = array(//'time' => $item 'owner' => $item[2],