Commit 649f447b authored by tbrehm's avatar tbrehm
Browse files

- Improved is_installed() function in installer.

- Fixed php notices in dashboard.
parent 3ffbc8af
......@@ -582,8 +582,8 @@ function removeLine($filename,$search_pattern,$strict = 0) {
}
function is_installed($appname) {
exec('which '.escapeshellcmd($appname).' 2> /dev/null',$out);
if(isset($out[0]) && stristr($out[0],$appname)) {
exec('which '.escapeshellcmd($appname).' 2> /dev/null',$out,$returncode);
if(isset($out[0]) && stristr($out[0],$appname) && $returncode == 0) {
return true;
} else {
return false;
......
......@@ -98,16 +98,16 @@ if($_SESSION["s"]["user"]["typ"] == 'admin') {
$v2 = $_SESSION['s']['new_ispconfig_version'];
$this_version = explode(".",$v1);
$this_fullversion = (($this_version[0] < 10) ? '0'.$this_version[0] : $this_version[0]) .
(($this_version[1] < 10) ? '0'.$this_version[1] : $this_version[1]) .
(($this_version[2] < 10) ? '0'.$this_version[2] : $this_version[2]) .
(($this_version[3] < 10) ? (($this_version[3] < 1) ? '00' : '0'.$this_version[3]) : $this_version[3]);
((isset($this_version[1]) && $this_version[1] < 10) ? '0'.$this_version[1] : $this_version[1]) .
((isset($this_version[2]) && $this_version[2] < 10) ? '0'.$this_version[2] : $this_version[2]) .
((isset($this_version[3]) && $this_version[3] < 10) ? (($this_version[3] < 1) ? '00' : '0'.$this_version[3]) : $this_version[3]);
$new_version = explode(".",$v2);
$new_fullversion = (($new_version[0] < 10) ? '0'.$new_version[0] : $new_version[0]) .
(($new_version[1] < 10) ? '0'.$new_version[1] : $new_version[1]) .
(($new_version[2] < 10) ? '0'.$new_version[2] : $new_version[2]) .
(($new_version[3] < 10) ? (($new_version[3] < 1) ? '00' : '0'.$new_version[3]) : $new_version[3]);
((isset($new_version[1]) && $new_version[1] < 10) ? '0'.$new_version[1] : $new_version[1]) .
((isset($new_version[2]) && $new_version[2] < 10) ? '0'.$new_version[2] : $new_version[2]) .
((isset($new_version[3]) && $new_version[3] < 10) ? (($new_version[3] < 1) ? '00' : '0'.$new_version[3]) : $new_version[3]);
if($new_fullversion > $this_fullversion) {
$info[] = array('info_msg' => 'There is a new Version of ISPConfig 3 available!<br>' .
'This Version: ' . $v1 . '<br>' .
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment