Compare commits

..

27 Commits

Author SHA1 Message Date
Florian Aders (EleRas)
448e7f5c99 Tagging froxlor 0.9.10 2010-06-28 09:47:32 +00:00
Michael Kaufmann (d00p)
e5cd9ad727 - fix accessibility of Froxlor
- added option to decide how Froxlor is being reached
- set version to 0.9.10
2010-06-28 08:53:41 +00:00
Michael Kaufmann (d00p)
cc5c30cc69 - check for defined variable in makeCorrectFile as an undefined may return unwanted values 2010-06-28 08:23:11 +00:00
Michael Kaufmann (d00p)
cf2104e989 - fix wrong variable name 2010-06-28 08:18:12 +00:00
Michael Kaufmann (d00p)
14b7be0a4f - fix undefined (and also unneeded) variable in cron-job 2010-06-25 05:27:09 +00:00
Michael Kaufmann (d00p)
e6c385da10 - fix maildir checking (returned error even if the path exists and is readable) 2010-06-24 20:10:47 +00:00
Michael Kaufmann (d00p)
57124d040d - don't delete everything if the path is the domains document-root (protect basedir, awstats|webalizer-dir and place default index), fixes #273
refs #273
2010-06-24 08:11:43 +00:00
Michael Kaufmann (d00p)
67c55c5a25 - remove installed files when APS packages has been removed, fixes #273
refs #273
2010-06-24 07:26:49 +00:00
Michael Kaufmann (d00p)
f86e4f39d3 - add missing label-string for httpuser and httpgroup settings 2010-06-21 08:38:13 +00:00
Michael Kaufmann (d00p)
5e162b018d - nicer and safer way of determine the customer-id out of the aps-database name 2010-06-17 11:32:14 +00:00
Michael Kaufmann (d00p)
9851ac53cc - show aps-databases also customer-mysql overview, fixes #272
- aps-databases are now increasing the customers mysql-contingent, refs #278
- customers viewing the aps-list are now notified if a package requires a database but the contingent is used up
- the update will add all web[X]aps[Y] databases to the according customer regardless of contingent
- fix tiny issue in preconfig
- setting version to 0.9.10-svn2


refs #272,278
2010-06-17 09:21:14 +00:00
Michael Kaufmann (d00p)
794c4d3b55 - show message-box if customer has no/insufficient aps-contingent, fixed #278
refs #278
2010-06-17 06:30:59 +00:00
Michael Kaufmann (d00p)
530b6da6e8 - fix htpasswd stuff in lighty, fixes #281 2010-06-17 05:56:36 +00:00
Florian Aders (EleRas)
6986ffefbe Fixed bug in languageselect 2010-06-16 20:13:12 +00:00
Florian Aders (EleRas)
e6eefc9913 Fixed typo, fixes #279 2010-06-16 20:02:28 +00:00
Florian Aders (EleRas)
3cd66a9fc4 Now the same for trunk, if someone only checks out trunk ;) 2010-06-16 18:16:37 +00:00
Florian Aders (EleRas)
a1c98e4012 Fixing login - languageselector, fixes #277 2010-06-16 16:26:31 +00:00
Florian Aders (EleRas)
cc7610d436 I hate stupid bugs, still fixing #276 2010-06-16 12:38:53 +00:00
Florian Aders (EleRas)
36efb04f86 Stupid bug-- 2010-06-16 12:34:22 +00:00
Florian Aders (EleRas)
dcc5859eb8 remove waiting createuser - tasks while removing a customer, fixes #276 2010-06-16 12:28:32 +00:00
Michael Kaufmann (d00p)
1557e5b7a3 - only ask for httpgroup/httpuser if not set before
- version decrease back to 0.9.10-svn1 (the two update-procedures have to be executed at the same update-level)
2010-06-16 12:18:14 +00:00
Michael Kaufmann (d00p)
9a41d35f98 - forgot a dot xD 2010-06-16 12:07:36 +00:00
Michael Kaufmann (d00p)
65a7983edc - don't make httpuser/httpgroup-setting hidden
- setting version to 0.9.10-svn2
2010-06-16 12:04:28 +00:00
Michael Kaufmann (d00p)
7b4a34ee69 - use system-settings of awstats-path for configuration-commands, fixes #275 2010-06-16 11:34:48 +00:00
Michael Kaufmann (d00p)
fb63dac2d1 - sorry, wrong checking, corrected now 2010-06-16 10:11:29 +00:00
Michael Kaufmann (d00p)
f9b014f640 - check for missing settings due to forgotten updates in syscp-installs (years ago)
- setting version to 0.9.10-svn1
2010-06-16 10:02:17 +00:00
Michael Kaufmann (d00p)
fe15ff4913 - determine correct path of Froxlor in webserver-cron, fixes #270 2010-06-15 05:40:08 +00:00
26 changed files with 386 additions and 95 deletions

View File

