diff options
Diffstat (limited to 'phpBB/phpbb/db/migration')
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/rc2.php | 31 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/data/v310/search_type.php | 34 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/profilefield_base_migration.php | 14 | ||||
-rw-r--r-- | phpBB/phpbb/db/migration/tool/permission.php | 5 |
4 files changed, 76 insertions, 8 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/rc2.php b/phpBB/phpbb/db/migration/data/v310/rc2.php new file mode 100644 index 0000000000..e1323659da --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/rc2.php @@ -0,0 +1,31 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v310; + +class rc2 extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\rc1', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.1.0-RC2')), + ); + } +} diff --git a/phpBB/phpbb/db/migration/data/v310/search_type.php b/phpBB/phpbb/db/migration/data/v310/search_type.php new file mode 100644 index 0000000000..f89456ae19 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v310/search_type.php @@ -0,0 +1,34 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v310; + +class search_type extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v310\dev', + ); + } + + public function update_data() + { + return array( + array('if', array( + (is_file($this->phpbb_root_path . 'phpbb/search/' . $this->config['search_type'] . $this->php_ext)), + array('config.update', array('search_type', '\\phpbb\\search\\' . $this->config['search_type'])), + )), + ); + } +} diff --git a/phpBB/phpbb/db/migration/profilefield_base_migration.php b/phpBB/phpbb/db/migration/profilefield_base_migration.php index e66e5fd080..9000949a7d 100644 --- a/phpBB/phpbb/db/migration/profilefield_base_migration.php +++ b/phpBB/phpbb/db/migration/profilefield_base_migration.php @@ -107,8 +107,8 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration while ($lang_id = (int) $this->db->sql_fetchfield('lang_id')) { $insert_buffer->insert(array( - 'field_id' => $field_id, - 'lang_id' => $lang_id, + 'field_id' => (int) $field_id, + 'lang_id' => (int) $lang_id, 'lang_name' => $lang_name, 'lang_explain' => '', 'lang_default_value' => '', @@ -136,8 +136,8 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration foreach ($this->profilefield_language_data as $language_data) { $insert_buffer->insert(array_merge(array( - 'field_id' => $field_id, - 'lang_id' => $lang_id, + 'field_id' => (int) $field_id, + 'lang_id' => (int) $lang_id, ), $language_data)); } } @@ -154,15 +154,15 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration $field_id = $this->get_custom_profile_field_id(); $sql = 'DELETE FROM ' . PROFILE_FIELDS_TABLE . ' - WHERE field_id = ' . $field_id; + WHERE field_id = ' . (int) $field_id; $this->db->sql_query($sql); $sql = 'DELETE FROM ' . PROFILE_LANG_TABLE . ' - WHERE field_id = ' . $field_id; + WHERE field_id = ' . (int) $field_id; $this->db->sql_query($sql); $sql = 'DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . ' - WHERE field_id = ' . $field_id; + WHERE field_id = ' . (int) $field_id; $this->db->sql_query($sql); } diff --git a/phpBB/phpbb/db/migration/tool/permission.php b/phpBB/phpbb/db/migration/tool/permission.php index d2df27613a..5cfbc5ca00 100644 --- a/phpBB/phpbb/db/migration/tool/permission.php +++ b/phpBB/phpbb/db/migration/tool/permission.php @@ -105,6 +105,7 @@ class permission implements \phpbb\db\migration\tool\tool_interface * @param string $auth_option The name of the permission (auth) option * @param bool $global True for checking a global permission setting, * False for a local permission setting + * @param int|false $copy_from If set, contains the id of the permission from which to copy the new one. * @return null */ public function add($auth_option, $global = true, $copy_from = false) @@ -243,7 +244,9 @@ class permission implements \phpbb\db\migration\tool\tool_interface * Add a new permission role * * @param string $role_name The new role name - * @param sting $role_type The type (u_, m_, a_) + * @param string $role_type The type (u_, m_, a_) + * @param string $role_description Description of the new role + * * @return null */ public function role_add($role_name, $role_type, $role_description = '') |