@@ -62,7 +62,7 @@ if ($action == 'delete' && function_exists('apcu_clear_cache') && $userinfo['cha
|
||||
}
|
||||
|
||||
if (!function_exists('apcu_cache_info') || !function_exists('apcu_sma_info')) {
|
||||
Response::standardError(lng('error.no_apcuinfo'));
|
||||
Response::standardError('no_apcuinfo');
|
||||
}
|
||||
|
||||
if ($page == 'showinfo' && $userinfo['change_serversettings'] == '1') {
|
||||
|
||||
@@ -58,12 +58,12 @@ if ($action == 'reset' && function_exists('opcache_reset') && $userinfo['change_
|
||||
}
|
||||
|
||||
if (!extension_loaded('Zend OPcache')) {
|
||||
Response::standardError(lng('error.no_opcacheinfo'));
|
||||
Response::standardError('no_opcacheinfo');
|
||||
}
|
||||
|
||||
$ocEnabled = ini_get('opcache.enable');
|
||||
if (empty($ocEnabled)) {
|
||||
Response::standardError(lng('error.inactive_opcacheinfo'));
|
||||
Response::standardError('inactive_opcacheinfo');
|
||||
}
|
||||
|
||||
if ($page == 'showinfo' && $userinfo['change_serversettings'] == '1') {
|
||||
|
||||
@@ -70,7 +70,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
||||
|
||||
// check if the session timeout is too low #815
|
||||
if (isset($_POST['session_sessiontimeout']) && $_POST['session_sessiontimeout'] < 60) {
|
||||
Response::standardError(lng('error.session_timeout'), lng('error.session_timeout_desc'));
|
||||
Response::standardError(['session_timeout', 'session_timeout_desc']);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -132,7 +132,7 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Response::standardError(lng('error.no_phpinfo'));
|
||||
Response::standardError('error.no_phpinfo');
|
||||
}
|
||||
UI::view('settings/phpinfo.html.twig', [
|
||||
'phpversion' => PHP_VERSION,
|
||||
|
||||
@@ -32,7 +32,7 @@ class Response
|
||||
{
|
||||
|
||||
/**
|
||||
* Sends an header ( 'Location ...' ) to the browser.
|
||||
* Sends a header ( 'Location ...' ) to the browser.
|
||||
*
|
||||
* @param string $destination
|
||||
* Destination
|
||||
@@ -74,18 +74,18 @@ class Response
|
||||
$linker->filename = $path . $destination;
|
||||
}
|
||||
header('Location: ' . $linker->getLink());
|
||||
exit();
|
||||
exit;
|
||||
} elseif ($get_variables == null) {
|
||||
$linker = new Linker($destination);
|
||||
header('Location: ' . $linker->getLink());
|
||||
exit();
|
||||
exit;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints one ore more errormessages on screen
|
||||
* Prints one or more errormessages on screen
|
||||
*
|
||||
* @param array $errors
|
||||
* Errormessages
|
||||
@@ -93,8 +93,9 @@ class Response
|
||||
* A %s in the errormessage will be replaced by this string.
|
||||
* @param bool $throw_exception
|
||||
*
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
* @throws Exception
|
||||
* @author Ron Brand <ron.brand@web.de>
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
*/
|
||||
public static function standardError($errors = '', $replacer = '', $throw_exception = false)
|
||||
{
|
||||
@@ -115,7 +116,7 @@ class Response
|
||||
$error = '';
|
||||
foreach ($errors as $single_error) {
|
||||
if (strpos($single_error, ".") === false) {
|
||||
$single_error = 'error.'.$single_error;
|
||||
$single_error = 'error.' . $single_error;
|
||||
}
|
||||
$single_error = lng($single_error, [htmlentities($replacer)]);
|
||||
if (empty($error)) {
|
||||
@@ -157,7 +158,7 @@ class Response
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints one ore more errormessages on screen
|
||||
* Prints one or more errormessages on screen
|
||||
*
|
||||
* @param array $success_message
|
||||
* Errormessages
|
||||
@@ -166,12 +167,13 @@ class Response
|
||||
* @param array $params
|
||||
* @param bool $throw_exception
|
||||
*
|
||||
* @throws Exception
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
*/
|
||||
public static function standardSuccess($success_message = '', $replacer = '', $params = [], $throw_exception = false)
|
||||
{
|
||||
if (strpos($success_message, ".") === false) {
|
||||
$success_message = 'success.'.$success_message;
|
||||
$success_message = 'success.' . $success_message;
|
||||
}
|
||||
$success_message = lng($success_message, [htmlentities($replacer)]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user