Revert "refactor global array"

This reverts commit 370ccbdb74.
This commit is contained in:
Michael Kaufmann
2018-12-22 08:15:31 +01:00
parent c800e89414
commit 7e39a7bc60
220 changed files with 2244 additions and 2227 deletions

View File

@@ -217,7 +217,7 @@ class HTML
*/
public static function makeyesno($name, $yesvalue, $novalue = '', $yesselected = '', $disabled = false)
{
global $theme;
global $lng, $theme;
if ($disabled) {
$d = ' disabled="disabled"';
@@ -230,7 +230,7 @@ class HTML
}
return '<select class="dropdown_noborder" id="' . $name . '" name="' . $name . '"' . $d . '>
<option value="' . $yesvalue . '"' . ($yesselected ? ' selected="selected"' : '') . '>' . \Froxlor\I18N\Lang::getAll()['panel']['yes'] . '</option><option value="' . $novalue . '"' . ($yesselected ? '' : ' selected="selected"') . '>' . \Froxlor\I18N\Lang::getAll()['panel']['no'] . '</option></select>';
<option value="' . $yesvalue . '"' . ($yesselected ? ' selected="selected"' : '') . '>' . $lng['panel']['yes'] . '</option><option value="' . $novalue . '"' . ($yesselected ? '' : ' selected="selected"') . '>' . $lng['panel']['no'] . '</option></select>';
}
/**
@@ -264,8 +264,8 @@ class HTML
}
}
if (isset(\Froxlor\I18N\Lang::getAll()['question'][$text])) {
$text = \Froxlor\I18N\Lang::getAll()['question'][$text];
if (isset($lng['question'][$text])) {
$text = $lng['question'][$text];
}
$text = strtr($text, array(
@@ -287,12 +287,12 @@ class HTML
}
}
if (isset(\Froxlor\I18N\Lang::getAll()['question'][$text])) {
$text = \Froxlor\I18N\Lang::getAll()['question'][$text];
if (isset($lng['question'][$text])) {
$text = $lng['question'][$text];
}
if (isset(\Froxlor\I18N\Lang::getAll()['question'][$chk_text])) {
$chk_text = \Froxlor\I18N\Lang::getAll()['question'][$chk_text];
if (isset($lng['question'][$chk_text])) {
$chk_text = $lng['question'][$chk_text];
}
if ($show_checkbox) {
@@ -308,4 +308,4 @@ class HTML
eval("echo \"" . Template::getTemplate('misc/question_yesno_checkbox', '1') . "\";");
exit();
}
}
}

View File

@@ -29,7 +29,7 @@ class HtmlForm
public static function genHTMLForm($data = array())
{
global $theme;
global $lng, $theme;
$nob = false;
self::$_form = '';
@@ -233,7 +233,7 @@ class HtmlForm
*
* <code>
* $data = array(
* 'label' => \Froxlor\I18N\Lang::getAll()['customer']['email_imap'],
* 'label' => $lng['customer']['email_imap'],
* 'type' => 'checkbox',
* 'values' => array(
* array( 'label' => 'active',

View File

@@ -405,8 +405,8 @@ class Paging
$breakorws = ($break ? '<br />' : '&nbsp;');
foreach (array(
'asc' => \Froxlor\I18N\Lang::getAll()['panel']['ascending'],
'desc' => \Froxlor\I18N\Lang::getAll()['panel']['descending']
'asc' => $lng['panel']['ascending'],
'desc' => $lng['panel']['descending']
) as $sortordertype => $sortorderdescription) {
$orderoptions .= HTML::makeoption($sortorderdescription, $sortordertype, $this->sortorder, true, true);
}

View File

@@ -94,13 +94,13 @@ class Response
$link = '';
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) !== false) {
$link = '<a href="' . htmlentities($_SERVER['HTTP_REFERER']) . '">' . \Froxlor\I18N\Lang::getAll()['panel']['back'] . '</a>';
$link = '<a href="' . htmlentities($_SERVER['HTTP_REFERER']) . '">' . $lng['panel']['back'] . '</a>';
}
$error = '';
foreach ($errors as $single_error) {
if (isset(\Froxlor\I18N\Lang::getAll()['error'][$single_error])) {
$single_error = \Froxlor\I18N\Lang::getAll()['error'][$single_error];
if (isset($lng['error'][$single_error])) {
$single_error = $lng['error'][$single_error];
$single_error = strtr($single_error, array(
'%s' => $replacer
));
@@ -129,7 +129,7 @@ class Response
$_SESSION['requestData'] = $_POST;
$link = '';
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) !== false) {
$link = '<a href="' . htmlentities($_SERVER['HTTP_REFERER']) . '">' . \Froxlor\I18N\Lang::getAll()['panel']['back'] . '</a>';
$link = '<a href="' . htmlentities($_SERVER['HTTP_REFERER']) . '">' . $lng['panel']['back'] . '</a>';
}
$error = $message;
eval("echo \"" . Template::getTemplate('misc/error', '1') . "\";");
@@ -152,8 +152,8 @@ class Response
{
global $s, $header, $footer, $theme;
if (isset(\Froxlor\I18N\Lang::getAll()['success'][$success_message])) {
$success_message = strtr(\Froxlor\I18N\Lang::getAll()['success'][$success_message], array(
if (isset($lng['success'][$success_message])) {
$success_message = strtr($lng['success'][$success_message], array(
'%s' => htmlentities($replacer)
));
}