Passed
Push — development ( 999888...3666e8 )
by Nils
04:36
created
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   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
 
645 645
 
646 646
         // generate new saltkey
647
-        $old_sk_filename = SECUREPATH."/teampass-seckey.txt".'.'.date("Y_m_d", mktime(0, 0, 0, (int)date('m'), (int)date('d'), (int)date('y'))).'.'.time();
647
+        $old_sk_filename = SECUREPATH."/teampass-seckey.txt".'.'.date("Y_m_d", mktime(0, 0, 0, (int) date('m'), (int) date('d'), (int) date('y'))).'.'.time();
648 648
         copy(
649 649
             SECUREPATH."/teampass-seckey.txt",
650 650
             $old_sk_filename
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
             $objects = explode(",", $post_object);
749 749
 
750 750
             // Allowed values for $_POST['object'] : "items,logs,files,categories"
751
-            if (in_array($objects[0], array("items","logs","files","categories")) === false) {
751
+            if (in_array($objects[0], array("items", "logs", "files", "categories")) === false) {
752 752
                 echo '[{"nextAction":"" , "error":"Input `'.$objects[0].'` is not allowed" , "nbOfItems":""}]';
753 753
                 break;
754 754
             }
@@ -1238,7 +1238,7 @@  discard block
 block discarded – undo
1238 1238
             foreach ($rows as $record) {
1239 1239
                 if (is_file($SETTINGS['path_to_upload_folder'].'/'.$record['file'])) {
1240 1240
                     $addFile = 0;
1241
-                    if ($post_option== "decrypt" && $record['status'] === 'encrypted') {
1241
+                    if ($post_option == "decrypt" && $record['status'] === 'encrypted') {
1242 1242
                         $addFile = 1;
1243 1243
                     } elseif ($post_option == "encrypt" && $record['status'] === 'clear') {
1244 1244
                         $addFile = 1;
@@ -1530,7 +1530,7 @@  discard block
 block discarded – undo
1530 1530
                     $tmp_skfile,
1531 1531
                     $tmp_skfile.'.'.date(
1532 1532
                         "Y_m_d",
1533
-                        mktime(0, 0, 0, (int)date('m'), (int)date('d'), (int)date('y'))
1533
+                        mktime(0, 0, 0, (int) date('m'), (int) date('d'), (int) date('y'))
1534 1534
                     )
1535 1535
                 )) {
1536 1536
                     echo '[{"result" : "" , "error" : "Could NOT perform a copy of file: '.$tmp_skfile.'"}]';
@@ -2045,16 +2045,16 @@  discard block
 block discarded – undo
2045 2045
                         );
2046 2046
 
2047 2047
                         $debug_ldap .= 'Search filter (group): '.$filter_group."<br/>".
2048
-                          'Results : '.str_replace("\n","<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2048
+                          'Results : '.str_replace("\n", "<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2049 2049
 
2050 2050
                         if ($result_group) {
2051 2051
                             $entries = ldap_get_entries($ldapconn, $result_group);
2052 2052
 
2053 2053
                             if ($entries['count'] > 0) {
2054 2054
                                 // Now check if group fits
2055
-                                for ($i=0; $i<$entries['count']; $i++) {
2056
-                                  $parsr=ldap_explode_dn($entries[$i]['dn'], 0);
2057
-                                  if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2055
+                                for ($i = 0; $i < $entries['count']; $i++) {
2056
+                                  $parsr = ldap_explode_dn($entries[$i]['dn'], 0);
2057
+                                  if (str_replace(array('CN=', 'cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2058 2058
                                     $GroupRestrictionEnabled = true;
2059 2059
                                     break;
2060 2060
                                   }
@@ -2067,7 +2067,7 @@  discard block
 block discarded – undo
2067 2067
                     }
2068 2068
 
2069 2069
                     $debug_ldap .= 'Search filter : '.$filter."<br/>".
2070
-                            'Results : '.str_replace("\n","<br>", print_r(ldap_get_entries($ldapconn, $result), true))."<br/>";
2070
+                            'Results : '.str_replace("\n", "<br>", print_r(ldap_get_entries($ldapconn, $result), true))."<br/>";
2071 2071
 
2072 2072
                     if (ldap_count_entries($ldapconn, $result)) {
2073 2073
                         // 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.
includes/language/turkish.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.