Skip to content

Commit

Permalink
Merge branch 'release/1.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Nov 1, 2023
2 parents b2b7335 + 13d3a68 commit 7c658b5
Show file tree
Hide file tree
Showing 103 changed files with 18,158 additions and 5,551 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ jobs:
- name: PHPStan checks
run: |
vendor/bin/phpstan analyze --ansi --memory-limit=2G --no-interaction --no-progress
- name: Twig CS
run: |
vendor/bin/twigcs app/Templates --severity error --display blocking
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
/.vscode/
/vendor/
/public/node_modules/
/data/cache/*
!/data/cache/.gitkeep
/data/logs/*.log
/config.inc.php
/local.config.inc.php
/phinx_local.php
/tests/code-coverage/
/projects/
_site/
.sass-cache/
.buildpath
.project
.settings/
.idea/
node_modules/
public/assets/
!public/assets/.gitkeep

# Semantic UI
semantic
!ui/semantic
public/ui/
16 changes: 1 addition & 15 deletions app/Controllers/Reference.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class Reference extends ControllerAbstract
public function view(Request $req, Response $res, array $args)
{
$get = $req->getQueryParams();

// default session param for this controller
if (!isset($_SESSION['reference'])) {
$_SESSION['reference'] = [
Expand All @@ -21,17 +20,6 @@ public function view(Request $req, Response $res, array $args)
];
}

// manage sorting
if (isset($get['orderby'])) {
if ($_SESSION['reference']['orderby'] == $get['orderby']) {
// toggle sort if orderby requested on the same column
$_SESSION['reference']['sort'] = ($_SESSION['reference']['sort'] == "desc"
? "asc"
: "desc");
}
$_SESSION['reference']['orderby'] = $get['orderby'];
}

$_SESSION['reference']['pagination'] = 15;
$order_field = $_SESSION['reference']['orderby'];
$order_sort = $_SESSION['reference']['sort'];
Expand Down Expand Up @@ -121,7 +109,7 @@ function ($key) use ($join_table) {
'total' => ReferenceModel::query()->where('is_displayed', '=', true)->count(),
'class' => 'reference',
'showmodal' => isset($get['showmodal']),
'uuid' => isset($get['uuid']) ? $get['uuid'] : '',
'uuid' => $get['uuid'] ?? '',
'references' => $references,
'orderby' => $_SESSION['reference']['orderby'],
'sort' => $_SESSION['reference']['sort'],
Expand Down Expand Up @@ -207,8 +195,6 @@ public function register(Request $req, Response $res)

public function filter(Request $req, Response $res, array $args)
{
$get = $req->getQueryParams();

// manage sorting
if ($args['action'] == 'order') {
if (!isset($args['value'])) {
Expand Down
1 change: 1 addition & 0 deletions app/Controllers/Telemetry.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public function view(Request $request, Response $response)
->toArray();
$dashboard['default_languages'] = json_encode([[
'type' => 'pie',
'hole' => .4,
'palette' => 'combo',
'labels' => array_column($languages, 'glpi_default_language'),
'values' => array_column($languages, 'total')
Expand Down
Loading

0 comments on commit 7c658b5

Please sign in to comment.