aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2019-12-30 02:25:26 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2019-12-30 02:26:31 +0100
commit364461b58fd40af8fe8c7513fe9424de483055b9 (patch)
treedfa19502064c10b05b8f27d1a769fc498795c28b /phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php
parent3e5090e792e6ba2be4ee1119ebdd6e82d9ef53e3 (diff)
downloadforums-364461b58fd40af8fe8c7513fe9424de483055b9.tar
forums-364461b58fd40af8fe8c7513fe9424de483055b9.tar.gz
forums-364461b58fd40af8fe8c7513fe9424de483055b9.tar.bz2
forums-364461b58fd40af8fe8c7513fe9424de483055b9.tar.xz
forums-364461b58fd40af8fe8c7513fe9424de483055b9.zip
[ticket/16279] Add permission for Emoji in topic title
PHPBB3-16279
Diffstat (limited to 'phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php')
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php b/phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php
new file mode 100644
index 0000000000..a915f1e140
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/user_emoji_permission.php
@@ -0,0 +1,43 @@
+<?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\v32x;
+
+class user_emoji_permission extends \phpbb\db\migration\migration
+{
+ public function effectively_installed()
+ {
+ $sql = 'SELECT auth_option_id
+ FROM ' . ACL_OPTIONS_TABLE . "
+ WHERE auth_option = 'u_emoji'";
+ $result = $this->db->sql_query($sql);
+ $auth_option_id = $this->db->sql_fetchfield('auth_option_id');
+ $this->db->sql_freeresult($result);
+
+ return $auth_option_id !== false;
+ }
+
+ static public function depends_on()
+ {
+ return [
+ '\phpbb\db\migration\data\v32x\v329rc1',
+ ];
+ }
+
+ public function update_data()
+ {
+ return [
+ ['permission.add', ['u_emoji']],
+ ];
+ }
+}