Browse code

Change license from CC0 to 0BSD, all contributors agreed

Hanno Böck authored on 20/08/2022 09:22:23
Showing 1 changed files
... ...
@@ -2,14 +2,11 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2018 by schokokeks.org Hosting, namely
5
+Written by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 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/
9
+This code is published under a 0BSD license.
13 10
 
14 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.
15 12
 */
Browse code

Codingstyle PSR12 + array syntax

Hanno Böck authored on 30/10/2021 21:18:17
Showing 1 changed files
... ...
@@ -19,7 +19,7 @@ require_once('inc/base.php');
19 19
 function user_has_accounts()
20 20
 {
21 21
     $uid = (int) $_SESSION['userinfo']['uid'];
22
-    $result = db_query("SELECT id from `mail`.`mailaccounts` WHERE uid=?", array($uid));
22
+    $result = db_query("SELECT id from `mail`.`mailaccounts` WHERE uid=?", [$uid]);
23 23
     DEBUG($result->rowCount()." accounts");
24 24
     return ($result->rowCount() > 0);
25 25
 }
... ...
@@ -32,7 +32,7 @@ if (! function_exists("user_has_vmail_domain")) {
32 32
             return false;
33 33
         }
34 34
         $uid = (int) $_SESSION['userinfo']['uid'];
35
-        $result = db_query("SELECT COUNT(*) FROM mail.v_vmail_domains WHERE useraccount=?", array($uid));
35
+        $result = db_query("SELECT COUNT(*) FROM mail.v_vmail_domains WHERE useraccount=?", [$uid]);
36 36
         $row = $result->fetch();
37 37
         $count = $row[0];
38 38
         DEBUG("User has {$count} vmail-domains");
Browse code

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

Hanno authored on 26/06/2018 13:58:19
Showing 1 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.
... ...
@@ -18,26 +18,24 @@ require_once('inc/base.php');
18 18
 
19 19
 function user_has_accounts()
20 20
 {
21
-  $uid = (int) $_SESSION['userinfo']['uid'];
22
-  $result = db_query("SELECT id from `mail`.`mailaccounts` WHERE uid=?", array($uid));
23
-  DEBUG($result->rowCount()." accounts");
24
-  return ($result->rowCount() > 0);
21
+    $uid = (int) $_SESSION['userinfo']['uid'];
22
+    $result = db_query("SELECT id from `mail`.`mailaccounts` WHERE uid=?", array($uid));
23
+    DEBUG($result->rowCount()." accounts");
24
+    return ($result->rowCount() > 0);
25 25
 }
26 26
 
27
-if (! function_exists("user_has_vmail_domain"))
28
-{
29
-  function user_has_vmail_domain()
30
-  {
27
+if (! function_exists("user_has_vmail_domain")) {
28
+    function user_has_vmail_domain()
29
+    {
31 30
         $role = $_SESSION['role'];
32 31
         if (! ($role & ROLE_SYSTEMUSER)) {
33
-                return false;
32
+            return false;
34 33
         }
35 34
         $uid = (int) $_SESSION['userinfo']['uid'];
36 35
         $result = db_query("SELECT COUNT(*) FROM mail.v_vmail_domains WHERE useraccount=?", array($uid));
37 36
         $row = $result->fetch();
38 37
         $count = $row[0];
39 38
         DEBUG("User has {$count} vmail-domains");
40
-        return ( (int) $count > 0 );
41
-  }
39
+        return ((int) $count > 0);
40
+    }
42 41
 }
43
-
Browse code

Copyright year update

Bernd Wurst authored on 13/01/2018 06:07:05
Showing 1 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 on 08/02/2014 05:45:07
Showing 1 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

email-Modul auf prepared-statements umgestellt

Bernd Wurst authored on 02/02/2014 08:03:52
Showing 1 changed files
... ...
@@ -19,7 +19,7 @@ require_once('inc/base.php');
19 19
 function user_has_accounts()
20 20
 {
21 21
   $uid = (int) $_SESSION['userinfo']['uid'];
22
-  $result = db_query("SELECT id from `mail`.`mailaccounts` WHERE uid=$uid");
22
+  $result = db_query("SELECT id from `mail`.`mailaccounts` WHERE uid=?", array($uid));
23 23
   DEBUG($result->rowCount()." accounts");
24 24
   return ($result->rowCount() > 0);
25 25
 }
... ...
@@ -33,7 +33,7 @@ if (! function_exists("user_has_vmail_domain"))
33 33
                 return false;
34 34
         }
35 35
         $uid = (int) $_SESSION['userinfo']['uid'];
