diff options
author | Igor Wiedler <igor@wiedler.ch> | 2012-04-07 18:27:30 +0200 |
---|---|---|
committer | Igor Wiedler <igor@wiedler.ch> | 2012-04-07 18:27:30 +0200 |
commit | 24daef1aafb0a733c3428122d740fea17d4f34a0 (patch) | |
tree | 19338a7c549089437f2f9cb708f6afb8a26e733a /phpBB/install | |
parent | 3963b39634225a68687cf1b817a47ae1eeb6ac79 (diff) | |
parent | 713e7129e2dfb1039f5198c03c8808c8410f434a (diff) | |
download | forums-24daef1aafb0a733c3428122d740fea17d4f34a0.tar forums-24daef1aafb0a733c3428122d740fea17d4f34a0.tar.gz forums-24daef1aafb0a733c3428122d740fea17d4f34a0.tar.bz2 forums-24daef1aafb0a733c3428122d740fea17d4f34a0.tar.xz forums-24daef1aafb0a733c3428122d740fea17d4f34a0.zip |
Merge branch 'develop' into feature/avatars
* develop: (335 commits)
[ticket/10575] Adding public visibility to the methods.
[ticket/10575] Fixing non-static access to static functions get_instance
[ticket/10547] User is not logged in as admin after installation
[ticket/10650] Revert merge of 'rahulr92/ticket/10650' into develop
[ticket/10650] Added checking for empty subjects
[ticket/10650] Corrected intendation
[ticket/10650]Added permission checking and utf8 functions
[ticket/10650] Cropped subject and inserted newline
[ticket/10650] Corrected space before true
[ticket/10650] Changed language files and forumlist
[ticket/10650] Added static sql files
[ticket/10650] Displaying last topic on forum list
[ticket/10760] Fix numbering in php fun facts.
[ticket/10760] Value must be quoted as it might be two words.
[ticket/10760] PHP is great. This commit is the proof.
[ticket/10760] Catch both versions of parse error output in php.
[ticket/10607] Added 'Powered by' translation string.
[ticket/10760] Account for display_errors=stderr in pre-commit hook.
[ticket/10760] Quote PHP_BIN when using it.
[ticket/10760] Use echo -e only if echo understands -e.
...
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/database_update.php | 55 | ||||
-rw-r--r-- | phpBB/install/index.php | 22 | ||||
-rw-r--r-- | phpBB/install/install_install.php | 5 | ||||
-rw-r--r-- | phpBB/install/install_update.php | 62 | ||||
-rw-r--r-- | phpBB/install/schemas/firebird_schema.sql | 60 | ||||
-rw-r--r-- | phpBB/install/schemas/mssql_schema.sql | 62 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_40_schema.sql | 36 | ||||
-rw-r--r-- | phpBB/install/schemas/mysql_41_schema.sql | 36 | ||||
-rw-r--r-- | phpBB/install/schemas/oracle_schema.sql | 74 | ||||
-rw-r--r-- | phpBB/install/schemas/postgres_schema.sql | 42 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 8 | ||||
-rw-r--r-- | phpBB/install/schemas/sqlite_schema.sql | 34 |
12 files changed, 105 insertions, 391 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index ba6d5d34e2..e85fe1810d 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -84,8 +84,6 @@ if (!empty($load_extensions) && function_exists('dl')) // Include files require($phpbb_root_path . 'includes/class_loader.' . $phpEx); -require($phpbb_root_path . 'includes/session.' . $phpEx); -require($phpbb_root_path . 'includes/auth.' . $phpEx); require($phpbb_root_path . 'includes/functions.' . $phpEx); @@ -120,8 +118,9 @@ $cache = $cache_factory->get_service(); $phpbb_class_loader_ext->set_cache($cache->get_driver()); $phpbb_class_loader->set_cache($cache->get_driver()); +$phpbb_dispatcher = new phpbb_event_dispatcher(); $request = new phpbb_request(); -$user = new user(); +$user = new phpbb_user(); $db = new $sql_db(); // make sure request_var uses this request instance @@ -1088,6 +1087,15 @@ function database_update_info() PROFILE_FIELDS_TABLE => array( 'field_show_on_pm' => array('BOOL', 0), ), + STYLES_TABLE => array( + 'style_path' => array('VCHAR:100', ''), + 'bbcode_bitfield' => array('VCHAR:255', 'kNg='), + 'style_parent_id' => array('UINT:4', 0), + 'style_parent_tree' => array('TEXT', ''), + ), + REPORTS_TABLE => array( + 'reported_post_text' => array('MTEXT_UNI', ''), + ), ), 'change_columns' => array( GROUPS_TABLE => array( @@ -1101,20 +1109,16 @@ function database_update_info() 'drop_columns' => array( STYLES_TABLE => array( 'imageset_id', + 'template_id', + 'theme_id', ), - STYLES_TEMPLATE_TABLE => array( - 'template_storedb', - ), - STYLES_THEME_TABLE => array( - 'theme_storedb', - 'theme_mtime', - 'theme_data', - ), ), 'drop_tables' => array( STYLES_IMAGESET_TABLE, STYLES_IMAGESET_DATA_TABLE, + STYLES_TEMPLATE_TABLE, STYLES_TEMPLATE_DATA_TABLE, + STYLES_THEME_TABLE, ), ), ); @@ -2271,12 +2275,33 @@ function change_database_data(&$no_updates, $version) 'auth' => 'acl_a_attach', 'cat' => 'ACP_ATTACHMENTS', ), + 'install' => array( + 'base' => 'acp_styles', + 'class' => 'acp', + 'title' => 'ACP_STYLES_INSTALL', + 'auth' => 'acl_a_styles', + 'cat' => 'ACP_STYLE_MANAGEMENT', + ), + 'edit' => array( + 'base' => 'acp_styles', + 'class' => 'acp', + 'title' => 'ACP_STYLES_EDIT', + 'auth' => 'acl_a_styles', + 'cat' => 'ACP_STYLE_MANAGEMENT', + ), + 'cache' => array( + 'base' => 'acp_styles', + 'class' => 'acp', + 'title' => 'ACP_STYLES_CACHE', + 'auth' => 'acl_a_styles', + 'cat' => 'ACP_STYLE_MANAGEMENT', + ), ); _add_modules($modules_to_install); $sql = 'DELETE FROM ' . MODULES_TABLE . " - WHERE module_basename = 'styles' AND module_mode = 'imageset'"; + WHERE (module_basename = 'styles' OR module_basename = 'acp_styles') AND (module_mode = 'imageset' OR module_mode = 'theme' OR module_mode = 'template')"; _sql($sql, $errored, $error_ary); // Localise Global Announcements @@ -2366,7 +2391,13 @@ function change_database_data(&$no_updates, $version) { set_config('teampage_memberships', '1'); } + + // Clear styles table and add prosilver entry + _sql('DELETE FROM ' . STYLES_TABLE, $errored, $error_ary); + $sql = 'INSERT INTO ' . STYLES_TABLE . " (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Group', 1, 'prosilver', 'kNg=', 0, '')"; + _sql($sql, $errored, $error_ary); + $no_updates = false; break; diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 9d003ba6ab..13ab30a9fa 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -17,9 +17,9 @@ define('IN_INSTALL', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); -if (version_compare(PHP_VERSION, '5.2.0') < 0) +if (version_compare(PHP_VERSION, '5.3.2') < 0) { - die('You are running an unsupported PHP version. Please upgrade to PHP 5.2.0 or higher before trying to install phpBB 3.1'); + die('You are running an unsupported PHP version. Please upgrade to PHP 5.3.2 or higher before trying to install phpBB 3.1'); } function phpbb_require_updated($path, $optional = false) @@ -75,8 +75,6 @@ require($phpbb_root_path . 'includes/functions.' . $phpEx); phpbb_require_updated('includes/functions_content.' . $phpEx, true); -include($phpbb_root_path . 'includes/auth.' . $phpEx); -include($phpbb_root_path . 'includes/session.' . $phpEx); include($phpbb_root_path . 'includes/functions_admin.' . $phpEx); include($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx); require($phpbb_root_path . 'includes/functions_install.' . $phpEx); @@ -92,6 +90,7 @@ $cache = $cache_factory->get_service(); $phpbb_class_loader_ext->set_cache($cache->get_driver()); $phpbb_class_loader->set_cache($cache->get_driver()); +$phpbb_dispatcher = new phpbb_event_dispatcher(); $request = new phpbb_request(); // make sure request_var uses this request instance @@ -177,8 +176,8 @@ $sub = request_var('sub', ''); // Set PHP error handler to ours set_error_handler(defined('PHPBB_MSG_HANDLER') ? PHPBB_MSG_HANDLER : 'msg_handler'); -$user = new user(); -$auth = new auth(); +$user = new phpbb_user(); +$auth = new phpbb_auth(); // Add own hook handler, if present. :o if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx)) @@ -201,11 +200,12 @@ $config = new phpbb_config(array( 'load_tplcompile' => '1' )); -$phpbb_template_locator = new phpbb_template_locator(); -$phpbb_template_path_provider = new phpbb_template_path_provider(); -$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_template_locator, $phpbb_template_path_provider); -$template->set_ext_dir_prefix('adm/'); -$template->set_custom_template('../adm/style', 'admin'); +$phpbb_style_resource_locator = new phpbb_style_resource_locator(); +$phpbb_style_path_provider = new phpbb_style_path_provider(); +$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider); +$style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); +$style->set_ext_dir_prefix('adm/'); +$style->set_custom_style('admin', '../adm/style', ''); $template->assign_var('T_ASSETS_PATH', '../assets'); $template->assign_var('T_TEMPLATE_PATH', '../adm/style'); diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 4663b5204e..7558fde944 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -140,7 +140,7 @@ class install_install extends module // Test the minimum PHP version $php_version = PHP_VERSION; - if (version_compare($php_version, '5.2.0') < 0) + if (version_compare($php_version, '5.3.2') < 0) { $result = '<strong style="color:red">' . $lang['NO'] . '</strong>'; } @@ -1804,6 +1804,9 @@ class install_install extends module $this->page_title = $lang['STAGE_FINAL']; + // Obtain any submitted data + $data = $this->get_submitted_data(); + // We need to fill the config to let internal functions correctly work $config = new phpbb_config_db($db, new phpbb_cache_driver_null, CONFIG_TABLE); set_config(null, null, null, $config); diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index 9f50a56595..dcf01e5cc8 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -71,7 +71,7 @@ class install_update extends module function main($mode, $sub) { - global $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language; + global $style, $template, $phpEx, $phpbb_root_path, $user, $db, $config, $cache, $auth, $language; global $request; $this->tpl_name = 'install_update'; @@ -131,7 +131,7 @@ class install_update extends module } // Set custom template again. ;) - $template->set_custom_template('../adm/style', 'admin'); + $style->set_custom_style('admin', '../adm/style', ''); $template->assign_vars(array( 'S_USER_LANG' => $user->lang['USER_LANG'], @@ -504,56 +504,6 @@ class install_update extends module // Add database update to log add_log('admin', 'LOG_UPDATE_PHPBB', $this->current_version, $this->update_to_version); - // Refresh prosilver css data - this may cause some unhappy users, but - $sql = 'SELECT * - FROM ' . STYLES_THEME_TABLE . " - WHERE LOWER(theme_name) = 'prosilver'"; - $result = $db->sql_query($sql); - $theme = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if ($theme) - { - $recache = (empty($theme['theme_data'])) ? true : false; - $update_time = time(); - - // We test for stylesheet.css because it is faster and most likely the only file changed on common themes - if (!$recache && $theme['theme_mtime'] < @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css')) - { - $recache = true; - $update_time = @filemtime("{$phpbb_root_path}styles/" . $theme['theme_path'] . '/theme/stylesheet.css'); - } - else if (!$recache) - { - $last_change = $theme['theme_mtime']; - $dir = @opendir("{$phpbb_root_path}styles/{$theme['theme_path']}/theme"); - - if ($dir) - { - while (($entry = readdir($dir)) !== false) - { - if (substr(strrchr($entry, '.'), 1) == 'css' && $last_change < @filemtime("{$phpbb_root_path}styles/{$theme['theme_path']}/theme/{$entry}")) - { - $recache = true; - break; - } - } - closedir($dir); - } - } - - if ($recache) - { - // Instead of re-caching here, we simply remove theme_data... HAR HAR HAR (think about a carribean pirate) - $sql = 'UPDATE ' . STYLES_THEME_TABLE . " SET theme_data = '' - WHERE theme_id = " . $theme['theme_id']; - $db->sql_query($sql); - - $cache->destroy('sql', STYLES_THEME_TABLE); - $cache->destroy('sql', STYLES_TABLE); - } - } - $db->sql_return_on_error(true); $db->sql_query('DELETE FROM ' . CONFIG_TABLE . " WHERE config_name = 'version_update_from'"); $db->sql_return_on_error(false); @@ -1694,9 +1644,9 @@ class install_update extends module $info['custom'] = array(); /* // Get custom installed styles... - $sql = 'SELECT template_name, template_path - FROM ' . STYLES_TEMPLATE_TABLE . " - WHERE LOWER(template_name) NOT IN ('subsilver2', 'prosilver')"; + $sql = 'SELECT style_name, style_path + FROM ' . STYLES_TABLE . " + WHERE LOWER(style_name) NOT IN ('subsilver2', 'prosilver')"; $result = $db->sql_query($sql); $templates = array(); @@ -1715,7 +1665,7 @@ class install_update extends module { foreach ($templates as $row) { - $info['custom'][$filename][] = str_replace('/prosilver/', '/' . $row['template_path'] . '/', $filename); + $info['custom'][$filename][] = str_replace('/prosilver/', '/' . $row['style_path'] . '/', $filename); } } } diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 8b5bc90afa..68cdca57f8 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -909,7 +909,8 @@ CREATE TABLE phpbb_reports ( user_notify INTEGER DEFAULT 0 NOT NULL, report_closed INTEGER DEFAULT 0 NOT NULL, report_time INTEGER DEFAULT 0 NOT NULL, - report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL + report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, + reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL );; ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);; @@ -1086,15 +1087,15 @@ CREATE TABLE phpbb_styles ( style_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, style_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, style_active INTEGER DEFAULT 1 NOT NULL, - template_id INTEGER DEFAULT 0 NOT NULL, - theme_id INTEGER DEFAULT 0 NOT NULL + style_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, + bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL, + style_parent_id INTEGER DEFAULT 0 NOT NULL, + style_parent_tree BLOB SUB_TYPE TEXT CHARACTER SET NONE DEFAULT '' NOT NULL );; ALTER TABLE phpbb_styles ADD PRIMARY KEY (style_id);; CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles(style_name);; -CREATE INDEX phpbb_styles_template_id ON phpbb_styles(template_id);; -CREATE INDEX phpbb_styles_theme_id ON phpbb_styles(theme_id);; CREATE GENERATOR phpbb_styles_gen;; SET GENERATOR phpbb_styles_gen TO 0;; @@ -1107,55 +1108,6 @@ BEGIN END;; -# Table: 'phpbb_styles_template' -CREATE TABLE phpbb_styles_template ( - template_id INTEGER NOT NULL, - template_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - template_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - template_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL, - bbcode_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT 'kNg=' NOT NULL, - template_inherits_id INTEGER DEFAULT 0 NOT NULL, - template_inherit_path VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_styles_template ADD PRIMARY KEY (template_id);; - -CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template(template_name);; - -CREATE GENERATOR phpbb_styles_template_gen;; -SET GENERATOR phpbb_styles_template_gen TO 0;; - -CREATE TRIGGER t_phpbb_styles_template FOR phpbb_styles_template -BEFORE INSERT -AS -BEGIN - NEW.template_id = GEN_ID(phpbb_styles_template_gen, 1); -END;; - - -# Table: 'phpbb_styles_theme' -CREATE TABLE phpbb_styles_theme ( - theme_id INTEGER NOT NULL, - theme_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - theme_copyright VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - theme_path VARCHAR(100) CHARACTER SET NONE DEFAULT '' NOT NULL -);; - -ALTER TABLE phpbb_styles_theme ADD PRIMARY KEY (theme_id);; - -CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme(theme_name);; - -CREATE GENERATOR phpbb_styles_theme_gen;; -SET GENERATOR phpbb_styles_theme_gen TO 0;; - -CREATE TRIGGER t_phpbb_styles_theme FOR phpbb_styles_theme -BEFORE INSERT -AS -BEGIN - NEW.theme_id = GEN_ID(phpbb_styles_theme_gen, 1); -END;; - - # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( topic_id INTEGER NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 65ef420877..2cf60e9f02 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -1108,7 +1108,8 @@ CREATE TABLE [phpbb_reports] ( [user_notify] [int] DEFAULT (0) NOT NULL , [report_closed] [int] DEFAULT (0) NOT NULL , [report_time] [int] DEFAULT (0) NOT NULL , - [report_text] [text] DEFAULT ('') NOT NULL + [report_text] [text] DEFAULT ('') NOT NULL , + [reported_post_text] [text] DEFAULT ('') NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO @@ -1322,8 +1323,10 @@ CREATE TABLE [phpbb_styles] ( [style_name] [varchar] (255) DEFAULT ('') NOT NULL , [style_copyright] [varchar] (255) DEFAULT ('') NOT NULL , [style_active] [int] DEFAULT (1) NOT NULL , - [template_id] [int] DEFAULT (0) NOT NULL , - [theme_id] [int] DEFAULT (0) NOT NULL + [style_path] [varchar] (100) DEFAULT ('') NOT NULL , + [bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL , + [style_parent_id] [int] DEFAULT (0) NOT NULL , + [style_parent_tree] [varchar] (8000) DEFAULT ('') NOT NULL ) ON [PRIMARY] GO @@ -1337,59 +1340,6 @@ GO CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY] GO -CREATE INDEX [template_id] ON [phpbb_styles]([template_id]) ON [PRIMARY] -GO - -CREATE INDEX [theme_id] ON [phpbb_styles]([theme_id]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_styles_template' -*/ -CREATE TABLE [phpbb_styles_template] ( - [template_id] [int] IDENTITY (1, 1) NOT NULL , - [template_name] [varchar] (255) DEFAULT ('') NOT NULL , - [template_copyright] [varchar] (255) DEFAULT ('') NOT NULL , - [template_path] [varchar] (100) DEFAULT ('') NOT NULL , - [bbcode_bitfield] [varchar] (255) DEFAULT ('kNg=') NOT NULL , - [template_inherits_id] [int] DEFAULT (0) NOT NULL , - [template_inherit_path] [varchar] (255) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_styles_template] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_styles_template] PRIMARY KEY CLUSTERED - ( - [template_id] - ) ON [PRIMARY] -GO - -CREATE UNIQUE INDEX [tmplte_nm] ON [phpbb_styles_template]([template_name]) ON [PRIMARY] -GO - - -/* - Table: 'phpbb_styles_theme' -*/ -CREATE TABLE [phpbb_styles_theme] ( - [theme_id] [int] IDENTITY (1, 1) NOT NULL , - [theme_name] [varchar] (255) DEFAULT ('') NOT NULL , - [theme_copyright] [varchar] (255) DEFAULT ('') NOT NULL , - [theme_path] [varchar] (100) DEFAULT ('') NOT NULL -) ON [PRIMARY] -GO - -ALTER TABLE [phpbb_styles_theme] WITH NOCHECK ADD - CONSTRAINT [PK_phpbb_styles_theme] PRIMARY KEY CLUSTERED - ( - [theme_id] - ) ON [PRIMARY] -GO - -CREATE UNIQUE INDEX [theme_name] ON [phpbb_styles_theme]([theme_name]) ON [PRIMARY] -GO - /* Table: 'phpbb_topics' diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index a41a55494c..2515d07b8e 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -647,6 +647,7 @@ CREATE TABLE phpbb_reports ( report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, report_text mediumblob NOT NULL, + reported_post_text mediumblob NOT NULL, PRIMARY KEY (report_id), KEY post_id (post_id), KEY pm_id (pm_id) @@ -760,37 +761,12 @@ CREATE TABLE phpbb_styles ( style_name blob NOT NULL, style_copyright blob NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (style_id), - UNIQUE style_name (style_name(255)), - KEY template_id (template_id), - KEY theme_id (theme_id) -); - - -# Table: 'phpbb_styles_template' -CREATE TABLE phpbb_styles_template ( - template_id mediumint(8) UNSIGNED NOT NULL auto_increment, - template_name blob NOT NULL, - template_copyright blob NOT NULL, - template_path varbinary(100) DEFAULT '' NOT NULL, + style_path varbinary(100) DEFAULT '' NOT NULL, bbcode_bitfield varbinary(255) DEFAULT 'kNg=' NOT NULL, - template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL, - template_inherit_path varbinary(255) DEFAULT '' NOT NULL, - PRIMARY KEY (template_id), - UNIQUE tmplte_nm (template_name(255)) -); - - -# Table: 'phpbb_styles_theme' -CREATE TABLE phpbb_styles_theme ( - theme_id mediumint(8) UNSIGNED NOT NULL auto_increment, - theme_name blob NOT NULL, - theme_copyright blob NOT NULL, - theme_path varbinary(100) DEFAULT '' NOT NULL, - PRIMARY KEY (theme_id), - UNIQUE theme_name (theme_name(255)) + style_parent_id int(4) UNSIGNED DEFAULT '0' NOT NULL, + style_parent_tree blob NOT NULL, + PRIMARY KEY (style_id), + UNIQUE style_name (style_name(255)) ); diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 9615905625..3fd8d4f1d1 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -647,6 +647,7 @@ CREATE TABLE phpbb_reports ( report_closed tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, report_text mediumtext NOT NULL, + reported_post_text mediumtext NOT NULL, PRIMARY KEY (report_id), KEY post_id (post_id), KEY pm_id (pm_id) @@ -760,37 +761,12 @@ CREATE TABLE phpbb_styles ( style_name varchar(255) DEFAULT '' NOT NULL, style_copyright varchar(255) DEFAULT '' NOT NULL, style_active tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, - template_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - theme_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - PRIMARY KEY (style_id), - UNIQUE style_name (style_name), - KEY template_id (template_id), - KEY theme_id (theme_id) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_styles_template' -CREATE TABLE phpbb_styles_template ( - template_id mediumint(8) UNSIGNED NOT NULL auto_increment, - template_name varchar(255) DEFAULT '' NOT NULL, - template_copyright varchar(255) DEFAULT '' NOT NULL, - template_path varchar(100) DEFAULT '' NOT NULL, + style_path varchar(100) DEFAULT '' NOT NULL, bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, - template_inherits_id int(4) UNSIGNED DEFAULT '0' NOT NULL, - template_inherit_path varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (template_id), - UNIQUE tmplte_nm (template_name) -) CHARACTER SET `utf8` COLLATE `utf8_bin`; - - -# Table: 'phpbb_styles_theme' -CREATE TABLE phpbb_styles_theme ( - theme_id mediumint(8) UNSIGNED NOT NULL auto_increment, - theme_name varchar(255) DEFAULT '' NOT NULL, - theme_copyright varchar(255) DEFAULT '' NOT NULL, - theme_path varchar(100) DEFAULT '' NOT NULL, - PRIMARY KEY (theme_id), - UNIQUE theme_name (theme_name) + style_parent_id int(4) UNSIGNED DEFAULT '0' NOT NULL, + style_parent_tree text NOT NULL, + PRIMARY KEY (style_id), + UNIQUE style_name (style_name) ) CHARACTER SET `utf8` COLLATE `utf8_bin`; diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 5d60d2a19e..8a0f3e56b1 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -1214,6 +1214,7 @@ CREATE TABLE phpbb_reports ( report_closed number(1) DEFAULT '0' NOT NULL, report_time number(11) DEFAULT '0' NOT NULL, report_text clob DEFAULT '' , + reported_post_text clob DEFAULT '' , CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id) ) / @@ -1444,17 +1445,15 @@ CREATE TABLE phpbb_styles ( style_name varchar2(765) DEFAULT '' , style_copyright varchar2(765) DEFAULT '' , style_active number(1) DEFAULT '1' NOT NULL, - template_id number(8) DEFAULT '0' NOT NULL, - theme_id number(8) DEFAULT '0' NOT NULL, + style_path varchar2(100) DEFAULT '' , + bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL, + style_parent_id number(4) DEFAULT '0' NOT NULL, + style_parent_tree clob DEFAULT '' , CONSTRAINT pk_phpbb_styles PRIMARY KEY (style_id), CONSTRAINT u_phpbb_style_name UNIQUE (style_name) ) / -CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id) -/ -CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id) -/ CREATE SEQUENCE phpbb_styles_seq / @@ -1473,69 +1472,6 @@ END; /* - Table: 'phpbb_styles_template' -*/ -CREATE TABLE phpbb_styles_template ( - template_id number(8) NOT NULL, - template_name varchar2(765) DEFAULT '' , - template_copyright varchar2(765) DEFAULT '' , - template_path varchar2(100) DEFAULT '' , - bbcode_bitfield varchar2(255) DEFAULT 'kNg=' NOT NULL, - template_inherits_id number(4) DEFAULT '0' NOT NULL, - template_inherit_path varchar2(255) DEFAULT '' , - CONSTRAINT pk_phpbb_styles_template PRIMARY KEY (template_id), - CONSTRAINT u_phpbb_tmplte_nm UNIQUE (template_name) -) -/ - - -CREATE SEQUENCE phpbb_styles_template_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_styles_template -BEFORE INSERT ON phpbb_styles_template -FOR EACH ROW WHEN ( - new.template_id IS NULL OR new.template_id = 0 -) -BEGIN - SELECT phpbb_styles_template_seq.nextval - INTO :new.template_id - FROM dual; -END; -/ - - -/* - Table: 'phpbb_styles_theme' -*/ -CREATE TABLE phpbb_styles_theme ( - theme_id number(8) NOT NULL, - theme_name varchar2(765) DEFAULT '' , - theme_copyright varchar2(765) DEFAULT '' , - theme_path varchar2(100) DEFAULT '' , - CONSTRAINT pk_phpbb_styles_theme PRIMARY KEY (theme_id), - CONSTRAINT u_phpbb_theme_name UNIQUE (theme_name) -) -/ - - -CREATE SEQUENCE phpbb_styles_theme_seq -/ - -CREATE OR REPLACE TRIGGER t_phpbb_styles_theme -BEFORE INSERT ON phpbb_styles_theme -FOR EACH ROW WHEN ( - new.theme_id IS NULL OR new.theme_id = 0 -) -BEGIN - SELECT phpbb_styles_theme_seq.nextval - INTO :new.theme_id - FROM dual; -END; -/ - - -/* Table: 'phpbb_topics' */ CREATE TABLE phpbb_topics ( diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index d7377ac2e6..c624024362 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -853,6 +853,7 @@ CREATE TABLE phpbb_reports ( report_closed INT2 DEFAULT '0' NOT NULL CHECK (report_closed >= 0), report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0), report_text TEXT DEFAULT '' NOT NULL, + reported_post_text TEXT DEFAULT '' NOT NULL, PRIMARY KEY (report_id) ); @@ -994,47 +995,14 @@ CREATE TABLE phpbb_styles ( style_name varchar(255) DEFAULT '' NOT NULL, style_copyright varchar(255) DEFAULT '' NOT NULL, style_active INT2 DEFAULT '1' NOT NULL CHECK (style_active >= 0), - template_id INT4 DEFAULT '0' NOT NULL CHECK (template_id >= 0), - theme_id INT4 DEFAULT '0' NOT NULL CHECK (theme_id >= 0), + style_path varchar(100) DEFAULT '' NOT NULL, + bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, + style_parent_id INT4 DEFAULT '0' NOT NULL CHECK (style_parent_id >= 0), + style_parent_tree varchar(8000) DEFAULT '' NOT NULL, PRIMARY KEY (style_id) ); CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); -CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id); -CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id); - -/* - Table: 'phpbb_styles_template' -*/ -CREATE SEQUENCE phpbb_styles_template_seq; - -CREATE TABLE phpbb_styles_template ( - template_id INT4 DEFAULT nextval('phpbb_styles_template_seq'), - template_name varchar(255) DEFAULT '' NOT NULL, - template_copyright varchar(255) DEFAULT '' NOT NULL, - template_path varchar(100) DEFAULT '' NOT NULL, - bbcode_bitfield varchar(255) DEFAULT 'kNg=' NOT NULL, - template_inherits_id INT4 DEFAULT '0' NOT NULL CHECK (template_inherits_id >= 0), - template_inherit_path varchar(255) DEFAULT '' NOT NULL, - PRIMARY KEY (template_id) -); - -CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name); - -/* - Table: 'phpbb_styles_theme' -*/ -CREATE SEQUENCE phpbb_styles_theme_seq; - -CREATE TABLE phpbb_styles_theme ( - theme_id INT4 DEFAULT nextval('phpbb_styles_theme_seq'), - theme_name varchar(255) DEFAULT '' NOT NULL, - theme_copyright varchar(255) DEFAULT '' NOT NULL, - theme_path varchar(100) DEFAULT '' NOT NULL, - PRIMARY KEY (theme_id) -); - -CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name); /* Table: 'phpbb_topics' diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 3255cafea2..43b09c97f7 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -437,13 +437,7 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', 10); # -- phpbb_styles -INSERT INTO phpbb_styles (style_name, style_copyright, style_active, template_id, theme_id) VALUES ('prosilver', '© phpBB Group', 1, 1, 1); - -# -- phpbb_styles_template -INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path, bbcode_bitfield) VALUES ('prosilver', '© phpBB Group', 'prosilver', 'lNg='); - -# -- phpbb_styles_theme -INSERT INTO phpbb_styles_theme (theme_name, theme_copyright, theme_path) VALUES ('prosilver', '© phpBB Group', 'prosilver'); +INSERT INTO phpbb_styles (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '© phpBB Group', 1, 'prosilver', 'kNg=', 0, ''); # -- Forums INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 1, 1, 1, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, ''); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 257937275c..bd002c93ed 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -627,7 +627,8 @@ CREATE TABLE phpbb_reports ( user_notify INTEGER UNSIGNED NOT NULL DEFAULT '0', report_closed INTEGER UNSIGNED NOT NULL DEFAULT '0', report_time INTEGER UNSIGNED NOT NULL DEFAULT '0', - report_text mediumtext(16777215) NOT NULL DEFAULT '' + report_text mediumtext(16777215) NOT NULL DEFAULT '', + reported_post_text mediumtext(16777215) NOT NULL DEFAULT '' ); CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id); @@ -736,36 +737,13 @@ CREATE TABLE phpbb_styles ( style_name varchar(255) NOT NULL DEFAULT '', style_copyright varchar(255) NOT NULL DEFAULT '', style_active INTEGER UNSIGNED NOT NULL DEFAULT '1', - template_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - theme_id INTEGER UNSIGNED NOT NULL DEFAULT '0' -); - -CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); -CREATE INDEX phpbb_styles_template_id ON phpbb_styles (template_id); -CREATE INDEX phpbb_styles_theme_id ON phpbb_styles (theme_id); - -# Table: 'phpbb_styles_template' -CREATE TABLE phpbb_styles_template ( - template_id INTEGER PRIMARY KEY NOT NULL , - template_name varchar(255) NOT NULL DEFAULT '', - template_copyright varchar(255) NOT NULL DEFAULT '', - template_path varchar(100) NOT NULL DEFAULT '', + style_path varchar(100) NOT NULL DEFAULT '', bbcode_bitfield varchar(255) NOT NULL DEFAULT 'kNg=', - template_inherits_id INTEGER UNSIGNED NOT NULL DEFAULT '0', - template_inherit_path varchar(255) NOT NULL DEFAULT '' + style_parent_id INTEGER UNSIGNED NOT NULL DEFAULT '0', + style_parent_tree text(65535) NOT NULL DEFAULT '' ); -CREATE UNIQUE INDEX phpbb_styles_template_tmplte_nm ON phpbb_styles_template (template_name); - -# Table: 'phpbb_styles_theme' -CREATE TABLE phpbb_styles_theme ( - theme_id INTEGER PRIMARY KEY NOT NULL , - theme_name varchar(255) NOT NULL DEFAULT '', - theme_copyright varchar(255) NOT NULL DEFAULT '', - theme_path varchar(100) NOT NULL DEFAULT '' -); - -CREATE UNIQUE INDEX phpbb_styles_theme_theme_name ON phpbb_styles_theme (theme_name); +CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name); # Table: 'phpbb_topics' CREATE TABLE phpbb_topics ( |