Code Duplication    Length = 7-7 lines in 2 locations

class/SwDatabase.php 2 locations

@@ 157-163 (lines=7) @@
154
     * saveImage function
155
     * @param $values
156
     */
157
    public function saveImage($values)
158
    {
159
        global $xoopsUser, $xoopsDB;
160
        $myts   = \MyTextSanitizer::getInstance();
161
        $sql    = 'INSERT INTO ' . $xoopsDB->prefix('smallworld_images') . ' VALUES (' . $values . ')';
162
        $result = $xoopsDB->queryF($sql);
163
    }
164
165
    /**
166
     * DeleteImage function
@@ 170-176 (lines=7) @@
167
     * @param int    $userid
168
     * @param string $imagename
169
     */
170
    public function DeleteImage($userid, $imagename)
171
    {
172
        global $xoopsUser, $xoopsDB;
173
        $myts   = \MyTextSanitizer::getInstance();
174
        $sql    = 'DELETE FROM ' . $xoopsDB->prefix('smallworld_images') . " WHERE imgname = '" . stripslashes($imagename) . "' AND userid='" . $userid . "'";
175
        $result = $xoopsDB->queryF($sql);
176
    }
177
178
    /**
179
     * handlePosts function