From 014aa6ca67eaa45aa09f7732e6a4320634517a98 Mon Sep 17 00:00:00 2001 From: Pim Snel Date: Wed, 29 Jun 2005 21:06:52 +0000 Subject: [PATCH] only show template set that contain a setup.inc.php --- phpgwapi/inc/class.common.inc.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 186d0eeb48..d4bb61d340 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -746,16 +746,15 @@ $d = dir(EGW_SERVER_ROOT . '/phpgwapi/templates'); while ($entry=$d->read()) { - if ($entry != 'CVS' && $entry != '.' && $entry != '..' - && $entry != 'phpgw_website' - && is_dir(EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry)) + if ($entry != '..' && is_file(EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry .'/setup/setup.inc.php') + ) { $list[$entry]['name'] = $entry; - $f = EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/details.inc.php'; + $f = EGW_SERVER_ROOT . '/phpgwapi/templates/' . $entry . '/setup/setup.inc.php'; if (file_exists ($f)) { include($f); - $list[$entry]['title'] = 'Use '.$GLOBALS['egw_info']['template'][$entry]['title'].'interface'; + $list[$entry]['title'] = $GLOBALS['egw_info']['template'][$entry]['title']; } else { @@ -763,6 +762,9 @@ } } } + //_debug_array($GLOBALS['egw_info'][template]); + //die(); + $d->close(); ksort($list); return $list;