354c05a4ddd678c49bcbba458bffa7d13482139a
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
12) */
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

13) 
14) require_once('inc/debug.php');
15) 
16) require_once('webapp-installer.php');
17) 
18) 
19) function validate_data($post)
20) {
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

21)     DEBUG('Validating Data:');
22)     DEBUG($post);
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

23)     $fields = ['adminuser', 'adminpassword', 'adminemail', 'sitename', 'siteemail'];
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

24)     foreach ($fields as $field) {
Hanno Böck Fix not operator (!) spaces

Hanno Böck authored 1 year ago

25)         if ((!isset($post[$field])) || $post[$field] == '') {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

26)             system_failure('Nicht alle Werte angegeben (' . $field . ')');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

27)         }
28)     }
29) 
30)     $dbdata = create_webapp_mysqldb('drupal7', $post['sitename']);
31) 
32)     $data = "adminuser={$post['adminuser']}
bernd Webapp-Installer für Drupal-7

bernd authored 13 years ago

33) adminpassword={$post['adminpassword']}
34) adminemail={$post['adminemail']}
35) sitename={$post['sitename']}
36) siteemail={$post['siteemail']}
37) dbname={$dbdata['dbname']}
38) dbuser={$dbdata['dbuser']}
39) dbpass={$dbdata['dbpass']}";
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

40)     DEBUG($data);
41)     return $data;