Merge remote-tracking branch 'igorw/ticket/10359' into develop

* igorw/ticket/10359:
  [ticket/10359] Fix phpbb_request regression in download/file.php
This commit is contained in:
Andreas Fischer 2011-09-08 23:02:22 +02:00
commit 56bd8f27cd

View file

@ -44,6 +44,7 @@ if (isset($_GET['avatar']))
require($phpbb_root_path . 'includes/constants.' . $phpEx); require($phpbb_root_path . 'includes/constants.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx);
require($phpbb_root_path . 'includes/functions_download' . '.' . $phpEx); require($phpbb_root_path . 'includes/functions_download' . '.' . $phpEx);
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
$class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx); $class_loader = new phpbb_class_loader($phpbb_root_path, '.' . $phpEx);
$class_loader->register(); $class_loader->register();
@ -53,6 +54,7 @@ if (isset($_GET['avatar']))
$cache = $cache_factory->get_service(); $cache = $cache_factory->get_service();
$class_loader->set_cache($cache->get_driver()); $class_loader->set_cache($cache->get_driver());
$request = new phpbb_request();
$db = new $sql_db(); $db = new $sql_db();
// Connect to DB // Connect to DB
@ -62,6 +64,8 @@ if (isset($_GET['avatar']))
} }
unset($dbpasswd); unset($dbpasswd);
request_var('', 0, false, false, $request);
// worst-case default // worst-case default
$browser = strtolower($request->header('User-Agent', 'msie 6.0')); $browser = strtolower($request->header('User-Agent', 'msie 6.0'));