From: hickert Date: Wed, 30 Jun 2010 15:03:11 +0000 (+0000) Subject: Renamed class X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a8f49cd216f3c184767be1e25443177df959f688;p=gosa.git Renamed class git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18893 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/generic/dashBoard/dbNotifications/class_dbAdvices.inc b/gosa-core/plugins/generic/dashBoard/dbNotifications/class_dbAdvices.inc deleted file mode 100644 index a34c1b77c..000000000 --- a/gosa-core/plugins/generic/dashBoard/dbNotifications/class_dbAdvices.inc +++ /dev/null @@ -1,50 +0,0 @@ -adviceList = new sortableListing(); - $this->adviceList->setDeleteable(false); - $this->adviceList->setEditable(false); - $this->adviceList->setWidth("100%"); - $this->adviceList->setHeight("200px"); - $this->adviceList->setAcl("rwcdm"); - } - - function execute() - { - // Get logs as RSS feed. - $rsyslog = new rsyslog($this->config); - $source = $rsyslog->logToRss(); - - // Read Feeds and sort the results - $feeds = rssReader::parseFeedFromSource(array($source)); - $feeds = rssReader::sortFeedResultBy($feeds, 'timestamp'); - - // Append the results to the list. - $data = $lData = array(); - foreach($feeds as $key => $feed){ - $data[$key] = $feed; - $lData[$key] = array('data'=> array(htmlentities($feed['title'],ENT_QUOTES,'UTF-8'))); - } - $this->adviceList->setListData($data, $lData); - $this->adviceList->update(); - - // Generate the HTML content - $smarty = get_smarty(); - $smarty->assign('adviceList', $this->adviceList->render()); - return($smarty->fetch(get_template_path('dbNotifications/contents.tpl', TRUE))); - } - - function save_object() - { - parent::save_object(); - $this->adviceList->save_object(); - } -} - -?> diff --git a/gosa-core/plugins/generic/dashBoard/dbNotifications/class_dbNotifications.inc b/gosa-core/plugins/generic/dashBoard/dbNotifications/class_dbNotifications.inc new file mode 100644 index 000000000..a34c1b77c --- /dev/null +++ b/gosa-core/plugins/generic/dashBoard/dbNotifications/class_dbNotifications.inc @@ -0,0 +1,50 @@ +adviceList = new sortableListing(); + $this->adviceList->setDeleteable(false); + $this->adviceList->setEditable(false); + $this->adviceList->setWidth("100%"); + $this->adviceList->setHeight("200px"); + $this->adviceList->setAcl("rwcdm"); + } + + function execute() + { + // Get logs as RSS feed. + $rsyslog = new rsyslog($this->config); + $source = $rsyslog->logToRss(); + + // Read Feeds and sort the results + $feeds = rssReader::parseFeedFromSource(array($source)); + $feeds = rssReader::sortFeedResultBy($feeds, 'timestamp'); + + // Append the results to the list. + $data = $lData = array(); + foreach($feeds as $key => $feed){ + $data[$key] = $feed; + $lData[$key] = array('data'=> array(htmlentities($feed['title'],ENT_QUOTES,'UTF-8'))); + } + $this->adviceList->setListData($data, $lData); + $this->adviceList->update(); + + // Generate the HTML content + $smarty = get_smarty(); + $smarty->assign('adviceList', $this->adviceList->render()); + return($smarty->fetch(get_template_path('dbNotifications/contents.tpl', TRUE))); + } + + function save_object() + { + parent::save_object(); + $this->adviceList->save_object(); + } +} + +?>