diff options
author | Dries Buytaert <dries@buytaert.net> | 2000-10-04 10:25:08 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2000-10-04 10:25:08 +0000 |
commit | 9a5e960638f32b977bfeaf2dcc430c7274f71f83 (patch) | |
tree | 4377bdb9cf42aa1a20a0abf61d7bce64c8f185d5 /function.inc | |
parent | e7019c257742aeeac1665682786131fb59733a4b (diff) | |
download | brdo-9a5e960638f32b977bfeaf2dcc430c7274f71f83.tar.gz brdo-9a5e960638f32b977bfeaf2dcc430c7274f71f83.tar.bz2 |
* Reorganised a few things and fixed the theme-update bug reported by UCD.
Diffstat (limited to 'function.inc')
-rw-r--r-- | function.inc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/function.inc b/function.inc index 2c69e4fb9..a3fb0111a 100644 --- a/function.inc +++ b/function.inc @@ -1,6 +1,5 @@ <? -include "config.inc"; include "database.inc"; include "log.inc"; @@ -21,6 +20,19 @@ function dbsave($dbase, $data, $id=0) { else { db_query("INSERT INTO $dbase SET $query") or die(mysql_error()); return mysql_insert_id(); } } +function load_theme() { + global $user, $themes; + + if ($user->theme && file_exists($themes[$user->theme][0])) { + include $themes[$user->theme][0]; + } + else { + include $themes[key($themes)][0]; + } + + return new Theme(); +} + function check_input($message) { return str_replace("\"", """, stripslashes($message)); } |