bernd commited on 2007-08-08 13:38:08
Zeige 1 geänderte Dateien mit 7 Einfügungen und 3 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@601 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -89,6 +89,7 @@ function delete_vhost($id) |
89 | 89 |
if ($id == 0) |
90 | 90 |
system_failure("id == 0"); |
91 | 91 |
$vhost = get_vhost_details($id); |
92 |
+ logger('modules/vhosts/include/vhosts.php', 'vhosts', 'Removing vhost #'.$id.' ('.$vhost['hostname'].'.'.$vhost['domain'].')'); |
|
92 | 93 |
db_query("DELETE FROM vhosts.vhost WHERE id={$vhost['id']} LIMIT 1"); |
93 | 94 |
} |
94 | 95 |
|
... | ... |
@@ -106,11 +107,14 @@ function save_vhost($vhost) |
106 | 107 |
$logtype = maybe_null($vhost['logtype']); |
107 | 108 |
$options = mysql_real_escape_string( $vhost['options'] ); |
108 | 109 |
|
109 |
- if ($id != 0) |
|
110 |
+ if ($id != 0) { |
|
111 |
+ logger('modules/vhosts/include/vhosts.php', 'vhosts', 'Updating vhost #'.$id.' ('.$vhost['hostname'].'.'.$vhost['domain'].')'); |
|
110 | 112 |
db_query("UPDATE vhosts.vhost SET hostname={$hostname}, domain={$domain}, docroot={$docroot}, php={$php}, logtype={$logtype}, options='{$options}' WHERE id={$id} LIMIT 1"); |
111 |
- else |
|
113 |
+ } |
|
114 |
+ else { |
|
115 |
+ logger('modules/vhosts/include/vhosts.php', 'vhosts', 'Creating vhost '.$vhost['hostname'].'.'.$vhost['domain'].''); |
|
112 | 116 |
db_query("INSERT INTO vhosts.vhost (user, hostname, domain, docroot, php, logtype, options) VALUES ({$_SESSION['userinfo']['uid']}, {$hostname}, {$domain}, {$docroot}, {$php}, {$logtype}, '{$options}')"); |
113 |
- |
|
117 |
+ } |
|
114 | 118 |
} |
115 | 119 |
|
116 | 120 |
|
117 | 121 |