diff --git a/modules/categorie_documenti/src/Categoria.php b/modules/categorie_documenti/src/Categoria.php index f1ea658b4..531022c80 100644 --- a/modules/categorie_documenti/src/Categoria.php +++ b/modules/categorie_documenti/src/Categoria.php @@ -19,12 +19,12 @@ class Categoria extends Model $model->save(); $gruppi = database()->fetchArray('SELECT `id` FROM `zz_groups`'); - foreach($gruppi as $array) { - foreach($array as $k=>$v) { + foreach ($gruppi as $array) { + foreach ($array as $k => $v) { $newArray[$k] = $v; } } - + $model->syncPermessi($newArray); return $model; @@ -33,7 +33,7 @@ class Categoria extends Model public function syncPermessi(array $groups) { $groups[] = 1; - + $database = database(); $database->sync('do_permessi', ['id_categoria' => $this->id], [ 'id_gruppo' => $groups, diff --git a/modules/dashboard/edit.php b/modules/dashboard/edit.php index bf41b8641..6d63584cd 100644 --- a/modules/dashboard/edit.php +++ b/modules/dashboard/edit.php @@ -590,7 +590,7 @@ if (empty($domenica)) { echo " minTime: '".setting('Inizio orario lavorativo')."', - maxTime: '".((setting('Fine orario lavorativo') != '00:00:00' and !empty(setting('Fine orario lavorativo'))) ? setting('Fine orario lavorativo'):'23:59:59')."', + maxTime: '".((setting('Fine orario lavorativo') != '00:00:00' and !empty(setting('Fine orario lavorativo'))) ? setting('Fine orario lavorativo') : '23:59:59')."', "; ?> diff --git a/src/Prints.php b/src/Prints.php index 8dc3b2b6d..2a59f8b1a 100644 --- a/src/Prints.php +++ b/src/Prints.php @@ -125,23 +125,25 @@ class Prints $dbo = $database = database(); $infos = self::get($print); - Permissions::addModule($infos['id_module']); + if (!$return_string) { + Permissions::addModule($infos['id_module']); - $has_access = true; - if (!empty($infos['is_record'])) { - $module = Modules::get($infos['id_module']); + $has_access = true; + if (!empty($infos['is_record'])) { + $module = Modules::get($infos['id_module']); - Util\Query::setSegments(false); - $query = Util\Query::getQuery($module, [ - 'id' => $id_record, - ]); - Util\Query::setSegments(true); + Util\Query::setSegments(false); + $query = Util\Query::getQuery($module, [ + 'id' => $id_record, + ]); + Util\Query::setSegments(true); - $has_access = !empty($query) ? $dbo->fetchNum($query) !== 0 : true; - } + $has_access = !empty($query) ? $dbo->fetchNum($query) !== 0 : true; + } - if (empty($infos) || empty($infos['enabled']) || !Permissions::check([], false) || !$has_access) { - return false; + if (empty($infos) || empty($infos['enabled']) || !Permissions::check([], false) || !$has_access) { + return false; + } } // Individuazione della configurazione diff --git a/update/v2_4_10/Article.php b/update/v2_4_10/Article.php index 81f0702b4..d26011d3c 100644 --- a/update/v2_4_10/Article.php +++ b/update/v2_4_10/Article.php @@ -2,8 +2,8 @@ namespace Update\v2_4_10; -use Common\Document; use Common\Components\Row; +use Common\Document; use Illuminate\Database\Eloquent\Builder; use Modules\Articoli\Articolo as Original; use UnexpectedValueException; diff --git a/update/v2_4_10/Components/Articolo.php b/update/v2_4_10/Components/Articolo.php index 5f3bed972..2fbd3a01f 100644 --- a/update/v2_4_10/Components/Articolo.php +++ b/update/v2_4_10/Components/Articolo.php @@ -2,8 +2,8 @@ namespace Update\v2_4_10\Components; -use Update\v2_4_10\Article; use Modules\Articoli\Articolo as Original; +use Update\v2_4_10\Article; use Update\v2_4_10\Fattura; class Articolo extends Article