Skip to content

Commit 58e0015

Browse files
committed
hide php install options when web_backend is not configured
1 parent 7e02dda commit 58e0015

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

web/edit/server/index.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
];
4848
sort($v_php_versions);
4949

50+
if(empty($backend_templates))
51+
$v_php_versions=[];
52+
5053
$v_php_versions = array_map(function($php_version) use ($backend_templates, $v_php_versions) {
5154
// Mark installed php versions
5255

@@ -65,7 +68,8 @@
6568

6669
if(array_search($phpinfo->name, array_reverse($v_php_versions, true)) == array_key_last($v_php_versions)) {
6770
// Prevent default php version to be removed
68-
$phpinfo->protected = true;
71+
if($phpinfo->installed)
72+
$phpinfo->protected = true;
6973
}
7074

7175
return $phpinfo;

0 commit comments

Comments
 (0)