Code Duplication    Length = 13-13 lines in 2 locations

sources/import.queries.php 1 location

@@ 263-275 (lines=13) @@
260
            $item = explode('@|@', $item); //explode item to get all fields
261
262
            //Encryption key
263
            if ($personalFolder == 1) {
264
                $encrypt = cryption(
265
                    $item[2],
266
                    $_SESSION['user_settings']['session_psk'],
267
                    "encrypt"
268
                );
269
            } else {
270
                $encrypt = cryption(
271
                    $item[2],
272
                    "",
273
                    "encrypt"
274
                );
275
            }
276
277
            // Insert new item in table ITEMS
278
            DB::insert(

sources/items.queries.php 1 location

@@ 872-884 (lines=13) @@
869
                        }
870
                    }
871
                    // decrypt PW
872
                    if (empty($dataReceived['salt_key'])) {
873
                        $encrypt = cryption(
874
                            $dataItem['pw'],
875
                            "",
876
                            "encrypt"
877
                        );
878
                    } else {
879
                        $encrypt = cryption(
880
                            $dataItem['pw'],
881
                            $_SESSION['user_settings']['session_psk'],
882
                            "encrypt"
883
                        );
884
                    }
885
886
                    $pw = cleanString($encrypt['string']);
887
                    // generate 2d key