@@ -56,7 +56,7 @@ |
||
| 56 | 56 | } elseif (substr_count($val, '$pre = ') > 0) { |
| 57 | 57 | $_SESSION['pre'] = getSettingValue($val); |
| 58 | 58 | } elseif (substr_count($val, "define('SECUREPATH',") > 0) { |
| 59 | - $_SESSION['sk_file'] = substr($val, 23, strpos($val, ');')-24)."/sk.php"; |
|
| 59 | + $_SESSION['sk_file'] = substr($val, 23, strpos($val, ');') - 24)."/sk.php"; |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $config->setIgnoreHeaderLine("true"); |
| 138 | 138 | // extract data from CSV file |
| 139 | 139 | $interpreter = new Interpreter(); |
| 140 | - $interpreter->addObserver(function (array $row) use (&$valuesToImport) { |
|
| 140 | + $interpreter->addObserver(function(array $row) use (&$valuesToImport) { |
|
| 141 | 141 | $valuesToImport[] = array( |
| 142 | 142 | 'Label' => $row[0], |
| 143 | 143 | 'Login' => $row[1], |
@@ -966,7 +966,7 @@ discard block |
||
| 966 | 966 | break; |
| 967 | 967 | } |
| 968 | 968 | |
| 969 | -spl_autoload_register(function ($class) { |
|
| 969 | +spl_autoload_register(function($class) { |
|
| 970 | 970 | $prefix = 'League\\Csv\\'; |
| 971 | 971 | $base_dir = __DIR__.'/src/'; |
| 972 | 972 | $len = strlen($prefix); |
@@ -427,7 +427,7 @@ |
||
| 427 | 427 | } elseif (substr_count($val, '$pre') > 0) { |
| 428 | 428 | $pre = getSettingValue($val); |
| 429 | 429 | } elseif (substr_count($val, "define('SECUREPATH',") > 0) { |
| 430 | - $superGlobal->put("sk_file", substr($val, 23, strpos($val, ');')-24)."/sk.php", "SESSION"); |
|
| 430 | + $superGlobal->put("sk_file", substr($val, 23, strpos($val, ');') - 24)."/sk.php", "SESSION"); |
|
| 431 | 431 | } |
| 432 | 432 | } |
| 433 | 433 | } |
@@ -309,7 +309,7 @@ |
||
| 309 | 309 | BeforeUpload: function (up, file) { |
| 310 | 310 | $("#import_status_ajax_loader").show(); |
| 311 | 311 | up.settings.multipart_params = { |
| 312 | - "PHPSESSID":"<?php echo $_SESSION['user_id'];?>", |
|
| 312 | + "PHPSESSID":"<?php echo $_SESSION['user_id']; ?>", |
|
| 313 | 313 | "type_upload":"import_items_from_keypass", |
| 314 | 314 | "user_token": $("#import_user_token").val() |
| 315 | 315 | }; |
@@ -711,7 +711,7 @@ |
||
| 711 | 711 | utf8_encode( |
| 712 | 712 | "<?php |
| 713 | 713 | global \$SETTINGS; |
| 714 | -\$SETTINGS = array (" . $config_text . " |
|
| 714 | +\$SETTINGS = array (" . $config_text." |
|
| 715 | 715 | );" |
| 716 | 716 | ) |
| 717 | 717 | ); |
@@ -227,15 +227,15 @@ |
||
| 227 | 227 | } |
| 228 | 228 | $tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `_install` WHERE `key` = 'url_path'")); |
| 229 | 229 | if (intval($tmp) === 0) { |
| 230 | - mysqli_query($dbTmp, "INSERT INTO `_install` (`key`, `value`) VALUES ('url_path', '". empty($session_url_path) ? $db['url_path'] : $session_url_path. "');"); |
|
| 230 | + mysqli_query($dbTmp, "INSERT INTO `_install` (`key`, `value`) VALUES ('url_path', '".empty($session_url_path) ? $db['url_path'] : $session_url_path."');"); |
|
| 231 | 231 | } else { |
| 232 | 232 | mysqli_query($dbTmp, "UPDATE `_install` SET `value` = '", empty($session_url_path) ? $db['url_path'] : $session_url_path, "' WHERE `key` = 'url_path';"); |
| 233 | 233 | } |
| 234 | 234 | $tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `_install` WHERE `key` = 'abspath'")); |
| 235 | 235 | if (intval($tmp) === 0) { |
| 236 | - mysqli_query($dbTmp, "INSERT INTO `_install` (`key`, `value`) VALUES ('abspath', '". empty($session_abspath) ? $db['abspath'] : $session_abspath. "');"); |
|
| 236 | + mysqli_query($dbTmp, "INSERT INTO `_install` (`key`, `value`) VALUES ('abspath', '".empty($session_abspath) ? $db['abspath'] : $session_abspath."');"); |
|
| 237 | 237 | } else { |
| 238 | - mysqli_query($dbTmp, "UPDATE `_install` SET `value` = '". empty($session_abspath) ? $db['abspath'] : $session_abspath. "' WHERE `key` = 'abspath';"); |
|
| 238 | + mysqli_query($dbTmp, "UPDATE `_install` SET `value` = '".empty($session_abspath) ? $db['abspath'] : $session_abspath."' WHERE `key` = 'abspath';"); |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | echo '[{"error" : "", "result" : "Connection is successful", "multiple" : ""}]'; |
@@ -759,7 +759,7 @@ |
||
| 759 | 759 | utf8_encode( |
| 760 | 760 | "<?php |
| 761 | 761 | global \$SETTINGS; |
| 762 | -\$SETTINGS = array (" . $config_text . " |
|
| 762 | +\$SETTINGS = array (" . $config_text." |
|
| 763 | 763 | );" |
| 764 | 764 | ) |
| 765 | 765 | ); |
@@ -309,7 +309,7 @@ |
||
| 309 | 309 | BeforeUpload: function (up, file) { |
| 310 | 310 | $("#import_status_ajax_loader").show(); |
| 311 | 311 | up.settings.multipart_params = { |
| 312 | - "PHPSESSID":"<?php echo $_SESSION['user_id'];?>", |
|
| 312 | + "PHPSESSID":"<?php echo $_SESSION['user_id']; ?>", |
|
| 313 | 313 | "type_upload":"import_items_from_keypass", |
| 314 | 314 | "user_token": $("#import_user_token").val() |
| 315 | 315 | }; |
@@ -769,7 +769,7 @@ discard block |
||
| 769 | 769 | } |
| 770 | 770 | // Get IDs of personal folders |
| 771 | 771 | if (isset($SETTINGS['enable_pf_feature']) === true && $SETTINGS['enable_pf_feature'] === '1' |
| 772 | - && isset($_SESSION['personal_folder']) === true && $_SESSION['personal_folder'] === '1' |
|
| 772 | + && isset($_SESSION['personal_folder']) === true && $_SESSION['personal_folder'] === '1' |
|
| 773 | 773 | ) { |
| 774 | 774 | $persoFld = DB::queryfirstrow( |
| 775 | 775 | "SELECT id |
@@ -1925,7 +1925,7 @@ discard block |
||
| 1925 | 1925 | $antiXss = new protect\AntiXSS\AntiXSS(); |
| 1926 | 1926 | |
| 1927 | 1927 | // Protect against bad inputs |
| 1928 | - if (is_array($source_file) ||is_array($target_file)) { |
|
| 1928 | + if (is_array($source_file) || is_array($target_file)) { |
|
| 1929 | 1929 | return 'error_cannot_be_array'; |
| 1930 | 1930 | } |
| 1931 | 1931 | |
@@ -2082,7 +2082,7 @@ discard block |
||
| 2082 | 2082 | $newArr = array(); |
| 2083 | 2083 | |
| 2084 | 2084 | foreach ($arr as $key => $value) { |
| 2085 | - $newArr[ $key ] = (is_array($value) ? array_map_r($func, $value) : ( is_array($func) ? call_user_func_array($func, $value) : $func( $value ))); |
|
| 2085 | + $newArr[$key] = (is_array($value) ? array_map_r($func, $value) : (is_array($func) ? call_user_func_array($func, $value) : $func($value))); |
|
| 2086 | 2086 | } |
| 2087 | 2087 | |
| 2088 | 2088 | return $newArr; |