Passed
Branch development (e0e718)
by Nils
04:45
created
backups/script.backup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,15 +12,15 @@
 block discarded – undo
12 12
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 13
  */
14 14
 
15
-include dirname(__FILE__) .'/../includes/config/settings.php';
16
-require_once dirname(__FILE__) .'/../includes/config/tp.config.php';
15
+include dirname(__FILE__).'/../includes/config/settings.php';
16
+require_once dirname(__FILE__).'/../includes/config/tp.config.php';
17 17
 header("Content-type: text/html; charset=utf-8");
18 18
 
19 19
 $_SESSION['CPM'] = 1;
20 20
 
21 21
 // connect to DB
22
-require_once $SETTINGS['cpassman_dir'] .'/sources/SplClassLoader.php';
23
-require_once $SETTINGS['cpassman_dir'] .'/includes/libraries/Database/Meekrodb/db.class.php';
22
+require_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
23
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
24 24
 
25 25
 // Load libraries
26 26
 require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
Please login to merge, or discard this patch.
sources/admin.queries.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2085,7 +2085,7 @@  discard block
 block discarded – undo
2085 2085
             $debug_ldap .= "LDAP connection : ".($ldapconn ? "Connected" : "Failed")."<br/>";
2086 2086
 
2087 2087
             if ($ldapconn) {
2088
-              $debug_ldap .= "DN : ".$dataReceived[0]['ldap_bind_dn']." -- ".$dataReceived[0]['ldap_bind_passwd']."<br/>";
2088
+                $debug_ldap .= "DN : ".$dataReceived[0]['ldap_bind_dn']." -- ".$dataReceived[0]['ldap_bind_passwd']."<br/>";
2089 2089
                 ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
2090 2090
                 ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0);
2091 2091
                 $ldapbind = ldap_bind($ldapconn, $dataReceived[0]['ldap_bind_dn'], $dataReceived[0]['ldap_bind_passwd']);
@@ -2112,7 +2112,7 @@  discard block
 block discarded – undo
2112 2112
                         );
2113 2113
 
2114 2114
                         $debug_ldap .= 'Search filter (group): '.$filter_group."<br/>".
