tbrehm
2011-11-07 f9318304dc8b00dfd0a3759a8aece7725865db32
- Added version check to autoupdate script.
- Added some default values for nginx in the web_domain_update function of the remote api.
- Fixed a php warning in the updater.
3 files modified
13 ■■■■■ changed files
install/autoupdate.php 4 ●●●● patch | view | raw | blame | history
install/update.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/remoting.inc.php 7 ●●●●● patch | view | raw | blame | history
install/autoupdate.php
@@ -79,6 +79,10 @@
if($dist['id'] == '') die('Linux distribution or version not recognized.');
//** Check version
if(compare_ispconfig_version('3.0.3',ISPC_APP_VERSION) < 0) die("This updater is for ISPConfig versions > 3.0.3.0. Please Update to ISPConfig 3.0.3.3 first before you update to the current ISPConfig version.\n");
//** Include the distribution-specific installer class library and configuration
if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php');
include_once('dist/lib/'.$dist['id'].'.lib.php');
install/update.php
@@ -79,7 +79,7 @@
if($dist['id'] == '') die('Linux distribution or version not recognized.');
//** Check version
if(compare_ispconfig_version('3.0.3',ISPC_APP_VERSION) < 0) die('This updater is for ISPConfig versions > 3.0.3.0. Please Update to ISPConfig 3.0.3.3 first before you update to the current ISPConfig version.');
if(compare_ispconfig_version('3.0.3',ISPC_APP_VERSION) < 0) die("This updater is for ISPConfig versions > 3.0.3.0. Please Update to ISPConfig 3.0.3.3 first before you update to the current ISPConfig version.\n");
//** Include the distribution-specific installer class library and configuration
if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php');
interface/lib/classes/remoting.inc.php
@@ -1372,6 +1372,13 @@
            $this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        //* Set a few defaults for nginx servers
        if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
        if($params['pm_start_servers'] == '') $params['pm_start_servers'] = 1;
        if($params['pm_min_spare_servers'] == '') $params['pm_min_spare_servers'] = 1;
        if($params['pm_max_spare_servers'] == '') $params['pm_max_spare_servers'] = 1;
        $affected_rows = $this->updateQuery('../sites/form/web_domain.tform.php',$client_id,$primary_id,$params);
        return $affected_rows;
    }