commit d9c345e8e835d3af0390ea7b8c4568a48a44d3a8
parent 86478423ca0d7c22d7546b52eb9f55f72b0bfc00
Author: Jan Dankert <devnull@localhost>
Date: Mon, 19 Mar 2012 23:47:38 +0100
Umstellung auf neues Konfigurationsformat.
Diffstat:
4 files changed, 963 insertions(+), 21 deletions(-)
diff --git a/config/config-default.php b/config/config-default.php
@@ -0,0 +1,879 @@
+<?php
+// DO NOT MAKE ANY CHANGES IN THIS FILE, please edit the configuration file instead.
+// This file should only be changed by developers.
+$conf = array();
+$conf['applications'] = array();
+$conf['applications']['']=0;
+$conf['applications']['phpmyadmin'] = array();
+$conf['applications']['phpmyadmin']['name']='PHPYourAdmin';
+$conf['applications']['phpmyadmin']['url']="https://example.com/anotherapplication/index.cgi";
+$conf['applications']['phpmyadmin']['param']="ticketidforopenrat";
+$conf['applications']['phpmyadmin']['group']='0';
+$conf['applications']['phpmyadmin']['description']="Your database administration";
+$conf['cache'] = array();
+$conf['cache']['conditional_get']='true';
+$conf['cache']['enable_cache']=false;
+$conf['cache']['tmp_dir']="";
+$conf['config'] = array();
+$conf['config']['per_host_configuration']= true;
+$conf['config']['per_host_configuration_dir']= "./config/virtual";
+$conf['content'] = array();
+$conf['content']['file'] = array();
+$conf['content']['file']['max_file_size']='1500';
+$conf['content']['revision-limit'] = array();
+$conf['content']['revision-limit']['enabled']= false;
+$conf['content']['revision-limit']['max-age']= 120;
+$conf['content']['revision-limit']['min-age']= 1;
+$conf['content']['revision-limit']['max-revisions']= 100;
+$conf['content']['revision-limit']['min-revisions']= 3;
+$conf['content']['language'] = array();
+$conf['content']['language']['use_default_language']= true;
+$conf['countries'] = array();
+$conf['countries']['']='0';
+$conf['countries']['AA']='Afar';
+$conf['countries']['AB']='Abkhazian';
+$conf['countries']['AF']='Afrikaans';
+$conf['countries']['AM']='Amharic';
+$conf['countries']['AR']='Arabic';
+$conf['countries']['AS']='Assamese';
+$conf['countries']['AY']='Aymara';
+$conf['countries']['AZ']='Azerbaijani';
+$conf['countries']['BA']='Bashkir';
+$conf['countries']['BE']='Byelorussian';
+$conf['countries']['BG']='Bulgarian';
+$conf['countries']['BH']='Bihari';
+$conf['countries']['BI']='Bislama';
+$conf['countries']['BN']='Bengali';
+$conf['countries']['BO']='Tibetan';
+$conf['countries']['BR']='Breton';
+$conf['countries']['CA']='Catalan';
+$conf['countries']['CO']='Corsican';
+$conf['countries']['CS']='Czech';
+$conf['countries']['CY']='Welsh';
+$conf['countries']['DA']='Danish';
+$conf['countries']['DE']='German';
+$conf['countries']['DZ']='Bhutani';
+$conf['countries']['EL']='Greek';
+$conf['countries']['EN']='English';
+$conf['countries']['EO']='Esperanto';
+$conf['countries']['ES']='Spanish';
+$conf['countries']['ET']='Estonian';
+$conf['countries']['EU']='Basque';
+$conf['countries']['FA']='Persian';
+$conf['countries']['FI']='Finnish';
+$conf['countries']['FJ']='Fiji';
+$conf['countries']['FO']='Faeroese';
+$conf['countries']['FR']='French';
+$conf['countries']['FY']='Frisian';
+$conf['countries']['GA']='Irish';
+$conf['countries']['GD']='Gaelic';
+$conf['countries']['GL']='Galician';
+$conf['countries']['GN']='Guarani';
+$conf['countries']['GU']='Gujarati';
+$conf['countries']['HA']='Hausa';
+$conf['countries']['HI']='Hindi';
+$conf['countries']['HR']='Croatian';
+$conf['countries']['HU']='Hungarian';
+$conf['countries']['HY']='Armenian';
+$conf['countries']['IA']='Interlingua';
+$conf['countries']['IE']='Interlingue';
+$conf['countries']['IK']='Inupiak';
+$conf['countries']['IN']='Indonesian';
+$conf['countries']['IS']='Icelandic';
+$conf['countries']['IT']='Italian';
+$conf['countries']['IW']='Hebrew';
+$conf['countries']['JA']='Japanese';
+$conf['countries']['JI']='Yiddish';
+$conf['countries']['JW']='Javanese';
+$conf['countries']['KA']='Georgian';
+$conf['countries']['KK']='Kazakh';
+$conf['countries']['KL']='Greenlandic';
+$conf['countries']['KM']='Cambodian';
+$conf['countries']['KN']='Kannada';
+$conf['countries']['KO']='Korean';
+$conf['countries']['KS']='Kashmiri';
+$conf['countries']['KU']='Kurdish';
+$conf['countries']['KY']='Kirghiz';
+$conf['countries']['LA']='Latin';
+$conf['countries']['LN']='Lingala';
+$conf['countries']['LO']='Laothian';
+$conf['countries']['LT']='Lithuanian';
+$conf['countries']['LV']='Latvian';
+$conf['countries']['MG']='Malagasy';
+$conf['countries']['MI']='Maori';
+$conf['countries']['MK']='Macedonian';
+$conf['countries']['ML']='Malayalam';
+$conf['countries']['MN']='Mongolian';
+$conf['countries']['MO']='Moldavian';
+$conf['countries']['MR']='Marathi';
+$conf['countries']['MS']='Malay';
+$conf['countries']['MT']='Maltese';
+$conf['countries']['MY']='Burmese';
+$conf['countries']['NA']='Nauru';
+$conf['countries']['NE']='Nepali';
+$conf['countries']['NL']='Dutch';
+$conf['countries']['_NO']='Norwegian';
+$conf['countries']['OC']='Occitan';
+$conf['countries']['OM']='Oromo';
+$conf['countries']['OR']='Oriya';
+$conf['countries']['PA']='Punjabi';
+$conf['countries']['PL']='Polish';
+$conf['countries']['PS']='Pashto';
+$conf['countries']['PT']='Portuguese';
+$conf['countries']['QU']='Quechua';
+$conf['countries']['RM']='Rhaeto-Romance';
+$conf['countries']['RN']='Kirundi';
+$conf['countries']['RO']='Romanian';
+$conf['countries']['RU']='Russian';
+$conf['countries']['RW']='Kinyarwanda';
+$conf['countries']['SA']='Sanskrit';
+$conf['countries']['SD']='Sindhi';
+$conf['countries']['SG']='Sangro';
+$conf['countries']['SH']='Serbo-Croatian';
+$conf['countries']['SI']='Singhalese';
+$conf['countries']['SK']='Slovak';
+$conf['countries']['SL']='Slovenian';
+$conf['countries']['SM']='Samoan';
+$conf['countries']['SN']='Shona';
+$conf['countries']['SO']='Somali';
+$conf['countries']['SQ']='Albanian';
+$conf['countries']['SR']='Serbian';
+$conf['countries']['SS']='Siswati';
+$conf['countries']['ST']='Sesotho';
+$conf['countries']['SU']='Sudanese';
+$conf['countries']['SV']='Swedish';
+$conf['countries']['SW']='Swahili';
+$conf['countries']['TA']='Tamil';
+$conf['countries']['TE']='Tegulu';
+$conf['countries']['TG']='Tajik';
+$conf['countries']['TH']='Thai';
+$conf['countries']['TI']='Tigrinya';
+$conf['countries']['TK']='Turkmen';
+$conf['countries']['TL']='Tagalog';
+$conf['countries']['TN']='Setswana';
+$conf['countries']['TO']='Tonga';
+$conf['countries']['TR']='Turkish';
+$conf['countries']['TS']='Tsonga';
+$conf['countries']['TT']='Tatar';
+$conf['countries']['TW']='Twi';
+$conf['countries']['UK']='Ukrainian';
+$conf['countries']['UR']='Urdu';
+$conf['countries']['UZ']='Uzbek';
+$conf['countries']['VI']='Vietnamese';
+$conf['countries']['VO']='Volapuk';
+$conf['countries']['WO']='Wolof';
+$conf['countries']['XH']='Xhosa';
+$conf['countries']['YO']='Yoruba';
+$conf['countries']['ZH']='Chinese';
+$conf['database'] = array();
+$conf['database']['']='0';
+$conf['database']['default']='sample_db_mysql';
+$conf['database']['sample_db_mysql'] = array();
+$conf['database']['sample_db_mysql']['enabled']='false ';
+$conf['database']['sample_db_mysql']['comment']= "DB MySQL" ;
+$conf['database']['sample_db_mysql']['type']='mysql ';
+$conf['database']['sample_db_mysql']['user']='dbuser ';
+$conf['database']['sample_db_mysql']['password']='dbpass ';
+$conf['database']['sample_db_mysql']['host']='localhost ';
+$conf['database']['sample_db_mysql']='port ';
+$conf['database']['sample_db_mysql']['database']='cms ';
+$conf['database']['sample_db_mysql']['base64']='false ';
+$conf['database']['sample_db_mysql']['prefix']= 'or_' ;
+$conf['database']['sample_db_mysql']['persistent']='yes ';
+$conf['database']['sample_db_mysql']['charset']= 'UTF-8';
+$conf['database']['sample_db_mysql']['connection_sql']= "";
+$conf['database']['sample_db_mysql']['cmd']= "";
+$conf['database']['sample_db_mysql']['prepare']=false;
+$conf['database']['sample_db_mysql']['transaction']=false;
+$conf['database']['sample_db_mysql']['readonly']=false;
+$conf['database']['sample_db_postgresql'] = array();
+$conf['database']['sample_db_postgresql']['enabled']='false ';
+$conf['database']['sample_db_postgresql']['comment']= "DB-PostgreSQL" ;
+$conf['database']['sample_db_postgresql']['type']='postgresql ';
+$conf['database']['sample_db_postgresql']['user']='dbuser ';
+$conf['database']['sample_db_postgresql']['password']='dbpass ';
+$conf['database']['sample_db_postgresql']['host']='localhost ';
+$conf['database']['sample_db_postgresql']='port ';
+$conf['database']['sample_db_postgresql']['database']='cms ';
+$conf['database']['sample_db_postgresql']['base64']='false ';
+$conf['database']['sample_db_postgresql']['prefix']= 'or_' ;
+$conf['database']['sample_db_postgresql']['persistent']='yes ';
+$conf['database']['sample_db_postgresql']['charset']= 'UTF-8';
+$conf['database']['sample_db_postgresql']['connection_sql']= "";
+$conf['database']['sample_db_postgresql']['cmd']= "";
+$conf['database']['sample_db_postgresql']['prepare']=false;
+$conf['database']['sample_db_postgresql']['transaction']=false;
+$conf['database']['sample_db_sqlite'] = array();
+$conf['database']['sample_db_sqlite']['enabled']='false ';
+$conf['database']['sample_db_sqlite']['comment']= "DB-SQLite" ;
+$conf['database']['sample_db_sqlite']['type']='sqlite ';
+$conf['database']['sample_db_sqlite']['filename']= "/local/path/to/your/sqlite/openrat.db";
+$conf['database']['sample_db_sqlite']['base64']='false ';
+$conf['database']['sample_db_sqlite']['prefix']= 'or_' ;
+$conf['database']['sample_db_sqlite']['persistent']='yes ';
+$conf['database']['sample_db_sqlite']['charset']= 'UTF-8';
+$conf['database']['sample_db_sqlite']['connection_sql']= "pragma short_column_names=true";
+$conf['database']['sample_db_sqlite']['cmd']= "";
+$conf['database']['sample_db_sqlite']['prepare']=false;
+$conf['database']['sample_db_sqlite']['transaction']=false;
+$conf['database']['sample_pdo_sqlite'] = array();
+$conf['database']['sample_pdo_sqlite']['enabled']='false ';
+$conf['database']['sample_pdo_sqlite']['comment']= "DB-PDO" ;
+$conf['database']['sample_pdo_sqlite']['type']='pdo ';
+$conf['database']['sample_pdo_sqlite']['dsn']= "";
+$conf['database']['sample_pdo_sqlite']['dsn']= "mysql:dbname=testdb";
+$conf['database']['sample_pdo_sqlite']['dsn']= "pgsql:host=localhost port=5432 dbname=mydb user=dbuser password=dbpass";
+$conf['database']['sample_pdo_sqlite']['dsn']= "sqlite:/path/to/mydb.db";
+$conf['database']['sample_pdo_sqlite']['dsn']= "java:comp/env/jdbc/mydb";
+$conf['database']['sample_pdo_sqlite']['user']= "dbuser";
+$conf['database']['sample_pdo_sqlite']['password']= "dbpass";
+$conf['database']['sample_pdo_sqlite']['base64']='false ';
+$conf['database']['sample_pdo_sqlite']['prefix']= 'or_' ;
+$conf['database']['sample_pdo_sqlite']['persistent']='yes ';
+$conf['database']['sample_pdo_sqlite']['charset']= 'UTF-8';
+$conf['database']['sample_pdo_sqlite']['connection_sql']= "";
+$conf['database']['sample_pdo_sqlite']['connection_sql']= "pragma short_column_names=true";
+$conf['database']['sample_pdo_sqlite']['connection_sql']= "alter session set current_schema=myschema";
+$conf['database']['sample_pdo_sqlite']['cmd']= "";
+$conf['database']['sample_pdo_sqlite']['prepare']=false;
+$conf['database']['sample_pdo_sqlite']['transaction']=false;
+$conf['database']['sample_pdo_sqlite']['readonly']=false;
+$conf['database']['sample_pdo_sqlite']['convert_to_lowercase']=false;
+$conf['database']['sample_pdo_sqlite']='option_myoption_a';
+$conf['database']['sample_pdo_sqlite']='option_myoption_b';
+$conf['database']['another_db'] = array();
+$conf['date'] = array();
+$conf['date']['format'] = array();
+$conf['date']['format']['SHORT']= "";
+$conf['date']['format']['ISO8601SHORT']= "Ymd";
+$conf['date']['format']['ISO8601']= "Y-m-d";
+$conf['date']['format']['ISO8601BAS']= "YmdTHis";
+$conf['date']['format']['ISO8601EXT']= "Y-m-dTH:i:s";
+$conf['date']['format']['ISO8601FULL']= "Y-m-dTH:i:sO";
+$conf['date']['format']['ISO8601WEEK']= "YWW";
+$conf['date']['format']['GER1']= "d.m.Y";
+$conf['date']['format']['GER2']= "d.m.Y, H:i";
+$conf['date']['format']['GER3']= "d.m.Y, H:i:s";
+$conf['date']['format']['GER4']= "d. F Y, H:i:s";
+$conf['date']['format']['ENGLONG']= "l dS of F Y h:i:s A";
+$conf['date']['format']['GMDATE']= "D, d M Y H:i:s GMT";
+$conf['date']['format']['RFC822']= "r";
+$conf['date']['format']['UNIX']= "U";
+$conf['date']['format']['LONG']= "F j, Y, g:i a";
+$conf['date']['timezone'] = array();
+$conf['date']['timezone']['-6']="New York";
+$conf['date']['timezone']['0']="UTC (GMT)";
+$conf['date']['timezone']['60']="MET (Middle European Time)";
+$conf['date']['timezone']['120']="MEST (Middle European Summertime)";
+$conf['editor'] = array();
+$conf['editor']['text-markup'] = array();
+$conf['editor']['text-markup']['strong-begin']= "*";
+$conf['editor']['text-markup']['strong-end']= "*";
+$conf['editor']['text-markup']['emphatic-begin']= "_";
+$conf['editor']['text-markup']['emphatic-end']= "_";
+$conf['editor']['text-markup']['image-begin']= "{";
+$conf['editor']['text-markup']['image-end']= "}";
+$conf['editor']['text-markup']['speech-begin']='QUOTE';
+$conf['editor']['text-markup']['speech-end']='QUOTE';
+$conf['editor']['text-markup']['code-begin']= "=";
+$conf['editor']['text-markup']['code-end']= "=";
+$conf['editor']['text-markup']['footnote-begin']= "[";
+$conf['editor']['text-markup']['footnote-end']= "]";
+$conf['editor']['text-markup']['pre-begin']= "=";
+$conf['editor']['text-markup']['pre-end']= "=";
+$conf['editor']['text-markup']['insert-begin']= "++";
+$conf['editor']['text-markup']['insert-end']= "++";
+$conf['editor']['text-markup']['remove-begin']= "--";
+$conf['editor']['text-markup']['remove-end']= "--";
+$conf['editor']['text-markup']['definition-sep']= "::";
+$conf['editor']['text-markup']['headline']= "+";
+$conf['editor']['text-markup']['headline_level1_underline']= "=";
+$conf['editor']['text-markup']['headline_level2_underline']= "-";
+$conf['editor']['text-markup']['headline_level3_underline']= ".";
+$conf['editor']['text-markup']['list-unnumbered']= "-";
+$conf['editor']['text-markup']['list-numbered']= "#";
+$conf['editor']['text-markup']['table-of-content']= "##TOC##";
+$conf['editor']['text-markup']['linkto']= "->";
+$conf['editor']['text-markup']['table-cell-sep']= "|";
+$conf['editor']['text-markup']['style-begin']= "'";
+$conf['editor']['text-markup']['style-end']= "'";
+$conf['editor']['text-markup']['quote']= ">";
+$conf['editor']['text-markup']['quote-line-begin']= ">";
+$conf['editor']['text-markup']['quote-line-end']= ">";
+$conf['editor']['text-markup']['macro-begin']= "<<";
+$conf['editor']['text-markup']['macro-end']= ">>";
+$conf['editor']['text-markup']['macro-attribute-quote']= "'";
+$conf['editor']['text-markup']['macro-attribute-value-seperator']= "=";
+$conf['editor']['html'] = array();
+$conf['editor']['html']['tag_strong']= "strong";
+$conf['editor']['html']['tag_emphatic']= "em";
+$conf['editor']['html']['tag_teletype']= "tt";
+$conf['editor']['html']['tag_speech']= "cite";
+$conf['editor']['html']['override_speech']=false;
+$conf['editor']['html']['override_speech_open']= "«";
+$conf['editor']['html']['override_speech_close']= "»";
+$conf['editor']['html']['rendermode']="sgml";
+$conf['editor']['html']['rendermode']="xml";
+$conf['editor']['html']['replace']= "EUR:€";
+$conf['editor']['wiki'] = array();
+$conf['editor']['wiki']['convert_html']=true;
+$conf['editor']['wiki']['convert_bbcode']=true;
+$conf['editor']['text'] = array();
+$conf['editor']['text']['linelength']='70';
+$conf['editor']['calendar'] = array();
+$conf['editor']['calendar']['weekday_offset']='1';
+$conf['editor']['text'] = array();
+$conf['editor']['text']['linelength']='70';
+$conf['editor']['macro'] = array();
+$conf['editor']['macro']['show_errors']=false;
+$conf['filename'] = array();
+$conf['filename']['edit']='true ';
+$conf['filename']['default']='index ';
+$conf['filename']['style']='ss ';
+$conf['filename']['style']='id ';
+$conf['filename']['style']='longid ';
+$conf['filename']['style']='short ';
+$conf['filename']['url']='relative ';
+$conf['ftp'] = array();
+$conf['ftp']['ascii']= "html,htm,php ";
+$conf['help'] = array();
+$conf['help']['enabled']=true;
+$conf['help']['url']="help/html/";
+$conf['help']['url']="http://help.openrat.de/";
+$conf['help']['suffix']="html";
+$conf['help']['only_question_mark']=false;
+$conf['html'] = array();
+$conf['html']['tag_teletype']='tt';
+$conf['html']['tag_emphatic']='em';
+$conf['html']['tag_strong']='strong';
+$conf['html']['tag_speech']='cite';
+$conf['html']['speech_open']= "&bdquo";
+$conf['html']['speech_close']= "&rdquo";
+$conf['i18n'] = array();
+$conf['i18n']['use_http']=true;
+$conf['i18n']['default']='de';
+$conf['i18n']['available']='de,en,es,fr,it,ru,cn';
+$conf['i18n']['locale'] = array();
+$conf['i18n']['locale']['de']="de_DE.utf8";
+$conf['i18n']['locale']['en']="en_US.utf8";
+$conf['image'] = array();
+$conf['image']['truecolor']=true;
+$conf['interface'] = array();
+$conf['interface']['application_mode']=false;
+$conf['interface']['tree_width']= "25%";
+$conf['interface']['file_separator']= " »";
+$conf['interface']['nice_urls']=false;
+$conf['interface']['url_sessionid']=false;
+$conf['interface']['theme']= "default";
+$conf['interface']['show_duration']=false;
+$conf['interface']['timeout']='0';
+$conf['interface']['override_title']='0';
+$conf['interface']['min_width']= 950;
+$conf['interface']['redirect']=false;
+$conf['interface']['human_date_format']=false;
+$conf['interface']['style'] = array();
+$conf['interface']['style']['default']="default";
+$conf['interface']['style']['default']='system';
+$conf['interface']['config'] = array();
+$conf['interface']['config']['file_manager_url']="";
+$conf['interface']['config']['enable']=true;
+$conf['interface']['config']['show_system']=true;
+$conf['interface']['config']['show_interpreter']=true;
+$conf['interface']['config']['show_extensions']=true;
+$conf['interface']['frames'] = array();
+$conf['interface']['frames']['top']='_top';
+$conf['interface']['url'] = array();
+$conf['interface']['url']['fake_url']=false;
+$conf['interface']['url']['index']=false;
+$conf['interface']['url']['url_format']= "%s,%s.%i";
+$conf['interface']['url']['url_format']= "%s,%s,%d.do";
+$conf['interface']['url']['add_sessionid']=false;
+$conf['interface']['gravatar'] = array();
+$conf['interface']['gravatar']['enable']=true;
+$conf['interface']['gravatar']['size']='80';
+$conf['interface']['gravatar']['default']='404';
+$conf['interface']['gravatar']['rating']='g';
+$conf['interface']['session'] = array();
+$conf['interface']['session']['auto_extend']=false;
+$conf['ldap'] = array();
+$conf['ldap']['host']="localhost";
+$conf['ldap']['port']="389";
+$conf['ldap']['protocol']="2";
+$conf['ldap']['dn']= "uid={user},ou=users,dc=example,dc=com";
+$conf['ldap']['dn']= "";
+$conf['ldap']['search'] = array();
+$conf['ldap']['search']['anonymous']=true;
+$conf['ldap']['search']['user']= "uid=openrat,ou=users,dc=example,dc=com";
+$conf['ldap']['search']['password']= "verysecret";
+$conf['ldap']['search']['basedn']= "dc=example,dc=com";
+$conf['ldap']['search']['filter']= "(uid={user})";
+$conf['ldap']['search']['aliases']=true;
+$conf['ldap']['search']['timeout']= 30;
+$conf['ldap']['search']['add']=true;
+$conf['ldap']['authorize'] = array();
+$conf['ldap']['authorize']['group_filter']="(memberUid={dn})";
+$conf['ldap']['authorize']['group_name']="cn";
+$conf['ldap']['authorize']['auto_add']=true;
+$conf['login'] = array();
+$conf['login']['motd']="" ;
+$conf['login']['nologin']='false ';
+$conf['login']['register']=false;
+$conf['login']['send_password']=false;
+$conf['login']['gpl'] = array();
+$conf['login']['gpl']['url']="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html";
+$conf['login']['logo'] = array();
+$conf['login']['logo']['file']="./themes/default/images/logo.jpg" ;
+$conf['login']['logo']['url']="http://www.openrat.de" ;
+$conf['login']['start'] = array();
+$conf['login']['start']['start_lastchanged_object']=true;
+$conf['log'] = array();
+$conf['log']['file']= "";
+$conf['log']['level']= "warn";
+$conf['log']['date_format']= "M j H:i:s";
+$conf['log']['dns_lookup']=false;
+$conf['log']['format']= "%time %level %host %user %action %text";
+$conf['mail'] = array();
+$conf['mail']['enabled']=true;
+$conf['mail']['from']="OpenRat <user@example.com>";
+$conf['mail']['signature']="http://www.openrat.de";
+$conf['mail']['cc']='0';
+$conf['mail']['bcc']='0';
+$conf['mail']['priority']='3';
+$conf['mail']['header_encoding']="Quoted-printable";
+$conf['mail']['client']='smtp';
+$conf['mail']['client']='php';
+$conf['mail']['whitelist']= "";
+$conf['mail']['blacklist']= "";
+$conf['mail']['smtp'] = array();
+$conf['mail']['smtp']['host']="mail.yourdomain.example";
+$conf['mail']['smtp']['host']="locahost";
+$conf['mail']['smtp']['port']="25";
+$conf['mail']['smtp']['auth_username']="your.user@something.example";
+$conf['mail']['smtp']['auth_password']="notsecret";
+$conf['mail']['smtp']['timeout']="45";
+$conf['mail']['smtp']['localhost']='0';
+$conf['mail']['smtp']['localhost']="your.fully.qualified.hostname.example";
+$conf['mail']['smtp']['tls']=false;
+$conf['mail']['smtp']['ssl']=false;
+$conf['mime-types'] = array();
+$conf['mime-types']['ez']='';
+$conf['mime-types']['csm']='';
+$conf['mime-types']['cu']='';
+$conf['mime-types']['tsp']='';
+$conf['mime-types']['spl']='';
+$conf['mime-types']['cpt']='';
+$conf['mime-types']['hqx']=' application/mac-binhex40';
+$conf['mime-types']['nb']='';
+$conf['mime-types']['mdb']='';
+$conf['mime-types']['doc']='';
+$conf['mime-types']['dot']='';
+$conf['mime-types']['bin']='';
+$conf['mime-types']['oda']='';
+$conf['mime-types']['pdf']='';
+$conf['mime-types']['pgp']='';
+$conf['mime-types']['ps']='';
+$conf['mime-types']['ai']='';
+$conf['mime-types']['eps']='';
+$conf['mime-types']['rtf']='';
+$conf['mime-types']['smi']='';
+$conf['mime-types']['smil']='';
+$conf['mime-types']['xls']=' application/vnd.ms-excel';
+$conf['mime-types']['xlb']=' application/vnd.ms-excel';
+$conf['mime-types']['ppt']=' application/vnd.ms-powerpoint';
+$conf['mime-types']['pps']=' application/vnd.ms-powerpoint';
+$conf['mime-types']['pot']=' application/vnd.ms-powerpoint';
+$conf['mime-types']['sdw']=' application/vnd.stardivision.writer';
+$conf['mime-types']['sgl']= 'application/vnd.stardivision.writer-global';
+$conf['mime-types']['vor']=' application/vnd.stardivision.writer';
+$conf['mime-types']['sdc']=' application/vnd.stardivision.calc';
+$conf['mime-types']['sda']=' application/vnd.stardivision.draw';
+$conf['mime-types']['sdd']=' application/vnd.stardivision.impress';
+$conf['mime-types']['sdp']=' application/vnd.stardivision.impress-packed';
+$conf['mime-types']['smf']=' application/vnd.stardivision.math';
+$conf['mime-types']['sds']=' application/vnd.stardivision.chart';
+$conf['mime-types']['smd']=' application/vnd.stardivision.mail';
+$conf['mime-types']['wbxml']=' application/vnd.wap.wbxml';
+$conf['mime-types']['wmlc']=' application/vnd.wap.wmlc';
+$conf['mime-types']['wmlsc']=' application/vnd.wap.wmlscriptc';
+$conf['mime-types']['wp5']= 'application/wordperfect5.1';
+$conf['mime-types']['zip']='';
+$conf['mime-types']['wk']=' application/x-123';
+$conf['mime-types']['bcpio']='';
+$conf['mime-types']['vcd']='';
+$conf['mime-types']['pgn']='';
+$conf['mime-types']['cpio']='';
+$conf['mime-types']['csh']='';
+$conf['mime-types']['deb']='';
+$conf['mime-types']['dcr']='';
+$conf['mime-types']['dir']='';
+$conf['mime-types']['dxr']='';
+$conf['mime-types']['wad']='';
+$conf['mime-types']['dms']='';
+$conf['mime-types']['dvi']='';
+$conf['mime-types']['pfa']='';
+$conf['mime-types']['pfb']='';
+$conf['mime-types']['gsf']='';
+$conf['mime-types']['pcf']='';
+$conf['mime-types']['pcf.Z']='';
+$conf['mime-types']['spl']='';
+$conf['mime-types']['gnumeric']='';
+$conf['mime-types']['gtar']='';
+$conf['mime-types']['tgz']='';
+$conf['mime-types']['taz']='';
+$conf['mime-types']['hdf']='';
+$conf['mime-types']['phtml']='';
+$conf['mime-types']['pht']='';
+$conf['mime-types']['php']='';
+$conf['mime-types']['phps']='';
+$conf['mime-types']['php3']='';
+$conf['mime-types']['php3p']='';
+$conf['mime-types']['php4']='';
+$conf['mime-types']['docbook']= 'application/docbook+xml';
+$conf['mime-types']['ica']='';
+$conf['mime-types']['jar']='';
+$conf['mime-types']['jnlp']='';
+$conf['mime-types']['ser']='';
+$conf['mime-types']['class']='';
+$conf['mime-types']['js']='';
+$conf['mime-types']['chrt']='';
+$conf['mime-types']['kil']='';
+$conf['mime-types']['kpr']='';
+$conf['mime-types']['kpt']='';
+$conf['mime-types']['skp']='';
+$conf['mime-types']['skd']='';
+$conf['mime-types']['skt']='';
+$conf['mime-types']['skm']='';
+$conf['mime-types']['ksp']='';
+$conf['mime-types']['kwd']='';
+$conf['mime-types']['kwt']='';
+$conf['mime-types']['latex']='';
+$conf['mime-types']['lha']='';
+$conf['mime-types']['lzh']='';
+$conf['mime-types']['lzx']='';
+$conf['mime-types']['frm']='';
+$conf['mime-types']['maker']='';
+$conf['mime-types']['frame']='';
+$conf['mime-types']['fm']='';
+$conf['mime-types']['fb']='';
+$conf['mime-types']['book']='';
+$conf['mime-types']['mif']='';
+$conf['mime-types']['com']='';
+$conf['mime-types']['exe']='';
+$conf['mime-types']['bat']='';
+$conf['mime-types']['dll']='';
+$conf['mime-types']['msi']='';
+$conf['mime-types']['nc']='';
+$conf['mime-types']['cdf']='';
+$conf['mime-types']['pac']='';
+$conf['mime-types']['o']='';
+$conf['mime-types']['ogg']='';
+$conf['mime-types']['oza']='';
+$conf['mime-types']['pl']='';
+$conf['mime-types']['pm']='';
+$conf['mime-types']['crl']=' application/x-pkcs7-crl';
+$conf['mime-types']['rpm']='';
+$conf['mime-types']['shar']='';
+$conf['mime-types']['swf']='';
+$conf['mime-types']['swfl']='';
+$conf['mime-types']['sh']='';
+$conf['mime-types']['sit']='';
+$conf['mime-types']['sv4cpio']=' application/x-sv4cpio';
+$conf['mime-types']['sv4crc']=' application/x-sv4crc';
+$conf['mime-types']['tar']='';
+$conf['mime-types']['tcl']='';
+$conf['mime-types']['tex']='';
+$conf['mime-types']['gf']='';
+$conf['mime-types']['pk']='';
+$conf['mime-types']['texinfo']='';
+$conf['mime-types']['texi']='';
+$conf['mime-types']["%"]='';
+$conf['mime-types']['bak']='';
+$conf['mime-types']['old']='';
+$conf['mime-types']['sik']='';
+$conf['mime-types']['t']='';
+$conf['mime-types']['tr']='';
+$conf['mime-types']['roff']='';
+$conf['mime-types']['man']='';
+$conf['mime-types']['me']='';
+$conf['mime-types']['ms']='';
+$conf['mime-types']['ustar']='';
+$conf['mime-types']['src']='';
+$conf['mime-types']['wz']='';
+$conf['mime-types']['crt']=' application/x-x509-ca-cert';
+$conf['mime-types']['fig']='';
+$conf['mime-types']['au']='';
+$conf['mime-types']['snd']='';
+$conf['mime-types']['mid']='';
+$conf['mime-types']['midi']='';
+$conf['mime-types']['kar']='';
+$conf['mime-types']['mpga']='';
+$conf['mime-types']['mpega']='';
+$conf['mime-types']['mp2']='';
+$conf['mime-types']['mp3']='';
+$conf['mime-types']['m3u']='';
+$conf['mime-types']['sid']=' audio/prs.sid';
+$conf['mime-types']['aif']='';
+$conf['mime-types']['aiff']='';
+$conf['mime-types']['aifc']='';
+$conf['mime-types']['gsm']='';
+$conf['mime-types']['m3u']='';
+$conf['mime-types']['rpm']='';
+$conf['mime-types']['ra']='';
+$conf['mime-types']['rm']='';
+$conf['mime-types']['ram']='';
+$conf['mime-types']['ra']='';
+$conf['mime-types']['pls']='';
+$conf['mime-types']['wav']='';
+$conf['mime-types']['pdb']='';
+$conf['mime-types']['xyz']='';
+$conf['mime-types']['bmp']='';
+$conf['mime-types']['gif']='';
+$conf['mime-types']['ief']='';
+$conf['mime-types']['jpeg']='';
+$conf['mime-types']['jpg']='';
+$conf['mime-types']['jpe']='';
+$conf['mime-types']['pcx']='';
+$conf['mime-types']['png']='';
+$conf['mime-types']['svg']='image/svg+xml';
+$conf['mime-types']['svgz']='image/svg+xml';
+$conf['mime-types']['tiff']='';
+$conf['mime-types']['tif']='';
+$conf['mime-types']['wbmp']=' image/vnd.wap.wbmp';
+$conf['mime-types']['ras']='';
+$conf['mime-types']['cdr']='';
+$conf['mime-types']['pat']='';
+$conf['mime-types']['cdt']='';
+$conf['mime-types']['cpt']='';
+$conf['mime-types']['djvu']='';
+$conf['mime-types']['djv']='';
+$conf['mime-types']['jng']='';
+$conf['mime-types']['bmp']='';
+$conf['mime-types']['pnm']='';
+$conf['mime-types']['pbm']='';
+$conf['mime-types']['pgm']='';
+$conf['mime-types']['ppm']='';
+$conf['mime-types']['rgb']='';
+$conf['mime-types']['xbm']='';
+$conf['mime-types']['xpm']='';
+$conf['mime-types']['xwd']='';
+$conf['mime-types']['igs']='';
+$conf['mime-types']['iges']='';
+$conf['mime-types']['msh']='';
+$conf['mime-types']['mesh']='';
+$conf['mime-types']['silo']='';
+$conf['mime-types']['wrl']='';
+$conf['mime-types']['vrml']='';
+$conf['mime-types']['csv']='';
+$conf['mime-types']['css']='';
+$conf['mime-types']['htm']='';
+$conf['mime-types']['html']='';
+$conf['mime-types']['xhtml']='';
+$conf['mime-types']['mml']='';
+$conf['mime-types']['asc']='';
+$conf['mime-types']['txt']='';
+$conf['mime-types']['text']='';
+$conf['mime-types']['diff']='';
+$conf['mime-types']['rtx']='';
+$conf['mime-types']['rtf']='';
+$conf['mime-types']['tsv']='';
+$conf['mime-types']['wml']= 'text/vnd.wap.wml';
+$conf['mime-types']['wmls']= 'text/vnd.wap.wmlscript';
+$conf['mime-types']['xml']='';
+$conf['mime-types']['xsl']='';
+$conf['mime-types']['hpp']= 'text/x-c++hdr';
+$conf['mime-types']['hxx']= 'text/x-c++hdr';
+$conf['mime-types']['hh']= 'text/x-c++hdr';
+$conf['mime-types']['cpp']= 'text/x-c++src';
+$conf['mime-types']['cxx']= 'text/x-c++src';
+$conf['mime-types']['cc']= 'text/x-c++src';
+$conf['mime-types']['h']='';
+$conf['mime-types']['csh']='';
+$conf['mime-types']['c']='';
+$conf['mime-types']['java']='';
+$conf['mime-types']['moc']='';
+$conf['mime-types']['p']='';
+$conf['mime-types']['pas']='';
+$conf['mime-types']['etx']='';
+$conf['mime-types']['sh']='';
+$conf['mime-types']['tcl']='';
+$conf['mime-types']['tk']='';
+$conf['mime-types']['tex']='';
+$conf['mime-types']['ltx']='';
+$conf['mime-types']['sty']='';
+$conf['mime-types']['cls']='';
+$conf['mime-types']['vcs']='';
+$conf['mime-types']['vcf']='';
+$conf['mime-types']['dl']='';
+$conf['mime-types']['fli']='';
+$conf['mime-types']['gl']='';
+$conf['mime-types']['mpeg']='';
+$conf['mime-types']['mpg']='';
+$conf['mime-types']['mpe']='';
+$conf['mime-types']['qt']='';
+$conf['mime-types']['mov']='';
+$conf['mime-types']['mxu']=' video/vnd.mpegurl';
+$conf['mime-types']['mng']='';
+$conf['mime-types']['asf']='';
+$conf['mime-types']['asx']='';
+$conf['mime-types']['avi']='';
+$conf['mime-types']['movie']='';
+$conf['mime-types']['ice']='';
+$conf['mime-types']['vrm']='';
+$conf['mime-types']['vrml']='';
+$conf['mime-types']['wrl']='';
+$conf['publish'] = array();
+$conf['publish']['edit']=true;
+$conf['publish']['default']='index';
+$conf['publish']['format']= "{filename}{language_sep}{language}{type_sep}{type}";
+$conf['publish']['language_sep']= ".";
+$conf['publish']['type_sep']= ".";
+$conf['publish']['filename_language']='auto';
+$conf['publish']['filename_type']='always';
+$conf['publish']['style']="id";
+$conf['publish']['url']='relative';
+$conf['publish']['url']='absolute';
+$conf['publish']['enable_php_in_page_content']=false;
+$conf['publish']['enable_php_in_file_content']=false;
+$conf['publish']['escape_8bit_characters']=false;
+$conf['publish']['negotiation'] = array();
+$conf['publish']['negotiation']['page_negotiate_type']=true;
+$conf['publish']['negotiation']['page_negotiate_language']=true;
+$conf['publish']['negotiation']['file_negotiate_type']=true;
+$conf['publish']['project'] = array();
+$conf['publish']['project']['publish_dir']="/var/www/";
+$conf['publish']['project']['override_publish_dir']=true;
+$conf['publish']['project']['system_command']="sudo -u xyz /usr/local/bin/mirror.sh {dirbase}";
+$conf['publish']['project']['system_command']='0';
+$conf['publish']['project']['override_system_command']=true;
+$conf['publish']['ftp'] = array();
+$conf['publish']['ftp']['enable']=true;
+$conf['publish']['ftp']['port']='21';
+$conf['publish']['ftp']['host']="ftp.example.com";
+$conf['publish']['ftp']['path']="/path/to/site";
+$conf['publish']['ftp']['user']='agent_smith';
+$conf['publish']['ftp']['pass']='smith';
+$conf['replace'] = array();
+$conf['replace']['']='0';
+$conf['replace']['']='0';
+$conf['replace']['euro']= "EUR,&euro";
+$conf['replace']['copy']= "(c),©";
+$conf['search'] = array();
+$conf['search']['']='0';
+$conf['search']['quicksearch'] = array();
+$conf['search']['quicksearch']['show_button']=false;
+$conf['search']['quicksearch']['search_name']=true;
+$conf['search']['quicksearch']['search_filename']=true;
+$conf['search']['quicksearch']['search_description']=true;
+$conf['search']['quicksearch']['search_content']=false;
+$conf['security'] = array();
+$conf['security']['readonly']=false;
+$conf['security']['nopublish']=false;
+$conf['security']['umask']='0';
+$conf['security']['chmod']='0';
+$conf['security']['chmod_dir']='0';
+$conf['security']['']='0';
+$conf['security']['disable_dynamic_code']=true;
+$conf['security']['show_system_info']=true;
+$conf['security']['use_post_token']=true;
+$conf['security']['renew_session_login']=false;
+$conf['security']['renew_session_logout']=false;
+$conf['security']['default'] = array();
+$conf['security']['default']['username']='0';
+$conf['security']['default']['password']='0';
+$conf['security']['guest'] = array();
+$conf['security']['guest']['enable']=false;
+$conf['security']['guest']['user']='guest';
+$conf['security']['login'] = array();
+$conf['security']['login']['type']='form';
+$conf['security']['login']['type']='http';
+$conf['security']['auth'] = array();
+$conf['security']['auth']['type']='database';
+$conf['security']['auth']['userdn']=false;
+$conf['security']['authorize'] = array();
+$conf['security']['authorize']['type']='database';
+$conf['security']['authorize']['type']='ldap';
+$conf['security']['password'] = array();
+$conf['security']['password']['random_length']='8';
+$conf['security']['password']['min_length']='5';
+$conf['security']['password']['salt']= "";
+$conf['security']['password']['salt_text']= "somerandomtext";
+$conf['security']['http'] = array();
+$conf['security']['http']['url']= "http://example.net/restricted-area";
+$conf['security']['authdb'] = array();
+$conf['security']['authdb']['type']='postgresql';
+$conf['security']['authdb']['user']='dbuser';
+$conf['security']['authdb']['password']='dbpassword';
+$conf['security']['authdb']['host']= '127.0.0.1';
+$conf['security']['authdb']['database']='dbname';
+$conf['security']['authdb']['persistent']=false;
+$conf['security']['authdb']['sql']= "select 1 from table where user={username} and password=md5({password})";
+$conf['security']['authdb']['add']=true;
+$conf['security']['ssl'] = array();
+$conf['security']['ssl']['user_var']='0';
+$conf['security']['ssl']['user_var']="REMOTE_USER";
+$conf['security']['ssl']['user_var']="SSL_CLIENT_S_DN";
+$conf['security']['ssl']['user_var']="SSL_CLIENT_S_DN_CN";
+$conf['security']['ssl']['trust']=false;
+$conf['security']['openid'] = array();
+$conf['security']['openid']['enable']=false;
+$conf['security']['openid']['add']=false;
+$conf['security']['openid']['logo_url']='0';
+$conf['security']['openid']['logo_url']="http://openid.net/login-bg.gif";
+$conf['security']['openid']['trust_root']='http://your.server.example/openrat/';
+$conf['security']['openid']['trust_root']='0';
+$conf['security']['openid']['trusted_server']='openid1.example.com,openid2.example.com';
+$conf['security']['openid']['trusted_server']='0';
+$conf['security']['openid']['update_user']=true;
+$conf['security']['openid']['user_identity']=true;
+$conf['security']['openid']['provider']['name']='google';
+$conf['security']['openid']['provider']['google']['xrds_uri']="http://google.com/accounts/o8/id";
+$conf['security']['openid']['provider']['google']['map_attribute']="email";
+$conf['security']['openid']['provider']['google']['name']="Google";
+$conf['security']['openid']['provider']['google']['map_internal']="mail";
+$conf['security']['openid']['provider']['yahoo']['xrds_uri']="http://??????";
+$conf['security']['openid']['provider']['yahoo']['map_attribute']="usename";
+$conf['security']['openid']['provider']['yahoo']['map_internal']="mail";
+$conf['security']['sso'] = array();
+$conf['security']['sso']['enable']=false;
+$conf['security']['sso']['url']="http://localhost/check.php?phpsessid={id}&check=true";
+$conf['security']['sso']['url']="https://www.example.com/phpmyadmin/main.php?server=1";
+$conf['security']['sso']['auth_param_name']='authid';
+$conf['security']['sso']['auth_param_serialized']=true;
+$conf['security']['sso']['cookie']=true;
+$conf['security']['sso']['cookie_name']='0';
+$conf['security']['sso']['force']=true;
+$conf['security']['sso']['expect']='0';
+$conf['security']['sso']['expect_regexp']="/running on/";
+$conf['security']['sso']['username_regexp']="/running on localhost as ([a-z]+)@localhost/";
+$conf['security']['newuser'] = array();
+$conf['security']['newuser']['groups']="YourGroup,AnotherGroup";
+$conf['security']['logout'] = array();
+$conf['security']['logout']['redirect_url']="http://your.intranet.example/";
+$conf['security']['logout']['redirect_url']='0';
+$conf['security']['user'] = array();
+$conf['security']['user']['show_admin_mail']=true;
+$conf['security']['user']['show_mail']=true;
+$conf['security']['user']['send_message']=true;
+$conf['theme'] = array();
+$conf['theme']['compiler'] = array();
+$conf['theme']['compiler']['enable']=false;
+$conf['theme']['compiler']['cache']=true;
+$conf['theme']['compiler']['chmod']='0';
+$conf['theme']['compiler']['compile_at_logout']=true;
+$conf['theme']['compiler']['compile_to_tmp_dir']=false;
+$conf['webdav'] = array();
+$conf['webdav']['enable']=false;
+$conf['webdav']['create']=true;
+$conf['webdav']['max_file_size']='1000';
+$conf['webdav']['readonly']=true;
+$conf['webdav']['expose_openrat']=true;
+$conf['webdav']['session_in_uri']=false;
+$conf['webdav']['session_in_uri_prefix']='ors';
+$conf['webdav']['']='0';
+$conf['webdav']['compliant_to_redmond']=true;
+$conf['wiki'] = array();
+$conf['wiki']['convert_html']=true;
+$conf['wiki']['convert_bbcode']=true;
+$conf['wiki']['tag_strong']= "*";
+$conf['wiki']['tag_emphatic']= "_";
+?>+
\ No newline at end of file
diff --git a/config/convert.sh b/config/convert.sh
@@ -21,7 +21,7 @@ for fn in *.ini.php; do
echo "; next section: $line"
elif [ "${line:0:2}" == ";[" ]; then
sec="${fn}.${line:2}."
- ru="${line;1}"
+ ru="${line:1}"
echo ";;PHP \$conf['${fn}']['${ru}'] = array();"
echo "; next unused section: $line"
elif [ "$line" == "" ]; then
diff --git a/dispatcher.php b/dispatcher.php
@@ -58,12 +58,11 @@ if ( !is_array( $conf ) || @$REQ['reload']=='1' )
session_unset();
$conf = Preferences::load();
+ #echo "<code><tt>";
+ #print_r($conf);
+ #echo "</tt></code>";
- if ( $conf['config']['per_host_configuration'] )
- if ( !empty($_SERVER['HTTP_HOST']))
- $conf = Preferences::load($conf['config']['per_host_configuration_dir'].'/'.$_SERVER['HTTP_HOST'].'/');
-
- $conf['action'] = Preferences::load(OR_ACTIONCLASSES_DIR);
+ $conf['action'] = Preferences::loadDirectory(OR_ACTIONCLASSES_DIR);
$conf['build'] = parse_ini_file('build.ini');
// Sprache lesen und zur Konfiguration hinzufuegen
@@ -79,31 +78,31 @@ if ( !is_array( $conf ) || @$REQ['reload']=='1' )
// Default-Sprache hinzufuegen.
// Wird dann verwendet, wenn die vom Browser angeforderten Sprachen
- // nicht vorhanden sind
- $languages[] = $conf['i18n']['default'];
- $available = explode(',',$conf['i18n']['available']);
-
+ // nicht vorhanden sind
+ $languages[] = $conf['i18n']['default'];
+ $available = explode(',',$conf['i18n']['available']);
+
foreach( $languages as $l )
- {
- if ( !in_array($l,$available) )
- continue;
-
+ {
+ if ( !in_array($l,$available) )
+ continue;
+
// Pruefen, ob Sprache vorhanden ist.
$langFile = OR_LANGUAGE_DIR.$l.'.ini.'.PHP_EXT;
if ( !file_exists( $langFile ) )
- Http::serverError("File does not exist: ".$langFile);
-
+ Http::serverError("File does not exist: ".$langFile);
+
$conf['language'] = parse_ini_file( $langFile );
$conf['language']['language_code'] = $l;
break;
}
-
- if ( !isset($conf['language']) )
- Http::serverError('no language found! (languages='.implode(',',$languages).')' );
+
+ if ( !isset($conf['language']) )
+ Http::serverError('no language found! (languages='.implode(',',$languages).')' );
- // Schreibt die Konfiguration in die Sitzung. Diese wird anschliessend nicht
+ // Schreibt die Konfiguration in die Sitzung. Diese wird anschliessend nicht
// mehr veraendert.
Session::setConfig( $conf );
}
diff --git a/util/Preferences.class.php b/util/Preferences.class.php
@@ -16,7 +16,70 @@ class Preferences
* das Standard-Konfigurationsverzeichnis verwendet.
* @return Array
*/
- public static function load( $dir='' )
+ public static function load()
+ {
+ if ( !empty($_SERVER['OPENRAT_CONFIG_FILE']) )
+ {
+ $config_filename = $_SERVER['OPENRAT_CONFIG_FILE'];
+ }
+ else
+ {
+ if ( !empty($_SERVER['OPENRAT_CONFIG_DIR']) )
+ $dir = $_SERVER['OPENRAT_CONFIG_DIR'];
+ else
+ $dir = './config/';
+
+ if ( !empty($_SERVER['HTTP_HOST']) )
+ {
+ $vhost_config_file = slashify($dir).'config-'.$_SERVER['HTTP_HOST'].'.ini.php';
+
+ if ( is_file($vhost_config_file) )
+ $config_filename = $vhost_config_file;
+ else
+ $config_filename = slashify($dir).'config.ini.php';
+ }
+ }
+
+ require('./config/config-default.php');
+ //echo "default: "; print_r($conf);
+
+ if ( ! is_file($config_filename))
+ Http::serverError("Configuration not found","The file does not exist: ".$config_filename);
+
+ $ini_values = parse_ini_file( $config_filename,false );
+
+ //echo "loading ".$config_filename;
+ foreach ( $ini_values as $key=>$value )
+ {
+ $parts = explode('.',$key);
+ if ( count($parts)==1)
+ $conf[$parts[0]] = $value;
+ elseif ( count($parts)==2)
+ $conf[$parts[0]][$parts[1]] = $value;
+ elseif ( count($parts)==3)
+ $conf[$parts[0]][$parts[1]][$parts[2]] = $value;
+ elseif ( count($parts)==4)
+ $conf[$parts[0]][$parts[1]][$parts[2]][$parts[3]] = $value;
+ elseif ( count($parts)==5)
+ $conf[$parts[0]][$parts[1]][$parts[2]][$parts[3]][$parts[4]] = $value;
+ elseif ( count($parts)==6)
+ $conf[$parts[0]][$parts[1]][$parts[2]][$parts[3]][$parts[4]][$parts[5]] = $value;
+ }
+
+ return $conf;
+ }
+
+
+
+
+ /**
+ * Liest die Konfigurationsdateien im angegebenen Ordner.
+ *
+ * @param $dir Verzeichnis, welche gelesen wird. Optional. Falls nicht gesetzt, wird
+ * das Standard-Konfigurationsverzeichnis verwendet.
+ * @return Array
+ */
+ public static function loadDirectory( $dir='' )
{
if ( !defined('QUOTE') )
define('QUOTE','"');