36
-        $result = db_query("SELECT COUNT(*) FROM mail.v_vmail_domains WHERE useraccount='{$uid}'");
36
+        $result = db_query("SELECT COUNT(*) FROM mail.v_vmail_domains WHERE useraccount=?", array($uid));
37 37
         $row = $result->fetch();
38 38
         $count = $row[0];
39 39
         DEBUG("User has {$count} vmail-domains");
Browse code

Umstellung auf PDO-Datenbankverbindung

Bernd Wurst authored on 01/02/2014 18:38:23
Showing 1 changed files
... ...
@@ -20,8 +20,8 @@ function user_has_accounts()
20 20
 {
21 21
   $uid = (int) $_SESSION['userinfo']['uid'];
22 22
   $result = db_query("SELECT id from `mail`.`mailaccounts` WHERE uid=$uid");
23
-  DEBUG(mysql_num_rows($result)." accounts");
24
-  return (mysql_num_rows($result) > 0);
23
+  DEBUG($result->rowCount()." accounts");
24
+  return ($result->rowCount() > 0);
25 25
 }
26 26
 
27 27
 if (! function_exists("user_has_vmail_domain"))
... ...
@@ -34,7 +34,7 @@ if (! function_exists("user_has_vmail_domain"))
34 34
         }
35 35
         $uid = (int) $_SESSION['userinfo']['uid'];
36 36
         $result = db_query("SELECT COUNT(*) FROM mail.v_vmail_domains WHERE useraccount='{$uid}'");
37
-        $row = mysql_fetch_array($result);
37
+        $row = $result->fetch();
38 38
         $count = $row[0];
39 39
         DEBUG("User has {$count} vmail-domains");
40 40
         return ( (int) $count > 0 );
Browse code

Updated copyright notice (2012 => 2013)

Bernd Wurst authored on 19/01/2013 10:49:50
Showing 1 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 on 11/03/2012 15:40:04
Showing 1 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
 
Browse code

IMAP/POP3 nur anzeigen wenn es benötigt wird

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

bernd authored on 11/03/2010 10:37:59
Showing 1 changed files
... ...
@@ -27,11 +27,3 @@ if (! function_exists("user_has_vmail_domain"))
27 27
   }
28 28
 }
29 29
 
30
-function user_has_regular_domain()
31
-{
32
-  $result = db_query("SELECT id FROM kundendaten.domains AS dom WHERE id NOT IN (SELECT domain FROM mail.virtual_mail_domains WHERE hostname IS NULL)");
33
-  return (mysql_num_rows($result) > 0);
34
-}
35
-
36
-
37
-?>
Browse code

Bisher nicht sichtbare warnings

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

bernd authored on 03/12/2008 07:27:39
Showing 1 changed files
... ...
@@ -30,7 +30,7 @@ if (! function_exists("user_has_vmail_domain"))
30 30
 function user_has_regular_domain()
31 31
 {
32 32
   $result = db_query("SELECT id FROM kundendaten.domains AS dom WHERE id NOT IN (SELECT domain FROM mail.virtual_mail_domains WHERE hostname IS NULL)");
33
-  return (mysql_num_rows() > 0);
33
+  return (mysql_num_rows($result) > 0);
34 34
 }
35 35
 
36 36
 
Browse code

Großer VMail-move

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

bernd authored on 03/04/2008 10:38:22
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,37 @@
1
+<?php
2
+
3
+require_once('inc/base.php');
4
+
5
+function user_has_accounts()
6
+{
7
+  $uid = (int) $_SESSION['userinfo']['uid'];
8
+  $result = db_query("SELECT id from `mail`.`mailaccounts` WHERE uid=$uid");
9
+  DEBUG(mysql_num_rows($result)." accounts");
10
+  return (mysql_num_rows($result) > 0);
11
+}
12
+
13
+if (! function_exists("user_has_vmail_domain"))
14
+{
15
+  function user_has_vmail_domain()
16
+  {
17
+        $role = $_SESSION['role'];
18
+        if (! ($role & ROLE_SYSTEMUSER)) {
19
+                return false;
20
+        }
21
+        $uid = (int) $_SESSION['userinfo']['uid'];
22
+        $result = db_query("SELECT COUNT(*) FROM mail.v_vmail_domains WHERE useraccount='{$uid}'");
23
+        $row = mysql_fetch_array($result);
24
+        $count = $row[0];
25
+        DEBUG("User has {$count} vmail-domains");
26
+        return ( (int) $count > 0 );
27
+  }
28
+}
29
+
30
+function user_has_regular_domain()
31
+{
32
+  $result = db_query("SELECT id FROM kundendaten.domains AS dom WHERE id NOT IN (SELECT domain FROM mail.virtual_mail_domains WHERE hostname IS NULL)");
33
+  return (mysql_num_rows() > 0);
34
+}
35
+
36
+
37
+?>