diff options
| author | Nils Adermann <naderman@naderman.de> | 2012-05-31 15:34:48 +0200 | 
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2012-05-31 15:34:48 +0200 | 
| commit | b10757ef144d501af578edd4e438a088ee07ccf0 (patch) | |
| tree | 88a111606c37d9c0f245e9f4a129b96a12120672 | |
| parent | f6f300d3f9366a2c63e1b2dc4d8f35574c51ed4b (diff) | |
| parent | 9240ddbfa7cc4deb2076dcb989e6bfb318652e47 (diff) | |
| download | forums-b10757ef144d501af578edd4e438a088ee07ccf0.tar forums-b10757ef144d501af578edd4e438a088ee07ccf0.tar.gz forums-b10757ef144d501af578edd4e438a088ee07ccf0.tar.bz2 forums-b10757ef144d501af578edd4e438a088ee07ccf0.tar.xz forums-b10757ef144d501af578edd4e438a088ee07ccf0.zip  | |
Merge remote-tracking branch 'github-bantu/ticket/10611' into develop-olympus
By Andreas Fischer
via Andreas Fischer
* github-bantu/ticket/10611:
  [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.
| -rw-r--r-- | phpBB/includes/acp/acp_database.php | 12 | 
1 files changed, 9 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index 62bcd43a47..758cd10434 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -21,6 +21,7 @@ if (!defined('IN_PHPBB'))  */  class acp_database  { +	var $db_tools;  	var $u_action;  	function main($id, $mode) @@ -28,6 +29,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'; @@ -50,7 +57,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', ''); @@ -173,8 +180,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)  						{  | 
