[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/phpbb/db/migration/data/v30x/ -> release_3_0_7_rc1.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  namespace phpbb\db\migration\data\v30x;
  15  
  16  class release_3_0_7_rc1 extends \phpbb\db\migration\migration
  17  {
  18  	public function effectively_installed()
  19      {
  20          return phpbb_version_compare($this->config['version'], '3.0.7-RC1', '>=');
  21      }
  22  
  23  	static public function depends_on()
  24      {
  25          return array('\phpbb\db\migration\data\v30x\release_3_0_6');
  26      }
  27  
  28  	public function update_schema()
  29      {
  30          return array(
  31              'drop_keys' => array(
  32                  $this->table_prefix . 'log' => array(
  33                      'log_time',
  34                  ),
  35              ),
  36              'add_index' => array(
  37                  $this->table_prefix . 'topics_track' => array(
  38                      'topic_id' => array('topic_id'),
  39                  ),
  40              ),
  41          );
  42      }
  43  
  44  	public function revert_schema()
  45      {
  46          return array(
  47              'add_index' => array(
  48                  $this->table_prefix . 'log' => array(
  49                      'log_time'    => array('log_time'),
  50                  ),
  51              ),
  52              'drop_keys' => array(
  53                  $this->table_prefix . 'topics_track' => array(
  54                      'topic_id',
  55                  ),
  56              ),
  57          );
  58      }
  59  
  60  	public function update_data()
  61      {
  62          return array(
  63              array('config.add', array('feed_overall', 1)),
  64              array('config.add', array('feed_http_auth', 0)),
  65              array('config.add', array('feed_limit_post', $this->config['feed_limit'])),
  66              array('config.add', array('feed_limit_topic', $this->config['feed_overall_topics_limit'])),
  67              array('config.add', array('feed_topics_new', $this->config['feed_overall_topics'])),
  68              array('config.add', array('feed_topics_active', $this->config['feed_overall_topics'])),
  69              array('custom', array(array(&$this, 'delete_text_templates'))),
  70  
  71              array('config.update', array('version', '3.0.7-RC1')),
  72          );
  73      }
  74  
  75  	public function delete_text_templates()
  76      {
  77          // Delete all text-templates from the template_data
  78          $sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
  79              WHERE template_filename ' . $this->db->sql_like_expression($this->db->get_any_char() . '.txt');
  80          $this->sql_query($sql);
  81      }
  82  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1