diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-08-09 12:08:36 -0700 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-08-09 12:08:36 -0700 |
commit | c9cd7412f27014e98300a0b8bff15b03f70dee55 (patch) | |
tree | f95c415d743e0b7496c563f37f6a20a0097a2c8c /phpBB/phpbb | |
parent | e399dc162b9d66992eb66fa2de0bedf524fb1ecf (diff) | |
parent | 07bc935efea32de9cbef7039730d910b1e2befea (diff) | |
download | forums-c9cd7412f27014e98300a0b8bff15b03f70dee55.tar forums-c9cd7412f27014e98300a0b8bff15b03f70dee55.tar.gz forums-c9cd7412f27014e98300a0b8bff15b03f70dee55.tar.bz2 forums-c9cd7412f27014e98300a0b8bff15b03f70dee55.tar.xz forums-c9cd7412f27014e98300a0b8bff15b03f70dee55.zip |
Merge pull request #1633 from nickvergessen/ticket/11751
[ticket/11751] Add mcp modules for softdelete on update
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/db/migration/data/310/softdelete_mcp_modules.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/310/softdelete_mcp_modules.php b/phpBB/phpbb/db/migration/data/310/softdelete_mcp_modules.php new file mode 100644 index 0000000000..f80f55d19a --- /dev/null +++ b/phpBB/phpbb/db/migration/data/310/softdelete_mcp_modules.php @@ -0,0 +1,55 @@ +<?php +/** +* +* @package migration +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2 +* +*/ + +class phpbb_db_migration_data_310_softdelete_mcp_modules extends phpbb_db_migration +{ + public function effectively_installed() + { + $sql = 'SELECT module_id + FROM ' . MODULES_TABLE . " + WHERE module_class = 'mcp' + AND module_basename = 'mcp_queue' + AND module_mode = 'deleted_topics'"; + $result = $this->db->sql_query($sql); + $module_id = $this->db->sql_fetchfield('module_id'); + $this->db->sql_freeresult($result); + + return $module_id !== false; + } + + static public function depends_on() + { + return array( + 'phpbb_db_migration_data_310_dev', + 'phpbb_db_migration_data_310_softdelete_p2', + ); + } + + public function update_data() + { + return array( + array('module.add', array( + 'mcp', + 'MCP_QUEUE', + array( + 'module_basename' => 'mcp_queue', + 'modes' => array('deleted_topics'), + ), + )), + array('module.add', array( + 'mcp', + 'MCP_QUEUE', + array( + 'module_basename' => 'mcp_queue', + 'modes' => array('deleted_posts'), + ), + )), + ); + } +} |