@@ -58,6 +58,14 @@ return array(
'default' => '', 'default' => '',
'save_method' => 'storeSettingHostname', 'save_method' => 'storeSettingHostname',
), ),
'system_froxlordirectlyviahostname' => array(
'label' => $lng['serversettings']['froxlordirectlyviahostname'],
'settinggroup' => 'system',
'varname' => 'froxlordirectlyviahostname',
'type' => 'bool',
'default' => false,
'save_method' => 'storeSettingField',
),
'system_stdsubdomain' => array( 'system_stdsubdomain' => array(
'label' => $lng['serversettings']['stdsubdomainhost'], 'label' => $lng['serversettings']['stdsubdomainhost'],
'settinggroup' => 'system', 'settinggroup' => 'system',
@@ -101,18 +109,6 @@ return array(
'default' => true, 'default' => true,
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
), ),
'system_httpuser' => array(
'settinggroup' => 'system',
'varname' => 'httpuser',
'type' => 'hidden',
'default' => 'www-data',
),
'system_httpgroup' => array(
'settinggroup' => 'system',
'varname' => 'httpgroup',
'type' => 'hidden',
'default' => 'www-data',
),
'system_debug_cron' => array( 'system_debug_cron' => array(
'label' => $lng['serversettings']['cron']['debug'], 'label' => $lng['serversettings']['cron']['debug'],
'settinggroup' => 'system', 'settinggroup' => 'system',

View File

@@ -33,6 +33,22 @@ return array(
'save_method' => 'storeSettingField', 'save_method' => 'storeSettingField',
'overview_option' => true 'overview_option' => true
), ),
'system_httpuser' => array(
'label' => $lng['admin']['webserver_user'],
'settinggroup' => 'system',
'varname' => 'httpuser',
'type' => 'string',
'default' => 'www-data',
'save_method' => 'storeSettingField',
),
'system_httpgroup' => array(
'label' => $lng['admin']['webserver_group'],
'settinggroup' => 'system',
'varname' => 'httpgroup',
'type' => 'string',
'default' => 'www-data',
'save_method' => 'storeSettingField',
),
'system_apacheconf_vhost' => array( 'system_apacheconf_vhost' => array(
'label' => $lng['serversettings']['apacheconf_vhost'], 'label' => $lng['serversettings']['apacheconf_vhost'],
'settinggroup' => 'system', 'settinggroup' => 'system',

View File

@@ -194,6 +194,10 @@ if($page == 'customers'
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'"); $db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'"); $db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
// Delete all waiting "create user" -tasks for this user, #276
// Note: the WHERE selects part of a serialized array, but it should be safe this way
$db->query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '2' AND `data` LIKE '%:\"" . $db->escape($result['loginname']) . "\";%';");
// remove everything APS-related, #216 // remove everything APS-related, #216
$apsresult = $db->query("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'"); $apsresult = $db->query("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
while($apsrow = $db->fetch_array($apsresult)) while($apsrow = $db->fetch_array($apsresult))

View File

@@ -342,7 +342,7 @@ elseif($page == 'htaccess')
else else
{ {
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']); $pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $settings['panel']['pathedit']);
$options_indexes = makeyesno('options_indexes', '1', '0', '1'); $options_indexes = makeyesno('options_indexes', '1', '0', '0');
eval("echo \"" . getTemplate("extras/htaccess_add") . "\";"); eval("echo \"" . getTemplate("extras/htaccess_add") . "\";");
} }
} }

View File

@@ -52,7 +52,7 @@ elseif($page == 'mysqls')
'description' => $lng['mysql']['databasedescription'] 'description' => $lng['mysql']['databasedescription']
); );
$paging = new paging($userinfo, $db, TABLE_PANEL_DATABASES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); $paging = new paging($userinfo, $db, TABLE_PANEL_DATABASES, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']);
$result = $db->query("SELECT `id`, `databasename`, `description`, `dbserver` FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()); $result = $db->query("SELECT * FROM `" . TABLE_PANEL_DATABASES . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit());
$paging->setEntries($db->num_rows($result)); $paging->setEntries($db->num_rows($result));
$sortcode = $paging->getHtmlSortCode($lng); $sortcode = $paging->getHtmlSortCode($lng);
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s); $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);

View File

@@ -248,6 +248,7 @@ CREATE TABLE `panel_databases` (
`databasename` varchar(255) NOT NULL default '', `databasename` varchar(255) NOT NULL default '',
`description` varchar(255) NOT NULL default '', `description` varchar(255) NOT NULL default '',
`dbserver` int(11) unsigned NOT NULL default '0', `dbserver` int(11) unsigned NOT NULL default '0',
`apsdb` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `customerid` (`customerid`) KEY `customerid` (`customerid`)
) TYPE=MyISAM ; ) TYPE=MyISAM ;
@@ -451,7 +452,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.9'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.10');
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');
@@ -571,6 +572,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (140, 'customredirect', 'enabled', '1'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (140, 'customredirect', 'enabled', '1');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (141, 'customredirect', 'default', '1'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (141, 'customredirect', 'default', '1');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (142, 'system', 'dns_createmailentry', '0'); INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (142, 'system', 'dns_createmailentry', '0');
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (143, 'system', 'froxlordirectlyviahostname', '0');
# -------------------------------------------------------- # --------------------------------------------------------

View File

@@ -795,4 +795,92 @@ if(isFroxlorVersion('0.9.9-svn1'))
updateToVersion('0.9.9'); updateToVersion('0.9.9');
} }
?> if(isFroxlorVersion('0.9.9'))
{
showUpdateStep("Updating from 0.9.9 to 0.9.10-svn1", false);
showUpdateStep("Checking whether you are missing any settings", false);
$nonefound = true;
$update_httpuser = isset($_POST['update_httpuser']) ? $_POST['update_httpuser'] : false;
$update_httpgroup = isset($_POST['update_httpgroup']) ? $_POST['update_httpgroup'] : false;
if($update_httpuser !== false)
{
$nonefound = false;
showUpdateStep("Adding missing setting 'httpuser'");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'httpuser', '".$update_httpuser."');");
lastStepStatus(0);
}
if($update_httpgroup !== false)
{
$nonefound = false;
showUpdateStep("Adding missing setting 'httpgroup'");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'httpgroup', '".$update_httpgroup."');");
lastStepStatus(0);
}
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'debug_cron'");
if(!isset($result) || !isset($result['value']))
{
$nonefound = false;
showUpdateStep("Adding missing setting 'debug_cron'");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'debug_cron', '0');");
lastStepStatus(0);
}
if($nonefound) {
showUpdateStep("No missing settings found");
lastStepStatus(0);
}
updateToVersion('0.9.10-svn1');
}
if(isFroxlorVersion('0.9.10-svn1'))
{
showUpdateStep("Updating from 0.9.10-svn1 to 0.9.10-svn2", false);
showUpdateStep("Updating database table definition for panel_databases");
$db->query("ALTER TABLE `" . TABLE_PANEL_DATABASES . "` ADD `apsdb` tinyint(1) NOT NULL default '0' AFTER `dbserver`;");
lastStepStatus(0);
showUpdateStep("Adding APS databases to customers overview");
$count_dbupdates = 0;
$db_root = null;
openRootDB();
$result = $db_root->query("SHOW DATABASES;");
while($row = $db_root->fetch_array($result))
{
if(preg_match('/^web([0-9]+)aps([0-9]+)$/', $row['Database'], $matches))
{
$cid = $matches[1];
$databasedescription = 'APS DB';
$result = $db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`, `apsdb`) VALUES ("' . (int)$cid . '", "' . $db->escape($row['Database']) . '", "' . $db->escape($databasedescription) . '", "0", "1")');
$result = $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1 WHERE `customerid`="' . (int)$cid . '"');
$count_dbupdates++;
}
}
closeRootDB();
if($count_dbupdates > 0) {
lastStepStatus(0, "Found ".$count_dbupdates." customer APS databases");
} else {
lastStepStatus(0, "None found");
}
updateToVersion('0.9.10-svn2');
}
if(isFroxlorVersion('0.9.10-svn2'))
{
showUpdateStep("Updating from 0.9.10-svn2 to 0.9.10", false);
$update_directlyviahostname = isset($_POST['update_directlyviahostname']) ? '1' : '0';
showUpdateStep("Adding new settings");
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'froxlordirectlyviahostname', '".(int)$update_directlyviahostname."');");
lastStepStatus(0);
updateToVersion('0.9.10');
}

