Commit 43447205 authored by Côme Chilliet's avatar Côme Chilliet

🚑 fix(code) Fix code style

Fixes of spaces by php-cs-fixer

issue #5955
parent e7a2d4d9
......@@ -23,7 +23,7 @@ function smarty_function_filePath ($params, Smarty_Internal_Template $smarty)
$default_theme = 'breezy';
/* Set theme */
if (isset ($config)) {
if (isset($config)) {
$theme = $config->get_cfg_value('theme', $default_theme);
} else {
$theme = $default_theme;
......
......@@ -23,7 +23,7 @@ function smarty_function_iconPath ($params)
/* Set theme */
$theme = IconTheme::$default_theme;
if (isset ($config)) {
if (isset($config)) {
$theme = $config->get_cfg_value("theme");
}
......
......@@ -20,9 +20,9 @@
*/
/* Basic setup, remove eventually registered sessions */
@require_once ("../include/php_setup.inc");
@require_once ("functions.inc");
@require_once ("variables.inc");
@require_once("../include/php_setup.inc");
@require_once("functions.inc");
@require_once("variables.inc");
session_cache_limiter("private");
session::start();
......
......@@ -43,7 +43,7 @@ header('Pragma: no-cache');
header('Cache-Control: post-check=0, pre-check=0');
$key = 'binary';
if (isset ($_GET['key'])) {
if (isset($_GET['key'])) {
$key .= $_GET['key'];
}
......
......@@ -20,10 +20,10 @@
*/
/* Load required includes */
require_once ("../include/php_setup.inc");
require_once ("functions.inc");
require_once ("variables.inc");
require_once ("class_logging.inc");
require_once("../include/php_setup.inc");
require_once("functions.inc");
require_once("variables.inc");
require_once("class_logging.inc");
/* Set headers */
header('Content-type: text/html; charset=UTF-8');
......
......@@ -20,9 +20,9 @@
*/
/* Basic setup, remove eventually registered sessions */
require_once ("../include/php_setup.inc");
require_once ("functions.inc");
require_once ("variables.inc");
require_once("../include/php_setup.inc");
require_once("functions.inc");
require_once("variables.inc");
/* Set headers */
header('Content-type: text/html; charset=UTF-8');
......
......@@ -24,10 +24,10 @@ session_cache_limiter("private");
/* Check for parameter completenes */
if (!isset($_GET['x']) || !isset($_GET['y']) || !isset($_GET['p'])) {
die ("Missing parameters!");
die("Missing parameters!");
}
if (!is_numeric($_GET['x']) || !is_numeric($_GET['y'])) {
die ("Parameters must be numeric!");
die("Parameters must be numeric!");
}
$p = (int)($_GET['p']);
......@@ -76,7 +76,7 @@ if (!function_exists("imagecreate")) {
/* Draw image in GD image stream */
$im = imagecreate($x, $y);
if (!$im) {
die ('Cannot Initialize new GD image stream');
die('Cannot Initialize new GD image stream');
}
/* Set colors */
......
......@@ -20,9 +20,9 @@
*/
/* Get standard functions */
require_once ("../include/php_setup.inc");
require_once ("functions.inc");
require_once ("variables.inc");
require_once("../include/php_setup.inc");
require_once("functions.inc");
require_once("variables.inc");
require_once("../setup/class_setup.inc");
require_once("../setup/class_setupStep.inc");
......
......@@ -335,7 +335,7 @@ class filter
function render ()
{
/* If template is not filled, we display nothing */
if (!isset ($this->xmlData['definition']['template'])) {
if (!isset($this->xmlData['definition']['template'])) {
return "";
}
......
......@@ -1374,7 +1374,7 @@ class LDAP
/* Build LDAP connection */
$ds = ldap_connect($server);
if (!$ds) {
die ('Can\'t bind to LDAP. No check possible!');
die('Can\'t bind to LDAP. No check possible!');
}
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_bind($ds, $admin, $password);
......
......@@ -1431,7 +1431,7 @@ class listing
global $ui;
if (isset($action['acl'])) {
if (isset ($action['aclInfos'])) {
if (isset($action['aclInfos'])) {
$aclInfos = $action['aclInfos'];
} else {
/* First time we check permission for this action */
......
......@@ -559,7 +559,7 @@ class pluglist
}
if (is_file("$plugin_dir/main.inc")) {
$display = '';
require ("$plugin_dir/main.inc");
require("$plugin_dir/main.inc");
} elseif (is_callable(array($plugin, 'mainInc'))) {
$plugin::mainInc();
} else {
......
......@@ -613,7 +613,7 @@ class templateHandling
if (!is_array($values)) {
$values = array($values);
}
unset ($values['count']);
unset($values['count']);
foreach ($values as $value) {
$offset = 0;
while (preg_match('/%([^%\|]+\|)?([^%]+)%/', $value, $m, PREG_OFFSET_CAPTURE, $offset)) {
......
......@@ -25,12 +25,12 @@
*/
/* Define common locations and variables */
require_once ('variables.inc');
require_once('variables.inc');
/* Include required files */
require_once (CACHE_DIR.'/'.CLASS_CACHE);
require_once ('functions_debug.inc');
require_once ('accept-to-gettext.inc');
require_once(CACHE_DIR.'/'.CLASS_CACHE);
require_once('functions_debug.inc');
require_once('accept-to-gettext.inc');
/* Define constants for debugging */
define('DEBUG_TRACE', 1); /*! Debug level for tracing of common actions (save, check, etc.) */
......@@ -234,7 +234,7 @@ function get_template_path ($filename = '', $plugin = FALSE, $path = '')
$default_theme = 'breezy';
/* Set theme */
if (isset ($config)) {
if (isset($config)) {
$theme = $config->get_cfg_value('theme', $default_theme);
} else {
$theme = $default_theme;
......
......@@ -24,7 +24,7 @@
* \file php_setup.inc
* Source code for php_setup
*/
require_once ("variables.inc");
require_once("variables.inc");
function html_trace ($errstr = "")
{
......@@ -36,7 +36,7 @@ function html_trace ($errstr = "")
'LDAP/__construct' => array(1),
);
if (!function_exists('debug_backtrace')) {
return array ('', '');
return array('', '');
}
$trace = array_slice(debug_backtrace(), 1);
......
......@@ -695,7 +695,7 @@ class simpleManagement
if (static::$skipTemplates) {
return;
}
if (isset ($target[0])) {
if (isset($target[0])) {
$dn = $target[0];
} else {
$dn = NULL;
......
......@@ -1168,7 +1168,7 @@ class simplePlugin
if (is_array($this->attrs[$index]) &&
(count($this->attrs[$index]) == 0) &&
!isset($this->saved_attributes[$index])) {
unset ($this->attrs[$index]);
unset($this->attrs[$index]);
continue;
}
......@@ -1177,7 +1177,7 @@ class simplePlugin
isset($this->saved_attributes[$index]) &&
!is_array($this->saved_attributes[$index]) &&
($this->attrs[$index] == $this->saved_attributes[$index])) {
unset ($this->attrs[$index]);
unset($this->attrs[$index]);
continue;
}
......@@ -1186,7 +1186,7 @@ class simplePlugin
isset($this->saved_attributes[$index]) &&
is_array($this->saved_attributes[$index]) &&
!array_differs($this->attrs[$index], $this->saved_attributes[$index])) {
unset ($this->attrs[$index]);
unset($this->attrs[$index]);
continue;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment