diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2010-12-28 22:40:09 +0100 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2010-12-28 22:40:09 +0100 |
| commit | 6e51e52f0c0f34a5dea8e3e1730de039ed5895e6 (patch) | |
| tree | 77a05c95078c7f86bfd1c5ae3780788198694e0e /phpBB/includes/acp/acp_database.php | |
| parent | 90ccdb4dad6521fe0431ab1e9373c5821156bc46 (diff) | |
| parent | 6b4d0a254218e8d40151ca1bdff8c439f89502e9 (diff) | |
| download | forums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.tar forums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.tar.gz forums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.tar.bz2 forums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.tar.xz forums-6e51e52f0c0f34a5dea8e3e1730de039ed5895e6.zip | |
Merge branch 'ticket/igorw/9574' into develop
* ticket/igorw/9574:
[ticket/9574] Add pcre_utf8_support() function
[ticket/9574] Remove conditional PHP<5.2 code
[ticket/9574] Drop fallback implementations
Diffstat (limited to 'phpBB/includes/acp/acp_database.php')
| -rw-r--r-- | phpBB/includes/acp/acp_database.php | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index deff7d4a65..96542986d3 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -1007,43 +1007,8 @@ class sqlite_extractor extends base_extractor function write_data($table_name) { global $db; - static $proper; - if (is_null($proper)) - { - $proper = version_compare(PHP_VERSION, '5.1.3', '>='); - } - - if ($proper) - { - $col_types = sqlite_fetch_column_types($db->db_connect_id, $table_name); - } - else - { - $sql = "SELECT sql - 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); - $table_data = trim($table_data); - - preg_match('#\((.*)\)#s', $table_data, $matches); - - $table_cols = explode(',', trim($matches[1])); - foreach ($table_cols as $declaration) - { - $entities = preg_split('#\s+#', trim($declaration)); - $column_name = preg_replace('/"?([^"]+)"?/', '\1', $entities[0]); - - // Hit a primary key, those are not what we need :D - if (empty($entities[1]) || (strtolower($entities[0]) === 'primary' && strtolower($entities[1]) === 'key')) - { - continue; - } - $col_types[$column_name] = $entities[1]; - } - } + $col_types = sqlite_fetch_column_types($db->db_connect_id, $table_name); $sql = "SELECT * FROM $table_name"; |
