mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
graham, sorry for this but i had to... ;)
- utilize common.php in installer (we only need to change one location then) - use $user->lang instead of $lang to be able to use language template vars and having consistant namings git-svn-id: file:///svn/phpbb/trunk@5855 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -33,21 +33,21 @@ class install_main extends module
|
||||
|
||||
function main($mode, $sub)
|
||||
{
|
||||
global $lang, $template;
|
||||
global $user, $template;
|
||||
|
||||
switch ($sub)
|
||||
{
|
||||
case 'intro' :
|
||||
$title = $lang['SUB_INTRO'];
|
||||
$body = $lang['OVERVIEW_BODY'];
|
||||
$title = $user->lang['SUB_INTRO'];
|
||||
$body = $user->lang['OVERVIEW_BODY'];
|
||||
break;
|
||||
case 'license' :
|
||||
$title = $lang['GPL'];
|
||||
$title = $user->lang['GPL'];
|
||||
$body = implode("<br/>\n", file('../docs/COPYING'));
|
||||
break;
|
||||
case 'support' :
|
||||
$title = $lang['SUB_SUPPORT'];
|
||||
$body = $lang['SUPPORT_BODY'];
|
||||
$title = $user->lang['SUB_SUPPORT'];
|
||||
$body = $user->lang['SUPPORT_BODY'];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -60,4 +60,48 @@ class install_main extends module
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add default modules
|
||||
function add_default_modules()
|
||||
{
|
||||
global $db, $phpbb_root_path, $phpEx;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/acp_modules.' . $phpEx);
|
||||
$module_class = 'acp';
|
||||
|
||||
$_module = &new acp_modules();
|
||||
|
||||
// Get the modules we want to add...
|
||||
$module_info = $_module->get_module_infos('', $module_class);
|
||||
|
||||
foreach ($module_info as $module_name => $fileinfo)
|
||||
{
|
||||
foreach ($fileinfo['modes'] as $module_mode => $row)
|
||||
{
|
||||
$module_data = array(
|
||||
'module_name' => $module_name,
|
||||
'module_enabled' => 1,
|
||||
'module_display' => (isset($row['display'])) ? $row['display'] : 1,
|
||||
'parent_id' => $row['parent_id'],
|
||||
'module_class' => $module_class,
|
||||
'module_langname' => $row['title'],
|
||||
'module_mode' => $module_mode,
|
||||
'module_auth' => $row['auth'],
|
||||
);
|
||||
|
||||
$_module->>update_module_data($module_data);
|
||||
}
|
||||
}
|
||||
|
||||
// recalculate binary tree
|
||||
if (!function_exists('recalc_btree'))
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
recalc_btree('module_id', MODULES_TABLE, $module_class);
|
||||
$_module->remove_cache_file();
|
||||
}
|
||||
*/
|
||||
?>
|
Reference in New Issue
Block a user