Code Duplication    Length = 15-15 lines in 2 locations

class/dbupdater.php 1 location

@@ 270-284 (lines=15) @@
267
     * @return bool true if success, false if an error occured
268
     *
269
     */
270
    public function createTable()
271
    {
272
        global $xoopsDB;
273
274
        $query = $this->getStructure();
275
276
        $ret = $xoopsDB->query($query);
277
        if (!$ret) {
278
            echo "<li class='err'>" . sprintf(_AM_SPARTNER_DB_MSG_CREATE_TABLE_ERR, $this->name()) . '</li>';
279
        } else {
280
            echo "<li class='ok'>" . sprintf(_AM_SPARTNER_DB_MSG_CREATE_TABLE, $this->name()) . '</li>';
281
        }
282
283
        return $ret;
284
    }
285
286
    /**
287
     * Use to drop a table

class/smartdbupdater.php 1 location

@@ 388-402 (lines=15) @@
385
     * @return bool true if success, false if an error occured
386
     *
387
     */
388
    public function createTable()
389
    {
390
        global $xoopsDB;
391
392
        $query = $this->getStructure();
393
394
        $ret = $xoopsDB->query($query);
395
        if (!$ret) {
396
            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()) . '<br>';
397
        } else {
398
            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CREATE_TABLE, $this->name()) . '<br>';
399
        }
400
401
        return $ret;
402
    }
403
404
    /**
405
     * Use to drop a table