summaryrefslogtreecommitdiff
path: root/utils/modules/news.php
diff options
context:
space:
mode:
authordeva <deva>2010-03-01 13:49:59 +0000
committerdeva <deva>2010-03-01 13:49:59 +0000
commite5a159c01d65ca8112a6d4dcab709f103e6c8ceb (patch)
tree5ad301744e41f508b29bfd586fbd8c7c70f29f75 /utils/modules/news.php
parentc4d41eb35d1a7bee8ba6c3047ba129d2cefd04f9 (diff)
Missing icon upon news-add-retry.
Diffstat (limited to 'utils/modules/news.php')
-rw-r--r--utils/modules/news.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/utils/modules/news.php b/utils/modules/news.php
index 00f1d4c..032c342 100644
--- a/utils/modules/news.php
+++ b/utils/modules/news.php
@@ -56,7 +56,7 @@ class NewsEntry {
fwrite($fp, " userid=\"" . xmlenc($this->userid) . "\"\n");
fwrite($fp, " icon=\"" . xmlenc($this->icon) . "\">");
fwrite($fp, xmlenc($this->description));
- fwrite($fp, " </newsentry>\n");
+ fwrite($fp, "</newsentry>\n");
}
public function __toString()
@@ -129,6 +129,7 @@ class News {
$time = DateTimeEdit::toTimestamp($vars, "time");
$category = $vars["category"];
$description = $vars["description"];
+ $icon = $vars["icon"];
default:
$form = new Form("preview");
$form->addWidget(new LineEdit("Title", "title", $title));
@@ -209,8 +210,10 @@ class News {
default:
$newslist = array();
foreach($this->news as $newsentry) {
- $newslist[$newsentry->title] = $newsentry->time;
+ $newslist[date("Y-m/d h:i:s", $newsentry->time) . ": " .
+ $newsentry->title] = $newsentry->time;
}
+ krsort($newslist);
$form = new Form("edit");
$form->addWidget(new ComboBox("Edit this entry:", "newsid", "", $newslist));
@@ -246,8 +249,11 @@ class News {
default:
$newslist = array();
foreach($this->news as $newsentry) {
- $newslist[$newsentry->title] = $newsentry->time;
+ $newslist[date("Y-m/d h:i:s", $newsentry->time) . ": " .
+ $newsentry->title] = $newsentry->time;
}
+ krsort($newslist);
+
$form = new Form("confirm");
$form->addWidget(new ComboBox("Delete this entry:", "newsid", "", $newslist));
$form->addWidget(new Button("Delete..."));