Code Duplication    Length = 10-10 lines in 2 locations

class/db.php 1 location

@@ 371-380 (lines=10) @@
368
     * handleImageEdit function
369
     * @return void
370
     */
371
    public function handleImageEdit()
372
    {
373
        global $xoopsDB;
374
        for ($i = 0, $iMax = count($_POST['id']); $i < $iMax; ++$i) {
375
            $id     = (int)$_POST['id'][$i];
376
            $desc   = $_POST['imgdesc'][$i];
377
            $sql    = 'UPDATE ' . $xoopsDB->prefix('smallworld_images') . " SET `desc` = '" . addslashes($desc) . "' WHERE `id`='" . $id . "'";
378
            $result = $xoopsDB->queryF($sql);
379
        }
380
    }
381
382
    /**
383
     * updateInspection function

class/SmallWorldDB.php 1 location

@@ 374-383 (lines=10) @@
371
     * handleImageEdit function
372
     * @return void
373
     */
374
    public function handleImageEdit()
375
    {
376
        global $xoopsDB;
377
        for ($i = 0, $iMax = count($_POST['id']); $i < $iMax; ++$i) {
378
            $id     = (int)$_POST['id'][$i];
379
            $desc   = $_POST['imgdesc'][$i];
380
            $sql    = 'UPDATE ' . $xoopsDB->prefix('smallworld_images') . " SET `desc` = '" . addslashes($desc) . "' WHERE `id`='" . $id . "'";
381
            $result = $xoopsDB->queryF($sql);
382
        }
383
    }
384
385
    /**
386
     * updateInspection function