View File

@@ -158,4 +158,66 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= makeyesno('update_defdns_mailentry', '1', '0', '0'); $question.= makeyesno('update_defdns_mailentry', '1', '0', '0');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";"); eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
} }
if(versionInUpdate($current_version, '0.9.10-svn1'))
{
$has_nouser = false;
$has_nogroup = false;
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'");
if(!isset($result) || !isset($result['value']))
{
$has_preconfig = true;
$has_nouser = true;
$guessed_user = 'www-data';
if(function_exists('posix_getuid')
&& function_exists('posix_getpwuid')
) {
$_httpuser = posix_getpwuid(posix_getuid());
$guessed_user = $_httpuser['name'];
}
}
$result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'");
if(!isset($result) || !isset($result['value']))
{
$has_preconfig = true;
$has_nogroup = true;
$guessed_group = 'www-data';
if(function_exists('posix_getgid')
&& function_exists('posix_getgrgid')
) {
$_httpgroup = posix_getgrgid(posix_getgid());
$guessed_group = $_httpgroup['name'];
}
}
if($has_nouser || $has_nogroup)
{
$description = 'Please enter the correct username/groupname of the webserver on your system We\'re guessing the user but it might not be correct, so please check.';
if($has_nouser)
{
$question = '<strong>Please enter the webservers username:</strong>&nbsp;<input type="text" class="text" name="update_httpuser" value="'.$guessed_user.'" />';
}
elseif($has_nogroup)
{
$question2 = '<strong>Please enter the webservers groupname:</strong>&nbsp;<input type="text" class="text" name="update_httpgroup" value="'.$guessed_group.'" />';
if($has_nouser) {
$question .= '<br /><br />'.$question2;
} else {
$question = $question2;
}
}
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}
if(versionInUpdate($current_version, '0.9.10'))
{
$has_preconfig = true;
$description = 'you can now decide whether Froxlor should be reached via hostname/froxlor or directly via the hostname.';
$question = '<strong>Do you want Froxlor to be reached directly via the hostname?:</strong>&nbsp;';
$question.= makeyesno('update_directlyviahostname', '1', '0', '0');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
} }

View File

