- removed customer-id limitations in domains-edit, fixes #394

- added permission-check to cron-init script if mod_fcgid_ownvhost is enabled
This commit is contained in:
Michael Kaufmann (d00p)
2010-08-27 05:53:25 +00:00
parent 28f525fb5c
commit 6e3bc87302
2 changed files with 17 additions and 2 deletions

View File

@@ -1129,9 +1129,9 @@ if($page == 'domains'
{
$domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']);
}
$subtodomains = makeoption($lng['domains']['nosubtomaindomain'], 0, NULL, true);
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$result['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC");
$result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC");
while($row_domain = $db->fetch_array($result_domains))
{

View File

@@ -167,6 +167,21 @@ unset($row);
unset($result);
fwrite($debugHandler, 'Froxlor settings have been loaded from the database' . "\n");
/**
* if settings['system']['mod_fcgid_ownvhost'] is set, we have to check
* whether the permission of the files are still correct
*/
if((int)$settings['system']['mod_fcgid_ownvhost'] == 1)
{
fwrite($debugHandler, 'Checking froxlor file permissions');
$mypath = makeCorrectDir(dirname(dirname(__FILE__))); // /var/www/froxlor, needed for chown
$user = $settings['system']['mod_fcgid_httpuser'];
$group = $settings['system']['mod_fcgid_httpgroup'];
// all the files and folders have to belong to the local user
// now because we also use fcgid for our own vhost
safe_exec('chown -R ' . $user . ':' . $group . ' ' . escapeshellarg($mypath));
}
if(!isset($settings['panel']['version'])
|| $settings['panel']['version'] != $version)
{