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'=>'

Successfully rebuilt the ' . $match[1] . ' theme.

' . + '

Go back to themes.

', + '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') . '' . (isset($themes_in_use[$_theme]) ? - '
  • Uninstall
  • ' + '
  • Rebuild
  • ' . + '
  • Uninstall
  • ' : '') . '' .