summaryrefslogtreecommitdiffstats
path: root/lib/themes.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/themes.php')
-rw-r--r--lib/themes.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/themes.php b/lib/themes.php
index ca4a92c7..dfe49292 100644
--- a/lib/themes.php
+++ b/lib/themes.php
@@ -121,4 +121,21 @@ function get_theme_author($theme_name) {
return $results['author'];
} // get_theme_author
+
+/*!
+ @function theme_exists
+ @discussion this function checks to make sure that a theme actually exists
+*/
+function theme_exists($theme_name) {
+
+ $theme_path = conf('prefix') . "/themes/" . $theme_name . "/theme.cfg.php";
+
+ if (!file_exists($theme_path)) {
+ return false;
+ }
+
+ return true;
+
+} // theme_exists
+
?>