aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm/swatch.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-05-29 12:25:56 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-05-29 12:25:56 +0000
commit2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04 (patch)
tree3b7ea329bf35eab5ddab9b0b5eb790e45e283a5c /phpBB/adm/swatch.php
parent91b4fe1868ca2c4d81111943f781e3cfd0262ef2 (diff)
downloadforums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar.gz
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar.bz2
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar.xz
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.zip
ok... i hope i haven't messed too much with the code and everything is still working.
Changes: - Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed. - A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid('memberlist')) - in this case the root path and extension get added automatically. The hook is called after these are added. git-svn-id: file:///svn/phpbb/trunk@8572 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/adm/swatch.php')
-rw-r--r--phpBB/adm/swatch.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/adm/swatch.php b/phpBB/adm/swatch.php
index e372c16b9b..7ee6d7d0c0 100644
--- a/phpBB/adm/swatch.php
+++ b/phpBB/adm/swatch.php
@@ -13,9 +13,9 @@
*/
define('IN_PHPBB', true);
define('ADMIN_START', true);
-$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
-$phpEx = substr(strrchr(__FILE__, '.'), 1);
-include($phpbb_root_path . 'common.' . $phpEx);
+if (!defined('PHPBB_ROOT_PATH')) define('PHPBB_ROOT_PATH', './../');
+if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
+include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Start session management
$user->session_begin(false);
@@ -23,7 +23,7 @@ $auth->acl($user->data);
$user->setup();
// Set custom template for admin area
-$template->set_custom_template($phpbb_root_path . 'adm/style', 'admin');
+$template->set_custom_template(PHPBB_ROOT_PATH . CONFIG_ADM_FOLDER . '/style', 'admin');
$template->set_filenames(array(
'body' => 'colour_swatch.html')
@@ -39,7 +39,7 @@ $name = (!preg_match('/^[a-z0-9_-]+$/i', $name)) ? '' : $name;
$template->assign_vars(array(
'OPENER' => $form,
'NAME' => $name,
- 'T_IMAGES_PATH' => "{$phpbb_root_path}images/",
+ 'T_IMAGES_PATH' => PHPBB_ROOT_PATH . 'images/',
'S_USER_LANG' => $user->lang['USER_LANG'],
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],