summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod.php')
-rw-r--r--mod.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/mod.php b/mod.php
index f6ed73d2..ef77e6ea 100644
--- a/mod.php
+++ b/mod.php
@@ -458,6 +458,8 @@
$query->bindValue(':id', $match[1], PDO::PARAM_INT);
$query->execute() or error(db_error($query));
+ rebuildTheme();
+
header('Location: ?/news', true, $config['redirect_http']);
} elseif(preg_match('/^\/news$/', $query)) {
$body = '';
@@ -478,13 +480,15 @@
markup($_POST['body']);
$query->bindValue(':body', $_POST['body']);
$query->execute() or error(db_error($query));
+
+ rebuildTheme();
}
$body .= '<fieldset><legend>New post</legend><form style="display:inline" action="" method="post"><table>' .
'<tr>' .
- '<th><label for="subject">Name</label></th>' .
+ '<th>Name</th>' .
($mod['type'] >= $config['mod']['news_custom'] ?
- '<td><input type="text" size="55" name="subject" id="subject" value="' . htmlentities($mod['username']) . '" /></td>'
+ '<td><input type="text" size="55" name="name" id="name" value="' . htmlentities($mod['username']) . '" /></td>'
:
'<td>' . $mod['username'] . '</td>') .
'</tr><tr>' .
@@ -1336,6 +1340,9 @@
$body = '<div class="ban"><h2>Rebuilding…</h2><p>';
+ $body .= 'Regenerating theme files…<br/>';
+ rebuildTheme();
+
$body .= 'Generating Javascript file…<br/>';
buildJavascript();