@@ -2085,7 +2085,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -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 |
@@ -1642,7 +1642,7 @@ |
||
| 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 | } |
@@ -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 | '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', |
@@ -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 | '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', |
@@ -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 | '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', |
@@ -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 | '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', |
@@ -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 | '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', |
@@ -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 | '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', |
@@ -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 | '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', |