openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit eb5837c13c964f328895e18a8a478f98d292195b
parent a55e74e9306f5a750c9672b59ebd6af4a12444b0
Author: Jan Dankert <devnull@localhost>
Date:   Mon,  6 Nov 2017 22:15:28 +0100

Auch Konfigurationseigenschaften in der 1. Hierachiestufe ermöglichen.

Diffstat:
functions/common.inc.php | 22++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/functions/common.inc.php b/functions/common.inc.php @@ -74,20 +74,26 @@ function readonly() * * @return String, leer falls Schluessel nicht vorhanden */ -function config( $part1,$part2,$part3=null ) +function config( $part1,$part2=null,$part3=null ) { global $conf; - if ( $part3 == null) - if ( isset($conf[$part1][$part2])) - return $conf[$part1][$part2]; + if ( $part2 == null) + if ( isset($conf[$part1])) + return $conf[$part1]; else return ''; + + if ( $part3 == null) + if ( isset($conf[$part1][$part2])) + return $conf[$part1][$part2]; + else + return ''; + + if ( isset($conf[$part1][$part2][$part3])) + return $conf[$part1][$part2][$part3]; else - if ( isset($conf[$part1][$part2][$part3])) - return $conf[$part1][$part2][$part3]; - else - return ''; + return ''; }