mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[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
This commit is contained in:
parent
55808e11c9
commit
15883dfac2
2 changed files with 5 additions and 2 deletions
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -136,8 +136,6 @@ switch ($mode)
|
|||
|
||||
case 'delete_cookies':
|
||||
|
||||
global $request;
|
||||
|
||||
// Delete Cookies with dynamic names (do NOT delete poll cookies)
|
||||
if (confirm_box(true))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue