tbrehm
2011-11-14 649f447b4f6512803b694437d9b218ca94c54bc1
- Improved is_installed() function in installer.
- Fixed php notices in dashboard.
2 files modified
16 ■■■■ changed files
install/lib/install.lib.php 4 ●●●● patch | view | raw | blame | history
interface/web/dashboard/dashboard.php 12 ●●●● patch | view | raw | blame | history
install/lib/install.lib.php
@@ -582,8 +582,8 @@
}
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;
interface/web/dashboard/dashboard.php
@@ -98,16 +98,16 @@
    $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>' .