2115
-                          'Results : '.str_replace("\n","<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2115
+                            'Results : '.str_replace("\n","<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2116 2116
 
2117 2117
                         if ($result_group) {
2118 2118
                             $entries = ldap_get_entries($ldapconn, $result_group);
@@ -2120,11 +2120,11 @@  discard block
 block discarded – undo
2120 2120
                             if ($entries['count'] > 0) {
2121 2121
                                 // Now check if group fits
2122 2122
                                 for ($i=0; $i<$entries['count']; $i++) {
2123
-                                  $parsr=ldap_explode_dn($entries[$i]['dn'], 0);
2124
-                                  if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2123
+                                    $parsr=ldap_explode_dn($entries[$i]['dn'], 0);
2124
+                                    if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2125 2125
                                     $GroupRestrictionEnabled = true;
2126 2126
                                     break;
2127
-                                  }
2127
+                                    }
2128 2128
                                 }
2129 2129
 
2130 2130
                             }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
             $objects = explode(",", $post_object);
741 741
 
742 742
             // Allowed values for $_POST['object'] : "items,logs,files,categories"
743
-            if (in_array($objects[0], array("items","logs","files","categories")) === false) {
743
+            if (in_array($objects[0], array("items", "logs", "files", "categories")) === false) {
744 744
                 echo '[{"nextAction":"" , "error":"Input `'.$objects[0].'` is not allowed" , "nbOfItems":""}]';
745 745
                 break;
746 746
             }
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
             foreach ($rows as $record) {
1306 1306
                 if (is_file($SETTINGS['path_to_upload_folder'].'/'.$record['file'])) {
1307 1307
                     $addFile = 0;
1308
-                    if ($post_option== "decrypt" && $record['status'] === 'encrypted') {
1308
+                    if ($post_option == "decrypt" && $record['status'] === 'encrypted') {
1309 1309
                         $addFile = 1;
1310 1310
                     } elseif ($post_option == "encrypt" && $record['status'] === 'clear') {
1311 1311
                         $addFile = 1;
@@ -2112,16 +2112,16 @@  discard block
 block discarded – undo
2112 2112
                         );
2113 2113
 
2114 2114
                         $debug_ldap .= 'Search filter (group): '.$filter_group."<br/>".
2115
-                          'Results : '.str_replace("\n","<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2115
+                          'Results : '.str_replace("\n", "<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2116 2116
 
2117 2117
                         if ($result_group) {
2118 2118
                             $entries = ldap_get_entries($ldapconn, $result_group);
2119 2119
 
2120 2120
                             if ($entries['count'] > 0) {
2121 2121
                                 // Now check if group fits
2122
-                                for ($i=0; $i<$entries['count']; $i++) {
2123
-                                  $parsr=ldap_explode_dn($entries[$i]['dn'], 0);
2124
-                                  if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2122
+                                for ($i = 0; $i < $entries['count']; $i++) {
2123
+                                  $parsr = ldap_explode_dn($entries[$i]['dn'], 0);
2124
+                                  if (str_replace(array('CN=', 'cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2125 2125
                                     $GroupRestrictionEnabled = true;
2126 2126
                                     break;
2127 2127
                                   }
@@ -2134,7 +2134,7 @@  discard block
 block discarded – undo
2134 2134
                     }
2135 2135
 
2136 2136
                     $debug_ldap .= 'Search filter : '.$filter."<br/>".
2137
-                            'Results : '.str_replace("\n","<br>", print_r(ldap_get_entries($ldapconn, $result), true))."<br/>";
2137
+                            'Results : '.str_replace("\n", "<br>", print_r(ldap_get_entries($ldapconn, $result), true))."<br/>";
2138 2138
 
2139 2139
                     if (ldap_count_entries($ldapconn, $result)) {
2140 2140
                         // try auth
Please login to merge, or discard this patch.
sources/users.queries.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1642,7 +1642,7 @@
 block discarded – undo
1642 1642
 
1643 1643
                 // Update session
1644 1644
                 if ($field === 'user_api_key') {
1645
-                  $_SESSION['user_settings']['api-key'] = $new_value;
1645
+                    $_SESSION['user_settings']['api-key'] = $new_value;
1646 1646
                 }
1647 1647
             break;
1648 1648
     }
Please login to merge, or discard this patch.
includes/language/french.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 14
  */
15 15
 global $LANG;
16
-$LANG = array (
16
+$LANG = array(
17 17
     'report_a_bug' => 'Reporter un défaut',
18 18
     'user_profile_api_key' => 'Votre clé API',
19 19
     'settings_ldap_and_local_authentication' => 'Utilisateurs locaux et LDAP',
Please login to merge, or discard this patch.
includes/language/catalan.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 14
  */
15 15
 global $LANG;
16
-$LANG = array (
16
+$LANG = array(
17 17
     'report_a_bug' => 'Report a Bug',
18 18
     'user_profile_api_key' => 'Your API key',
19 19
     'settings_ldap_and_local_authentication' => 'Local and LDAP users',
Please login to merge, or discard this patch.
includes/language/dutch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 14
  */
15 15
 global $LANG;
16
-$LANG = array (
16
+$LANG = array(
17 17
     'report_a_bug' => 'Report a Bug',
18 18
     'user_profile_api_key' => 'Your API key',
19 19
     'user_ga_code' => 'E-mail Google Authenticatie naar gebruiker',
Please login to merge, or discard this patch.
includes/language/portuguese_br.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 14
  */
15 15
 global $LANG;
16
-$LANG = array (
16
+$LANG = array(
17 17
     'report_a_bug' => 'Report a Bug',
18 18
     'user_profile_api_key' => 'Your API key',
19 19
     'user_ga_code' => 'Enviar ao usuário o Código do Google Authenticator por e-mail',
Please login to merge, or discard this patch.
includes/language/spanish.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 14
  */
15 15
 global $LANG;
16
-$LANG = array (
16
+$LANG = array(
17 17
     'report_a_bug' => 'Report a Bug',
18 18
     'user_profile_api_key' => 'Your API key',
19 19
     'user_ga_code' => 'Enviar el código de GoogleAuthenticator por correo al usuario',
Please login to merge, or discard this patch.
includes/language/polish.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 14
  */
15 15
 global $LANG;
16
-$LANG = array (
16
+$LANG = array(
17 17
     'report_a_bug' => 'Report a Bug',
18 18
     'user_profile_api_key' => 'Your API key',
19 19
     'user_ga_code' => 'Wyślij emaila z Google Authenticator do użytkownika',
Please login to merge, or discard this patch.