[ticket/334] Add clock setting in v210_rc1 migration
B3P-334
This commit is contained in:
@@ -21,6 +21,23 @@ class v210_rc1 extends \phpbb\db\migration\migration
|
|||||||
return array(
|
return array(
|
||||||
array('config.remove', array('board3_phpbb_menu')),
|
array('config.remove', array('board3_phpbb_menu')),
|
||||||
array('config.update', array('board3_portal_version', '2.1.0-rc1')),
|
array('config.update', array('board3_portal_version', '2.1.0-rc1')),
|
||||||
|
array('custom', array(array($this, 'add_clock_setting'))),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds clock settings to already installed clock modules
|
||||||
|
*/
|
||||||
|
public function add_clock_setting()
|
||||||
|
{
|
||||||
|
$sql = 'SELECT module_id
|
||||||
|
FROM ' . $this->table_prefix . "portal_modules
|
||||||
|
WHERE module_classname = '\\\board3\\\portal\\\modules\\\clock'";
|
||||||
|
$result = $this->db->sql_query($sql);
|
||||||
|
while ($row = $this->db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$this->config->set('board3_clock_src_' . $row['module_id'], '');
|
||||||
|
}
|
||||||
|
$this->db->sql_freeresult($result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user