summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-10-08 17:59:50 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-10-08 17:59:50 +1100
commitd1f8d5f5e8dbff5bc87a99e5c90407e3ae7c18ea (patch)
tree00e8296dd55dc8ad49f99ded404618b90de9f691 /mod.php
parent3520a10f0df5b3dd094d5f68d3ff5305b32d92aa (diff)
"rebuild theme" in theme management
Diffstat (limited to 'mod.php')
-rw-r--r--mod.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/mod.php b/mod.php
index 6d8450c5..ce554192 100644
--- a/mod.php
+++ b/mod.php
@@ -320,6 +320,19 @@
'mod'=>true
)
);
+ } elseif(preg_match('/^\/themes\/(\w+)\/rebuild$/', $query, $match)) {
+ if(!hasPermission($config['mod']['themes'])) error($config['error']['noaccess']);
+
+ rebuildTheme($match[1], 'all');
+
+ echo Element('page.html', Array(
+ 'config'=>$config,
+ 'title'=>'Rebuilt',
+ 'body'=>'<p style="text-align:center">Successfully rebuilt the <strong>' . $match[1] . '</strong> theme.</p>' .
+ '<p style="text-align:center"><a href="?/themes">Go back to themes</a>.</p>',
+ 'mod'=>true
+ )
+ );
} elseif(preg_match('/^\/themes\/(\w+)\/uninstall$/', $query, $match)) {
if(!hasPermission($config['mod']['themes'])) error($config['error']['noaccess']);
@@ -496,7 +509,8 @@
(isset($themes_in_use[$_theme]) ? 'Reconfigure' : 'Install') .
'</a></li>' .
(isset($themes_in_use[$_theme]) ?
- '<li><a title="Use theme" href="?/themes/' . $_theme . '/uninstall">Uninstall</a></li>'
+ '<li><a title="Rebuild" href="?/themes/' . $_theme . '/rebuild">Rebuild</a></li>' .
+ '<li><a title="Use theme" href="?/themes/' . $_theme . '/uninstall">Uninstall</a></li>'
:
'') .
'</ul></td>' .