fallback refactor

This commit is contained in:
Szekeres Bálint
2018-06-12 00:41:57 +02:00
parent 3712ab8045
commit 11260d7ea5
5 changed files with 55 additions and 61 deletions

View File

@@ -49,7 +49,9 @@
cdn: false,
index: 'index.php',
fallback: true,
fallback_html: false,
fallback_php: true,
fallback_php_path: '/api/',
php: '7.2',
wordpress: false,
@@ -341,16 +343,20 @@
return $scope.isWWW() && $scope.data.cdn;
};
$scope.isIndexHtml = function() {
return $scope.data.index === 'index.html';
$scope.isIndexHTML = function() {
return $scope.data.index === 'index.html' || !$scope.isPHP();
};
$scope.isIndexPhp = function() {
$scope.isIndexPHP = function() {
return $scope.isPHP() && $scope.data.index === 'index.php';
};
$scope.isFallback = function() {
return $scope.data.fallback && (!$scope.isIndexPhp() || $scope.isPHP);
$scope.isFallbackHTML = function() {
return $scope.data.fallback_html;
};
$scope.isFallbackPHP = function() {
return $scope.data.fallback_php && $scope.isPHP();
};
$scope.isPHP = function() {