mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
use identity operator + code consistency
- use identity operator === to check string - use single quotes for consistency - simplify code using the ternary operator
This commit is contained in:
parent
13625547d3
commit
75bc2da406
@ -443,11 +443,7 @@ HTML;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepare action for template search
|
// Prepare action for template search
|
||||||
if ($action == "index") {
|
$action = $action === 'index' ? '' : '_' . $action;
|
||||||
$action = "";
|
|
||||||
} else {
|
|
||||||
$action = '_' . $action;
|
|
||||||
}
|
|
||||||
|
|
||||||
$templatesFound = [];
|
$templatesFound = [];
|
||||||
// Find templates for the record + action together - e.g. Page_action.ss
|
// Find templates for the record + action together - e.g. Page_action.ss
|
||||||
|
Loading…
Reference in New Issue
Block a user