aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_database.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_database.php')
-rw-r--r--phpBB/includes/acp/acp_database.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index d8d4b8a306..62331fbca2 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package acp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* @package acp
*/
class acp_database
@@ -713,7 +721,7 @@ class mysql_extractor extends base_extractor
// Get field information
$field = array();
- for ($i = 0; $i < $fields_cnt; $i++)
+ for ($i = 0; $i < $fields_cnt; $i++)
{
$field[] = mysql_fetch_field($result, $i);
}
@@ -915,8 +923,8 @@ class sqlite_extractor extends base_extractor
$sql_data .= "DROP TABLE $table_name;\n";
$sql = "SELECT sql
- FROM sqlite_master
- WHERE type = 'table'
+ FROM sqlite_master
+ WHERE type = 'table'
AND name = '" . $db->sql_escape($table_name) . "'
ORDER BY type DESC, name;";
$result = $db->sql_query($sql);
@@ -974,8 +982,8 @@ class sqlite_extractor extends base_extractor
else
{
$sql = "SELECT sql
- FROM sqlite_master
- WHERE type = 'table'
+ FROM sqlite_master
+ WHERE type = 'table'
AND name = '" . $table_name . "'";
$table_data = sqlite_single_query($db->db_connect_id, $sql);
$table_data = preg_replace('#CREATE\s+TABLE\s+"?' . $table_name . '"?#i', '', $table_data);