- possibility to enter a different path for 'awstats.pl' because it might not be in the same directory as 'awstats_buildsstaticpages.pl', fixes #343

This commit is contained in:
Michael Kaufmann (d00p)
2010-08-10 12:07:53 +00:00
parent ee29c406ab
commit 90bd5c3512
8 changed files with 45 additions and 4 deletions

View File

@@ -960,7 +960,7 @@ if(isFroxlorVersion('0.9.12-svn1'))
showUpdateStep("Updating from 0.9.12-svn1 to 0.9.12-svn2", false);
$update_perl_suexecworkaround = isset($_POST['update_perl_suexecworkaround']) ? (int)$_POST['update_perl_suexecworkaround'] : '0';
$update_perl_suexecpath = isset($_POST['update_perl_suexecpath']) ? $_POST['update_perl_suexecpath'] : '/var/www/cgi-bin/';
$update_perl_suexecpath = isset($_POST['update_perl_suexecpath']) ? makeCorrectPath($_POST['update_perl_suexecpath']) : '/var/www/cgi-bin/';
if($update_perl_suexecpath == '') {
$update_perl_suexecpath = '/var/www/cgi-bin/';
@@ -984,3 +984,16 @@ if(isFroxlorVersion('0.9.12-svn2'))
updateToVersion('0.9.12-svn3');
}
if(isFroxlorVersion('0.9.12-svn3'))
{
showUpdateStep("Updating from 0.9.12-svn3 to 0.9.12-svn4", false);
$update_awstats_awstatspath = isset($_POST['update_awstats_awstatspath']) ? makeCorrectPath($_POST['update_awstats_awstatspath']) : $settings['system']['awstats_path'];
showUpdateStep("Adding new settings for awstats");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_awstatspath', '".$db->escape($update_awstats_awstatspath)."');");
lastStepStatus(0);
updateToVersion('0.9.12-svn4');
}

View File

@@ -267,4 +267,16 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= '<input type="text" class="text" name="update_perl_suexecpath" value="/var/www/cgi-bin/" /><br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if(versionInUpdate($current_version, '0.9.12-svn4'))
{
if((int)$settings['system']['awstats_enabled'] == 1)
{
$has_preconfig = true;
$description = 'Due to different paths of awstats_buildstaticpages.pl and awstats.pl you can set a different path for awstats.pl now.';
$question = '<strong>Path to \'awstats.pl\'?:</strong>&nbsp;';
$question.= '<input type="text" class="text" name="update_awstats_awstatspath" value="'.$settings['system']['awstats_path'].'" /><br />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
}