From 75bc2da406dcfb50848e39b5908b683f31ecfd65 Mon Sep 17 00:00:00 2001 From: maks Date: Fri, 17 Aug 2018 14:38:24 +0200 Subject: [PATCH] use identity operator + code consistency - use identity operator === to check string - use single quotes for consistency - simplify code using the ternary operator --- code/Controllers/ContentController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/Controllers/ContentController.php b/code/Controllers/ContentController.php index e14d6794..3d544935 100644 --- a/code/Controllers/ContentController.php +++ b/code/Controllers/ContentController.php @@ -443,11 +443,7 @@ HTML; } // Prepare action for template search - if ($action == "index") { - $action = ""; - } else { - $action = '_' . $action; - } + $action = $action === 'index' ? '' : '_' . $action; $templatesFound = []; // Find templates for the record + action together - e.g. Page_action.ss