From 19fa6bb4be51a443d9252b16b8cad7125bc2cb1b Mon Sep 17 00:00:00 2001 From: jengo Date: Fri, 18 Aug 2000 21:52:23 +0000 Subject: [PATCH] Made themes more dynamic --- calendar/inc/functions.inc.php | 3 +-- preferences/changetheme.php | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/calendar/inc/functions.inc.php b/calendar/inc/functions.inc.php index f4d809b486..9540fe5302 100755 --- a/calendar/inc/functions.inc.php +++ b/calendar/inc/functions.inc.php @@ -105,8 +105,7 @@ { global $phpgw, $phpgw_info, $friendly; if (! $friendly) - echo "link($phpgw_info["server"]["app_root"] - ."/view.php","id=$id")."\">link("view.php","id=$id")."\">\"".htmlentities($description)."\""; } diff --git a/preferences/changetheme.php b/preferences/changetheme.php index a4b824196d..7cbf0709e8 100755 --- a/preferences/changetheme.php +++ b/preferences/changetheme.php @@ -16,7 +16,13 @@ $phpgw_flags["currentapp"] = "preferences"; include("../header.inc.php"); - $installed_themes = array('default','blue','mojo','heaven','yellows', 'rose'); + + $dh = opendir($phpgw_info["server"]["server_root"] . "/themes"); + while ($file = readdir($dh)) { + if ($file != "." && $file != ".." && $file != "CVS") { + $installed_themes[] = substr($file,0,strpos($file,".")); + } + } if ($phpgw_info["user"]["permissions"]["anonymous"]) { Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/"));