Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
448e7f5c99 | ||
|
|
e5cd9ad727 | ||
|
|
cc5c30cc69 | ||
|
|
cf2104e989 | ||
|
|
14b7be0a4f | ||
|
|
e6c385da10 | ||
|
|
57124d040d | ||
|
|
67c55c5a25 | ||
|
|
f86e4f39d3 | ||
|
|
5e162b018d | ||
|
|
9851ac53cc | ||
|
|
794c4d3b55 | ||
|
|
530b6da6e8 | ||
|
|
6986ffefbe | ||
|
|
e6eefc9913 | ||
|
|
3cd66a9fc4 | ||
|
|
a1c98e4012 | ||
|
|
cc7610d436 | ||
|
|
36efb04f86 | ||
|
|
dcc5859eb8 | ||
|
|
1557e5b7a3 | ||
|
|
9a41d35f98 | ||
|
|
65a7983edc | ||
|
|
7b4a34ee69 | ||
|
|
fb63dac2d1 | ||
|
|
f9b014f640 | ||
|
|
fe15ff4913 | ||
|
|
cb128e5020 | ||
|
|
2c3a11cff9 | ||
|
|
7dbb715f04 | ||
|
|
cdc2c8b1e4 | ||
|
|
ba33268596 | ||
|
|
fd96e4b42e | ||
|
|
950c9d7373 | ||
|
|
470fb9a02a | ||
|
|
f2a4c52110 | ||
|
|
10cfdb137a | ||
|
|
323e2210c3 | ||
|
|
d256ddfcbc | ||
|
|
de250df0cb | ||
|
|
e7c9b4d402 |
@@ -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',
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -59,6 +59,14 @@ return array(
|
|||||||
'default' => '',
|
'default' => '',
|
||||||
'save_method' => 'storeSettingField',
|
'save_method' => 'storeSettingField',
|
||||||
),
|
),
|
||||||
|
'system_dns_createmailentry' => array(
|
||||||
|
'label' => $lng['serversettings']['mail_also_with_mxservers'],
|
||||||
|
'settinggroup' => 'system',
|
||||||
|
'varname' => 'dns_createmailentry',
|
||||||
|
'type' => 'bool',
|
||||||
|
'default' => false,
|
||||||
|
'save_method' => 'storeSettingField'
|
||||||
|
),
|
||||||
'system_defaultttl' => array(
|
'system_defaultttl' => array(
|
||||||
'label' => $lng['serversettings']['defaultttl'],
|
'label' => $lng['serversettings']['defaultttl'],
|
||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ return array(
|
|||||||
'type' => 'option',
|
'type' => 'option',
|
||||||
'default' => '',
|
'default' => '',
|
||||||
'option_mode' => 'multiple',
|
'option_mode' => 'multiple',
|
||||||
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap'),
|
'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap', 'json' => 'json', 'ldap' => 'LDAP', 'hash' => 'hash', 'mbstring' => 'mbstring'),
|
||||||
'save_method' => 'storeSettingApsPhpExtensions',
|
'save_method' => 'storeSettingApsPhpExtensions',
|
||||||
),
|
),
|
||||||
'aps_php-function' => array(
|
'aps_php-function' => array(
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ if($action == "add")
|
|||||||
}
|
}
|
||||||
|
|
||||||
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
$date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||||
$date_until_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true);
|
||||||
|
|
||||||
eval("echo \"" . getTemplate("email/autoresponder_add") . "\";");
|
eval("echo \"" . getTemplate("email/autoresponder_add") . "\";");
|
||||||
}
|
}
|
||||||
@@ -229,7 +229,7 @@ if($action == "edit")
|
|||||||
$deactivated = '0';
|
$deactivated = '0';
|
||||||
$date_until = date('d-m-Y', $date_until);
|
$date_until = date('d-m-Y', $date_until);
|
||||||
}
|
}
|
||||||
$date_from_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
$date_until_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true);
|
||||||
|
|
||||||
$checked = '';
|
$checked = '';
|
||||||
|
|
||||||
|
|||||||
@@ -184,6 +184,12 @@ elseif($page == 'emails')
|
|||||||
$number_forwarders = 0;
|
$number_forwarders = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isset($_POST['delete_userfiles'])
|
||||||
|
&& (int)$_POST['delete_userfiles'] == 1)
|
||||||
|
{
|
||||||
|
inserttask('7', $result['loginname'], $result['email']);
|
||||||
|
}
|
||||||
|
|
||||||
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
$db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `id`='" . (int)$id . "'");
|
||||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `emails_used`=`emails_used` - 1 , `email_forwarders_used` = `email_forwarders_used` - " . (int)$number_forwarders . " $update_users_query_addon WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `emails_used`=`emails_used` - 1 , `email_forwarders_used` = `email_forwarders_used` - " . (int)$number_forwarders . " $update_users_query_addon WHERE `customerid`='" . (int)$userinfo['customerid'] . "'");
|
||||||
$log->logAction(USR_ACTION, LOG_INFO, "deleted email address '" . $result['email'] . "'");
|
$log->logAction(USR_ACTION, LOG_INFO, "deleted email address '" . $result['email'] . "'");
|
||||||
@@ -191,7 +197,7 @@ elseif($page == 'emails')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ask_yesno('email_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
ask_yesno_withcheckbox('email_reallydelete', 'admin_customer_alsoremovemail', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['email_full']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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.8');
|
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');
|
||||||
@@ -570,6 +571,8 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
|||||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (139, 'system', 'ftpserver', 'proftpd');
|
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (139, 'system', 'ftpserver', 'proftpd');
|
||||||
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 (143, 'system', 'froxlordirectlyviahostname', '0');
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|||||||
@@ -775,4 +775,112 @@ if(isFroxlorVersion('0.9.7'))
|
|||||||
updateToVersion('0.9.8');
|
updateToVersion('0.9.8');
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
if(isFroxlorVersion('0.9.8'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.8 to 0.9.9-svn1", false);
|
||||||
|
|
||||||
|
$update_defdns_mailentry = isset($_POST['update_defdns_mailentry']) ? '1' : '0';
|
||||||
|
|
||||||
|
showUpdateStep("Adding new settings");
|
||||||
|
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'dns_createmailentry', '".(int)$update_defdns_mailentry."');");
|
||||||
|
lastStepStatus(0);
|
||||||
|
|
||||||
|
updateToVersion('0.9.9-svn1');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isFroxlorVersion('0.9.9-svn1'))
|
||||||
|
{
|
||||||
|
showUpdateStep("Updating from 0.9.9-svn1 to 0.9.9 final");
|
||||||
|
lastStepStatus(0);
|
||||||
|
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');
|
||||||
|
}
|
||||||
|
|||||||
@@ -149,4 +149,75 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
|||||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(versionInUpdate($current_version, '0.9.9-svn1'))
|
||||||
|
{
|
||||||
|
$has_preconfig = true;
|
||||||
|
$description = 'When entering MX servers to Froxlor there was no mail-, imap-, pop3- and smtp-"A record" created. You can now chose whether this should be done or not.';
|
||||||
|
$question = '<strong>Do you want these A-records to be created even with MX servers given?:</strong> ';
|
||||||
|
$question.= makeyesno('update_defdns_mailentry', '1', '0', '0');
|
||||||
|
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> <input type="text" class="text" name="update_httpuser" value="'.$guessed_user.'" />';
|
||||||
|
}
|
||||||
|
elseif($has_nogroup)
|
||||||
|
{
|
||||||
|
$question2 = '<strong>Please enter the webservers groupname:</strong> <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> ';
|
||||||
|
$question.= makeyesno('update_directlyviahostname', '1', '0', '0');
|
||||||
|
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ class ApsInstaller extends ApsParser
|
|||||||
private $RealPath = '';
|
private $RealPath = '';
|
||||||
private $RootDir = '';
|
private $RootDir = '';
|
||||||
private $Hosts = '';
|
private $Hosts = '';
|
||||||
|
private $aps_version = '1.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constructor of class. setup some basic variables
|
* constructor of class. setup some basic variables
|
||||||
@@ -73,6 +74,8 @@ class ApsInstaller extends ApsParser
|
|||||||
$XmlContent = file_get_contents($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml');
|
$XmlContent = file_get_contents($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml');
|
||||||
$Xml = new SimpleXMLElement($XmlContent);
|
$Xml = new SimpleXMLElement($XmlContent);
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//check for unparseable xml data
|
//check for unparseable xml data
|
||||||
|
|
||||||
if($Xml == false)
|
if($Xml == false)
|
||||||
@@ -146,9 +149,16 @@ class ApsInstaller extends ApsParser
|
|||||||
$ReturnStatus = 0;
|
$ReturnStatus = 0;
|
||||||
|
|
||||||
// make configure-script executable
|
// make configure-script executable
|
||||||
chmod($this->RealPath . $this->DomainPath . '/install_scripts/configure', 0755);
|
if($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$scriptname = (string)$Xml->service->provision->{'configuration-script'}['name'];
|
||||||
|
} else {
|
||||||
|
$scriptname = 'configure';
|
||||||
|
}
|
||||||
|
|
||||||
$Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/configure') . ' install', $ReturnStatus);
|
chmod($this->RealPath . $this->DomainPath . '/install_scripts/'.$scriptname, 0755);
|
||||||
|
|
||||||
|
$Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/'.$scriptname) . ' install', $ReturnStatus);
|
||||||
|
|
||||||
if($ReturnStatus != 0)
|
if($ReturnStatus != 0)
|
||||||
{
|
{
|
||||||
@@ -209,16 +219,24 @@ 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 . '/'
|
if ($this->aps_version == '1.0')
|
||||||
//remove permissions
|
{
|
||||||
//drop database
|
// the good ole way
|
||||||
|
|
||||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
$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($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)
|
||||||
@@ -228,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
|
||||||
@@ -237,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 . '/');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,6 +317,19 @@ class ApsInstaller extends ApsParser
|
|||||||
|
|
||||||
private function PrepareFiles($Xml, $Row, $Task)
|
private function PrepareFiles($Xml, $Row, $Task)
|
||||||
{
|
{
|
||||||
|
if($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$mapping = $Xml->service->provision->{'url-mapping'}->mapping;
|
||||||
|
$mapping_path = $Xml->service->provision->{'url-mapping'}->mapping['path'];
|
||||||
|
$mapping_url = $Xml->service->provision->{'url-mapping'}->mapping['url'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mapping = $Xml->mapping;
|
||||||
|
$mapping_path = $Xml->mapping['path'];
|
||||||
|
$mapping_url = $Xml->mapping['url'];
|
||||||
|
}
|
||||||
|
|
||||||
if($Task == TASK_INSTALL)
|
if($Task == TASK_INSTALL)
|
||||||
{
|
{
|
||||||
//FIXME truncate customer directory
|
//FIXME truncate customer directory
|
||||||
@@ -287,7 +339,7 @@ class ApsInstaller extends ApsParser
|
|||||||
|
|
||||||
//extract all files and chown them to the customer guid
|
//extract all files and chown them to the customer guid
|
||||||
|
|
||||||
if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], $Xml->mapping['path'], $this->RealPath . $this->DomainPath . '/') == false
|
if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], $mapping_path, $this->RealPath . $this->DomainPath . '/') == false
|
||||||
|| self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false)
|
|| self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false)
|
||||||
{
|
{
|
||||||
$this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID']));
|
$this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID']));
|
||||||
@@ -319,7 +371,7 @@ class ApsInstaller extends ApsParser
|
|||||||
|
|
||||||
//recursive mappings
|
//recursive mappings
|
||||||
|
|
||||||
self::PrepareMappings($Xml->mapping, $Xml->mapping['url'], $this->RealPath . $this->DomainPath . '/');
|
self::PrepareMappings($mapping, $mapping_url, $this->RealPath . $this->DomainPath . '/');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,6 +388,8 @@ class ApsInstaller extends ApsParser
|
|||||||
//check for special PHP permissions
|
//check for special PHP permissions
|
||||||
//must be done with xpath otherwise check not possible (XML parser problem with attributes)
|
//must be done with xpath otherwise check not possible (XML parser problem with attributes)
|
||||||
|
|
||||||
|
if($ParentMapping && $ParentMapping !== null)
|
||||||
|
{
|
||||||
$ParentMapping->registerXPathNamespace('p', 'http://apstandard.com/ns/1/php');
|
$ParentMapping->registerXPathNamespace('p', 'http://apstandard.com/ns/1/php');
|
||||||
$Result = $ParentMapping->xpath('p:permissions');
|
$Result = $ParentMapping->xpath('p:permissions');
|
||||||
|
|
||||||
@@ -366,6 +420,7 @@ class ApsInstaller extends ApsParser
|
|||||||
chmod($Path, 0222);
|
chmod($Path, 0222);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//set environment variables
|
//set environment variables
|
||||||
|
|
||||||
@@ -373,7 +428,8 @@ class ApsInstaller extends ApsParser
|
|||||||
putenv('WEB_' . $EnvVariable . '_DIR=' . $Path);
|
putenv('WEB_' . $EnvVariable . '_DIR=' . $Path);
|
||||||
|
|
||||||
//resolve deeper mappings
|
//resolve deeper mappings
|
||||||
|
if($ParentMapping && $ParentMapping !== null)
|
||||||
|
{
|
||||||
foreach($ParentMapping->mapping as $Mapping)
|
foreach($ParentMapping->mapping as $Mapping)
|
||||||
{
|
{
|
||||||
//recursive check of other mappings
|
//recursive check of other mappings
|
||||||
@@ -388,6 +444,7 @@ class ApsInstaller extends ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setup domain environment variables for the installation script
|
* setup domain environment variables for the installation script
|
||||||
@@ -433,9 +490,22 @@ 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')
|
||||||
|
{
|
||||||
|
// 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($XmlDb->db->id)
|
||||||
{
|
{
|
||||||
//database management
|
//database management
|
||||||
@@ -456,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
|
||||||
@@ -576,5 +653,3 @@ class ApsInstaller extends ApsParser
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -38,6 +38,7 @@ class ApsParser
|
|||||||
private $settings = array();
|
private $settings = array();
|
||||||
private $db = false;
|
private $db = false;
|
||||||
private $RootDir = '';
|
private $RootDir = '';
|
||||||
|
private $aps_version = '1.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor of class, setup basic variables needed by the class
|
* Constructor of class, setup basic variables needed by the class
|
||||||
@@ -399,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;
|
||||||
|
|
||||||
@@ -410,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);
|
||||||
@@ -417,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
|
||||||
@@ -988,14 +998,26 @@ class ApsParser
|
|||||||
if($Xml == false)continue;
|
if($Xml == false)continue;
|
||||||
$Icon = './images/default.png';
|
$Icon = './images/default.png';
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//show data and status of package
|
//show data and status of package
|
||||||
|
|
||||||
if($Xml->icon['path'])
|
if($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
$Icon = './packages/' . $Row2['Path'] . '/' . basename($Xml->icon['path']);
|
$iconpath = $Xml->presentation->icon['path'];
|
||||||
|
$Summary = htmlspecialchars($Xml->presentation->summary);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$iconpath = $Xml->icon['path'];
|
||||||
|
$Summary = htmlspecialchars($Xml->summary);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($iconpath)
|
||||||
|
{
|
||||||
|
$Icon = './packages/' . $Row2['Path'] . '/' . basename($iconpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$Summary = $Xml->summary;
|
|
||||||
$Fieldname = $lng['aps']['version'];
|
$Fieldname = $lng['aps']['version'];
|
||||||
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
@@ -1338,23 +1360,43 @@ 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))
|
||||||
{
|
{
|
||||||
$Error = array();
|
$Error = array();
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//check alot of stuff if package is supported
|
//check alot of stuff if package is supported
|
||||||
//php modules
|
//php modules
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
$XmlPhp = $Xml->requirements->children('http://apstandard.com/ns/1/php');
|
$XmlPhp = $Xml->requirements->children('http://apstandard.com/ns/1/php');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('php', 'http://apstandard.com/ns/1/php');
|
||||||
|
|
||||||
|
$XmlPhp = new DynamicProperties;
|
||||||
|
$XmlPhp->extension = getXPathValue($Xml, '//php:extension', false);
|
||||||
|
$XmlPhp->function = getXPathValue($Xml, '//php:function', false);
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->extension)
|
if($XmlPhp->extension)
|
||||||
{
|
{
|
||||||
$ExtensionsLoaded = get_loaded_extensions();
|
$ExtensionsLoaded = get_loaded_extensions();
|
||||||
foreach($XmlPhp->extension as $Extension)
|
foreach($XmlPhp->extension as $Extension)
|
||||||
{
|
{
|
||||||
|
if(strtolower($Extension) == 'php')
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(!in_array($Extension, $ExtensionsLoaded)
|
if(!in_array($Extension, $ExtensionsLoaded)
|
||||||
&& !self::CheckException('php', 'extension', $Extension))
|
&& !self::CheckException('php', 'extension', $Extension))
|
||||||
{
|
{
|
||||||
@@ -1389,6 +1431,11 @@ class ApsParser
|
|||||||
);
|
);
|
||||||
foreach($PhpValues as $Value)
|
foreach($PhpValues as $Value)
|
||||||
{
|
{
|
||||||
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$XmlPhp->{$Value} = getXPathValue($Xml, '//php:'.$Value);
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->{$Value})
|
if($XmlPhp->{$Value})
|
||||||
{
|
{
|
||||||
if(self::TrueFalseIniGet($Value) != $XmlPhp->{$Value}
|
if(self::TrueFalseIniGet($Value) != $XmlPhp->{$Value}
|
||||||
@@ -1399,6 +1446,11 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$XmlPhp->{'post-max-size'} = getXPathValue($Xml, '//php:post-max-size');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->{'post-max-size'})
|
if($XmlPhp->{'post-max-size'})
|
||||||
{
|
{
|
||||||
if(self::PhpMemorySizeToBytes(ini_get('post_max_size')) < intval($XmlPhp->{'post-max-size'})
|
if(self::PhpMemorySizeToBytes(ini_get('post_max_size')) < intval($XmlPhp->{'post-max-size'})
|
||||||
@@ -1408,6 +1460,11 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$XmlPhp->{'memory-limit'} = getXPathValue($Xml, '//php:memory-limit');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->{'memory-limit'})
|
if($XmlPhp->{'memory-limit'})
|
||||||
{
|
{
|
||||||
if(self::PhpMemorySizeToBytes(ini_get('memory_limit')) < intval($XmlPhp->{'memory-limit'})
|
if(self::PhpMemorySizeToBytes(ini_get('memory_limit')) < intval($XmlPhp->{'memory-limit'})
|
||||||
@@ -1417,6 +1474,11 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$XmlPhp->{'max-execution-time'} = getXPathValue($Xml, '//php:max-execution-time');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlPhp->{'max-execution-time'})
|
if($XmlPhp->{'max-execution-time'})
|
||||||
{
|
{
|
||||||
if(ini_get('max_execution_time') < intval($XmlPhp->{'max-execution-time'})
|
if(ini_get('max_execution_time') < intval($XmlPhp->{'max-execution-time'})
|
||||||
@@ -1450,7 +1512,21 @@ class ApsParser
|
|||||||
|
|
||||||
//database
|
//database
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
$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');
|
||||||
|
$XmlDb->db->{'server-type'} = getXPathValue($Xml, '//db:server-type');
|
||||||
|
$XmlDb->db->{'server-min-version'} = getXPathValue($Xml, '//db:server-min-version');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlDb->db->id)
|
if($XmlDb->db->id)
|
||||||
{
|
{
|
||||||
@@ -1467,7 +1543,21 @@ class ApsParser
|
|||||||
|
|
||||||
//ASP.NET
|
//ASP.NET
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
$XmlAsp = $Xml->requirements->children('http://apstandard.com/ns/1/aspnet');
|
$XmlAsp = $Xml->requirements->children('http://apstandard.com/ns/1/aspnet');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('aspnet', 'http://apstandard.com/ns/1/aspnet');
|
||||||
|
|
||||||
|
$XmlAsp = new DynamicProperties;
|
||||||
|
$XmlAsp->handler = getXPathValue($Xml, '//aspnet:handler');
|
||||||
|
$XmlAsp->permissions = getXPathValue($Xml, '//aspnet:permissions');
|
||||||
|
$XmlAsp->version = getXPathValue($Xml, '//aspnet:version');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlAsp->handler
|
if($XmlAsp->handler
|
||||||
|| $XmlAsp->permissions
|
|| $XmlAsp->permissions
|
||||||
@@ -1478,7 +1568,19 @@ class ApsParser
|
|||||||
|
|
||||||
//CGI
|
//CGI
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
$XmlCgi = $Xml->requirements->children('http://apstandard.com/ns/1/cgi');
|
$XmlCgi = $Xml->requirements->children('http://apstandard.com/ns/1/cgi');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('cgi', 'http://apstandard.com/ns/1/cgi');
|
||||||
|
|
||||||
|
$XmlCgi = new DynamicProperties;
|
||||||
|
$XmlCgi->handler = getXPathValue($Xml, '//cgi:handler');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlCgi->handler)
|
if($XmlCgi->handler)
|
||||||
{
|
{
|
||||||
@@ -1487,7 +1589,20 @@ class ApsParser
|
|||||||
|
|
||||||
//webserver modules
|
//webserver modules
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
$XmlWebserver = $Xml->requirements->children('http://apstandard.com/ns/1/apache');
|
$XmlWebserver = $Xml->requirements->children('http://apstandard.com/ns/1/apache');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$Xml->registerXPathNamespace('apache', 'http://apstandard.com/ns/1/apache');
|
||||||
|
|
||||||
|
$XmlWebserver = new DynamicProperties;
|
||||||
|
$XmlWebserver->{'required-module'} = getXPathValue($Xml, '//apache:required-module');
|
||||||
|
$XmlWebserver->htaccess = getXPathValue($Xml, '//apache:htaccess');
|
||||||
|
}
|
||||||
|
|
||||||
if($XmlWebserver->{'required-module'})
|
if($XmlWebserver->{'required-module'})
|
||||||
{
|
{
|
||||||
@@ -1527,7 +1642,21 @@ class ApsParser
|
|||||||
|
|
||||||
//validation against a charset not possible in current version
|
//validation against a charset not possible in current version
|
||||||
|
|
||||||
foreach($Xml->settings->group as $Group)
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$aps_settings_array = $Xml->settings->group;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$aps_settings_array = $Xml->{'global-settings'}->setting;
|
||||||
|
if(!is_array($aps_settings_array)) {
|
||||||
|
$aps_settings_array = $Xml->service->settings->group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($aps_settings_array as $Group)
|
||||||
{
|
{
|
||||||
foreach($Group->setting as $Setting)
|
foreach($Group->setting as $Setting)
|
||||||
{
|
{
|
||||||
@@ -1544,6 +1673,8 @@ class ApsParser
|
|||||||
|
|
||||||
//check different errors/features in submappings
|
//check different errors/features in submappings
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
$Return = self::CheckSubmappings($Xml->mapping, $Xml->mapping['url']);
|
$Return = self::CheckSubmappings($Xml->mapping, $Xml->mapping['url']);
|
||||||
|
|
||||||
if(count($Return) != 0)
|
if(count($Return) != 0)
|
||||||
@@ -1553,6 +1684,7 @@ class ApsParser
|
|||||||
if(!in_array($Value, $Error))$Error[] = $Value;
|
if(!in_array($Value, $Error))$Error[] = $Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//check already installed versions
|
//check already installed versions
|
||||||
|
|
||||||
@@ -1617,9 +1749,19 @@ class ApsParser
|
|||||||
|
|
||||||
//copy screenshots
|
//copy screenshots
|
||||||
|
|
||||||
if($Xml->screenshot)
|
if ($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
foreach($Xml->screenshot as $Screenshot)
|
$xml_screenshots = $Xml->presentation->screenshot;;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_screenshots = $Xml->screenshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($xml_screenshots)
|
||||||
|
{
|
||||||
|
foreach($xml_screenshots as $Screenshot)
|
||||||
{
|
{
|
||||||
self::GetContentFromZip($Filename, $Screenshot['path'], $Destination . basename($Screenshot['path']));
|
self::GetContentFromZip($Filename, $Screenshot['path'], $Destination . basename($Screenshot['path']));
|
||||||
}
|
}
|
||||||
@@ -1627,17 +1769,36 @@ class ApsParser
|
|||||||
|
|
||||||
//copy icon
|
//copy icon
|
||||||
|
|
||||||
if($Xml->icon['path'])
|
if ($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
self::GetContentFromZip($Filename, $Xml->icon['path'], $Destination . basename($Xml->icon['path']));
|
$xml_iconpath = $Xml->presentation->icon['path'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_iconpath = $Xml->icon['path'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($xml_iconpath)
|
||||||
|
{
|
||||||
|
self::GetContentFromZip($Filename, $xml_iconpath, $Destination . basename($xml_iconpath));
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy license
|
//copy license
|
||||||
|
|
||||||
if($Xml->license
|
if ($this->aps_version != '1.0')
|
||||||
&& $Xml->license->text->file)
|
|
||||||
{
|
{
|
||||||
self::GetContentFromZip($Filename, $Xml->license->text->file, $Destination . 'license.txt');
|
$xml_license = $Xml->service->license;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_license = $Xml->license;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($xml_license
|
||||||
|
&& $xml_license->text->file)
|
||||||
|
{
|
||||||
|
self::GetContentFromZip($Filename, $xml_license->text->file, $Destination . 'license.txt');
|
||||||
}
|
}
|
||||||
|
|
||||||
//insert package to database
|
//insert package to database
|
||||||
@@ -1679,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
|
||||||
|
|
||||||
@@ -2030,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))
|
||||||
@@ -2363,10 +2531,26 @@ class ApsParser
|
|||||||
|
|
||||||
if($Xml == false)return false;
|
if($Xml == false)return false;
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//check all data fields of xml file against inut of customer
|
//check all data fields of xml file against inut of customer
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$aps_settings_array = $Xml->settings->group;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$aps_settings_array = $Xml->{'global-settings'}->setting;
|
||||||
|
if(!is_array($aps_settings_array)) {
|
||||||
|
$aps_settings_array = $Xml->service->settings->group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$Error = array();
|
$Error = array();
|
||||||
foreach($Xml->settings->group as $Group)
|
foreach($aps_settings_array as $Group)
|
||||||
{
|
{
|
||||||
foreach($Group->setting as $Setting)
|
foreach($Group->setting as $Setting)
|
||||||
{
|
{
|
||||||
@@ -2542,7 +2726,19 @@ class ApsParser
|
|||||||
|
|
||||||
//database required?
|
//database required?
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
$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($XmlDb->db->id)
|
||||||
{
|
{
|
||||||
@@ -2664,10 +2860,19 @@ class ApsParser
|
|||||||
self::SetInstallationValue($PackageId, $CustomerId, 'main_location', '');
|
self::SetInstallationValue($PackageId, $CustomerId, 'main_location', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($Xml->license)
|
if ($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
if($Xml->license['must-accept']
|
$xml_license = $Xml->service->license;
|
||||||
&& $Xml->license['must-accept'] == 'true')
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_license = $Xml->license;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($xml_license)
|
||||||
|
{
|
||||||
|
if($xml_license['must-accept']
|
||||||
|
&& $xml_license['must-accept'] == 'true')
|
||||||
{
|
{
|
||||||
if(isset($_POST['license'])
|
if(isset($_POST['license'])
|
||||||
&& $_POST['license'] == 'true')
|
&& $_POST['license'] == 'true')
|
||||||
@@ -2712,6 +2917,8 @@ class ApsParser
|
|||||||
|
|
||||||
if($Xml == false)return false;
|
if($Xml == false)return false;
|
||||||
|
|
||||||
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
//show notifcation if customer has reached his installation limit
|
//show notifcation if customer has reached his installation limit
|
||||||
|
|
||||||
if($this->userinfo['aps_packages'] != '-1'
|
if($this->userinfo['aps_packages'] != '-1'
|
||||||
@@ -2725,9 +2932,18 @@ class ApsParser
|
|||||||
|
|
||||||
$Icon = './images/default.png';
|
$Icon = './images/default.png';
|
||||||
|
|
||||||
if($Xml->icon['path'])
|
if($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
$Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']);
|
$iconpath = $Xml->presentation->icon['path'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$iconpath = $Xml->icon['path'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if($iconpath)
|
||||||
|
{
|
||||||
|
$Icon = './packages/' . $Row['Path'] . '/' . basename($iconpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
//show error message if some input was wrong
|
//show error message if some input was wrong
|
||||||
@@ -2761,7 +2977,7 @@ class ApsParser
|
|||||||
{
|
{
|
||||||
if($Value)
|
if($Value)
|
||||||
{
|
{
|
||||||
if($Row3['ID'] == $Value)
|
if($Row3['id'] == $Value)
|
||||||
{
|
{
|
||||||
$Temp.= '<option selected="selected" value="' . $Row3['id'] . '">' . $Row3['domain'] . '</option>';
|
$Temp.= '<option selected="selected" value="' . $Row3['id'] . '">' . $Row3['domain'] . '</option>';
|
||||||
}
|
}
|
||||||
@@ -2813,7 +3029,19 @@ class ApsParser
|
|||||||
|
|
||||||
//database required?
|
//database required?
|
||||||
|
|
||||||
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
$XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db');
|
$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($XmlDb->db->id)
|
||||||
{
|
{
|
||||||
@@ -2832,7 +3060,21 @@ class ApsParser
|
|||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($Xml->settings->group as $Group)
|
if ($this->aps_version == '1.0')
|
||||||
|
{
|
||||||
|
// the good ole way
|
||||||
|
$aps_settings_array = $Xml->settings->group;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// since 1.1
|
||||||
|
$aps_settings_array = $Xml->{'global-settings'}->setting;
|
||||||
|
if(!is_array($aps_settings_array)) {
|
||||||
|
$aps_settings_array = $Xml->service->settings->group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($aps_settings_array as $Group)
|
||||||
{
|
{
|
||||||
$GroupPrinted = false;
|
$GroupPrinted = false;
|
||||||
foreach($Group->setting as $Setting)
|
foreach($Group->setting as $Setting)
|
||||||
@@ -3015,16 +3257,25 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($Xml->license)
|
if ($this->aps_version != '1.0')
|
||||||
|
{
|
||||||
|
$xml_license = $Xml->service->license;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$xml_license = $Xml->license;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($xml_license)
|
||||||
{
|
{
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
|
|
||||||
if($Xml->license['must-accept']
|
if($xml_license['must-accept']
|
||||||
&& $Xml->license['must-accept'] == 'true')
|
&& $xml_license['must-accept'] == 'true')
|
||||||
{
|
{
|
||||||
if($Xml->license->text->name)$Temp.= $Xml->license->text->name . '<br/>';
|
if($xml_license->text->name)$Temp.= $xml_license->text->name . '<br/>';
|
||||||
|
|
||||||
if($Xml->license->text->file)
|
if($xml_license->text->file)
|
||||||
{
|
{
|
||||||
$Temp.= '<textarea name="text" rows="10" cols="55">';
|
$Temp.= '<textarea name="text" rows="10" cols="55">';
|
||||||
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
||||||
@@ -3037,7 +3288,7 @@ class ApsParser
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$Temp.= '<a target="_blank" href="' . htmlspecialchars($Xml->license->text->url) . '">' . $lng['aps']['error_license'] . '</a>';
|
$Temp.= '<a target="_blank" href="' . htmlspecialchars($xml_license->text->url) . '">' . $lng['aps']['error_license'] . '</a>';
|
||||||
$Groupname = $lng['aps']['license'];
|
$Groupname = $lng['aps']['license'];
|
||||||
$Fieldname = $lng['aps']['license'];
|
$Fieldname = $lng['aps']['license'];
|
||||||
$Fieldvalue = $Temp;
|
$Fieldvalue = $Temp;
|
||||||
@@ -3088,14 +3339,37 @@ class ApsParser
|
|||||||
if($Xml == false)return false;
|
if($Xml == false)return false;
|
||||||
$Icon = './images/default.png';
|
$Icon = './images/default.png';
|
||||||
|
|
||||||
//show icon and basic data
|
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
|
||||||
|
|
||||||
if($Xml->icon['path'])
|
//show icon and basic data
|
||||||
|
if($this->aps_version != '1.0')
|
||||||
{
|
{
|
||||||
$Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']);
|
$iconpath = $Xml->presentation->icon['path'];
|
||||||
|
$Summary = htmlspecialchars($Xml->presentation->summary);
|
||||||
|
$categories = $Xml->presentation->categories;
|
||||||
|
$languages = $Xml->presentation->languages;
|
||||||
|
$description = $Xml->presentation->description;
|
||||||
|
$changelogs = $Xml->presentation->changelog;
|
||||||
|
$license = $Xml->service->license;
|
||||||
|
$screenshots = $Xml->presentation->screenshot;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$iconpath = $Xml->icon['path'];
|
||||||
|
$Summary = htmlspecialchars($Xml->summary);
|
||||||
|
$categories = $Xml->categories;
|
||||||
|
$languages = $Xml->languages;
|
||||||
|
$description = $Xml->description;
|
||||||
|
$changelogs = $Xml->changelog;
|
||||||
|
$license = $Xml->license;
|
||||||
|
$screenshots = $Xml->screenshot;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($iconpath)
|
||||||
|
{
|
||||||
|
$Icon = './packages/' . $Row['Path'] . '/' . basename($iconpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
$Summary = htmlspecialchars($Xml->summary);
|
|
||||||
$Fieldname = $lng['aps']['version'];
|
$Fieldname = $lng['aps']['version'];
|
||||||
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
$Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')';
|
||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
@@ -3120,12 +3394,12 @@ class ApsParser
|
|||||||
|
|
||||||
//show categories
|
//show categories
|
||||||
|
|
||||||
if($Xml->categories)
|
if($categories)
|
||||||
{
|
{
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
foreach($Xml->categories->category as $Categories)
|
foreach($categories->category as $_categories)
|
||||||
{
|
{
|
||||||
$Temp.= htmlspecialchars($Categories[0]) . '<br/>';
|
$Temp.= htmlspecialchars($_categories[0]) . '<br/>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Fieldname = $lng['aps']['categories'];
|
$Fieldname = $lng['aps']['categories'];
|
||||||
@@ -3135,12 +3409,12 @@ class ApsParser
|
|||||||
|
|
||||||
//show available languages
|
//show available languages
|
||||||
|
|
||||||
if($Xml->languages)
|
if($languages)
|
||||||
{
|
{
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
foreach($Xml->languages->language as $Languages)
|
foreach($languages->language as $_languages)
|
||||||
{
|
{
|
||||||
$Temp.= $Languages[0] . ' ';
|
$Temp.= $_languages[0] . ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Fieldname = $lng['aps']['languages'];
|
$Fieldname = $lng['aps']['languages'];
|
||||||
@@ -3153,7 +3427,7 @@ class ApsParser
|
|||||||
if($All == true)
|
if($All == true)
|
||||||
{
|
{
|
||||||
$Fieldname = $lng['aps']['long_description'];
|
$Fieldname = $lng['aps']['long_description'];
|
||||||
$Fieldvalue = htmlspecialchars($Xml->description);
|
$Fieldvalue = htmlspecialchars($description);
|
||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
|
|
||||||
//show config script language
|
//show config script language
|
||||||
@@ -3168,7 +3442,7 @@ class ApsParser
|
|||||||
//show changelog
|
//show changelog
|
||||||
|
|
||||||
$Temp = '<ul>';
|
$Temp = '<ul>';
|
||||||
foreach($Xml->changelog->version as $Versions)
|
foreach($changelogs->version as $Versions)
|
||||||
{
|
{
|
||||||
$Temp.= '<li><strong>' . $Versions['version'] . ' (Release ' . $Versions['release'] . ')</strong>';
|
$Temp.= '<li><strong>' . $Versions['version'] . ' (Release ' . $Versions['release'] . ')</strong>';
|
||||||
$Temp.= '<ul>';
|
$Temp.= '<ul>';
|
||||||
@@ -3187,13 +3461,13 @@ class ApsParser
|
|||||||
|
|
||||||
//show license
|
//show license
|
||||||
|
|
||||||
if($Xml->license)
|
if($license)
|
||||||
{
|
{
|
||||||
if($Xml->license->text->file)
|
if($license->text->file)
|
||||||
{
|
{
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
|
|
||||||
if($Xml->license->text->name)$Temp = $Xml->license->text->name . '<br/>';
|
if($license->text->name)$Temp = $license->text->name . '<br/>';
|
||||||
$Temp.= '<form name="license" action="#"><textarea name="text" rows="10" cols="70">';
|
$Temp.= '<form name="license" action="#"><textarea name="text" rows="10" cols="70">';
|
||||||
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
$FileContent = file_get_contents('./packages/' . $Row['Path'] . '/license.txt');
|
||||||
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'ISO-8859-1');
|
$Temp.= htmlentities($FileContent, ENT_QUOTES, 'ISO-8859-1');
|
||||||
@@ -3205,23 +3479,23 @@ class ApsParser
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$Fieldname = $lng['aps']['license'];
|
$Fieldname = $lng['aps']['license'];
|
||||||
$Fieldvalue = '<a target="_blank" href="' . htmlspecialchars($Xml->license->text->url) . '">' . $lng['aps']['linktolicense'] . '</a>';
|
$Fieldvalue = '<a target="_blank" href="' . htmlspecialchars($license->text->url) . '">' . $lng['aps']['linktolicense'] . '</a>';
|
||||||
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
eval("\$Data.=\"" . getTemplate("aps/data") . "\";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//show screenshots
|
//show screenshots
|
||||||
|
|
||||||
if($Xml->screenshot)
|
if($screenshots)
|
||||||
{
|
{
|
||||||
$Count = 0;
|
$Count = 0;
|
||||||
$Temp = '';
|
$Temp = '';
|
||||||
foreach($Xml->screenshot as $Screenshot)
|
foreach($screenshots as $Screenshot)
|
||||||
{
|
{
|
||||||
$Count+= 1;
|
$Count+= 1;
|
||||||
$Temp.= '<img src="./packages/' . $Row['Path'] . '/' . basename($Screenshot['path']) . '" alt="' . $Screenshot->description . '"/><br/><em>' . $Screenshot->description . '</em><br/>';
|
$Temp.= '<img src="./packages/' . $Row['Path'] . '/' . basename($Screenshot['path']) . '" alt="' . $Screenshot->description . '"/><br/><em>' . $Screenshot->description . '</em><br/>';
|
||||||
|
|
||||||
if(count($Xml->screenshot) != $Count)$Temp.= '<br/>';
|
if(count($screenshots) != $Count)$Temp.= '<br/>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$Fieldname = $lng['aps']['screenshots'];
|
$Fieldname = $lng['aps']['screenshots'];
|
||||||
@@ -3230,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);
|
||||||
}
|
}
|
||||||
|
|||||||
18
lib/classes/aps/class.DynamicProperties.php
Normal file
18
lib/classes/aps/class.DynamicProperties.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?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 APS
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
class DynamicProperties { /* empty class for some magic */ }
|
||||||
@@ -272,9 +272,9 @@ 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')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -199,12 +199,12 @@ return Array(
|
|||||||
'cd /usr/ports/www/awstats/',
|
'cd /usr/ports/www/awstats/',
|
||||||
'make install clean',
|
'make install clean',
|
||||||
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf']),
|
'cp /usr/local/www/awstats/cgi-bin/awstats.model.conf '.makeCorrectDir($settings['system']['awstats_conf']),
|
||||||
'sed -i.bak \'s/^LogFile/# LogFile/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^LogFile/# LogFile/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||||
'sed -i.bak \'s/^LogType/# LogType/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^LogType/# LogType/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||||
'sed -i.bak \'s/^LogFormat/# LogFormat/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^LogFormat/# LogFormat/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||||
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^LogSeparator/# LogSeparator/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||||
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
'sed -i.bak \'s/^SiteDomain/# SiteDomain/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf'),
|
||||||
'sed -i.bak \'s/^DirData/# DirData/\''.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
'sed -i.bak \'s/^DirData/# DirData/\' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf')
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ milter_default_action = accept" >> /etc/postfix/main.cf'
|
|||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'emerge awstats',
|
'emerge awstats',
|
||||||
'awstats_configure.pl',
|
'awstats_configure.pl',
|
||||||
'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')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -297,9 +297,9 @@ 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')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -305,9 +305,9 @@ 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')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -306,9 +306,9 @@ 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')
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'libnss' => Array(
|
'libnss' => Array(
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ return Array(
|
|||||||
'commands' => Array(
|
'commands' => Array(
|
||||||
'awstats_configure.pl',
|
'awstats_configure.pl',
|
||||||
makeCorrectFile($settings['system']['awstats_conf'].'/awstats.conf').' '.makeCorrectFile($settings['system']['awstats_conf'].'/awstats.model.conf'),
|
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')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
30
lib/functions/aps/function.getXPathValue.php
Normal file
30
lib/functions/aps/function.getXPathValue.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?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 APS
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
function getXPathValue($xmlobj = null, $path = null, $single = true)
|
||||||
|
{
|
||||||
|
$result = null;
|
||||||
|
|
||||||
|
$tmpxml = new DynamicProperties;
|
||||||
|
$tmpxml = ($xmlobj->xpath($path)) ? $xmlobj->xpath($path) : false;
|
||||||
|
|
||||||
|
if($result !== false)
|
||||||
|
{
|
||||||
|
$result = ($single == true) ? (string)$tmpxml[0] : $tmpxml;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
* @param int The uid of the user
|
* @param int The uid of the user
|
||||||
* @param int The gid of the user
|
* @param int The gid of the user
|
||||||
* @param bool Place standard-index.html into the new folder
|
* @param bool Place standard-index.html into the new folder
|
||||||
|
* @param bool Allow creating a directory out of the customers docroot
|
||||||
*
|
*
|
||||||
* @return bool true if everything went okay, false if something went wrong
|
* @return bool true if everything went okay, false if something went wrong
|
||||||
*
|
*
|
||||||
@@ -34,7 +35,7 @@
|
|||||||
* @author Martin Burchert <martin.burchert@syscp.org>
|
* @author Martin Burchert <martin.burchert@syscp.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeindex = false)
|
function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeindex = false, $allow_notwithinhomedir = false)
|
||||||
{
|
{
|
||||||
$returncode = true;
|
$returncode = true;
|
||||||
|
|
||||||
@@ -47,16 +48,20 @@ function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeind
|
|||||||
if(substr($dirToCreate, 0, strlen($homeDir)) == $homeDir)
|
if(substr($dirToCreate, 0, strlen($homeDir)) == $homeDir)
|
||||||
{
|
{
|
||||||
$subdir = substr($dirToCreate, strlen($homeDir));
|
$subdir = substr($dirToCreate, strlen($homeDir));
|
||||||
|
$within_homedir = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$subdir = $dirToCreate;
|
$subdir = $dirToCreate;
|
||||||
|
$within_homedir = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$subdir = makeCorrectDir($subdir);
|
$subdir = makeCorrectDir($subdir);
|
||||||
$subdirlen = strlen($subdir);
|
|
||||||
$subdirs = array();
|
$subdirs = array();
|
||||||
array_push($subdirs, $dirToCreate);
|
|
||||||
|
if($within_homedir || !$allow_notwithinhomedir)
|
||||||
|
{
|
||||||
|
$subdirlen = strlen($subdir);
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
|
|
||||||
while($offset < $subdirlen)
|
while($offset < $subdirlen)
|
||||||
@@ -66,6 +71,11 @@ function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid, $placeind
|
|||||||
$offset++;
|
$offset++;
|
||||||
array_push($subdirs, makeCorrectDir($homeDir . $subdirelem));
|
array_push($subdirs, makeCorrectDir($homeDir . $subdirelem));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
array_push($subdirs, $dirToCreate);
|
||||||
|
}
|
||||||
|
|
||||||
$subdirs = array_unique($subdirs);
|
$subdirs = array_unique($subdirs);
|
||||||
sort($subdirs);
|
sort($subdirs);
|
||||||
|
|||||||
@@ -62,6 +62,17 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '')
|
|||||||
$db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("6", "' . $db->escape($data) . '")');
|
$db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("6", "' . $db->escape($data) . '")');
|
||||||
$doupdate = true;
|
$doupdate = true;
|
||||||
}
|
}
|
||||||
|
elseif($type == '7'
|
||||||
|
&& $param1 != ''
|
||||||
|
&& $param2 != '')
|
||||||
|
{
|
||||||
|
$data = Array();
|
||||||
|
$data['loginname'] = $param1;
|
||||||
|
$data['email'] = $param2;
|
||||||
|
$data = serialize($data);
|
||||||
|
$db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("7", "' . $db->escape($data) . '")');
|
||||||
|
$doupdate = true;
|
||||||
|
}
|
||||||
|
|
||||||
if($doupdate === true
|
if($doupdate === true
|
||||||
&& (int)$settings['system']['realtime_port'] !== 0
|
&& (int)$settings['system']['realtime_port'] !== 0
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
18
lib/init.php
18
lib/init.php
@@ -265,9 +265,16 @@ foreach($langs as $key => $value)
|
|||||||
$languages[$key] = $key;
|
$languages[$key] = $key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($userinfo['def_language'])
|
if (isset($userinfo['language']) && isset($languages[$userinfo['language']]))
|
||||||
|| !isset($languages[$userinfo['def_language']]))
|
|
||||||
{
|
{
|
||||||
|
// default: use language from session, #277
|
||||||
|
$language = $userinfo['language'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(!isset($userinfo['def_language'])
|
||||||
|
|| !isset($languages[$userinfo['def_language']]))
|
||||||
|
{
|
||||||
if(isset($_GET['language'])
|
if(isset($_GET['language'])
|
||||||
&& isset($languages[$_GET['language']]))
|
&& isset($languages[$_GET['language']]))
|
||||||
{
|
{
|
||||||
@@ -277,10 +284,11 @@ if(!isset($userinfo['def_language'])
|
|||||||
{
|
{
|
||||||
$language = $settings['panel']['standardlanguage'];
|
$language = $settings['panel']['standardlanguage'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ define('PACKAGE_ENABLED', 2);
|
|||||||
|
|
||||||
// VERSION INFO
|
// VERSION INFO
|
||||||
|
|
||||||
$version = '0.9.8';
|
$version = '0.9.10';
|
||||||
$dbversion = '2';
|
$dbversion = '2';
|
||||||
$branding = '';
|
$branding = '';
|
||||||
|
|
||||||
|
|||||||
@@ -256,6 +256,7 @@ $lng['question']['ftp_reallydelete'] = 'Do you really want to delete the FTP acc
|
|||||||
$lng['question']['mysql_reallydelete'] = 'Do you really want to delete the database %s? This cannot be undone!';
|
$lng['question']['mysql_reallydelete'] = 'Do you really want to delete the database %s? This cannot be undone!';
|
||||||
$lng['question']['admin_configs_reallyrebuild'] = 'Do you really want to rebuild all config files?';
|
$lng['question']['admin_configs_reallyrebuild'] = 'Do you really want to rebuild all config files?';
|
||||||
$lng['question']['admin_customer_alsoremovefiles'] = 'Remove user files too?';
|
$lng['question']['admin_customer_alsoremovefiles'] = 'Remove user files too?';
|
||||||
|
$lng['question']['admin_customer_alsoremovemail'] = 'Completely remove email data from filesystem?';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mails
|
* Mails
|
||||||
@@ -1064,7 +1065,7 @@ $lng['aps']['nospecialchars'] = 'Special characters are not allowed in the searc
|
|||||||
$lng['aps']['noitemsfound'] = 'No Packages were found!';
|
$lng['aps']['noitemsfound'] = 'No Packages were found!';
|
||||||
$lng['aps']['nopackagesinstalled'] = 'You haven\'t installed any package yet which could be shown.';
|
$lng['aps']['nopackagesinstalled'] = 'You haven\'t installed any package yet which could be shown.';
|
||||||
$lng['aps']['instance_install'] = 'Package Installation pending';
|
$lng['aps']['instance_install'] = 'Package Installation pending';
|
||||||
$lng['aps']['instance_task_active'] = 'Installation running at this moment';
|
$lng['aps']['instance_task_active'] = 'Package is currently being processed';
|
||||||
$lng['aps']['instance_success'] = 'Package is installed/was installed successfully';
|
$lng['aps']['instance_success'] = 'Package is installed/was installed successfully';
|
||||||
$lng['aps']['instance_error'] = 'Package isn\'t installed - there occured some errors on the Installation';
|
$lng['aps']['instance_error'] = 'Package isn\'t installed - there occured some errors on the Installation';
|
||||||
$lng['aps']['instance_uninstall'] = 'Package Uninstallation pending';
|
$lng['aps']['instance_uninstall'] = 'Package Uninstallation pending';
|
||||||
@@ -1420,7 +1421,20 @@ $lng['redirect_desc']['rc_found'] = 'found';
|
|||||||
$lng['redirect_desc']['rc_seeother'] = 'see other';
|
$lng['redirect_desc']['rc_seeother'] = 'see other';
|
||||||
$lng['redirect_desc']['rc_tempred'] = 'temporary redirect';
|
$lng['redirect_desc']['rc_tempred'] = 'temporary redirect';
|
||||||
|
|
||||||
// ADDED UN FROXLOR 0.9.8
|
// ADDED IN FROXLOR 0.9.8
|
||||||
$lng['error']['exception'] = '%s';
|
$lng['error']['exception'] = '%s';
|
||||||
|
|
||||||
|
// 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';
|
||||||
|
|
||||||
|
// 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';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -256,6 +256,7 @@ $lng['question']['ftp_reallydelete'] = 'Wollen Sie das FTP-Benutzerkonto %s wirk
|
|||||||
$lng['question']['mysql_reallydelete'] = 'Wollen Sie die Datenbank %s wirklich löschen?<br />ACHTUNG! Alle Daten gehen unwiderruflich verloren!';
|
$lng['question']['mysql_reallydelete'] = 'Wollen Sie die Datenbank %s wirklich löschen?<br />ACHTUNG! Alle Daten gehen unwiderruflich verloren!';
|
||||||
$lng['question']['admin_configs_reallyrebuild'] = 'Wollen Sie wirklich alle Konfigurationsdateien neu erstellen lassen?';
|
$lng['question']['admin_configs_reallyrebuild'] = 'Wollen Sie wirklich alle Konfigurationsdateien neu erstellen lassen?';
|
||||||
$lng['question']['admin_customer_alsoremovefiles'] = 'Auch Kunden-Daten löschen?';
|
$lng['question']['admin_customer_alsoremovefiles'] = 'Auch Kunden-Daten löschen?';
|
||||||
|
$lng['question']['admin_customer_alsoremovemail'] = 'E-Mail Daten auf dem Dateisystem löschen?';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mails
|
* Mails
|
||||||
@@ -932,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 ändern';
|
$lng['emails']['quota_edit'] = 'E-Mail Kontingent ändern';
|
||||||
$lng['panel']['not_supported'] = 'Nicht ünterstüzt in: ';
|
$lng['panel']['not_supported'] = 'Nicht unterstüzt in: ';
|
||||||
$lng['error']['allocatetoomuchquota'] = 'Sie versuchen %s MB ' . $lng['emails']['quota'] . ' zu zuweisen, haben aber nicht genug übrig.';
|
$lng['error']['allocatetoomuchquota'] = 'Sie versuchen %s MB ' . $lng['emails']['quota'] . ' zu zuweisen, haben aber nicht genug übrig.';
|
||||||
|
|
||||||
// Autoresponder module
|
// Autoresponder module
|
||||||
@@ -1069,7 +1070,7 @@ $lng['aps']['nospecialchars'] = 'Sonderzeichen sind im Suchausdruck nicht erlaub
|
|||||||
$lng['aps']['noitemsfound'] = 'Es wurden keine Pakete gefunden!';
|
$lng['aps']['noitemsfound'] = 'Es wurden keine Pakete gefunden!';
|
||||||
$lng['aps']['nopackagesinstalled'] = 'Sie haben noch kein Paket installiert welches angezeigt werden könnte.';
|
$lng['aps']['nopackagesinstalled'] = 'Sie haben noch kein Paket installiert welches angezeigt werden könnte.';
|
||||||
$lng['aps']['instance_install'] = 'Paket wurde zur Installation vorgemerkt';
|
$lng['aps']['instance_install'] = 'Paket wurde zur Installation vorgemerkt';
|
||||||
$lng['aps']['instance_task_active'] = 'Paket wird gerade installiert';
|
$lng['aps']['instance_task_active'] = 'Paket wird gerade bearbeitet';
|
||||||
$lng['aps']['instance_success'] = 'Paket ist installiert bzw. wurde erfolgreich installiert';
|
$lng['aps']['instance_success'] = 'Paket ist installiert bzw. wurde erfolgreich installiert';
|
||||||
$lng['aps']['instance_error'] = 'Paket ist nicht installiert - bei der Installation traten Fehler auf';
|
$lng['aps']['instance_error'] = 'Paket ist nicht installiert - bei der Installation traten Fehler auf';
|
||||||
$lng['aps']['instance_uninstall'] = 'Paket wurde zur Deinstallation vorgemerkt';
|
$lng['aps']['instance_uninstall'] = 'Paket wurde zur Deinstallation vorgemerkt';
|
||||||
@@ -1406,4 +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
|
||||||
|
$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önnen daher keine Pakete installieren.';
|
||||||
|
$lng['aps']['packageneedsdb'] = 'Dieses Paket benötigt eine Datenbank, Sie haben allerdings keine mehr frei';
|
||||||
|
$lng['aps']['cannoteditordeleteapsdb'] = 'APS-Datenbanken können hier nicht bearbeitet oder gelö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 über den Hostnamen erreichbar machen';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -225,6 +225,17 @@ class bind
|
|||||||
{
|
{
|
||||||
$zonefile.= '@ IN MX ' . trim($mxserver) . "\n";
|
$zonefile.= '@ IN MX ' . trim($mxserver) . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->settings['system']['dns_createmailentry'] == '1')
|
||||||
|
{
|
||||||
|
$zonefile.= 'mail IN ' . $ip_a_record . "\n";
|
||||||
|
if($domain['iswildcarddomain'] != '1')
|
||||||
|
{
|
||||||
|
$zonefile.= 'imap IN ' . $ip_a_record . "\n";
|
||||||
|
$zonefile.= 'smtp IN ' . $ip_a_record . "\n";
|
||||||
|
$zonefile.= 'pop3 IN ' . $ip_a_record . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -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')
|
||||||
@@ -677,7 +684,7 @@ class apache
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true);
|
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true, true);
|
||||||
$vhost_content.= $this->getWebroot($domain);
|
$vhost_content.= $this->getWebroot($domain);
|
||||||
$vhost_content.= $this->composePhpOptions($domain);
|
$vhost_content.= $this->composePhpOptions($domain);
|
||||||
$vhost_content.= $this->getStats($domain);
|
$vhost_content.= $this->getStats($domain);
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -283,10 +277,18 @@ class lighttpd
|
|||||||
if((int)$domain['parentdomainid'] == 0)
|
if((int)$domain['parentdomainid'] == 0)
|
||||||
{
|
{
|
||||||
$vhost_no = '51';
|
$vhost_no = '51';
|
||||||
|
if($ssl == '1')
|
||||||
|
{
|
||||||
|
$vhost_no = '61';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$vhost_no = '50';
|
$vhost_no = '50';
|
||||||
|
if($ssl == '1')
|
||||||
|
{
|
||||||
|
$vhost_no = '60';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'].'/vhosts/'.$vhost_no.'_'.$domain['domain'].'.conf');
|
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'].'/vhosts/'.$vhost_no.'_'.$domain['domain'].'.conf');
|
||||||
@@ -368,15 +370,23 @@ class lighttpd
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true);
|
mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true, true);
|
||||||
|
|
||||||
|
$only_webroot = false;
|
||||||
|
if($ssl_vhost === false && $domain['ssl_redirect'] == '1')
|
||||||
|
{
|
||||||
|
$only_webroot = true;
|
||||||
|
}
|
||||||
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
$vhost_content.= $this->getWebroot($domain, $ssl_vhost);
|
||||||
|
if(!$only_webroot)
|
||||||
|
{
|
||||||
$vhost_content.= $this->create_htaccess($domain);
|
$vhost_content.= $this->create_htaccess($domain);
|
||||||
$vhost_content.= $this->create_pathOptions($domain);
|
$vhost_content.= $this->create_pathOptions($domain);
|
||||||
$vhost_content.= $this->composePhpOptions($domain);
|
$vhost_content.= $this->composePhpOptions($domain);
|
||||||
$vhost_content.= $this->getStats($domain);
|
$vhost_content.= $this->getStats($domain);
|
||||||
$vhost_content.= $this->getLogFiles($domain);
|
$vhost_content.= $this->getLogFiles($domain);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($domain['specialsettings'] != "") {
|
if ($domain['specialsettings'] != "") {
|
||||||
$vhost_content.= $domain['specialsettings'] . "\n";
|
$vhost_content.= $domain['specialsettings'] . "\n";
|
||||||
@@ -562,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')
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ $awstatsclean['headerold']) {
|
|||||||
/*
|
/*
|
||||||
* remove homedir
|
* remove homedir
|
||||||
*/
|
*/
|
||||||
$homedir = makeCorrectDir($settings['system']['documentroot_prefix'] . $row['data']['loginname']);
|
$homedir = makeCorrectDir($settings['system']['documentroot_prefix'] . '/' . $row['data']['loginname']);
|
||||||
|
|
||||||
if($homedir != '/'
|
if($homedir != '/'
|
||||||
&& $homedir != $settings['system']['documentroot_prefix']
|
&& $homedir != $settings['system']['documentroot_prefix']
|
||||||
@@ -226,7 +226,7 @@ $awstatsclean['headerold']) {
|
|||||||
/*
|
/*
|
||||||
* remove maildir
|
* remove maildir
|
||||||
*/
|
*/
|
||||||
$maildir = makeCorrectDir($settings['system']['vmail_homedir'] . $row['data']['loginname']);
|
$maildir = makeCorrectDir($settings['system']['vmail_homedir'] . '/' . $row['data']['loginname']);
|
||||||
|
|
||||||
if($maildir != '/'
|
if($maildir != '/'
|
||||||
&& $maildir != $settings['system']['vmail_homedir']
|
&& $maildir != $settings['system']['vmail_homedir']
|
||||||
@@ -269,6 +269,35 @@ $awstatsclean['headerold']) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TYPE=7 Customer deleted an email account and wants the data to be deleted on the filesystem
|
||||||
|
*/
|
||||||
|
elseif ($row['type'] == '7')
|
||||||
|
{
|
||||||
|
fwrite($debugHandler, ' cron_tasks: Task7 started - deleting customer e-mail data' . "\n");
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_INFO, 'Task7 started - deleting customer e-mail data');
|
||||||
|
|
||||||
|
if(is_array($row['data']))
|
||||||
|
{
|
||||||
|
if(isset($row['data']['loginname'])
|
||||||
|
&& isset($row['data']['email'])
|
||||||
|
) {
|
||||||
|
/*
|
||||||
|
* remove specific maildir
|
||||||
|
*/
|
||||||
|
$maildir = makeCorrectDir($settings['system']['vmail_homedir'] .'/'. $row['data']['loginname'] .'/'. $row['data']['email']);
|
||||||
|
|
||||||
|
if($maildir != '/'
|
||||||
|
&& $maildir != $settings['system']['vmail_homedir']
|
||||||
|
&& substr($maildir, 0, strlen($settings['system']['vmail_homedir'])) == $settings['system']['vmail_homedir'])
|
||||||
|
{
|
||||||
|
$cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: rm -rf ' . escapeshellarg($maildir));
|
||||||
|
safe_exec('rm -rf '.escapeshellarg($maildir));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($db->num_rows($result_tasks) != 0)
|
if($db->num_rows($result_tasks) != 0)
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -17,6 +17,48 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* chowns either awstats or webalizer folder,
|
||||||
|
* either with webserver-user or - if fcgid
|
||||||
|
* is used - the customers name, #258
|
||||||
|
*
|
||||||
|
* @param array $row array if panel_customers
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function makeChownWithNewStats($row)
|
||||||
|
{
|
||||||
|
global $settings;
|
||||||
|
|
||||||
|
// get correct user
|
||||||
|
if($settings['system']['mod_fcgid'] == 1)
|
||||||
|
{
|
||||||
|
$user = $row['loginname'];
|
||||||
|
$group = $row['loginname'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$user = $row['guid'];
|
||||||
|
$group = $row['guid'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// get correct directory
|
||||||
|
$dir = $row['documentroot'];
|
||||||
|
if($settings['system']['awstats_enabled'] == '1')
|
||||||
|
{
|
||||||
|
$dir .= '/awstats/';
|
||||||
|
} else {
|
||||||
|
$dir .= '/webalizer/';
|
||||||
|
}
|
||||||
|
|
||||||
|
// only run chown if directory exists
|
||||||
|
if (file_exists($dir))
|
||||||
|
{
|
||||||
|
// run chown
|
||||||
|
safe_exec('chown -R '.escapeshellarg($user).':'.escapeshellarg($group).' '.escapeshellarg(makeCorrectDir($dir)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function awstatsDoSingleDomain($domain, $outputdir)
|
function awstatsDoSingleDomain($domain, $outputdir)
|
||||||
{
|
{
|
||||||
global $cronlog, $settings;
|
global $cronlog, $settings;
|
||||||
|
|||||||
@@ -191,6 +191,9 @@ while($row = $db->fetch_array($result))
|
|||||||
{
|
{
|
||||||
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'], $row['documentroot'] . '/webalizer/', $caption, $domainlist[$row['customerid']]));
|
$httptraffic+= floatval(callWebalizerGetTraffic($row['loginname'], $row['documentroot'] . '/webalizer/', $caption, $domainlist[$row['customerid']]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make the stuff readable for the customer, #258
|
||||||
|
makeChownWithNewStats($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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" />
|
||||||
|
|||||||
@@ -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&action=edit&id={$row['id']}&s=$s">{$lng['panel']['edit']}</a></td>
|
<td class="field_name"><a href="$filename?page=mysqls&action=edit&id={$row['id']}&s=$s">{$lng['panel']['edit']}</a></td>
|
||||||
<td class="field_name"><a href="$filename?page=mysqls&action=delete&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a></td>
|
<td class="field_name"><a href="$filename?page=mysqls&action=delete&id={$row['id']}&s=$s">{$lng['panel']['delete']}</a></td>
|
||||||
|
<else>
|
||||||
|
<td class="field_name" colspan="2">{$lng['aps']['cannoteditordeleteapsdb']}</td>
|
||||||
|
</if>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ url.access-deny = ("~", ".inc")
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
"socket" => "/tmp/lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ url.access-deny = ("~", ".inc")
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
"socket" => "/tmp/lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
|
|||||||
@@ -31,11 +31,12 @@ server.bind = "<SERVERIP>"
|
|||||||
url.access-deny = ("~", ".inc")
|
url.access-deny = ("~", ".inc")
|
||||||
|
|
||||||
include "mime-types.conf"
|
include "mime-types.conf"
|
||||||
|
#include "mod_cgi.conf"
|
||||||
|
|
||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
"socket" => "/tmp/lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php-cgi",
|
"bin-path" => "/usr/bin/php-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ url.access-deny = ("~", ".inc")
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
"socket" => "/tmp/lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ url.access-deny = ("~", ".inc")
|
|||||||
fastcgi.server = (
|
fastcgi.server = (
|
||||||
".php" => (
|
".php" => (
|
||||||
"localhost" => (
|
"localhost" => (
|
||||||
"socket" => "<CUSTOMER_TMP>lighttpd-fcgi-sock-lighttpd",
|
"socket" => "/tmp/lighttpd-fcgi-sock-lighttpd",
|
||||||
"broken-scriptfilename" => "enable",
|
"broken-scriptfilename" => "enable",
|
||||||
"bin-path" => "/usr/bin/php5-cgi",
|
"bin-path" => "/usr/bin/php5-cgi",
|
||||||
"min-procs" => 1,
|
"min-procs" => 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user