Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Commit

Permalink
bugfix news publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sysix committed Apr 7, 2015
1 parent 7311914 commit e2e9da2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/rex_asd_news_ajaxHandler.php
Expand Up @@ -27,17 +27,18 @@ static public function publishNews($id, $clang, DateTime $time)
$sql->setWhere('`id` = ' . $id);
}

$sql->setValue('publishedAt', $time->format('d.m.Y H:i'));
$sql->setValue('publishedAt', $time->format('Y-m-d H:i'));
$sql->setValue('publishedBy', $REX['USER']->getValue('user_id'));
$sql->setValue('status', 1);

$sql->update();

$sql->setQuery('SELECT * FROM `' . rex_asd_news_config::getTable() . '` WHERE `id` = ' . $id . ' AND `clang` = ' . $clang);

return '
<td>' . $id . '</td>
<td>' . $sql->getValue('title') . '</td>
<td><span>' . $time->format('Y-m-d H:i') . '</span></td>
<td><span>' . $time->format('d.m.Y H:i') . '</span></td>
<td><a href="' . self::getBaseUrl($clang) . 'unpublish&amp;id=' . $id . '" class="rex-offline" onclick="return confirm(\'' . $I18N->msg('asd_news_really_unpublish') . '\');">' . $I18N->msg('asd_news_unpublish') . '</a></td>
<td><a href="' . self::getBaseUrl($clang) . 'edit&amp;id=' . $id . '">' . $I18N->msg('edit') . '</a></td>
<td><a href="' . self::getBaseUrl($clang) . 'delete&amp;id=' . $id . '" onclick="return confirm(\'' . $I18N->msg('asd_news_really_delete') . '\');">' . $I18N->msg('delete') . '</a></td>
Expand Down

0 comments on commit e2e9da2

Please sign in to comment.