- improved update-procedure
- updated version to 0.9.4-svn2
This commit is contained in:
@@ -98,7 +98,7 @@ if($page == 'overview')
|
|||||||
$update_information = $ui_text;
|
$update_information = $ui_text;
|
||||||
|
|
||||||
include_once './install/updates/preconfig.php';
|
include_once './install/updates/preconfig.php';
|
||||||
$preconfig = getPreConfig($new_version);
|
$preconfig = getPreConfig($current_version);
|
||||||
if($preconfig != '')
|
if($preconfig != '')
|
||||||
{
|
{
|
||||||
$update_information .= '<br />'.$preconfig.$message;
|
$update_information .= '<br />'.$preconfig.$message;
|
||||||
|
|||||||
@@ -451,7 +451,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.4-svn1');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.4-svn2');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||||
|
|||||||
@@ -25,20 +25,13 @@
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getPreConfig($version)
|
function getPreConfig($current_version)
|
||||||
{
|
{
|
||||||
$has_preconfig = false;
|
$has_preconfig = false;
|
||||||
$return = '<div class="preconfig"><h3 style="color:#ff0000;">PLEASE NOTE - Important update notifications</h3>';
|
$return = '<div class="preconfig"><h3 style="color:#ff0000;">PLEASE NOTE - Important update notifications</h3>';
|
||||||
|
|
||||||
if($version == '0.9.4-svn2')
|
include_once makeCorrectFile(dirname(__FILE__).'/preconfig/0.9/preconfig_0.9.inc.php');
|
||||||
{
|
parseAndOutputPreconfig($has_preconfig, $return, $current_version);
|
||||||
$has_preconfig = true;
|
|
||||||
$return .= 'Froxlor-0.9.4-svn2 now enabled the usage of a domain-wildcard entry and subdomains for this domain at once (subdomains are parsed before the main vhost container). ';
|
|
||||||
$return .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.<br />';
|
|
||||||
$return .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.<br /><br />';
|
|
||||||
$return .= '<strong>Do you want to use wildcard-entries for existing domains?:</strong> ';
|
|
||||||
$return .= makeyesno('update_domainwildcardentry', '1', '0', '1');
|
|
||||||
}
|
|
||||||
|
|
||||||
$return .= '<br /><br />'.makecheckbox('update_changesagreed', '<strong>I have read the update notifications and I am aware of the changes made to my system.</strong>', '1', true, '0', true);
|
$return .= '<br /><br />'.makecheckbox('update_changesagreed', '<strong>I have read the update notifications and I am aware of the changes made to my system.</strong>', '1', true, '0', true);
|
||||||
$return .= '</div>';
|
$return .= '</div>';
|
||||||
@@ -50,3 +43,17 @@ function getPreConfig($version)
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function versionInUpdate($current_version, $version_to_check)
|
||||||
|
{
|
||||||
|
$pos_a = strpos($current_version, '-svn');
|
||||||
|
$pos_b = strpos($current_version, '-svn');
|
||||||
|
// if we compare svn-versions, we have to add -svn0 to the version
|
||||||
|
// to compare it correctly
|
||||||
|
if($pos_a === false && $pos_b !== false)
|
||||||
|
{
|
||||||
|
$current_version.= '-svn0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return version_compare($current_version, $version_to_check, '<=');
|
||||||
|
}
|
||||||
|
|||||||
38
install/updates/preconfig/0.9/preconfig_0.9.inc.php
Normal file
38
install/updates/preconfig/0.9/preconfig_0.9.inc.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This file is part of the Froxlor project.
|
||||||
|
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the COPYING
|
||||||
|
* file that was distributed with this source code. You can also view the
|
||||||
|
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
*
|
||||||
|
* @copyright (c) the authors
|
||||||
|
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||||
|
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||||
|
* @package Language
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* checks if the new-version has some updating to do
|
||||||
|
*
|
||||||
|
* @param boolean $has_preconfig pointer to check if any preconfig has to be output
|
||||||
|
* @param string $return pointer to output string
|
||||||
|
* @param string $current_version current froxlor version
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||||
|
{
|
||||||
|
if(versionInUpdate($current_version, '0.9.4-svn2'))
|
||||||
|
{
|
||||||
|
$has_preconfig = true;
|
||||||
|
$return .= 'Froxlor-0.9.4-svn2 now enabled the usage of a domain-wildcard entry and subdomains for this domain at once (subdomains are parsed before the main vhost container). ';
|
||||||
|
$return .= 'This makes it possible to catch all non-existing subdomains with the main vhost but also have the ability to use subdomains for that domain.<br />';
|
||||||
|
$return .= 'If you would like Froxlor to do so with your domains, the update script can set the correct values for existing domains for you. Note: future domains will have wildcard-entries enabled by default no matter how you decide here.<br /><br />';
|
||||||
|
$return .= '<strong>Do you want to use wildcard-entries for existing domains?:</strong> ';
|
||||||
|
$return .= makeyesno('update_domainwildcardentry', '1', '0', '1');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -68,7 +68,7 @@ define('PACKAGE_ENABLED', 2);
|
|||||||
|
|
||||||
// VERSION INFO
|
// VERSION INFO
|
||||||
|
|
||||||
$version = '0.9.4-svn1';
|
$version = '0.9.4-svn2';
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
$branding = '';
|
$branding = '';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user