aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/style.php
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2010-09-20 18:52:08 +0200
committerIgor Wiedler <igor@wiedler.ch>2010-09-20 18:52:08 +0200
commit15883dfac22c8a5660c0400c565ba980eaf6f618 (patch)
treed94aa952ef480bc2cda5128dbae315a369566c67 /phpBB/style.php
parent55808e11c987b72b6c2d364d4f17e11dfbbebc71 (diff)
downloadforums-15883dfac22c8a5660c0400c565ba980eaf6f618.tar
forums-15883dfac22c8a5660c0400c565ba980eaf6f618.tar.gz
forums-15883dfac22c8a5660c0400c565ba980eaf6f618.tar.bz2
forums-15883dfac22c8a5660c0400c565ba980eaf6f618.tar.xz
forums-15883dfac22c8a5660c0400c565ba980eaf6f618.zip
[feature/request-class] Add $request to style.php, minor change
Add $request instantiation to style.php to allow request_var to work properly. Also remove unneeded globalization of $request in ucp.php. PHPBB3-9716
Diffstat (limited to 'phpBB/style.php')
-rw-r--r--phpBB/style.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/style.php b/phpBB/style.php
index 026b5eecfc..368a7132e4 100644
--- a/phpBB/style.php
+++ b/phpBB/style.php
@@ -45,6 +45,7 @@ if (!empty($load_extensions) && function_exists('dl'))
}
}
+// no $request here because it is not loaded yet
$id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
// This is a simple script to grab and output the requested CSS data stored in the DB
@@ -67,8 +68,12 @@ if ($id)
$class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx, $cache);
$class_loader->register();
+ $request = new phpbb_request();
$db = new $sql_db();
+ // make sure request_var uses this request instance
+ request_var('', 0, false, false, $request); // "dependency injection" for a function
+
// Connect to DB
if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
{