Compare commits

..

2 Commits

Author SHA1 Message Date
Michael Kaufmann (d00p)
6da6915cac fix version_compare (why did this work for me in the first place?); fix fallback if user still has 'classic' as theme
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-12 10:48:26 +02:00
Michael Kaufmann (d00p)
e9f3e617c7 fix bug in updater which prevents the updater to finish correctly, fixes #1186
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2013-04-12 09:56:02 +02:00
6 changed files with 34 additions and 6 deletions

View File

@@ -534,7 +534,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('panel', 'password_regex', ''),
('panel', 'use_webfonts', '0'),
('panel', 'webfont', 'Numans'),
('panel', 'version', '0.9.28');
('panel', 'version', '0.9.28.1');

View File

@@ -2046,3 +2046,9 @@ if (isFroxlorVersion('0.9.28-rc2')) {
updateToVersion('0.9.28');
}
if (isFroxlorVersion('0.9.28')) {
showUpdateStep("Updating from 0.9.28 final to 0.9.28.1");
lastStepStatus(0);
updateToVersion('0.9.28.1');
}

View File

@@ -72,17 +72,20 @@ function version_compare2($a, $b) {
$x = explode("-", $a[count($a)-1]);
$a[count($a)-1] = $x[0];
if (stripos($x[1], 'rc') !== false) {
$a[] = '0';
$a[] = '2'; // rc > dev > svn
// number of rc
$a[] = substr($x[1], 2);
}
else if (stripos($x[1], 'dev') !== false) {
$a[] = '0';
$a[] = '1'; // svn < dev < rc
// number of dev
$a[] = substr($x[1], 3);
}
// -svn version are deprecated
else if (stripos($x[1], 'svn') !== false) {
$a[] = '0';
$a[] = '0'; // svn < dev < rc
// number of svn
$a[] = substr($x[1], 3);
@@ -97,17 +100,20 @@ function version_compare2($a, $b) {
$x = explode("-", $b[count($b)-1]);
$b[count($b)-1] = $x[0];
if (stripos($x[1], 'rc') !== false) {
$b[] = '0';
$b[] = '2'; // rc > dev > svn
// number of rc
$b[] = substr($x[1], 2);
}
else if (stripos($x[1], 'dev') !== false) {
$b[] = '0';
$b[] = '1'; // svn < dev < rc
// number of dev
$b[] = substr($x[1], 3);
}
// -svn version are deprecated
else if (stripos($x[1], 'svn') !== false) {
$b[] = '0';
$b[] = '0'; // svn < dev < rc
// number of svn
$b[] = substr($x[1], 3);
@@ -118,6 +124,17 @@ function version_compare2($a, $b) {
}
}
if (count($a) > count($b)) {
if ($a[count($b)-1] == $b[count($b)-1]) {
return -1;
}
}
if (count($b) > count($a)) {
if ($b[count($a)-1] == $a[count($a)-1]) {
return 1;
}
}
foreach ($a as $depth => $aVal) {
// iterate over each piece of A
if (isset($b[$depth])) {

View File

@@ -491,8 +491,8 @@ LoadModule authz_host_module modules/mod_authz_host.so</pre><br />';
$description = 'Froxlor changed the default parameter-set of sendmail (php.ini)<br />';
$description .= 'sendmail_path = "/usr/sbin/sendmail -t <strong>-i</strong> -f {CUSTOMER_EMAIL}"<br /><br />';
$description .= 'If you don\'t have any problems with sending mails, you don\'t need to change this';
if ($this->_settings['system']['mod_fcgid'] == '1'
|| $this->_settings['phpfpm']['enabled'] == '1'
if ($settings['system']['mod_fcgid'] == '1'
|| $settings['phpfpm']['enabled'] == '1'
) {
// information about removal of php's safe_mode
$description .= '<br /><br />The php safe_mode flag has been removed as current versions of PHP<br />';

View File

@@ -363,11 +363,16 @@ $theme = isset($settings['panel']['default_theme']) ? $settings['panel']['defaul
/**
* overwrite with customer/admin theme if defined
*/
if(isset($userinfo['theme']) && $userinfo['theme'] != $theme)
{
if (isset($userinfo['theme']) && $userinfo['theme'] != $theme) {
$theme = $userinfo['theme'];
}
// check for existence of the theme
if (!file_exists('templates/'.$theme.'/index.tpl')) {
// Fallback
$theme = 'Froxlor';
}
/*
* check for custom header-graphic
*/

View File

@@ -73,6 +73,6 @@ define('PACKAGE_ENABLED', 2);
// VERSION INFO
$version = '0.9.28';
$version = '0.9.28.1';
$dbversion = '2';
$branding = '';