- made simple template almost feature complete by implementing view modes and more

- other general fixes to things a bit all over the place

git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@12 a5845835-ea0f-0410-a762-dd0bfe9bfde8
This commit is contained in:
jim
2006-04-04 23:15:55 +00:00
parent a8fe6d5a8c
commit 80fd008b9d
20 changed files with 411 additions and 105 deletions

View File

@@ -33,12 +33,13 @@ class config {
// Parse settings from an array
function parse_array ($input, $overwrite=true) {
$pad = '';
if ( is_array($input) ) {
foreach( $input as $key => $value ) {
if ( is_array($value) ) {
if ( !empty($this->_config_pad) ) $key = $this->_config_pad.$key;
foreach( $value as $k => $v ) {
if ( ($empty = empty($this->$key)) || $overwrite ) {
if ( !empty($this->_config_pad) ) $k = $this->_config_pad.$k;
$this->$key = ( $empty ) ? array($k=>$v) : array_merge($this->$key, array($k=>$v)) ;
}
}