aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2014-06-09 17:55:25 +0200
committerNils Adermann <naderman@naderman.de>2014-06-09 17:55:25 +0200
commitb6232aa9b213fbf62f5ce351bc79220daf243cc6 (patch)
tree0e169650c4b0bb9476b5f0f917bff6952b574e4d /phpBB/phpbb/db/migration
parent0c5af536f1de55b6ee30ab9f193b6ea7637ac5b1 (diff)
parent92f43c5371f1f37bd6d77ade2fc5e2804b5cc49f (diff)
downloadforums-b6232aa9b213fbf62f5ce351bc79220daf243cc6.tar
forums-b6232aa9b213fbf62f5ce351bc79220daf243cc6.tar.gz
forums-b6232aa9b213fbf62f5ce351bc79220daf243cc6.tar.bz2
forums-b6232aa9b213fbf62f5ce351bc79220daf243cc6.tar.xz
forums-b6232aa9b213fbf62f5ce351bc79220daf243cc6.zip
Merge remote-tracking branch 'github-nickvergessen/ticket/10073' into develop-ascraeus
* github-nickvergessen/ticket/10073: (36 commits) [ticket/10073] Fix button descriptions [ticket/10073] Do not check disable boxes by default [ticket/10073] Store values with config_text in the ACP [ticket/10073] Move config values to config_text [ticket/10073] Fix request usage [ticket/10073] Deduplicate template variable names [ticket/10073] Get service from container [ticket/10073] Fix more "Contact Us" strings [ticket/10073] Move template code into the template [ticket/10073] Make contact page available when board is disabled [ticket/10073] Change name of the ACP module [ticket/10073] Deduplicate posting buttons code in ACP [ticket/10073] Use phpbb_validate_email to verify email address [ticket/10073] Add tests for new validate_email() [ticket/10073] Split email validation from email ban and taken checks [ticket/10073] Deduplicate the if statement [ticket/10073] Fallback to board_contact when contact page is disabled [ticket/10073] Remove language string from rebase conflict [ticket/10073] Add ACP module to add bbcode text for contact admin info [ticket/10073] Add new configs to the schema ...
Diffstat (limited to 'phpBB/phpbb/db/migration')
-rw-r--r--phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php27
-rw-r--r--phpBB/phpbb/db/migration/data/v310/contact_admin_form.php37
2 files changed, 64 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php b/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php
new file mode 100644
index 0000000000..bd682e2f7c
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/contact_admin_acp_module.php
@@ -0,0 +1,27 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class contact_admin_acp_module extends \phpbb\db\migration\migration
+{
+ public function update_data()
+ {
+ return array(
+ array('module.add', array(
+ 'acp',
+ 'ACP_BOARD_CONFIGURATION',
+ array(
+ 'module_basename' => 'acp_contact',
+ 'modes' => array('contact'),
+ ),
+ )),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php b/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php
new file mode 100644
index 0000000000..e255efb99d
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/contact_admin_form.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* @package migration
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+namespace phpbb\db\migration\data\v310;
+
+class contact_admin_form extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ return isset($this->config['contact_admin_form_enable']);
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('contact_admin_form_enable', 1)),
+ array('custom', array(array($this, 'contact_admin_info'))),
+ );
+ }
+
+ public function contact_admin_info()
+ {
+ $text_config = new \phpbb\config\db_text($this->db, $this->table_prefix . 'config_text');
+ $text_config->set_array(array(
+ 'contact_admin_info' => '',
+ 'contact_admin_info_uid' => '',
+ 'contact_admin_info_bitfield' => '',
+ 'contact_admin_info_flags' => OPTION_FLAG_BBCODE + OPTION_FLAG_SMILIES + OPTION_FLAG_LINKS,
+ ));
+ }
+}