From 34adfde5c4e797143ef5a54ab1c5c87a7464b85e Mon Sep 17 00:00:00 2001 From: Hannes Riebl <hannes.riebl@sub.uni-goettingen.de> Date: Thu, 24 Jan 2013 13:35:09 +0000 Subject: [PATCH] Simplify configuration git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@13757 7c539038-3410-0410-b1ec-0f2a7bf1c452 --- .../include/config.inc.php | 46 +++++++------------ .../include/menu.inc.php | 12 ----- ...hp.LICENSE => pwgen.class.php.LICENSE.txt} | 0 .../install/tgaccount.ini.tmpl | 24 +++++----- 4 files changed, 28 insertions(+), 54 deletions(-) delete mode 100644 info.textgrid.middleware.tgauth.tgaccount/include/menu.inc.php rename info.textgrid.middleware.tgauth.tgaccount/include/{pwgen.class.php.LICENSE => pwgen.class.php.LICENSE.txt} (100%) diff --git a/info.textgrid.middleware.tgauth.tgaccount/include/config.inc.php b/info.textgrid.middleware.tgauth.tgaccount/include/config.inc.php index d56d939..4eef3d5 100644 --- a/info.textgrid.middleware.tgauth.tgaccount/include/config.inc.php +++ b/info.textgrid.middleware.tgauth.tgaccount/include/config.inc.php @@ -1,38 +1,26 @@ <?php -// conf variables from ini file -// WARNING: should be outside webroot -$ini = parse_ini_file('/var/textgrid/tgaccount/tgaccount.ini'); -// path +// INI + +$conf = parse_ini_file('/var/textgrid/tgaccount/tgaccount.ini', TRUE); + +// Host + $conf['path'] = $_SERVER['DOCUMENT_ROOT'].'/tgaccount/'; -$conf['url'] = $ini['host']; - -// sqlite db settings -// WARNING: database should be outside webroot and needs to be writable by www user -$conf['sqlite']['path'] = $ini['sqlitePath']; - -// ldap-settings -$conf['ldap']['host'] = $ini['ldapHost']; -$conf['ldap']['port'] = $ini['ldapPort']; -$conf['ldap']['tls'] = $ini['ldapTLS']; -$conf['ldap']['managerdn'] = $ini['managerdn']; -$conf['ldap']['managerpassword'] = $ini['managerpassword']; -$conf['ldap']['debug'] = false; +$conf['url'] = $conf['host']['url']; +unset($conf['host']); + +// LDAP -// mail (imap) -$conf['mail']['sender'] = $ini['mailSender']; -$conf['mail']['reply'] = $ini['mailReply']; -$conf['mail']['cc'] = $ini['mailCC']; -$conf['mail']['smtpHost'] = $ini['smtpHost']; -$conf['mail']['smtpUser'] = $ini['smtpUser']; -$conf['mail']['smtpEhlo'] = $ini['smtpEhlo']; +$conf['ldap']['debug'] = false; -// textgrid-sandbox -$conf['sandbox'][0] = 'TGPR30'; -$conf['sandbox'][1] = 'TGPR31'; +// Smarty -// smarty -$conf['smarty']['incPath'] = $ini['smartyLib']; $conf['smarty']['path'] = $conf['path'].'smarty/'; +// Sandbox + +$conf['sandbox'][0] = 'TGPR30'; +$conf['sandbox'][1] = 'TGPR31'; + ?> diff --git a/info.textgrid.middleware.tgauth.tgaccount/include/menu.inc.php b/info.textgrid.middleware.tgauth.tgaccount/include/menu.inc.php deleted file mode 100644 index 562d2b3..0000000 --- a/info.textgrid.middleware.tgauth.tgaccount/include/menu.inc.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -$menu = '<div id="topMenu">'; -$menu .= '<ul class="menu mainMenu">'; -$menu .= '<li><a href="index.php">Ãœbersicht</a></li>'; -$menu .= '<li style="float:right"><a href="index.php?action=logout">Logout '.$conf['login']['user'].'</a></li>'; -$menu .= '</ul> - </div> - <div style="clear:both;"></div>'; - - -?> diff --git a/info.textgrid.middleware.tgauth.tgaccount/include/pwgen.class.php.LICENSE b/info.textgrid.middleware.tgauth.tgaccount/include/pwgen.class.php.LICENSE.txt similarity index 100% rename from info.textgrid.middleware.tgauth.tgaccount/include/pwgen.class.php.LICENSE rename to info.textgrid.middleware.tgauth.tgaccount/include/pwgen.class.php.LICENSE.txt diff --git a/info.textgrid.middleware.tgauth.tgaccount/install/tgaccount.ini.tmpl b/info.textgrid.middleware.tgauth.tgaccount/install/tgaccount.ini.tmpl index 3e0bc3e..e3508aa 100644 --- a/info.textgrid.middleware.tgauth.tgaccount/install/tgaccount.ini.tmpl +++ b/info.textgrid.middleware.tgauth.tgaccount/install/tgaccount.ini.tmpl @@ -1,25 +1,23 @@ [host] -host = http://localhost/tgaccount +url = http://localhost/tgaccount [sqlite] -# WARNING: database should be outside webroot and needs to be writable by www user -sqlitePath = /var/textgrid/tgaccount/tgaccount.sqlite +path = /var/textgrid/tgaccount/tgaccount.sqlite [ldap] -ldapHost = textgrid-users -ldapPort = 389 -ldapTLS = true +host = textgrid-users managerdn = "cn=Manager,dc=textgrid,dc=de" -managerpassword = +managerpassword = +port = 389 +tls = true [mail] -mailSender = no-reply@textgridlab.org -mailReply = register@textgrid.de -mailCC = TEXTGRID-REGISTER@D-GRID.DE +cc = textgrid-register@gwdg.de +reply = textgrid-register@gwdg.de +sender = no-reply@textgridlab.org +smtpEhlo = localhost smtpHost = localhost smtpUser = register@textgridlab.org -smtpEhlo = localhost [smarty] -smartyLib = /usr/share/php/smarty/libs/Smarty.class.php - +incPath = /usr/share/php/smarty/libs/Smarty.class.php -- GitLab