Use return instead of echo in the remaining core
Debug-messages still may use echo, and some functions in functions_image and trackback still use it to generate progress messages, which should get cleaned up as well but is not that urgent
This commit is contained in:
@@ -68,10 +68,7 @@ switch ($_POST['installAction'] && serendipity_checkFormToken()) {
|
||||
default:
|
||||
$from = &$serendipity;
|
||||
$t = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
|
||||
ob_start();
|
||||
serendipity_printConfigTemplate($t, $from, false, true);
|
||||
$data['config'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$data['config'] = serendipity_printConfigTemplate($t, $from, false, true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -325,17 +325,11 @@ if ( (int)$serendipity['GET']['step'] == 0 ) {
|
||||
|
||||
} elseif ( $serendipity['GET']['step'] == '2a' ) {
|
||||
$config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE, null, array('simpleInstall'));
|
||||
ob_start();
|
||||
serendipity_printConfigTemplate($config, $from, true, false, false);
|
||||
$data['ob_serendipity_printConfigTemplate'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$data['ob_serendipity_printConfigTemplate'] = serendipity_printConfigTemplate($config, $from, true, false, false);
|
||||
|
||||
} elseif ( $serendipity['GET']['step'] == '2b' ) {
|
||||
$config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
|
||||
ob_start();
|
||||
serendipity_printConfigTemplate($config, $from, true, false, false);
|
||||
$data['ob_serendipity_printConfigTemplate'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$data['ob_serendipity_printConfigTemplate'] = serendipity_printConfigTemplate($config, $from, true, false, false);
|
||||
|
||||
} elseif ( $serendipity['GET']['step'] == '3' ) {
|
||||
$serendipity['dbPrefix'] = $_POST['dbPrefix'];
|
||||
|
||||
@@ -105,10 +105,7 @@ $user = serendipity_fetchUsers($serendipity['authorid']);
|
||||
$from = $user[0];
|
||||
$from['groups'] = serendipity_getGroups($serendipity['authorid']);
|
||||
unset($from['password']);
|
||||
ob_start();
|
||||
serendipity_printConfigTemplate($template, $from, true, false);
|
||||
$data['config'] = ob_get_contents();
|
||||
ob_get_clean();
|
||||
$data['config'] = serendipity_printConfigTemplate($template, $from, true, false);
|
||||
|
||||
|
||||
$add = array('internal' => true);
|
||||
|
||||
@@ -389,20 +389,14 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
$data['backend_plugins_sidebar_header'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
ob_start();
|
||||
show_plugins(false, $sidebars);
|
||||
$data['sidebar_plugins'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$data['sidebar_plugins'] = show_plugins(false, $sidebars);
|
||||
|
||||
ob_start();
|
||||
serendipity_plugin_api::hook_event('backend_plugins_event_header', $serendipity);
|
||||
$data['backend_plugins_event_header'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
ob_start();
|
||||
show_plugins(true);
|
||||
$data['event_plugins'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$data['event_plugins'] = show_plugins(true);
|
||||
|
||||
if (count($serendipity['memSnaps']) > 0) {
|
||||
$data['$memsnaps'] = $serendipity['memSnaps'];
|
||||
@@ -410,10 +404,6 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
|
||||
}
|
||||
|
||||
if (!is_object($serendipity['smarty'])) {
|
||||
serendipity_smarty_init();
|
||||
}
|
||||
|
||||
echo serendipity_smarty_show('admin/plugins.inc.tpl', $data);
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
|
||||
@@ -228,10 +228,7 @@ if ( ($serendipity['GET']['adminAction'] == 'edit' && serendipity_checkPermissio
|
||||
$from['groups'] = array();
|
||||
}
|
||||
|
||||
ob_start();
|
||||
serendipity_printConfigTemplate($config, $from, true, false, true, true);
|
||||
$data['config'] = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$data['config'] = serendipity_printConfigTemplate($config, $from, true, false, true, true);
|
||||
|
||||
} elseif ($serendipity['GET']['adminAction'] == 'delete' && serendipity_checkPermission('adminUsersDelete')) {
|
||||
$user = serendipity_fetchUsers($serendipity['GET']['userid']);
|
||||
@@ -246,11 +243,6 @@ if ( ($serendipity['GET']['adminAction'] == 'edit' && serendipity_checkPermissio
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_object($serendipity['smarty'])) {
|
||||
serendipity_smarty_init();
|
||||
}
|
||||
|
||||
|
||||
echo serendipity_smarty_show('admin/users.inc.tpl', $data);
|
||||
|
||||
/* vim: set sts=4 ts=4 expandtab : */
|
||||
|
||||
Reference in New Issue
Block a user