refactor global array

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-21 20:31:17 +01:00
parent 5fa0f4b87e
commit c5a58e3f36
68 changed files with 646 additions and 613 deletions

View File

@@ -7,10 +7,10 @@ class HTML
/**
* Build Navigation Sidebar
*
* @param
* array navigation data
* @param
* array userinfo the userinfo of the user
* @param array $navigation
* data
* @param array $userinfo
* the userinfo of the user
* @return string the content of the navigation bar
*
* @author Florian Lippert <flo@syscp.org>
@@ -254,7 +254,7 @@ class HTML
*/
public static function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_nr = 1)
{
global $userinfo, $s, $header, $footer, $lng, $theme;
global $s, $header, $footer;
$hiddenparams = '';
@@ -277,7 +277,7 @@ class HTML
public static function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '', $show_checkbox = true)
{
global $userinfo, $s, $header, $footer, $lng, $theme;
global $s, $header, $footer, $theme;
$hiddenparams = '';

View File

@@ -26,13 +26,6 @@ namespace Froxlor\UI;
class Paging
{
/**
* Userinfo
*
* @var array
*/
private $userinfo = array();
/**
* MySQL-Table
*
@@ -109,16 +102,15 @@ class Paging
* Class constructor.
* Loads settings from request or from userdata and saves them to session.
*
* @param
* array userinfo
* @param
* string Name of Table
* @param
* array Fields, in format array( 'fieldname_in_mysql' => 'field_caption' )
* @param
* int *deprecated* entries per page
* @param
* bool *deprecated* Switch natsorting on/off (global, affects all calls of sort)
* @param array $userinfo
* @param string $table
* Name of Table
* @param array $fields
* Fields, in format array( 'fieldname_in_mysql' => 'field_caption' )
* @param int $entriesperpage
* *deprecated* entries per page
* @param bool $natSorting
* *deprecated* Switch natsorting on/off (global, affects all calls of sort)
* @param int $default_field
* default sorting-field-index
* @param string $default_order

View File

@@ -81,7 +81,7 @@ class Response
*/
public static function standard_error($errors = '', $replacer = '', $throw_exception = false)
{
global $userinfo, $s, $header, $footer, $lng, $theme;
global $s, $header, $footer, $theme;
$_SESSION['requestData'] = $_POST;
$replacer = htmlentities($replacer);
@@ -125,7 +125,7 @@ class Response
public static function dynamic_error($message)
{
global $userinfo, $s, $header, $footer, $lng, $theme;
global $s, $header, $footer, $theme;
$_SESSION['requestData'] = $_POST;
$link = '';
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) !== false) {
@@ -150,7 +150,7 @@ class Response
*/
public static function standard_success($success_message = '', $replacer = '', $params = array(), $throw_exception = false)
{
global $s, $header, $footer, $lng, $theme;
global $s, $header, $footer, $theme;
if (isset($lng['success'][$success_message])) {
$success_message = strtr($lng['success'][$success_message], array(