Passed
Push — development ( 7a0b19...861e44 )
by Nils
05:12
created
sources/admin.queries.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                         array(
108 108
                             'http' => array(
109 109
                                 'ignore_errors' => true,
110
-                                'proxy' =>  $SETTINGS['proxy_ip'] . ':' . $SETTINGS['proxy_port']
110
+                                'proxy' =>  $SETTINGS['proxy_ip'].':'.$SETTINGS['proxy_port']
111 111
                             )
112 112
                         )
113 113
                     );
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
 
666 666
 
667 667
         // generate new saltkey
668
-        $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();
668
+        $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();
669 669
         copy(
670 670
             SECUREPATH."/teampass-seckey.txt",
671 671
             $old_sk_filename
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
             $objects = explode(",", $post_object);
770 770
 
771 771
             // Allowed values for $_POST['object'] : "items,logs,files,categories"
772
-            if (in_array($objects[0], array("items","logs","files","categories")) === false) {
772
+            if (in_array($objects[0], array("items", "logs", "files", "categories")) === false) {
773 773
                 echo '[{"nextAction":"" , "error":"Input `'.$objects[0].'` is not allowed" , "nbOfItems":""}]';
774 774
                 break;
775 775
             }
@@ -1259,7 +1259,7 @@  discard block
 block discarded – undo
1259 1259
             foreach ($rows as $record) {
1260 1260
                 if (is_file($SETTINGS['path_to_upload_folder'].'/'.$record['file'])) {
1261 1261
                     $addFile = 0;
1262
-                    if ($post_option== "decrypt" && $record['status'] === 'encrypted') {
1262
+                    if ($post_option == "decrypt" && $record['status'] === 'encrypted') {
1263 1263
                         $addFile = 1;
1264 1264
                     } elseif ($post_option == "encrypt" && $record['status'] === 'clear') {
1265 1265
                         $addFile = 1;
@@ -1551,7 +1551,7 @@  discard block
 block discarded – undo
1551 1551
                     $tmp_skfile,
1552 1552
                     $tmp_skfile.'.'.date(
1553 1553
                         "Y_m_d",
1554
-                        mktime(0, 0, 0, (int)date('m'), (int)date('d'), (int)date('y'))
1554
+                        mktime(0, 0, 0, (int) date('m'), (int) date('d'), (int) date('y'))
1555 1555
                     )
1556 1556
                 )) {
1557 1557
                     echo '[{"result" : "" , "error" : "Could NOT perform a copy of file: '.$tmp_skfile.'"}]';
@@ -2067,16 +2067,16 @@  discard block
 block discarded – undo
2067 2067
                         );
2068 2068
 
2069 2069
                         $debug_ldap .= 'Search filter (group): '.$filter_group."<br/>".
2070
-                          'Results : '.str_replace("\n","<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2070
+                          'Results : '.str_replace("\n", "<br>", print_r(ldap_get_entries($ldapconn, $result_group), true))."<br/>";
2071 2071
 
2072 2072
                         if ($result_group) {
2073 2073
                             $entries = ldap_get_entries($ldapconn, $result_group);
2074 2074
 
2075 2075
                             if ($entries['count'] > 0) {
2076 2076
                                 // Now check if group fits
2077
-                                for ($i=0; $i<$entries['count']; $i++) {
2078
-                                  $parsr=ldap_explode_dn($entries[$i]['dn'], 0);
2079
-                                  if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2077
+                                for ($i = 0; $i < $entries['count']; $i++) {
2078
+                                  $parsr = ldap_explode_dn($entries[$i]['dn'], 0);
2079
+                                  if (str_replace(array('CN=', 'cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) {
2080 2080
                                     $GroupRestrictionEnabled = true;
2081 2081
                                     break;
2082 2082
                                   }
@@ -2089,7 +2089,7 @@  discard block
 block discarded – undo
2089 2089
                     }
2090 2090
 
2091 2091
                     $debug_ldap .= 'Search filter : '.$filter."<br/>".
2092
-                            'Results : '.str_replace("\n","<br>", print_r(ldap_get_entries($ldapconn, $result), true))."<br/>";
2092
+                            'Results : '.str_replace("\n", "<br>", print_r(ldap_get_entries($ldapconn, $result), true))."<br/>";
2093 2093
 
2094 2094
                     if (ldap_count_entries($ldapconn, $result)) {
2095 2095
                         // try auth
Please login to merge, or discard this patch.
install/upgrade_run_2.1.27.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -206,8 +206,8 @@
 block discarded – undo
206 206
     "INT(12) NOT NULL AUTO_INCREMENT, ADD PRIMARY KEY (`increment_id`)"
207 207
 );
208 208
 if ($res === true) {
209
-  // Change name of field
210
-  mysqli_query($db_link, "ALTER TABLE `".$pre."misc` CHANGE `id` `increment_id` INT(12) NOT NULL AUTO_INCREMENT");
209
+    // Change name of field
210
+    mysqli_query($db_link, "ALTER TABLE `".$pre."misc` CHANGE `id` `increment_id` INT(12) NOT NULL AUTO_INCREMENT");
211 211
 } elseif ($res === false) {
212 212
     echo '[{"finish":"1", "msg":"", "error":"An error appears when adding increment_id user_ip to table misc! '.mysqli_error($db_link).'!"}]';
213 213
     mysqli_close($db_link);
Please login to merge, or discard this patch.