Skip to content

Commit

Permalink
update article date when (re)publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
obfuscurity committed Nov 8, 2009
1 parent ade6eac commit 4478cdb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions admin.cgi
Expand Up @@ -67,6 +67,11 @@ sub manage_articles {
my $sth = $dbh->prepare($stmt);
$sth->execute($status, $article_id) || die $dbh->errstr;
}
if ($status == 1) {
my $stmt = "UPDATE articles SET date = datetime('now') WHERE id=?";
my $sth = $dbh->prepare($stmt);
$sth->execute($article_id) || die $dbh->errstr;
}

if (@{get_comments()} > 0) {
$template->param( comments_to_moderate => 1);
Expand Down

0 comments on commit 4478cdb

Please sign in to comment.