Code Duplication    Length = 8-11 lines in 2 locations

functions.php 2 locations

@@ 492-502 (lines=11) @@
489
 *
490
 * @access public
491
 */
492
function xhelpDeleteMeta($key)
493
{
494
    $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
495
    $sql = sprintf("DELETE FROM %s WHERE metakey=%s", $xoopsDB->prefix('xhelp_meta'), $xoopsDB->quoteString($key));
496
    $ret = $xoopsDB->query($sql);
497
    if(!$ret) {
498
        return false;
499
    } else {
500
        return $ret;
501
    }
502
}
503
504
/**
505
 * Does the supplied email belong to an existing xoops user
@@ 917-924 (lines=8) @@
914
 * @return RESOURCE SQL query resource
915
 * @access public
916
 */
917
function xhelpRemoveDBField($table, $column)
918
{
919
    $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
920
    $sql = sprintf('ALTER TABLE %s DROP COLUMN `%s`', $xoopsDB->prefix($table), $column);
921
    $ret = $xoopsDB->query($sql);
922
923
    return $ret;
924
}
925
926
/**
927
 * Mark all staff accounts as being updated