Code Duplication    Length = 10-10 lines in 2 locations

class/oledrion_utils.php 1 location

@@ 1523-1532 (lines=10) @@
1520
     *
1521
     * @return object
1522
     */
1523
    public function getThisMonthCriteria()
1524
    {
1525
        $start             = mktime(0, 1, 0, date('n'), date('j'), date('Y'));
1526
        $end               = mktime(0, 0, 0, date('n'), date('t'), date('Y'));
1527
        $criteriaThisMonth = new CriteriaCompo();
1528
        $criteriaThisMonth->add(new Criteria('product_submitted', $start, '>='));
1529
        $criteriaThisMonth->add(new Criteria('product_submitted', $end, '<='));
1530
1531
        return $criteriaThisMonth;
1532
    }
1533
1534
    /**
1535
     * Retourne une liste d'objets XoopsUsers à partir d'une liste d'identifiants

class/utility.php 1 location

@@ 1666-1675 (lines=10) @@
1663
     *
1664
     * @return object
1665
     */
1666
    public static function getThisMonthCriteria()
1667
    {
1668
        $start             = mktime(0, 1, 0, date('n'), date('j'), date('Y'));
1669
        $end               = mktime(0, 0, 0, date('n'), date('t'), date('Y'));
1670
        $criteriaThisMonth = new CriteriaCompo();
1671
        $criteriaThisMonth->add(new Criteria('product_submitted', $start, '>='));
1672
        $criteriaThisMonth->add(new Criteria('product_submitted', $end, '<='));
1673
1674
        return $criteriaThisMonth;
1675
    }
1676
1677
    /**
1678
     * Retourne une liste d'objets XoopsUsers à partir d'une liste d'identifiants