@@ -740,7 +740,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | } |
| 337 | 337 | $passwordClear = $_SERVER['PHP_AUTH_PW']; |
| 338 | 338 | $pwdOldEncryption = encryptOld($_SERVER['PHP_AUTH_PW']); |
| 339 | - }else{ |
|
| 339 | + } else { |
|
| 340 | 340 | $passwordClear = htmlspecialchars_decode($dataReceived['pw']); |
| 341 | 341 | $pwdOldEncryption = encryptOld(htmlspecialchars_decode($dataReceived['pw'])); |
| 342 | 342 | $username = $antiXss->xss_clean(htmlspecialchars_decode($dataReceived['login'])); |
@@ -487,9 +487,9 @@ discard block |
||
| 487 | 487 | |
| 488 | 488 | if ($entries['count'] > 0) { |
| 489 | 489 | // Now check if group fits |
| 490 | - for ($i=0; $i<$entries['count']; $i++) { |
|
| 491 | - $parsr=ldap_explode_dn($entries[$i]['dn'], 0); |
|
| 492 | - if (str_replace(array('CN=','cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) { |
|
| 490 | + for ($i = 0; $i < $entries['count']; $i++) { |
|
| 491 | + $parsr = ldap_explode_dn($entries[$i]['dn'], 0); |
|
| 492 | + if (str_replace(array('CN=', 'cn='), '', $parsr[0]) === $SETTINGS['ldap_usergroup']) { |
|
| 493 | 493 | $GroupRestrictionEnabled = true; |
| 494 | 494 | break; |
| 495 | 495 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'request_access_to_item' => 'Request access for this item', |
| 18 | 18 | 'request_access_to_item_info' => 'Provide the reason why you want to access this item', |
| 19 | 19 | 'send_request' => 'Send request', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'request_access_to_item' => 'Request access for this item', |
| 18 | 18 | 'request_access_to_item_info' => 'Provide the reason why you want to access this item', |
| 19 | 19 | 'send_request' => 'Send request', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'request_access_to_item' => 'Request access for this item', |
| 18 | 18 | 'request_access_to_item_info' => 'Provide the reason why you want to access this item', |
| 19 | 19 | 'send_request' => 'Send request', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'request_access_to_item' => 'Request access for this item', |
| 18 | 18 | 'request_access_to_item_info' => 'Provide the reason why you want to access this item', |
| 19 | 19 | 'send_request' => 'Send request', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'request_access_to_item' => 'Request access for this item', |
| 18 | 18 | 'request_access_to_item_info' => 'Provide the reason why you want to access this item', |
| 19 | 19 | 'send_request' => 'Send request', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'request_access_to_item' => 'Request access for this item', |
| 18 | 18 | 'request_access_to_item_info' => 'Provide the reason why you want to access this item', |
| 19 | 19 | 'send_request' => 'Send request', |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 14 | 14 | */ |
| 15 | 15 | global $LANG; |
| 16 | -$LANG = array ( |
|
| 16 | +$LANG = array( |
|
| 17 | 17 | 'request_access_to_item' => 'Request access for this item', |
| 18 | 18 | 'request_access_to_item_info' => 'Provide the reason why you want to access this item', |
| 19 | 19 | 'send_request' => 'Send request', |