43 lines
1.0 KiB
PHP
43 lines
1.0 KiB
PHP
<?php
|
|
/**
|
|
*
|
|
* @package Board3 Portal v2.1
|
|
* @copyright (c) 2015 Board3 Group ( www.board3.de )
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
*
|
|
*/
|
|
|
|
namespace board3\portal\migrations;
|
|
|
|
class v210 extends \phpbb\db\migration\migration
|
|
{
|
|
static public function depends_on()
|
|
{
|
|
return array('\board3\portal\migrations\v210_rc3');
|
|
}
|
|
|
|
public function update_data()
|
|
{
|
|
return array(
|
|
array('config.update', array('board3_portal_version', '2.1.0')),
|
|
array('custom', array(array($this, 'add_donation_setting'))),
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Adds default currency setting to already installed donation modules
|
|
*/
|
|
public function add_donation_setting()
|
|
{
|
|
$sql = 'SELECT module_id
|
|
FROM ' . $this->table_prefix . "portal_modules
|
|
WHERE module_classname = '\\\board3\\\portal\\\modules\\\donation'";
|
|
$result = $this->db->sql_query($sql);
|
|
while ($row = $this->db->sql_fetchrow($result))
|
|
{
|
|
$this->config->set('board3_pay_default_' . $row['module_id'], 'EUR');
|
|
}
|
|
$this->db->sql_freeresult($result);
|
|
}
|
|
}
|