diff --git a/lib/dashboard/DashboardNews.inc b/lib/dashboard/DashboardNews.inc index d9a21e7..4162de4 100644 --- a/lib/dashboard/DashboardNews.inc +++ b/lib/dashboard/DashboardNews.inc @@ -312,10 +312,10 @@ class DashboardNews { //set the current news item primary key $this->iId = $sql->insert_id(); - if ($this->bActive) { - // we're setting this entry to active, so set all the others to inactive - $sql->query("UPDATE $default->news_table SET active=0 WHERE id <> $this->iId"); - } +// if ($this->bActive) { +// // we're setting this entry to active, so set all the others to inactive +// $sql->query("UPDATE $default->news_table SET active=0 WHERE id <> $this->iId"); +// } return true; } @@ -345,14 +345,12 @@ class DashboardNews { $result = $sql->query($sQuery); if ($result) { if ($this->bActive) { - // we're setting this entry to active, so set all the others to inactive - $sql->query("UPDATE $default->news_table SET active=0"); // now set our entry to active $sql->query("UPDATE $default->news_table SET active=1 where id=$this->iId"); - } else { - // set this to inactive - $sql->query("UPDATE $default->news_table SET active=0 where id=$this->iId"); - } + } else { + // set this to inactive + $sql->query("UPDATE $default->news_table SET active=0 where id=$this->iId"); + } return true; } return false; @@ -477,4 +475,4 @@ class DashboardNews { return ""; } } -} \ No newline at end of file +} diff --git a/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc b/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc index aa1086b..a845e50 100644 --- a/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc @@ -228,23 +228,36 @@ function renderDashboardNews() { // retrieve all news items $aDashboardNews = DashboardNews::getList("active=1"); + if ($default->ScrollingNews) { + + $sToRender .= ""; + + } else { + + $sToRender .= "\t\t\t
| " . $oMainDashboardNews->getSynopsis() . " |
| " . $oMainDashboardNews->getImageLink() . " |
| " . $oMainDashboardNews->getBodyFragment() . "..... getID()) . "', 'newwindow', config='height=200,width=300,left=0,top=0, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, directories=no, status=no');return false;\">more |