diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-14 20:43:34 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-14 20:43:34 +1000 |
| commit | 641f925dfebf2540a6d7e94e23e302c4a30dc58b (patch) | |
| tree | f40d984c1de2fb914f64ee5e209aee2b1aed81d6 /mod.php | |
| parent | 757b09dec938c541dc5c858474b07c47b25248dc (diff) | |
better rebuilding system for themes
Diffstat (limited to 'mod.php')
| -rw-r--r-- | mod.php | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -304,7 +304,15 @@ $query->execute() or error(db_error($query)); // Build theme - $theme['build_function'](themeSettings()); + rebuildTheme('all'); + + echo Element('page.html', Array( + 'config'=>$config, + 'title'=>'Installed "' . htmlentities($theme['name']) . '"', + 'body'=>'<p style="text-align:center">Successfully installed and built theme.</p>', + 'mod'=>true + ) + ); } else { $body = '<form action="" method="post">'; @@ -481,7 +489,7 @@ $query->bindValue(':id', $match[1], PDO::PARAM_INT); $query->execute() or error(db_error($query)); - rebuildTheme(); + rebuildTheme('news'); header('Location: ?/news', true, $config['redirect_http']); } elseif(preg_match('/^\/news$/', $query)) { @@ -504,7 +512,7 @@ $query->bindValue(':body', $_POST['body']); $query->execute() or error(db_error($query)); - rebuildTheme(); + rebuildTheme('news'); } $body .= '<fieldset><legend>New post</legend><form style="display:inline" action="" method="post"><table>' . @@ -1197,6 +1205,8 @@ $query->bindValue(':id', $board['id'], PDO::PARAM_INT); $query->execute() or error(db_error($query)); + rebuildTheme('boards'); + header('Location: ?/', true, $config['redirect_http']); } else { if(isset($_POST['title']) && isset($_POST['subtitle'])) { @@ -1211,6 +1221,8 @@ $query->bindValue(':id', $board['id'], PDO::PARAM_INT); $query->execute() or error(db_error($query)); + rebuildTheme('boards'); + openBoard($board['uri']); } @@ -1364,7 +1376,7 @@ $body = '<div class="ban"><h2>Rebuilding…</h2><p>'; $body .= 'Regenerating theme files…<br/>'; - rebuildTheme(); + rebuildTheme('all'); $body .= 'Generating Javascript file…<br/>'; buildJavascript(); @@ -1510,6 +1522,8 @@ // Build the board buildIndex(); + rebuildTheme('boards'); + header('Location: ?/board/' . $board['uri'], true, $config['redirect_http']); } else { |
