diff --git a/phpgwapi/inc/phpgw_common.inc.php b/phpgwapi/inc/phpgw_common.inc.php index 565f13b5c6..f6cc26d6a1 100644 --- a/phpgwapi/inc/phpgw_common.inc.php +++ b/phpgwapi/inc/phpgw_common.inc.php @@ -331,6 +331,26 @@ } } + function list_templates(){ + global $phpgw_info; + $d = dir($phpgw_info["server"]["server_root"]."/phpgwapi/templates"); + while($entry=$d->read()) { + if ($entry != "CVS" && $entry != "." && $entry != ".."){ + $list[$entry]["name"] = $entry; + $f = $phpgw_info["server"]["server_root"]."/phpgwapi/templates/".$entry."/details.inc.php"; + if (file_exists ($f)){ + include($f); + $list[$entry]["title"] = "Use ".$phpgw_info["template"][$entry]["title"]."interface"; + }else{ + $list[$entry]["title"] = $entry; + } + } + } + $d->close(); + reset ($list); + return $list; + } + function get_tpl_dir($appname = ""){ global $phpgw_info; if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];} diff --git a/preferences/settings.php b/preferences/settings.php index 2de90aba65..8e6f297a4e 100755 --- a/preferences/settings.php +++ b/preferences/settings.php @@ -33,6 +33,21 @@ echo $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]; ?>" size="2"> + +