Commit e7a2d4d9 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(code) Code style fixes by php-cs-fixer

Basic fixes like identation

issue #5955
parent deff6548
......@@ -33,7 +33,7 @@ function smarty_block_render ($params, $text)
}
/* Debug output */
if (session::is_set('DEBUGLEVEL') && session::get('DEBUGLEVEL') & DEBUG_ACL ) {
if (session::is_set('DEBUGLEVEL') && session::get('DEBUGLEVEL') & DEBUG_ACL) {
echo '<div style="color:blue;">'.$acl.(isset($params['aclName']) ? ' ['.$params['aclName'].']' : '').'</div>';
}
......@@ -75,4 +75,3 @@ function smarty_block_render ($params, $text)
return preg_replace($from, $to, $text);
}
?>
......@@ -55,4 +55,3 @@ function smarty_function_filePath ($params, Smarty_Internal_Template $smarty)
}
return $filename;
}
?>
......@@ -29,4 +29,3 @@ function smarty_function_iconPath ($params)
return IconTheme::findThemeIcon($theme, $params['context'], $params['icon'], $params['size']);
}
?>
......@@ -36,4 +36,3 @@ function smarty_function_msgPool ($params)
trigger_error('Unknown class msgPool.');
}
}
?>
......@@ -68,9 +68,7 @@ if (isset($_GET['type']) && $_GET['type'] == "base") {
echo "<ul>$res</ul>";
}
}
} else {
$ui = session::global_get('ui');
$config = session::global_get('config');
......@@ -80,5 +78,3 @@ if (isset($_GET['type']) && $_GET['type'] == "base") {
$filter->processAutocomplete();
}
}
?>
......@@ -50,4 +50,3 @@ if (isset($_GET['disabled']) && $_GET['disabled']) {
} else {
readfile($src);
}
?>
......@@ -167,7 +167,7 @@ if (!empty($old_plugin_index) && ($old_plugin_index != $plugin_index)) {
$ui->getSizeLimitHandler()->update();
/* Check for memory */
if (memory_get_usage() > (to_byte(ini_get('memory_limit')) - 2048000 )) {
if (memory_get_usage() > (to_byte(ini_get('memory_limit')) - 2048000)) {
msg_dialog::display(_("Configuration error"), _("Running out of memory!"), WARNING_DIALOG);
}
......
......@@ -55,7 +55,6 @@ if (!function_exists("imagecreate")) {
echo "Please install the php5-gd library, FusionDirectory can't create images without it.";
exit();
} else {
$x_matches = FALSE;
$y_matches = FALSE;
foreach (array(7,6,5,4,3,2,1,0) as $font) {
......
......@@ -130,5 +130,3 @@ if ($error_collector != "") {
$smarty->assign("version", FD_VERSION);
echo $header.$smarty->fetch("$BASE_DIR/setup/setup_frame.tpl");
?>
......@@ -165,7 +165,7 @@ function al2gt ($gettextlangs)
}
// if lang scores are equals we compare char scores
if (($lang_score > $max_l_score)
if (($lang_score > $max_l_score)
|| (($lang_score == $max_l_score) && ($char_score > $max_c_score))) {
$max_l_score = $lang_score;
$max_c_score = $char_score;
......@@ -179,4 +179,3 @@ function al2gt ($gettextlangs)
return $max_lang;
}
?>
......@@ -58,8 +58,7 @@ class CSRFProtection
if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
/* Only take the first value, there may be several separated by commas */
list($target) = explode(',', $_SERVER['HTTP_X_FORWARDED_HOST'], 2);
} else
if (!empty($_SERVER['HTTP_HOST'])) {
} elseif (!empty($_SERVER['HTTP_HOST'])) {
$target = $_SERVER['HTTP_HOST'];
}
if ($target && !hash_equals($origin, $target)) {
......
......@@ -187,7 +187,7 @@ class CopyPasteHandler
$cut_acl = $ui->is_cutable($entry['dn'], $entry['aclCategory'], $entry['mainTab']);
/* Check permissions */
if ( (($entry['method'] == 'copy') && !$copy_acl)
if ((($entry['method'] == 'copy') && !$copy_acl)
|| (($entry['method'] == 'cut') && !$cut_acl)) {
$this->disallowed_objects[$key] = $entry;
} else {
......@@ -328,4 +328,3 @@ class CopyPasteHandler
return $Copy_Paste;
}
}
?>
......@@ -401,5 +401,3 @@ class IconTheme
),
);
}
?>
......@@ -408,4 +408,3 @@ class SnapshotRestoreDialog extends simplePlugin
{
}
}
?>
......@@ -402,4 +402,3 @@ class SnapshotHandler
}
}
}
?>
......@@ -99,11 +99,11 @@ class acl
{
$list = explode(':', $acl);
if (count($list) == 5) {
list($index, $type,$role,$members,$filter) = $list;
list($index, $type, $role, $members, $filter) = $list;
$filter = base64_decode($filter);
} else {
$filter = "";
list($index, $type,$role,$members) = $list;
list($index, $type, $role, $members) = $list;
}
$a = array( $index => array(
......@@ -214,11 +214,9 @@ class acl
list($field, $facl) = explode(';', $ssacl);
$a[$gobject][$field] = $facl;
}
}
}
return $a;
}
}
?>
......@@ -320,4 +320,3 @@ class baseSelector
return $this->pathMapping;
}
}
?>
......@@ -101,7 +101,6 @@ class config
session::global_set('class_location.inc:timestamp', $tmp['mtime']);
if (($this->filename != '') && ((filemtime($this->filename) != $this->last_modified) || $force)) {
$this->config_found = FALSE;
$this->tags = array();
$this->level = 0;
......@@ -447,7 +446,6 @@ class config
);
}
}
}
/* Check that configuration is in LDAP, check that no plugin got installed since last configuration update */
......@@ -1126,4 +1124,3 @@ class config
);
}
}
?>
......@@ -27,7 +27,8 @@
/*!
* \brief This class contains all the function needed to sort department
*/
class departmentSortIterator extends listingSortIterator {
class departmentSortIterator extends listingSortIterator
{
/*!
* \brief departmentSortIterator constructor
*
......@@ -40,4 +41,3 @@ class departmentSortIterator extends listingSortIterator {
parent::__construct($data, $direction, 'sort-attribute', 'department');
}
}
?>
......@@ -217,4 +217,3 @@ class divSelectBox
return $s_return;
}
}
?>
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