From 57b28f1ae22362711eb3eb9006d39df34ad11ae7 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 28 May 2012 18:07:33 +0000 Subject: [PATCH] config.inc.php: - remove the (now superfluous) $CONF['postfix_admin_url'] config option debian/patches/db_credentials: - remove the section that sets $CONF['postfix_admin_url'] functions.inc.php - authentication_require_role(): - also remove $CONF['postfix_admin_url'] from comments - remove the './' part from the redirect Combined with the previous two commits, this fixes https://sourceforge.net/tracker/?func=detail&aid=3039042&group_id=191583&atid=937964 git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1396 a1433add-5e2c-0410-b055-b7f2511e0802 --- config.inc.php | 4 ---- debian/patches/db_credentials | 11 +---------- functions.inc.php | 5 ++--- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/config.inc.php b/config.inc.php index 867c7e2b..5c6d4b61 100644 --- a/config.inc.php +++ b/config.inc.php @@ -29,10 +29,6 @@ $CONF['configured'] = false; // To create the hash, visit setup.php in a browser and type a password into the field, // on submission it will be echoed out to you as a hashed value. $CONF['setup_password'] = 'changeme'; -// Postfix Admin Path -// Set the location of your Postfix Admin installation here. -// YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin -$CONF['postfix_admin_url'] = ''; // Language config // Language files are located in './languages', change as required.. diff --git a/debian/patches/db_credentials b/debian/patches/db_credentials index 70c858b4..9852e291 100644 --- a/debian/patches/db_credentials +++ b/debian/patches/db_credentials @@ -1,7 +1,7 @@ Description: This patch sets the dbconfig placeholders in config.inc.php. Forwarded: not-needed Author: Norman Messtorff -Last-Update: 2011-12-18 +Last-Update: 2012-05-28 Index: postfixadmin/config.inc.php =================================================================== @@ -28,15 +28,6 @@ Index: postfixadmin/config.inc.php // In order to setup Postfixadmin, you MUST specify a hashed password here. // To create the hash, visit setup.php in a browser and type a password into the field, -@@ -32,7 +37,7 @@ - // Postfix Admin Path - // Set the location of your Postfix Admin installation here. - // YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin --$CONF['postfix_admin_url'] = ''; -+$CONF['postfix_admin_url'] = '/postfixadmin'; - - // Language config - // Language files are located in './languages', change as required.. @@ -85,11 +90,11 @@ // mysql = MySQL 3.23 and 4.0, 4.1 or 5 // mysqli = MySQL 4.1+ diff --git a/functions.inc.php b/functions.inc.php index 178e18a1..fe9411d7 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -78,8 +78,7 @@ function authentication_has_role($role) { /** * Used to enforce that $user has a particular role when * viewing a page. - * If they are lacking a role, redirect them to - * $CONF['postfix_admin_url']/login.php + * If they are lacking a role, redirect them to login.php * * Note, user < admin < global-admin */ @@ -90,7 +89,7 @@ function authentication_require_role($role) { return True; } - header("Location: ./login.php"); + header("Location: login.php"); exit(0); } /**