mirror of
https://github.com/jimeh/dlist.git
synced 2026-02-18 23:46:39 +00:00
- 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:
@@ -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)) ;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user