mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
remove exit statement and make sure no "additional" code gets executed
git-svn-id: file:///svn/phpbb/trunk@8916 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
ce6b87ccec
commit
bb97d3531a
1 changed files with 48 additions and 36 deletions
|
@ -37,7 +37,7 @@ $template->assign_var('S_IN_UCP', true);
|
||||||
|
|
||||||
$module = new p_master();
|
$module = new p_master();
|
||||||
|
|
||||||
// Basic "global" modes
|
// Go through basic "global" modes
|
||||||
switch ($mode)
|
switch ($mode)
|
||||||
{
|
{
|
||||||
case 'activate':
|
case 'activate':
|
||||||
|
@ -69,7 +69,6 @@ switch ($mode)
|
||||||
|
|
||||||
case 'confirm':
|
case 'confirm':
|
||||||
$module->load('ucp', 'confirm');
|
$module->load('ucp', 'confirm');
|
||||||
exit;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'login':
|
case 'login':
|
||||||
|
@ -233,7 +232,8 @@ switch ($mode)
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
default:
|
||||||
|
|
||||||
// Only registered users can go beyond this point
|
// Only registered users can go beyond this point
|
||||||
if (!$user->data['is_registered'])
|
if (!$user->data['is_registered'])
|
||||||
|
@ -252,7 +252,37 @@ $module->list_modules('ucp');
|
||||||
// Check if the zebra module is set
|
// Check if the zebra module is set
|
||||||
if ($module->is_active('zebra', 'friends'))
|
if ($module->is_active('zebra', 'friends'))
|
||||||
{
|
{
|
||||||
// Output listing of friends online
|
_display_friends();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do not display subscribed topics/forums if not allowed
|
||||||
|
if (!$config['allow_topic_notify'] && !$config['allow_forum_notify'])
|
||||||
|
{
|
||||||
|
$module->set_display('main', 'subscribed', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Select the active module
|
||||||
|
$module->set_active($id, $mode);
|
||||||
|
|
||||||
|
// Load and execute the relevant module
|
||||||
|
$module->load_active();
|
||||||
|
|
||||||
|
// Assign data to the template engine for the list of modules
|
||||||
|
$module->assign_tpl_vars(append_sid('ucp'));
|
||||||
|
|
||||||
|
// Generate the page, do not display/query online list
|
||||||
|
$module->display($module->get_page_title(), false);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Output listing of friends online
|
||||||
|
*/
|
||||||
|
function _display_friends()
|
||||||
|
{
|
||||||
|
global $config, $db, $template, $user, $auth;
|
||||||
|
|
||||||
$update_time = $config['load_online_time'] * 60;
|
$update_time = $config['load_online_time'] * 60;
|
||||||
|
|
||||||
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
$sql = $db->sql_build_query('SELECT_DISTINCT', array(
|
||||||
|
@ -297,24 +327,6 @@ if ($module->is_active('zebra', 'friends'))
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not display subscribed topics/forums if not allowed
|
|
||||||
if (!$config['allow_topic_notify'] && !$config['allow_forum_notify'])
|
|
||||||
{
|
|
||||||
$module->set_display('main', 'subscribed', false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Select the active module
|
|
||||||
$module->set_active($id, $mode);
|
|
||||||
|
|
||||||
// Load and execute the relevant module
|
|
||||||
$module->load_active();
|
|
||||||
|
|
||||||
// Assign data to the template engine for the list of modules
|
|
||||||
$module->assign_tpl_vars(append_sid('ucp'));
|
|
||||||
|
|
||||||
// Generate the page, do not display/query online list
|
|
||||||
$module->display($module->get_page_title(), false);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function for assigning a template var if the zebra module got included
|
* Function for assigning a template var if the zebra module got included
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue