aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/develop
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-11-18 19:14:06 +0100
committerNils Adermann <naderman@naderman.de>2011-11-18 19:14:06 +0100
commitaddf81f62e69e23b4f31fc48997ac38683b88ebf (patch)
tree4078d3786e8c84f253aa80a73214c2d5ad2de00a /phpBB/develop
parent5068c0588733f80a8433aea1cd6f763819caa9f7 (diff)
parent03918f7fd2fd790d5ebd4330f9f913bfcc206f91 (diff)
downloadforums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.gz
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.bz2
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.tar.xz
forums-addf81f62e69e23b4f31fc48997ac38683b88ebf.zip
Merge branch 'develop' into feature/extension-manager
* develop: (93 commits) [ticket/10157] Add notification to update cpfs when installing a language. [ticket/10185] Always set board startdate on conversion [ticket/10419] Reword the language strings [ticket/9361] View correct error messages when editing account information [ticket/10457] Undefined variable $request, when print-viewing PMs [ticket/10452] Fix xHTML errors when print-viewing PMs [ticket/9066] Move regex into get_preg_expression function and add tests [ticket/10254] Add "phpBB Group" to "Modified by" in prosilver stylesheet.css [ticket/10254] Removing the subsilver2 NOTE, incompatible with phpBB.com. [ticket/10254] Removing the NOTE as it is incompatible with phpBB.com. [ticket/10254] Remove subsilver2 as default style on theme. [ticket/10254] Remove style names from themes and fix some informations on it. [ticket/7138] Allow simple header and footer for trigger_error() messages [ticket/9066] Disallow some database prefix to prevent same errors and problems [ticket/10365] Fix up S_POST_UNAPPROVED check, make it easier to read [ticket/10437] Do not display announcements that are waiting for approval [ticket/10087] Organize bans in acp_baninto optgroups [ticket/8616] Include old U_INBOX var for BC [ticket/10435] Remove global announcement from forums total topic count [ticket/10435] Readd local announcements to total topic count in viewforum ... Conflicts: phpBB/install/database_update.php
Diffstat (limited to 'phpBB/develop')
-rw-r--r--phpBB/develop/create_schema_files.php72
1 files changed, 24 insertions, 48 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php
index 1828719570..1735bffef5 100644
--- a/phpBB/develop/create_schema_files.php
+++ b/phpBB/develop/create_schema_files.php
@@ -12,11 +12,7 @@
* If you overwrite the original schema files please make sure you save the file with UNIX linefeeds.
*/
-die("Please read the first lines of this script for instructions on how to enable it");
-
-@set_time_limit(0);
-
-$schema_path = './../install/schemas/';
+$schema_path = dirname(__FILE__) . '/../install/schemas/';
if (!is_writable($schema_path))
{
@@ -242,7 +238,7 @@ $supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', '
foreach ($supported_dbms as $dbms)
{
- $fp = fopen($schema_path . '_' . $dbms . '_schema.sql', 'wt');
+ $fp = fopen($schema_path . $dbms . '_schema.sql', 'wt');
$line = '';
@@ -251,32 +247,43 @@ foreach ($supported_dbms as $dbms)
{
case 'mysql_40':
case 'mysql_41':
- $line = "#\n# \$I" . "d: $\n#\n\n";
+ case 'firebird':
+ case 'sqlite':
+ fwrite($fp, "# DO NOT EDIT THIS FILE, IT IS GENERATED\n");
+ fwrite($fp, "#\n");
+ fwrite($fp, "# To change the contents of this file, edit\n");
+ fwrite($fp, "# phpBB/develop/create_schema_files.php and\n");
+ fwrite($fp, "# run it.\n");
+ break;
+
+ case 'mssql':
+ case 'oracle':
+ case 'postgres':
+ fwrite($fp, "/*\n");
+ fwrite($fp, " * DO NOT EDIT THIS FILE, IT IS GENERATED\n");
+ fwrite($fp, " *\n");
+ fwrite($fp, " * To change the contents of this file, edit\n");
+ fwrite($fp, " * phpBB/develop/create_schema_files.php and\n");
+ fwrite($fp, " * run it.\n");
+ fwrite($fp, " */\n\n");
break;
+ }
+ switch ($dbms)
+ {
case 'firebird':
- $line = "#\n# \$I" . "d: $\n#\n\n";
$line .= custom_data('firebird') . "\n";
break;
case 'sqlite':
- $line = "#\n# \$I" . "d: $\n#\n\n";
$line .= "BEGIN TRANSACTION;\n\n";
break;
- case 'mssql':
- $line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
- // no need to do this, no transaction support for schema changes
- //$line .= "BEGIN TRANSACTION\nGO\n\n";
- break;
-
case 'oracle':
- $line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
$line .= custom_data('oracle') . "\n";
break;
case 'postgres':
- $line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
$line .= "BEGIN;\n\n";
$line .= custom_data('postgres') . "\n";
break;
@@ -1650,14 +1657,12 @@ function get_schema_struct()
'style_active' => array('BOOL', 1),
'template_id' => array('UINT', 0),
'theme_id' => array('UINT', 0),
- 'imageset_id' => array('UINT', 0),
),
'PRIMARY_KEY' => 'style_id',
'KEYS' => array(
'style_name' => array('UNIQUE', 'style_name'),
'template_id' => array('INDEX', 'template_id'),
'theme_id' => array('INDEX', 'theme_id'),
- 'imageset_id' => array('INDEX', 'imageset_id'),
),
);
@@ -1690,35 +1695,6 @@ function get_schema_struct()
),
);
- $schema_data['phpbb_styles_imageset'] = array(
- 'COLUMNS' => array(
- 'imageset_id' => array('UINT', NULL, 'auto_increment'),
- 'imageset_name' => array('VCHAR_UNI:255', ''),
- 'imageset_copyright' => array('VCHAR_UNI', ''),
- 'imageset_path' => array('VCHAR:100', ''),
- ),
- 'PRIMARY_KEY' => 'imageset_id',
- 'KEYS' => array(
- 'imgset_nm' => array('UNIQUE', 'imageset_name'),
- ),
- );
-
- $schema_data['phpbb_styles_imageset_data'] = array(
- 'COLUMNS' => array(
- 'image_id' => array('UINT', NULL, 'auto_increment'),
- 'image_name' => array('VCHAR:200', ''),
- 'image_filename' => array('VCHAR:200', ''),
- 'image_lang' => array('VCHAR:30', ''),
- 'image_height' => array('USINT', 0),
- 'image_width' => array('USINT', 0),
- 'imageset_id' => array('UINT', 0),
- ),
- 'PRIMARY_KEY' => 'image_id',
- 'KEYS' => array(
- 'i_d' => array('INDEX', 'imageset_id'),
- ),
- );
-
$schema_data['phpbb_topics'] = array(
'COLUMNS' => array(
'topic_id' => array('UINT', NULL, 'auto_increment'),