summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/modules/news.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/modules/news.php b/utils/modules/news.php
index b59b7fd..5fd6ded 100644
--- a/utils/modules/news.php
+++ b/utils/modules/news.php
@@ -166,12 +166,12 @@ class News {
public function admin_edit($action, $vars)
{
- global $UID, $ICONS_DIR;
+ global $ICONS_DIR;
switch($action) {
case "add":
$this->news[$vars["newsid"]]->title = $vars["title"];
- $this->news[$vars["newsid"]]->userid = $UID;
+ $this->news[$vars["newsid"]]->userid = $vars["userid"];//$UID;
$this->news[$vars["newsid"]]->time = DateTimeEdit::toTimestamp($vars, "time");
$this->news[$vars["newsid"]]->category = $vars["category"];
$this->news[$vars["newsid"]]->description = $vars["description"];
@@ -182,7 +182,8 @@ class News {
case "preview":
$n = new NewsEntry($vars["title"], DatetimeEdit::toTimestamp($vars, "time"),
- $vars["category"], $vars["description"], $UID, $vars["icon"]);
+ $vars["category"], $vars["description"],
+ $vars["userid"]/*$UID*/, $vars["icon"]);
echo "<div class=\"preview\">\n";
echo "<div class=\"content\">\n";
echo $n->show($this->newspage);
@@ -212,6 +213,8 @@ class News {
else $description = $this->news[$vars["newsid"]]->description;
if(isset($vars["icon"])) $icon = $vars["icon"];
else $icon = $this->news[$vars["newsid"]]->icon;
+ // if(isset($vars["userid"])) $userid = $vars["userid"];
+ $vars["userid"] = $this->news[$vars["newsid"]]->userid;
$form = new Form("preview");
$form->addWidget(new Hidden($vars));