Code Duplication    Length = 7-11 lines in 2 locations

install/upgrade_run_2.1.26.php 2 locations

@@ 258-264 (lines=7) @@
255
256
// change to 0 if auto_update_pwd_next_date empty in ITEMS table
257
$result = mysqli_query($dbTmp, "SELECT id FROM `".$_SESSION['pre']."items` WHERE auto_update_pwd_next_date = ''");
258
while ($row = mysqli_fetch_assoc($result)) {
259
    mysqli_query($dbTmp,
260
        "UPDATE `".$_SESSION['pre']."items`
261
        SET `auto_update_pwd_next_date` = '0'
262
        WHERE id = '".$row['id']."'"
263
    );
264
}
265
mysqli_free_result($result);
266
267
@@ 374-384 (lines=11) @@
371
    FROM `".$_SESSION['pre']."nested_tree`
372
    WHERE personal_folder = '1' AND nlevel = '1' AND parent_id = '0'"
373
);
374
while ($row = mysqli_fetch_assoc($result)) {
375
    // only change non numeric folder title
376
    if (!is_numeric($row['title'])) {
377
        mysqli_query(
378
            $dbTmp,
379
            "UPDATE `".$_SESSION['pre']."nested_tree`
380
            SET personal_folder = '0'
381
            WHERE id = '".$row['id']."'"
382
        );
383
    }
384
}
385
mysqli_free_result($result);
386
387