Browse code

Fix codingstyle

Hanno authored on27/10/2019 08:54:14
Showing10 changed files
... ...
@@ -22,8 +22,9 @@ require_once("inc/theme.php");
22 22
 
23 23
 set_exception_handler('handle_exception');
24 24
 
25
-if (!isset($_GET['go']))
25
+if (!isset($_GET['go'])) {
26 26
     die("No command");
27
+}
27 28
 $go = $_GET['go'];
28 29
 
29 30
 /*
... ...
@@ -111,7 +111,6 @@ function verify_input_identifier($data)
111 111
     if ($filtered !== $data) {
112 112
         logger(LOG_WARNING, 'inc/security', 'verify_input_identifier', 'Ungültige Daten: '.$data);
113 113
         system_failure("Ihre Daten enthielten ungültige Zeichen!");
114
-
115 114
     }
116 115
     return $filtered;
117 116
 }
... ...
@@ -79,7 +79,7 @@ function create_dyndns_account($handle, $password_http, $sshkey)
79 79
         "INSERT INTO dns.dyndns (uid, handle, password, sshkey) VALUES ".
80 80
            "(:uid, :handle, :pwhash, :sshkey)",
81 81
         array(":uid" => $uid, ":handle" => $handle, ":pwhash" => $pwhash, ":sshkey" => $sshkey)
82
-  );
82
+    );
83 83
     $dyndns_id = db_insert_id();
84 84
     //$masterdomain = new Domain(config('masterdomain'));
85 85
     //db_query("INSERT INTO dns.custom_records (type, domain, hostname, dyndns, ttl) VALUES ".
... ...
@@ -107,7 +107,7 @@ function edit_dyndns_account($id, $handle, $password_http, $sshkey)
107 107
              "hostname=:oldhostname AND domain=:dom AND dyndns=:dyndns AND ip IS NULL",
108 108
             array(":dom" => $masterdomain->id, ":newhostname" => filter_input_hostname($handle).'.'.$_SESSION['userinfo']['username'],
109 109
                    ":oldhostname" => $oldaccount['handle'].'.'.$_SESSION['userinfo']['username'],  ":dyndns" => $id)
110
-    );
110
+        );
111 111
     }
112 112
 
113 113
     $args = array(":handle" => $handle, ":sshkey" => $sshkey, ":id" => $id);
... ...
@@ -92,4 +92,3 @@ $form .= '</td></tr></table>';
92 92
 $form .= '<p><input type="submit" value="Speichern" /></p>';
93 93
 
94 94
 output(html_form('git_edit', 'save', 'action='.$action, $form));
95
-
... ...
@@ -33,8 +33,7 @@ if ($_GET['action'] == 'new') {
33 33
         $_SESSION['clientcert_serial'],
34 34
         $_SESSION['clientcert_valid_from'],
35 35
         $_SESSION['clientcert_valid_until']
36
-
37
-  );
36
+    );
38 37
 
39 38
     // Räume session auf
40 39
     unset($_SESSION['clientcert_cert']);
... ...
@@ -74,4 +74,3 @@ Gültigkeit.
74 74
 ";
75 75
     send_mail($customer['email'], "Passwortanforderung fuer Webinterface", $msg);
76 76
 }
77
-
... ...
@@ -136,5 +136,5 @@ function delete_clientcert($id)
136 136
     db_query(
137 137
         "DELETE FROM system.clientcert WHERE id=:id AND type=:type AND username=:username",
138 138
         array(":id" => $id, ":type" => $type, ":username" => $username)
139
-  );
139
+    );
140 140
 }
... ...
@@ -251,7 +251,7 @@ function sepamandat($name, $adresse, $iban, $bankname, $bic, $gueltig_ab)
251 251
         array(":referenz" => $referenz, ":glaeubiger_id" => $glaeubiger_id, ":cid" => $cid,
252 252
                 ":today" => $today, ":gueltig_ab" => $gueltig_ab, ":name" => $name, ":adresse" => $adresse,
253 253
                 ":iban" => $iban, ":bic" => $bic, ":bankname" => $bankname)
254
-  );
254
+    );
255 255
 }
256 256
 
257 257
 
... ...
@@ -228,7 +228,7 @@ function save_cert($info, $cert, $key)
228 228
         "INSERT INTO vhosts.certs (uid, subject, cn, san, valid_from, valid_until, chain, cert, `key`) VALUES (:uid, :subject, :cn, :san, :valid_from, :valid_until, :chain, :cert, :key)",
229 229
         array(":uid" => $uid, ":subject" => filter_input_oneline($info['subject']), ":cn" => filter_input_oneline($info['cn']), ":san" => $info['san'], ":valid_from" => $info['valid_from'],
230 230
               ":valid_until" => $info['valid_until'], ":chain" => get_chain($cert), ":cert" => $cert, ":key" => $key)
231
-  );
231
+    );
232 232
 }
233 233
 
234 234
 
... ...
@@ -375,7 +375,7 @@ function save_csr($cn, $bits, $replace=null)
375 375
         "INSERT INTO vhosts.csr (uid, hostname, san, bits, `replace`, csr, `key`) VALUES (:uid, :cn, :san, :bits, :replace, :csr, :key)",
376 376
         array(":uid" => $uid, ":cn" => $cn, ":san" => $san, ":bits" => $bits,
377 377
                  ":replace" => $replace, ":csr" => $csr, ":key" => $key)
378
-  );
378
+    );
379 379
     $id = db_insert_id();
380 380
     return $id;
381 381
 }
... ...
@@ -69,4 +69,3 @@ $form = '<p>Ihr Webmail-Benutzername: <input type="text" name="username" value="
69 69
 
70 70
 
71 71
 output(html_form('webmailtotp_test', 'test', '', $form));
72
-