Install update
This commit is contained in:
@@ -880,34 +880,26 @@ if( $user->data['is_registered'] && $auth->acl_get('a_board') )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($portal_update_array, $sql_update);
|
unset($portal_update_array, $sql_update);
|
||||||
|
|
||||||
// create new acp modules
|
// create new acp modules
|
||||||
$modules = new acp_modules();
|
$modules = new acp_modules();
|
||||||
$sql = 'SELECT module_id FROM ' . MODULES_TABLE . " WHERE module_langname = 'ACP_PORTAL_INFO' LIMIT 1";
|
$sql = 'SELECT module_id FROM ' . MODULES_TABLE . " WHERE module_langname = 'ACP_PORTAL_INFO' LIMIT 1";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$portal = $db->sql_fetchrow($result);
|
$portal = $db->sql_fetchrow($result);
|
||||||
$customblock = array(
|
|
||||||
'module_basename' => 'portal',
|
foreach( $mod_update as $mod_ver => $mod_data )
|
||||||
'module_enabled' => 1,
|
{
|
||||||
'module_display' => 1,
|
if( version_compare($old_version, $mod_ver, ">=") === TRUE )
|
||||||
'parent_id' => $portal['module_id'],
|
{
|
||||||
'module_class' => 'acp',
|
continue;
|
||||||
'module_langname' => 'ACP_PORTAL_CUSTOM_INFO',
|
} else {
|
||||||
'module_mode' => 'customblock',
|
foreach( $mod_data as $mod_config)
|
||||||
'module_auth' => ''
|
{
|
||||||
);
|
$mod_config['parent_id'] = $portal['module_id'];
|
||||||
$modules->update_module_data($customblock);
|
$modules->update_module_data($mod_config);
|
||||||
$linkblock = array(
|
}
|
||||||
'module_basename' => 'portal',
|
}
|
||||||
'module_enabled' => 1,
|
}
|
||||||
'module_display' => 1,
|
|
||||||
'parent_id' => $portal['module_id'],
|
|
||||||
'module_class' => 'acp',
|
|
||||||
'module_langname' => 'ACP_PORTAL_LINKS_INFO',
|
|
||||||
'module_mode' => 'links',
|
|
||||||
'module_auth' => ''
|
|
||||||
);
|
|
||||||
$modules->update_module_data($linkblock);
|
|
||||||
|
|
||||||
$updated = true;
|
$updated = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ $sql_update['0.2.2'] = array(
|
|||||||
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_attachments_forum_ids', '')",
|
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_attachments_forum_ids', '')",
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql_update['0.2.3'] = array(
|
$sql_update['0.3.0'] = array(
|
||||||
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_announcements_permissions', '1')",
|
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_announcements_permissions', '1')",
|
||||||
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_news_permissions', '1')",
|
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_news_permissions', '1')",
|
||||||
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center', '0')",
|
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center', '0')",
|
||||||
@@ -29,4 +29,25 @@ $sql_update['0.2.3'] = array(
|
|||||||
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_links_array', 'a:2:{i:1;a:2:{s:4:\"text\";s:9:\"Board3.de\";s:3:\"url\";s:21:\"http://www.board3.de/\";}i:2;a:2:{s:4:\"text\";s:9:\"phpBB.com\";s:3:\"url\";s:21:\"http://www.phpbb.com/\";}}')",
|
"INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_links_array', 'a:2:{i:1;a:2:{s:4:\"text\";s:9:\"Board3.de\";s:3:\"url\";s:21:\"http://www.board3.de/\";}i:2;a:2:{s:4:\"text\";s:9:\"phpBB.com\";s:3:\"url\";s:21:\"http://www.phpbb.com/\";}}')",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$mod_update['0.3.0'] = array(
|
||||||
|
'customblock' => array(
|
||||||
|
'module_basename' => 'portal',
|
||||||
|
'module_enabled' => 1,
|
||||||
|
'module_display' => 1,
|
||||||
|
'module_class' => 'acp',
|
||||||
|
'module_langname' => 'ACP_PORTAL_CUSTOM_INFO',
|
||||||
|
'module_mode' => 'customblock',
|
||||||
|
'module_auth' => ''
|
||||||
|
),
|
||||||
|
'linkblock' => array(
|
||||||
|
'module_basename' => 'portal',
|
||||||
|
'module_enabled' => 1,
|
||||||
|
'module_display' => 1,
|
||||||
|
'module_class' => 'acp',
|
||||||
|
'module_langname' => 'ACP_PORTAL_LINKS_INFO',
|
||||||
|
'module_mode' => 'links',
|
||||||
|
'module_auth' => ''
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user