Einige notices (undefined index) beim anlegen neuer vhosts
bernd

bernd commited on 2009-11-21 16:18:10
Zeige 2 geänderte Dateien mit 4 Einfügungen und 2 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1513 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -11,7 +11,7 @@ $section = 'vhosts_vhosts';
11 11
 
12 12
 require_role(ROLE_SYSTEMUSER);
13 13
 
14
-$id = (int) $_GET['vhost'];
14
+$id = (isset($_GET['vhost']) ? (int) $_GET['vhost'] : 0);
15 15
 $vhost = empty_vhost();
16 16
 
17 17
 if ($id != 0)
... ...
@@ -100,7 +100,7 @@ else
100 100
   $docroot = substr($vhost['docroot'], strlen($vhost['homedir'].'/websites/'));
101 101
 
102 102
 $s = (strstr($vhost['options'], 'aliaswww') ? ' checked="checked" ' : '');
103
-$errorlog = (strstr($vhost['errorlog'], 'on') ? ' checked="checked" ' : '');
103
+$errorlog = ($vhost['errorlog'] == 1 ? ' checked="checked" ' : '');
104 104
 
105 105
 $vhost_type = 'regular';
106 106
 if ($vhost['is_dav'])
... ...
@@ -32,12 +32,14 @@ function empty_vhost()
32 32
   $vhost['php'] = 'fastcgi';
33 33
   $vhost['ssl'] = NULL;
34 34
   $vhost['logtype'] = NULL;
35
+  $vhost['errorlog'] = 0;
35 36
   $vhost['is_dav'] = 0;
36 37
   $vhost['is_svn'] = 0;
37 38
   $vhost['is_webapp'] = 0;
38 39
   $vhost['webapp_id'] = NULL;
39 40
   
40 41
   $vhost['cert'] = NULL;
42
+  $vhost['certid'] = NULL;
41 43
   $vhost['ipv4'] = NULL;
42 44
 
43 45
   $vhost['options'] = '';
44 46