index, fallback refactor

This commit is contained in:
Szekeres Bálint
2018-04-21 15:47:37 +02:00
parent 521d65c1f0
commit 0d61ff815b
4 changed files with 54 additions and 50 deletions

View File

@@ -48,11 +48,10 @@
non_www: true,
cdn: false,
index: '',
index_html: false,
index: 'index.php',
fallback: true,
php: '7.2',
index_php: true,
wordpress: false,
file_structure: 'unified',
@@ -343,17 +342,21 @@
};
$scope.isIndexHtml = function() {
return $scope.data.index_html;
return $scope.data.index === 'index.html';
};
$scope.isIndexPhp = function() {
return $scope.isPHP() && $scope.data.index === 'index.php';
};
$scope.isFallback = function() {
return $scope.data.fallback && (!$scope.isIndexPhp() || $scope.isPHP);
};
$scope.isPHP = function() {
return $scope.data.php !== 'off';
};
$scope.isIndexPhp = function() {
return $scope.isPHP() && $scope.data.index_php;
};
$scope.isWordPress = function() {
return $scope.isPHP() && $scope.data.wordpress;
};