From: hickert Date: Wed, 30 Jun 2010 15:02:46 +0000 (+0000) Subject: Moved plugin X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8fb82a83d60a230328d4db19e8da610d01f3c436;p=gosa.git Moved plugin git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18892 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/generic/dashBoard/dbAdvices/class_dbAdvices.inc b/gosa-core/plugins/generic/dashBoard/dbAdvices/class_dbAdvices.inc deleted file mode 100644 index a34c1b77c..000000000 --- a/gosa-core/plugins/generic/dashBoard/dbAdvices/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/dbAdvices/contents.tpl b/gosa-core/plugins/generic/dashBoard/dbAdvices/contents.tpl deleted file mode 100644 index 72926473d..000000000 --- a/gosa-core/plugins/generic/dashBoard/dbAdvices/contents.tpl +++ /dev/null @@ -1 +0,0 @@ -{$adviceList} diff --git a/gosa-core/plugins/generic/dashBoard/dbNotifications/class_dbAdvices.inc b/gosa-core/plugins/generic/dashBoard/dbNotifications/class_dbAdvices.inc new file mode 100644 index 000000000..a34c1b77c --- /dev/null +++ b/gosa-core/plugins/generic/dashBoard/dbNotifications/class_dbAdvices.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(); + } +} + +?> diff --git a/gosa-core/plugins/generic/dashBoard/dbNotifications/contents.tpl b/gosa-core/plugins/generic/dashBoard/dbNotifications/contents.tpl new file mode 100644 index 000000000..72926473d --- /dev/null +++ b/gosa-core/plugins/generic/dashBoard/dbNotifications/contents.tpl @@ -0,0 +1 @@ +{$adviceList}