@@ -107,7 +107,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
@@ -220,9 +220,9 @@ discard block |
||
| 220 | 220 | if (val[4] !== "") { |
| 221 | 221 | newList += '<span id="encryt_data_'+val[1]+'" style="margin-left:4px; cursor:pointer;">'; |
| 222 | 222 | if (val[4] === "1") { |
| 223 | - newList += '<i class="fa fa-key tip" title="<?php echo $LANG['encrypted_data'];?>"></i>'; |
|
| 223 | + newList += '<i class="fa fa-key tip" title="<?php echo $LANG['encrypted_data']; ?>"></i>'; |
|
| 224 | 224 | } else if (val[4] === "0") { |
| 225 | - newList += '<span class="fa-stack tip" title="<?php echo $LANG['not_encrypted_data'];?>">'+ |
|
| 225 | + newList += '<span class="fa-stack tip" title="<?php echo $LANG['not_encrypted_data']; ?>">'+ |
|
| 226 | 226 | '<span class="fa fa-key fa-stack-1x"></span><span class="fa fa-ban fa-stack-1x fa-lg" style="color:red;"></span></span>'; |
| 227 | 227 | } |
| 228 | 228 | newList += '</span>' |
@@ -231,20 +231,20 @@ discard block |
||
| 231 | 231 | if (val[6] !== "") { |
| 232 | 232 | newList += '<span style="margin-left:4px;">'; |
| 233 | 233 | if (val[6] === "text") { |
| 234 | - newList += '<span class="fa fa-paragraph tip" title="<?php echo $LANG['text'];?>"></span>'; |
|
| 234 | + newList += '<span class="fa fa-paragraph tip" title="<?php echo $LANG['text']; ?>"></span>'; |
|
| 235 | 235 | } else if (val[6] === "textarea") { |
| 236 | - newList += '<span class="fa fa-align-justify tip" title="<?php echo $LANG['textarea'];?>"></span>'; |
|
| 236 | + newList += '<span class="fa fa-align-justify tip" title="<?php echo $LANG['textarea']; ?>"></span>'; |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | if (val[7] === "1") { |
| 240 | - newList += ' <span class="fa fa-eye-slash tip" title="<?php echo $LANG['data_is_masked'];?>"></ispan>'; |
|
| 240 | + newList += ' <span class="fa fa-eye-slash tip" title="<?php echo $LANG['data_is_masked']; ?>"></ispan>'; |
|
| 241 | 241 | } |
| 242 | 242 | newList += '</span>' |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | // Manage display Roles visibility |
| 246 | 246 | newList += '<td colspan="1" style="border-bottom:1px solid #a0a0a0;">' + |
| 247 | - '<?php echo $LANG['visible_by'];?>: <span style="font-family:italic;">' + val[8] + |
|
| 247 | + '<?php echo $LANG['visible_by']; ?>: <span style="font-family:italic;">' + val[8] + |
|
| 248 | 248 | '</span><input type="hidden" id="roleVisibilityList_'+val[1]+'" value="' + val[9] + '" /></td></tr>'; |
| 249 | 249 | } |
| 250 | 250 | }); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | $("#categories_list").html(newList); |
| 256 | 256 | } else { |
| 257 | 257 | $("#no_category") |
| 258 | - .html("<?php echo addslashes($LANG['no_category_defined']);?>") |
|
| 258 | + .html("<?php echo addslashes($LANG['no_category_defined']); ?>") |
|
| 259 | 259 | .removeClass("hidden"); |
| 260 | 260 | } |
| 261 | 261 | $('.tip').tooltipster({multiple: true}); |
@@ -1101,8 +1101,8 @@ discard block |
||
| 1101 | 1101 | function(data) { |
| 1102 | 1102 | data = prepareExchangedData(data , "decode", "<?php echo $_SESSION['key']; ?>"); |
| 1103 | 1103 | |
| 1104 | - var html_admin_by = '<option value="">-- <?php echo addslashes($LANG['select']);?> --</option>', |
|
| 1105 | - html_roles = '<option value="">-- <?php echo addslashes($LANG['select']);?> --</option>', |
|
| 1104 | + var html_admin_by = '<option value="">-- <?php echo addslashes($LANG['select']); ?> --</option>', |
|
| 1105 | + html_roles = '<option value="">-- <?php echo addslashes($LANG['select']); ?> --</option>', |
|
| 1106 | 1106 | selected_admin_by = 0, |
| 1107 | 1107 | selected_role = 0; |
| 1108 | 1108 | |
@@ -1113,7 +1113,7 @@ discard block |
||
| 1113 | 1113 | if (data[i].selected_role === 1) { |
| 1114 | 1114 | selected_role = data[i].id; |
| 1115 | 1115 | } |
| 1116 | - html_admin_by += '<option value="'+data[i].id+'"><?php echo addslashes($LANG['managers_of']." ");?>'+data[i].title+'</option>'; |
|
| 1116 | + html_admin_by += '<option value="'+data[i].id+'"><?php echo addslashes($LANG['managers_of']." "); ?>'+data[i].title+'</option>'; |
|
| 1117 | 1117 | html_roles += '<option value="'+data[i].id+'">'+data[i].title+'</option>'; |
| 1118 | 1118 | } |
| 1119 | 1119 | $("#ldap_new_user_is_administrated_by").append(html_admin_by); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | $roleVisibility = $LANG['every_roles']; |
| 242 | 242 | } else { |
| 243 | 243 | $roleVisibility = ''; |
| 244 | - foreach(explode(',', $field['role_visibility']) as $role) { |
|
| 244 | + foreach (explode(',', $field['role_visibility']) as $role) { |
|
| 245 | 245 | $data = DB::queryFirstRow( |
| 246 | 246 | "SELECT title |
| 247 | 247 | FROM ".$pre."roles_title |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | <input type="text" id="catOrd_'.$field['id'].'" size="1" class="category_order" value="'.$field['order'].'" /> |
| 461 | 461 | <input type="radio" name="sel_item" id="item_'.$field['id'].'_cat" /> |
| 462 | 462 | <label for="item_'.$field['id'].'_cat" id="item_'.$field['id'].'">'.($field['title']).'</label> |
| 463 | - <span id="encryt_data_'.$field['id'].'" style="margin-left:4px; cursor:pointer;">'. (isset($field['encrypted_data']) && $field['encrypted_data'] === "1") ? '<i class="fa fa-key tip" title="'.$LANG['encrypted_data'].'" onclick="changeEncrypMode(\''.$field['id'].'\', \'1\')"></i>' : '<span class="fa-stack" title="'.$LANG['not_encrypted_data'].'" onclick="changeEncrypMode(\''.$field['id'].'\', \'0\')"><i class="fa fa-key fa-stack-1x"></i><i class="fa fa-ban fa-stack-1x fa-lg" style="color:red;"></i></span>'. ' |
|
| 463 | + <span id="encryt_data_'.$field['id'].'" style="margin-left:4px; cursor:pointer;">'.(isset($field['encrypted_data']) && $field['encrypted_data'] === "1") ? '<i class="fa fa-key tip" title="'.$LANG['encrypted_data'].'" onclick="changeEncrypMode(\''.$field['id'].'\', \'1\')"></i>' : '<span class="fa-stack" title="'.$LANG['not_encrypted_data'].'" onclick="changeEncrypMode(\''.$field['id'].'\', \'0\')"><i class="fa fa-key fa-stack-1x"></i><i class="fa fa-ban fa-stack-1x fa-lg" style="color:red;"></i></span>'.' |
|
| 464 | 464 | </span>'; |
| 465 | 465 | if (isset($field['type'])) { |
| 466 | 466 | if ($field['type'] === "text") { |
@@ -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 | 'position_in_list' => 'Position in list', |
| 18 | 18 | 'visible_by' => 'Visible by', |
| 19 | 19 | 'restrict_visibility_to' => 'Restrict visibility to', |
@@ -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 | 'visible_by' => 'Visible by', |
| 18 | 18 | 'restrict_visibility_to' => 'Restrict visibility to', |
| 19 | 19 | 'every_roles' => 'Every roles', |
@@ -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 | 'position_in_list' => 'Position', |
| 18 | 18 | 'visible_by' => 'Visible par', |
| 19 | 19 | 'restrict_visibility_to' => 'Uniquement visible par', |
@@ -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 | 'position_in_list' => 'Position in list', |
| 18 | 18 | 'visible_by' => 'Visible by', |
| 19 | 19 | 'restrict_visibility_to' => 'Restrict visibility to', |
@@ -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 | 'position_in_list' => 'Position in list', |
| 18 | 18 | 'visible_by' => 'Visible by', |
| 19 | 19 | 'restrict_visibility_to' => 'Restrict visibility to', |
@@ -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 | 'position_in_list' => 'Position in list', |
| 18 | 18 | 'visible_by' => 'Visible by', |
| 19 | 19 | 'restrict_visibility_to' => 'Restrict visibility to', |