@@ -219,11 +219,7 @@ class ApsInstaller extends ApsParser
} }
elseif($Task == TASK_REMOVE) elseif($Task == TASK_REMOVE)
{ {
//FIXME cleanup installation // check for database
//remove files from: $this->RealPath . $this->DomainPath . '/'
//remove permissions
//drop database
if ($this->aps_version == '1.0') if ($this->aps_version == '1.0')
{ {
// the good ole way // the good ole way
@@ -240,7 +236,7 @@ class ApsInstaller extends ApsParser
if($XmlDb->db->id) if($XmlDb->db->id)
{ {
//database management //drop database permissions
$Database = 'web' . $Row['CustomerID'] . 'aps' . $Row['InstanceID']; $Database = 'web' . $Row['CustomerID'] . 'aps' . $Row['InstanceID'];
foreach(array_map('trim', explode(',', $this->Hosts)) as $DatabaseHost) foreach(array_map('trim', explode(',', $this->Hosts)) as $DatabaseHost)
@@ -250,8 +246,15 @@ class ApsInstaller extends ApsParser
$this->db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $this->db->escape($Database) . '" AND `Host` = "' . $this->db->escape($DatabaseHost) . '"'); $this->db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $this->db->escape($Database) . '" AND `Host` = "' . $this->db->escape($DatabaseHost) . '"');
} }
//drop database
$this->db_root->query('DROP DATABASE IF EXISTS `' . $this->db->escape($Database) . '`'); $this->db_root->query('DROP DATABASE IF EXISTS `' . $this->db->escape($Database) . '`');
$this->db_root->query('FLUSH PRIVILEGES'); $this->db_root->query('FLUSH PRIVILEGES');
/*
* remove database from customer-mysql overview, #272
*/
$this->db->query('DELETE FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid`="' . (int)$Row['CustomerID'] . '" AND `databasename`="' . $this->db->escape($Database) . '" AND `apsdb`="1"');
$result = $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`-1 WHERE `customerid`="' . (int)$Row['CustomerID'] . '"');
} }
//remove task & delete package instance + settings //remove task & delete package instance + settings
@@ -259,6 +262,20 @@ class ApsInstaller extends ApsParser
$this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_REMOVE . ' AND `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_REMOVE . ' AND `InstanceID` = ' . $this->db->escape($Row['InstanceID']));
$this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); $this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Row['InstanceID']));
$this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); $this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']));
//remove data, #273
if($this->DomainPath != '' && $this->DomainPath != '/') {
self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/');
} else {
// save awstats/webalizer folder if it's the docroot
self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/', true);
// place standard-index file
$loginname = getLoginNameByUid($Row['CustomerID']);
if($loginname !== false)
{
storeDefaultIndex($loginname, $this->RealPath . $this->DomainPath . '/');
}
}
} }
} }
@@ -473,8 +490,6 @@ class ApsInstaller extends ApsParser
private function PrepareDatabase($Xml, $Row, $Task) private function PrepareDatabase($Xml, $Row, $Task)
{ {
global $db_root;
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
if ($this->aps_version == '1.0') if ($this->aps_version == '1.0')
@@ -511,6 +526,13 @@ class ApsInstaller extends ApsParser
} }
$this->db_root->query('FLUSH PRIVILEGES'); $this->db_root->query('FLUSH PRIVILEGES');
/*
* add database to customers databases, #272
*/
$databasedescription = $Xml->name.' '.$Xml->version.' (Release ' . $Xml->release . ')';
$result = $this->db->query('INSERT INTO `' . TABLE_PANEL_DATABASES . '` (`customerid`, `databasename`, `description`, `dbserver`, `apsdb`) VALUES ("' . (int)$Row['CustomerID'] . '", "' . $this->db->escape($NewDatabase) . '", "' . $this->db->escape($databasedescription) . '", "0", "1")');
$result = $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used`=`mysqls_used`+1 WHERE `customerid`="' . (int)$Row['CustomerID'] . '"');
} }
//get first mysql access host //get first mysql access host
@@ -631,5 +653,3 @@ class ApsInstaller extends ApsParser
return false; return false;
} }
} }
?>

View File

@@ -400,9 +400,9 @@ class ApsParser
* unlink files recursively * unlink files recursively
* *
* @param dir directory to delete recursive * @param dir directory to delete recursive
* @param boolean whether the base-directory should be kept or not
*/ */
protected function UnlinkRecursive($Dir, $save_base = false)
protected function UnlinkRecursive($Dir)
{ {
if(!$DirHandle = @opendir($Dir))return; if(!$DirHandle = @opendir($Dir))return;
@@ -411,6 +411,12 @@ class ApsParser
if($Object == '.' if($Object == '.'
|| $Object == '..')continue; || $Object == '..')continue;
if($save_base
&& (strtoupper($Object) == 'AWSTATS' || strtoupper($Object) == 'WEBALIZER')
) {
continue;
}
if(!@unlink($Dir . '/' . $Object)) if(!@unlink($Dir . '/' . $Object))
{ {
self::UnlinkRecursive($Dir . '/' . $Object); self::UnlinkRecursive($Dir . '/' . $Object);
@@ -418,8 +424,11 @@ class ApsParser
} }
closedir($DirHandle); closedir($DirHandle);
if(!$save_base)
{
@rmdir($Dir); @rmdir($Dir);
} }
}
/** /**
* function provides package management for admins * function provides package management for admins
@@ -1351,7 +1360,7 @@ class ApsParser
private function InstallNewPackage($Filename) private function InstallNewPackage($Filename)
{ {
global $lng; global $lng, $userinfo;
if(file_exists($Filename) if(file_exists($Filename)
&& $Xml = self::GetXmlFromZip($Filename)) && $Xml = self::GetXmlFromZip($Filename))
@@ -1831,7 +1840,7 @@ class ApsParser
public function MainHandler($Action) public function MainHandler($Action)
{ {
global $lng, $filename, $s, $page, $action, $Id; global $lng, $filename, $s, $page, $action, $Id, $userinfo;
//check for basic functions, classes and permissions //check for basic functions, classes and permissions
@@ -2182,6 +2191,13 @@ class ApsParser
return; return;
} }
// no more contingent, #278
if($userinfo['aps_packages'] == $userinfo['aps_packages_used']
&& $userinfo['aps_packages'] != '-1'
){
self::InfoBox($lng['aps']['nocontingent']);
}
//show packages //show packages
while($Row3 = $this->db->fetch_array($result2)) while($Row3 = $this->db->fetch_array($result2))
@@ -3488,6 +3504,41 @@ class ApsParser
} }
} }
/*
* check if packages needs a database
* and if the customer has contingent for that, #272
*/
if ($this->aps_version == '1.0')
{
// the good ole way
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
}
else
{
// since 1.1
$Xml->registerXPathNamespace('db', 'http://apstandard.com/ns/1/db');
$XmlDb = new DynamicProperties;
$XmlDb->db->id = getXPathValue($Xml, '//db:id');
}
if($XmlDb->db->id)
{
if($userinfo['mysqls_used'] < $userinfo['mysqls']
|| $userinfo['mysqls'] == '-1'
){
$can_use_db = true;
} else {
$can_use_db = false;
}
} else { $can_use_db = true; }
$db_info = '';
if(!$can_use_db)
{
$db_info = $lng['aps']['packageneedsdb'];
}
eval("echo \"" . getTemplate("aps/package") . "\";"); eval("echo \"" . getTemplate("aps/package") . "\";");
unset($Xml); unset($Xml);
} }

View File

@@ -272,7 +272,7 @@ return Array(
'label' => 'Awstats', 'label' => 'Awstats',
'commands' => Array( 'commands' => Array(
'apt-get install awstats', 'apt-get install awstats',
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/', 'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'), 'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf') 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
), ),

View File

@@ -297,7 +297,7 @@ return Array(
'label' => 'Awstats', 'label' => 'Awstats',
'commands' => Array( 'commands' => Array(
'apt-get install awstats', 'apt-get install awstats',
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/', 'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'), 'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf') 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
), ),

View File

@@ -305,7 +305,7 @@ return Array(
'label' => 'Awstats', 'label' => 'Awstats',
'commands' => Array( 'commands' => Array(
'apt-get install awstats', 'apt-get install awstats',
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/', 'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'), 'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf') 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
), ),

View File

@@ -306,7 +306,7 @@ return Array(
'label' => 'Awstats', 'label' => 'Awstats',
'commands' => Array( 'commands' => Array(
'apt-get install awstats', 'apt-get install awstats',
'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl /usr/lib/cgi-bin/', 'cp /usr/share/doc/awstats/examples/awstats_buildstaticpages.pl '.makeCorrectDir($settings['system']['awstats_path']),
'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'), 'mv '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf') 'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf')
), ),

View File

@@ -29,6 +29,15 @@
function makeCorrectFile($filename) function makeCorrectFile($filename)
{ {
if (!isset($filename)
|| trim($filename) == ''
) {
$error = 'Given filename for function '.__FUNCTION__.' is empty.'."\n";
$error.= 'This is very dangerous and should not happen.'."\n";
$error.= 'Please inform the Froxlor team about this issue so they can fix it.';
die($error);
}
if(substr($filename, 0, 1) != '/') if(substr($filename, 0, 1) != '/')
{ {
$filename = '/' . $filename; $filename = '/' . $filename;

View File

@@ -26,7 +26,7 @@
* *
* @return null * @return null
*/ */
function openRootDB($debugHandler, $lockfile) function openRootDB($debugHandler = false, $lockfile = false)
{ {
global $db_root; global $db_root;
@@ -47,14 +47,22 @@ function openRootDB($debugHandler, $lockfile)
/** /**
* Do not proceed further if no database connection could be established * Do not proceed further if no database connection could be established
*/ */
if(isset($debugHandler) && $debugHandler !== false)
{
fclose($debugHandler); fclose($debugHandler);
}
if(isset($lockfile) && $lockfile !== false)
{
unlink($lockfile); unlink($lockfile);
}
die('root can\'t connect to mysqlserver. Please check userdata.inc.php! Exiting...'); die('root can\'t connect to mysqlserver. Please check userdata.inc.php! Exiting...');
} }
unset($db_root->password); unset($db_root->password);
if(isset($debugHandler) && $debugHandler !== false)
{
fwrite($debugHandler, 'Database-rootconnection established' . "\n"); fwrite($debugHandler, 'Database-rootconnection established' . "\n");
}
unset($sql); unset($sql);
} }

View File

@@ -265,6 +265,13 @@ foreach($langs as $key => $value)
$languages[$key] = $key; $languages[$key] = $key;
} }
if (isset($userinfo['language']) && isset($languages[$userinfo['language']]))
{
// default: use language from session, #277
$language = $userinfo['language'];
}
else
{
if(!isset($userinfo['def_language']) if(!isset($userinfo['def_language'])
|| !isset($languages[$userinfo['def_language']])) || !isset($languages[$userinfo['def_language']]))
{ {
@@ -282,6 +289,7 @@ else
{ {
$language = $userinfo['def_language']; $language = $userinfo['def_language'];
} }
}
// include every english language file we can get // include every english language file we can get

View File

@@ -72,7 +72,7 @@ define('PACKAGE_ENABLED', 2);
// VERSION INFO // VERSION INFO
$version = '0.9.9'; $version = '0.9.10';
$dbversion = '2'; $dbversion = '2';
$branding = ''; $branding = '';

View File

@@ -1427,4 +1427,14 @@ $lng['error']['exception'] = '%s';
// ADDED IN FROXLOR 0.9.9-svn1 // ADDED IN FROXLOR 0.9.9-svn1
$lng['serversettings']['mail_also_with_mxservers'] = 'Create mail-, imap-, pop3- and smtp-"A record" also with MX-Servers set'; $lng['serversettings']['mail_also_with_mxservers'] = 'Create mail-, imap-, pop3- and smtp-"A record" also with MX-Servers set';
// ADDED IN FROXLOR 0.9.10-svn1
$lng['aps']['nocontingent'] = 'Your APS contingent is insufficient. You cannot install any package.';
$lng['aps']['packageneedsdb'] = 'This package needs a database but your contingent is used up';
$lng['aps']['cannoteditordeleteapsdb'] = 'APS databases cannot be edited or removed here';
$lng['admin']['webserver_user'] = 'Webserver user-name';
$lng['admin']['webserver_group'] = 'Webserver group-name';
// ADDED IN FROXLOR 0.9.10
$lng['serversettings']['froxlordirectlyviahostname'] = 'Access Froxlor directly via the hostname';
?> ?>

View File

@@ -933,7 +933,7 @@ $lng['customer']['email_pop3'] = 'E-Mail POP3';
$lng['customer']['mail_quota'] = 'E-Mail Kontingent'; $lng['customer']['mail_quota'] = 'E-Mail Kontingent';
$lng['panel']['megabyte'] = 'MegaByte'; $lng['panel']['megabyte'] = 'MegaByte';
$lng['emails']['quota_edit'] = 'E-Mail Kontingent &auml;ndern'; $lng['emails']['quota_edit'] = 'E-Mail Kontingent &auml;ndern';
$lng['panel']['not_supported'] = 'Nicht &uuml;nterst&uuml;zt in: '; $lng['panel']['not_supported'] = 'Nicht unterst&uuml;zt in: ';
$lng['error']['allocatetoomuchquota'] = 'Sie versuchen %s MB ' . $lng['emails']['quota'] . ' zu zuweisen, haben aber nicht genug &uuml;brig.'; $lng['error']['allocatetoomuchquota'] = 'Sie versuchen %s MB ' . $lng['emails']['quota'] . ' zu zuweisen, haben aber nicht genug &uuml;brig.';
// Autoresponder module // Autoresponder module
@@ -1407,8 +1407,17 @@ $lng['tasks']['aps_task_upgrade'] = 'Upgrade eines oder mehrerer APS Pakete';
$lng['tasks']['aps_task_sysupdate'] = 'Aktualisiere alle APS Pakete'; $lng['tasks']['aps_task_sysupdate'] = 'Aktualisiere alle APS Pakete';
$lng['tasks']['aps_task_sysdownload'] = 'Herunterladen neuer APS Pakete'; $lng['tasks']['aps_task_sysdownload'] = 'Herunterladen neuer APS Pakete';
// ADDED IN FROXLOR 0.9.9-svn1 // ADDED IN FROXLOR 0.9.9-svn1
$lng['serversettings']['mail_also_with_mxservers'] = 'Erstelle mail-, imap-, pop3- and smtp-"A Record" auch wenn MX-Server angegeben sind'; $lng['serversettings']['mail_also_with_mxservers'] = 'Erstelle mail-, imap-, pop3- and smtp-"A Record" auch wenn MX-Server angegeben sind';
// ADDED IN FROXLOR 0.9.10-svn1
$lng['aps']['nocontingent'] = 'Sie haben kein ausreichendes APS-Kontingent und k&ouml;nnen daher keine Pakete installieren.';
$lng['aps']['packageneedsdb'] = 'Dieses Paket ben&ouml;tigt eine Datenbank, Sie haben allerdings keine mehr frei';
$lng['aps']['cannoteditordeleteapsdb'] = 'APS-Datenbanken k&ouml;nnen hier nicht bearbeitet oder gel&ouml;scht werden';
$lng['admin']['webserver_user'] = 'Benutzername Webserver';
$lng['admin']['webserver_group'] = 'Gruppenname Webserver';
// ADDED IN FROXLOR 0.9.10
$lng['serversettings']['froxlordirectlyviahostname'] = 'Froxlor direkt &uuml;ber den Hostnamen erreichbar machen';
?> ?>

View File

@@ -80,7 +80,7 @@ if($db->num_rows($result) > 0)
$path = $row['homedir'] . $row['maildir'] . "new/"; $path = $row['homedir'] . $row['maildir'] . "new/";
if(!is_dir($path) || !is_readable($path)) if(!is_dir($path))
{ {
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error accessing maildir: " . $path); $cronlog->logAction(CRON_ACTION, LOG_WARNING, "Error accessing maildir: " . $path);
continue; continue;

View File

@@ -81,9 +81,9 @@ class apache
// if we use fcgid we don't need this file // if we use fcgid we don't need this file
if(file_exists($vhosts_filename)) if(file_exists($vhosts_filename))
{ {
fwrite($this->debugHandler, ' apache::_createStandardDirectoryEntry: unlinking ' . basename($vhost_filename) . "\n"); fwrite($this->debugHandler, ' apache::_createStandardDirectoryEntry: unlinking ' . basename($vhosts_filename) . "\n");
$this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'unlinking ' . basename($vhost_filename)); $this->logger->logAction(CRON_ACTION, LOG_NOTICE, 'unlinking ' . basename($vhosts_filename));
unlink(makeCorrectFile($vhost_filename)); unlink(makeCorrectFile($vhosts_filename));
} }
} }
else else
@@ -192,7 +192,14 @@ class apache
/** /**
* add 'real'-vhost content here, like doc-root :) * add 'real'-vhost content here, like doc-root :)
*/ */
if($this->settings['system']['froxlordirectlyviahostname'])
{
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
}
else
{
$mypath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__))))); $mypath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__)))));
}
$this->virtualhosts_data[$vhosts_filename].= 'DocumentRoot "'.$mypath.'"'."\n"; $this->virtualhosts_data[$vhosts_filename].= 'DocumentRoot "'.$mypath.'"'."\n";
if($row_ipsandports['vhostcontainer_servername_statement'] == '1') if($row_ipsandports['vhostcontainer_servername_statement'] == '1')

View File

@@ -107,7 +107,14 @@ class lighttpd
$this->lighttpd_data[$vhost_filename].= '# Froxlor default vhost' . "\n"; $this->lighttpd_data[$vhost_filename].= '# Froxlor default vhost' . "\n";
$this->lighttpd_data[$vhost_filename].= '$HTTP["host"] =~ "^(?:www\.|)' . $myhost . '$" {' . "\n"; $this->lighttpd_data[$vhost_filename].= '$HTTP["host"] =~ "^(?:www\.|)' . $myhost . '$" {' . "\n";
if($this->settings['system']['froxlordirectlyviahostname'])
{
$mypath = makeCorrectDir(dirname(dirname(dirname(__FILE__))));
}
else
{
$mypath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__))))); $mypath = makeCorrectDir(dirname(dirname(dirname(dirname(__FILE__)))));
}
$this->lighttpd_data[$vhost_filename].= ' server.document-root = "'.$mypath.'"'."\n"; $this->lighttpd_data[$vhost_filename].= ' server.document-root = "'.$mypath.'"'."\n";
/** /**
@@ -193,23 +200,6 @@ class lighttpd
if(!in_array($row_htpasswds['path'], $needed_htpasswds)) if(!in_array($row_htpasswds['path'], $needed_htpasswds))
{ {
if(empty($needed_htpasswds))
{
$auth_backend_loaded[$domain['ipandport']] = 'yes';
if(!$this->auth_backend_loaded)
{
$htaccess_text.= ' auth.backend = "htpasswd"' . "\n";
}
$htaccess_text.= ' auth.backend.htpasswd.userfile = "' . makeCorrectFile($this->settings['system']['apacheconf_htpasswddir'] . '/' . $filename) . '"' . "\n";
$htaccess_text.= ' auth.require = ( ' . "\n";
}
else
{
$htaccess_text.= ' ,' . "\n";
}
if(!isset($this->needed_htpasswds[$filename])) { if(!isset($this->needed_htpasswds[$filename])) {
$this->needed_htpasswds[$filename] = ''; $this->needed_htpasswds[$filename] = '';
} }
@@ -219,20 +209,24 @@ class lighttpd
$this->needed_htpasswds[$filename].= $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n"; $this->needed_htpasswds[$filename].= $row_htpasswds['username'] . ':' . $row_htpasswds['password'] . "\n";
} }
$needed_htpasswds[] = $row_htpasswds['path'];
$htaccess_path = substr($row_htpasswds['path'], strlen($domain['documentroot']) - 1); $htaccess_path = substr($row_htpasswds['path'], strlen($domain['documentroot']) - 1);
$htaccess_text.= ' "' . makeCorrectDir($htaccess_path) . '" =>' . "\n"; $htaccess_path = makeCorrectDir($htaccess_path);
$htaccess_text.= ' $HTTP["url"] =~ "^'.$htaccess_path.'" {' . "\n";
$htaccess_text.= ' auth.backend = "htpasswd"' . "\n";
$htaccess_text.= ' auth.backend.htpasswd.userfile = "' . makeCorrectFile($this->settings['system']['apacheconf_htpasswddir'] . '/' . $filename) . '"' . "\n";
$htaccess_text.= ' auth.require = ( ' . "\n";
$htaccess_text.= ' "' . $htaccess_path . '" =>' . "\n";
$htaccess_text.= ' (' . "\n"; $htaccess_text.= ' (' . "\n";
$htaccess_text.= ' "method" => "basic",' . "\n"; $htaccess_text.= ' "method" => "basic",' . "\n";
$htaccess_text.= ' "realm" => "Restricted Area",' . "\n"; $htaccess_text.= ' "realm" => "Restricted Area",' . "\n";
$htaccess_text.= ' "require" => "user=' . $row_htpasswds['username'] . '"' . "\n"; $htaccess_text.= ' "require" => "valid-user"' . "\n";
$htaccess_text.= ' )' . "\n"; $htaccess_text.= ' )' . "\n";
} $htaccess_text.= ' )' . "\n";
} $htaccess_text.= ' }' . "\n";
if(strlen(trim($htaccess_text)) > 0) $needed_htpasswds[] = $row_htpasswds['path'];
{ }
$htaccess_text.= ' )' . "\n";
} }
return $htaccess_text; return $htaccess_text;
@@ -578,7 +572,7 @@ class lighttpd
$diroption_text.= '(' . "\n"; $diroption_text.= '(' . "\n";
$diroption_text.= ' "method" => "basic",' . "\n"; $diroption_text.= ' "method" => "basic",' . "\n";
$diroption_text.= ' "realm" => "Restricted Area",' . "\n"; $diroption_text.= ' "realm" => "Restricted Area",' . "\n";
$diroption_text.= ' "require" => "user=' . $row_htpasswds['username'] . '"' . "\n"; $diroption_text.= ' "require" => "valid-user"' . "\n";
$diroption_text.= ')' . "\n"; $diroption_text.= ')' . "\n";
if($this->auth_backend_loaded[$domain['ssl_ipandport']] == 'yes') if($this->auth_backend_loaded[$domain['ssl_ipandport']] == 'yes')

View File

@@ -35,7 +35,7 @@ while($row_ticket = $db->fetch_array($result_tickets))
if($days >= $settings['ticket']['archiving_days']) if($days >= $settings['ticket']['archiving_days'])
{ {
fwrite($debugHandler, 'archiving ticket "' . $row_ticket['subject'] . '" (ID #' . $row_ticket['id'] . ')' . "\n"); fwrite($debugHandler, 'archiving ticket "' . $row_ticket['subject'] . '" (ID #' . $row_ticket['id'] . ')' . "\n");
$mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$row_ticket['id']); $mainticket = ticket::getInstanceOf(null, $db, $settings, (int)$row_ticket['id']);
$mainticket->Set('lastchange', $now, true, true); $mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '1', true, true); $mainticket->Set('lastreplier', '1', true, true);
$mainticket->Set('status', '3', true, true); $mainticket->Set('status', '3', true, true);

View File

@@ -29,7 +29,7 @@
<input class="bottom" type="submit" value="{$lng['aps']['back']}" /> <input class="bottom" type="submit" value="{$lng['aps']['back']}" />
</form> </form>
</if> </if>
<if $action != 'customerstatus' && ( $userinfo['aps_packages'] != $userinfo['aps_packages_used'] )> <if $action != 'customerstatus' && ( $userinfo['aps_packages'] != $userinfo['aps_packages_used'] ) && $db_info == ''>
<form method="get" action="$filename" style="float:left; padding-left: 5px;"> <form method="get" action="$filename" style="float:left; padding-left: 5px;">
<input type="hidden" name="s" value="$s" /> <input type="hidden" name="s" value="$s" />
<input type="hidden" name="page" value="$page" /> <input type="hidden" name="page" value="$page" />
@@ -38,6 +38,9 @@
<input class="bottom" type="submit" value="{$lng['aps']['install']}" /> <input class="bottom" type="submit" value="{$lng['aps']['install']}" />
</form> </form>
</if> </if>
<if $db_info != ''>
<span style="padding-left: 5px;">{$db_info}</span>
</if>
<if ($action == 'customerstatus') && ($Row['Status'] == 2 || $Row['Status'] == 3)> <if ($action == 'customerstatus') && ($Row['Status'] == 2 || $Row['Status'] == 3)>
<form method="get" action="$filename" style="float:left;"> <form method="get" action="$filename" style="float:left;">
<input type="hidden" name="s" value="$s" /> <input type="hidden" name="s" value="$s" />

View File

@@ -2,6 +2,10 @@
<td class="field_name_border_left">{$row['databasename']}</td> <td class="field_name_border_left">{$row['databasename']}</td>
<td class="field_name">{$row['description']}</td> <td class="field_name">{$row['description']}</td>
<if 1 < count($sql_root)><td class="field_name">{$sql_root[$row['dbserver']]['caption']}</td></if> <if 1 < count($sql_root)><td class="field_name">{$sql_root[$row['dbserver']]['caption']}</td></if>
<if $row['apsdb'] != '1'>
<td class="field_name"><a href="$filename?page=mysqls&amp;action=edit&amp;id={$row['id']}&amp;s=$s">{$lng['panel']['edit']}</a></td> <td class="field_name"><a href="$filename?page=mysqls&amp;action=edit&amp;id={$row['id']}&amp;s=$s">{$lng['panel']['edit']}</a></td>
<td class="field_name"><a href="$filename?page=mysqls&amp;action=delete&amp;id={$row['id']}&amp;s=$s">{$lng['panel']['delete']}</a></td> <td class="field_name"><a href="$filename?page=mysqls&amp;action=delete&amp;id={$row['id']}&amp;s=$s">{$lng['panel']['delete']}</a></td>
<else>
<td class="field_name" colspan="2">{$lng['aps']['cannoteditordeleteapsdb']}</td>
</if>
</tr> </tr>