From 89ffcbf25f0a03db8bca678c750bb67db9150fb4 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 28 May 2012 18:01:31 +0000 Subject: [PATCH] smarty.inc.php: - replace (last) usage of $CONF['postfix_admin_url'] with $rel_path (relative path to CSS etc., set to '../' in users/*) users/*.php: - set $rel_path to '../' 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@1395 a1433add-5e2c-0410-b055-b7f2511e0802 --- smarty.inc.php | 8 +++++--- users/edit-alias.php | 1 + users/login.php | 1 + users/main.php | 1 + users/password.php | 1 + users/vacation.php | 1 + 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/smarty.inc.php b/smarty.inc.php index 22138d02..314531ac 100644 --- a/smarty.inc.php +++ b/smarty.inc.php @@ -53,9 +53,11 @@ class PFASmarty { } $smarty = new PFASmarty(); -$CONF['theme_css'] = $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_css']); -if ($CONF['theme_custom_css'] != "") $CONF['theme_custom_css'] = $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_custom_css']); -$CONF['theme_logo'] = $CONF['postfix_admin_url'].'/'.htmlentities($CONF['theme_logo']); +if (!isset($rel_path)) $rel_path = ''; # users/* sets this to '../' + +$CONF['theme_css'] = $rel_path . htmlentities($CONF['theme_css']); +if ($CONF['theme_custom_css'] != "") $CONF['theme_custom_css'] = $rel_path . htmlentities($CONF['theme_custom_css']); +$CONF['theme_logo'] = $rel_path . htmlentities($CONF['theme_logo']); $smarty->assign ('CONF', $CONF); $smarty->assign ('PALANG', $PALANG); diff --git a/users/edit-alias.php b/users/edit-alias.php index 9c0f7e9a..f56d22dc 100644 --- a/users/edit-alias.php +++ b/users/edit-alias.php @@ -19,6 +19,7 @@ * */ +$rel_path = '../'; require_once('../common.php'); $smarty->assign ('smarty_template', 'users_edit-alias'); diff --git a/users/login.php b/users/login.php index 8829f0f8..96dc72bb 100644 --- a/users/login.php +++ b/users/login.php @@ -27,6 +27,7 @@ * lang */ +$rel_path = '../'; require_once("../common.php"); diff --git a/users/main.php b/users/main.php index 167868f1..6caf3be8 100644 --- a/users/main.php +++ b/users/main.php @@ -23,6 +23,7 @@ * Form POST \ GET Variables: -none- */ +$rel_path = '../'; require_once('../common.php'); authentication_require_role('user'); $USERID_USERNAME = authentication_get_username(); diff --git a/users/password.php b/users/password.php index 7b5b0531..ced27b5f 100644 --- a/users/password.php +++ b/users/password.php @@ -27,6 +27,7 @@ * fPassword2 */ +$rel_path = '../'; require_once('../common.php'); authentication_require_role('user'); diff --git a/users/vacation.php b/users/vacation.php index 5498875b..fb4740c5 100644 --- a/users/vacation.php +++ b/users/vacation.php @@ -17,6 +17,7 @@ * */ +$rel_path = '../'; require_once('../common.php'); require_once('../vacation.php');