Browse code

bugfix: Datenbankfehler beim ändern der Aliasoptionen

Bernd Wurst authored on16/06/2019 20:58:42
Showing1 changed files
... ...
@@ -30,7 +30,7 @@ if (isset($_GET['aliaswww'])) {
30 30
     $old_options = explode(',', $alias['options']);
31 31
     $new_options = array();
32 32
     foreach ($old_options as $op) {
33
-        if ($op != 'aliaswww') {
33
+        if ($op !== '' && $op != 'aliaswww') {
34 34
             array_push($new_options, $op);
35 35
         }
36 36
     }
... ...
@@ -58,7 +58,7 @@ if (isset($_GET['forward'])) {
58 58
     $old_options = explode(',', $alias['options']);
59 59
     $new_options = array();
60 60
     foreach ($old_options as $op) {
61
-        if ($op != 'forward') {
61
+        if ($op !== '' && $op != 'forward') {
62 62
             array_push($new_options, $op);
63 63
         }
64 64
     }
Browse code

another instance of accessing nonexisting

Hanno authored on23/07/2018 15:08:17
Showing1 changed files
... ...
@@ -69,7 +69,7 @@ if (isset($_GET['forward'])) {
69 69
     DEBUG($old_options);
70 70
     DEBUG($new_options);
71 71
     $alias['options'] = implode(',', $new_options);
72
-    DEBUG('New options: '.$options);
72
+    DEBUG('New options: '.$alias['options']);
73 73
 
74 74
     $alias['domainid'] = $alias['domain_id'];
75 75
     save_alias($alias);
Browse code

avoid accessing nonexisting var

Hanno authored on23/07/2018 15:05:26
Showing1 changed files
... ...
@@ -41,7 +41,7 @@ if (isset($_GET['aliaswww'])) {
41 41
     DEBUG($old_options);
42 42
     DEBUG($new_options);
43 43
     $alias['options'] = implode(',', $new_options);
44
-    DEBUG('New options: '.$options);
44
+    DEBUG('New options: '.$alias['options']);
45 45
 
46 46
     $alias['domainid'] = $alias['domain_id'];
47 47
     save_alias($alias);
Browse code

remove whitespace in empty lines

Hanno authored on26/06/2018 23:36:40
Showing1 changed files
... ...
@@ -37,7 +37,7 @@ if (isset($_GET['aliaswww'])) {
37 37
     if ($aliaswww) {
38 38
         array_push($new_options, 'aliaswww');
39 39
     }
40
-  
40
+
41 41
     DEBUG($old_options);
42 42
     DEBUG($new_options);
43 43
     $alias['options'] = implode(',', $new_options);
... ...
@@ -65,7 +65,7 @@ if (isset($_GET['forward'])) {
65 65
     if ($forward) {
66 66
         array_push($new_options, 'forward');
67 67
     }
68
-  
68
+
69 69
     DEBUG($old_options);
70 70
     DEBUG($new_options);
71 71
     $alias['options'] = implode(',', $new_options);
Browse code

Fix coding style with php-cs-checker, see https://cs.sensiolabs.org/

Hanno authored on26/06/2018 13:58:19
Showing1 changed files
... ...
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely
8 8
 
9 9
 To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10 10
 
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12 12
 http://creativecommons.org/publicdomain/zero/1.0/
13 13
 
14 14
 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.
... ...
@@ -23,60 +23,58 @@ global $debugmode;
23 23
 check_form_token('aliases_toggle', $_GET['formtoken']);
24 24
 
25 25
 if (isset($_GET['aliaswww'])) {
26
-
27
-  $aliaswww = (bool) ( (int) $_GET['aliaswww'] );
28
-
29
-  $alias = get_alias_details($_GET['alias']);
30
-  DEBUG($alias);
31
-  $old_options = explode(',', $alias['options']);
32
-  $new_options = array();
33
-  foreach ($old_options AS $op)
34
-  {
35
-    if ($op != 'aliaswww')
36
-      array_push($new_options, $op);
37
-  }
38
-  if ($aliaswww)
39
-    array_push($new_options, 'aliaswww');
26
+    $aliaswww = (bool) ((int) $_GET['aliaswww']);
27
+
28
+    $alias = get_alias_details($_GET['alias']);
29
+    DEBUG($alias);
30
+    $old_options = explode(',', $alias['options']);
31
+    $new_options = array();
32
+    foreach ($old_options as $op) {
33
+        if ($op != 'aliaswww') {
34
+            array_push($new_options, $op);
35
+        }
36
+    }
37
+    if ($aliaswww) {
38
+        array_push($new_options, 'aliaswww');
39
+    }
40 40
   
41
-  DEBUG($old_options);
42
-  DEBUG($new_options);
43
-  $alias['options'] = implode(',', $new_options);
44
-  DEBUG('New options: '.$options);
41
+    DEBUG($old_options);
42
+    DEBUG($new_options);
43
+    $alias['options'] = implode(',', $new_options);
44
+    DEBUG('New options: '.$options);
45 45
 
46
-  $alias['domainid'] = $alias['domain_id'];
47
-  save_alias($alias);
46
+    $alias['domainid'] = $alias['domain_id'];
47
+    save_alias($alias);
48 48
 
49
-  if (! $debugmode)
50
-    header('Location: aliases?vhost='.$alias['vhost']);
49
+    if (! $debugmode) {
50
+        header('Location: aliases?vhost='.$alias['vhost']);
51
+    }
51 52
 }
52 53
 if (isset($_GET['forward'])) {
53
-
54
-  $forward = (bool) ( (int) $_GET['forward'] );
55
-
56
-  $alias = get_alias_details($_GET['alias']);
57
-  DEBUG($alias);
58
-  $old_options = explode(',', $alias['options']);
59
-  $new_options = array();
60
-  foreach ($old_options AS $op)
61
-  {
62
-    if ($op != 'forward')
63
-      array_push($new_options, $op);
64
-  }
65
-  if ($forward)
66
-    array_push($new_options, 'forward');
54
+    $forward = (bool) ((int) $_GET['forward']);
55
+
56
+    $alias = get_alias_details($_GET['alias']);
57
+    DEBUG($alias);
58
+    $old_options = explode(',', $alias['options']);
59
+    $new_options = array();
60
+    foreach ($old_options as $op) {
61
+        if ($op != 'forward') {
62
+            array_push($new_options, $op);
63
+        }
64
+    }
65
+    if ($forward) {
66
+        array_push($new_options, 'forward');
67
+    }
67 68
   
68
-  DEBUG($old_options);
69
-  DEBUG($new_options);
70
-  $alias['options'] = implode(',', $new_options);
71
-  DEBUG('New options: '.$options);
69
+    DEBUG($old_options);
70
+    DEBUG($new_options);
71
+    $alias['options'] = implode(',', $new_options);
72
+    DEBUG('New options: '.$options);
72 73
 
73
-  $alias['domainid'] = $alias['domain_id'];
74
-  save_alias($alias);
74
+    $alias['domainid'] = $alias['domain_id'];
75
+    save_alias($alias);
75 76
 
76
-  if (! $debugmode)
77
-    header('Location: aliases?vhost='.$alias['vhost']);
77
+    if (! $debugmode) {
78
+        header('Location: aliases?vhost='.$alias['vhost']);
79
+    }
78 80
 }
79
-
80
-
81
-
82
-?>
Browse code

Copyright year update

Bernd Wurst authored on13/01/2018 06:07:05
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2014 by schokokeks.org Hosting, namely
5
+Written 2008-2018 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Lizenzinfos in eigenes Modul ausgelagert und Copyright auf 2014 angepasst

Bernd Wurst authored on08/02/2014 05:45:07
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2013 by schokokeks.org Hosting, namely
5
+Written 2008-2014 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Updated copyright notice (2012 => 2013)

Bernd Wurst authored on19/01/2013 10:49:50
Showing1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2012 by schokokeks.org Hosting, namely
5
+Written 2008-2013 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Added license tags for CC0, README and COPYING

Bernd Wurst authored on11/03/2012 15:40:04
Showing1 changed files
... ...
@@ -1,4 +1,18 @@
1 1
 <?php
2
+/*
3
+This file belongs to the Webinterface of schokokeks.org Hosting
4
+
5
+Written 2008-2012 by schokokeks.org Hosting, namely
6
+  Bernd Wurst <bernd@schokokeks.org>
7
+  Hanno Böck <hanno@schokokeks.org>
8
+
9
+To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10
+
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
12
+http://creativecommons.org/publicdomain/zero/1.0/
13
+
14
+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.
15
+*/
2 16
 
3 17
 require_once('inc/base.php');
4 18
 require_once('vhosts.php');
Browse code

eliminate .php extensions for URLs

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1128 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on08/08/2008 19:32:32
Showing1 changed files
... ...
@@ -33,7 +33,7 @@ if (isset($_GET['aliaswww'])) {
33 33
   save_alias($alias);
34 34
 
35 35
   if (! $debugmode)
36
-    header('Location: aliases.php?vhost='.$alias['vhost']);
36
+    header('Location: aliases?vhost='.$alias['vhost']);
37 37
 }
38 38
 if (isset($_GET['forward'])) {
39 39
 
... ...
@@ -60,7 +60,7 @@ if (isset($_GET['forward'])) {
60 60
   save_alias($alias);
61 61
 
62 62
   if (! $debugmode)
63
-    header('Location: aliases.php?vhost='.$alias['vhost']);
63
+    header('Location: aliases?vhost='.$alias['vhost']);
64 64
 }
65 65
 
66 66
 
Browse code

domain = NULL ==> user-subdomain

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@636 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on20/08/2007 13:02:02
Showing1 changed files
... ...
@@ -65,4 +65,4 @@ if (isset($_GET['forward'])) {
65 65
 
66 66
 
67 67
 
68
-?>
69 68
\ No newline at end of file
69
+?>
Browse code

Neue Dateien für Alias-Editor vergessen

git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@611 87cf0b9e-d624-0410-a070-f6ee81989793

bernd authored on09/08/2007 19:30:02
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,68 @@
1
+<?php
2
+
3
+require_once('inc/base.php');
4
+require_once('vhosts.php');
5
+
6
+require_once('inc/debug.php');
7
+global $debugmode;
8
+
9
+check_form_token('aliases_toggle', $_GET['formtoken']);
10
+
11
+if (isset($_GET['aliaswww'])) {
12
+
13
+  $aliaswww = (bool) ( (int) $_GET['aliaswww'] );
14
+
15
+  $alias = get_alias_details($_GET['alias']);
16
+  DEBUG($alias);
17
+  $old_options = explode(',', $alias['options']);
18
+  $new_options = array();
19
+  foreach ($old_options AS $op)
20
+  {
21
+    if ($op != 'aliaswww')
22
+      array_push($new_options, $op);
23
+  }
24
+  if ($aliaswww)
25
+    array_push($new_options, 'aliaswww');
26
+  
27
+  DEBUG($old_options);
28
+  DEBUG($new_options);
29
+  $alias['options'] = implode(',', $new_options);
30
+  DEBUG('New options: '.$options);
31
+
32
+  $alias['domainid'] = $alias['domain_id'];
33
+  save_alias($alias);
34
+
35
+  if (! $debugmode)
36
+    header('Location: aliases.php?vhost='.$alias['vhost']);
37
+}
38
+if (isset($_GET['forward'])) {
39
+
40
+  $forward = (bool) ( (int) $_GET['forward'] );
41
+
42
+  $alias = get_alias_details($_GET['alias']);
43
+  DEBUG($alias);
44
+  $old_options = explode(',', $alias['options']);
45
+  $new_options = array();
46
+  foreach ($old_options AS $op)
47
+  {
48
+    if ($op != 'forward')
49
+      array_push($new_options, $op);
50
+  }
51
+  if ($forward)
52
+    array_push($new_options, 'forward');
53
+  
54
+  DEBUG($old_options);
55
+  DEBUG($new_options);
56
+  $alias['options'] = implode(',', $new_options);
57
+  DEBUG('New options: '.$options);
58
+
59
+  $alias['domainid'] = $alias['domain_id'];
60
+  save_alias($alias);
61
+
62
+  if (! $debugmode)
63
+    header('Location: aliases.php?vhost='.$alias['vhost']);
64
+}
65
+
66
+
67
+
68
+?>
0 69
\ No newline at end of file