mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 06:55:25 +02:00
Merge branch 'develop-olympus' into develop
By Andreas Fischer via Andreas Fischer (1) and Nils Adermann (1) * develop-olympus: [ticket/10611] Filter out not existing database tables when making a backup. [ticket/10611] Use phpbb_db_tools::sql_list_tables() instead of get_tables(). [ticket/10611] Generate db_tools instance in acp_database module.
This commit is contained in:
commit
bafaf3700c
@ -20,6 +20,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
class acp_database
|
||||
{
|
||||
var $db_tools;
|
||||
var $u_action;
|
||||
|
||||
function main($id, $mode)
|
||||
@ -27,6 +28,12 @@ class acp_database
|
||||
global $cache, $db, $user, $auth, $template, $table_prefix;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
if (!class_exists('phpbb_db_tools'))
|
||||
{
|
||||
require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
|
||||
}
|
||||
$this->db_tools = new phpbb_db_tools($db);
|
||||
|
||||
$user->add_lang('acp/database');
|
||||
|
||||
$this->tpl_name = 'acp_database';
|
||||
@ -49,7 +56,7 @@ class acp_database
|
||||
{
|
||||
case 'download':
|
||||
$type = request_var('type', '');
|
||||
$table = request_var('table', array(''));
|
||||
$table = array_intersect($this->db_tools->sql_list_tables(), request_var('table', array('')));
|
||||
$format = request_var('method', '');
|
||||
$where = request_var('where', '');
|
||||
|
||||
@ -172,8 +179,7 @@ class acp_database
|
||||
break;
|
||||
|
||||
default:
|
||||
include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
||||
$tables = get_tables($db);
|
||||
$tables = $this->db_tools->sql_list_tables();
|
||||
asort($tables);
|
||||
foreach ($tables as $table_name)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user