Code Duplication    Length = 8-10 lines in 2 locations

programs/utilit/agent_right.class.php 1 location

@@ 1175-1182 (lines=8) @@
1172
	 * 
1173
	 * @return bool
1174
	 */
1175
	public function isAccessibleOnMonth()
1176
	{
1177
		require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php';
1178
		$begin = new BAB_DateTime(date('Y'), date('n'), 1);
1179
		$end = new BAB_DateTime(date('Y'), date('n'), date('t'), 23, 59, 59);
1180
		
1181
		return $this->isAccessibleOnPeriod($begin->getTimeStamp(), $end->getTimeStamp());
1182
	}
1183
	
1184
	
1185
	

programs/utilit/right.class.php 1 location

@@ 614-623 (lines=10) @@
611
	 *
612
	 * @return bool
613
	 */
614
	public function isAccessibleOnMonth()
615
	{
616
		require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php';
617
		$begin = new BAB_DateTime(date('Y'), date('n'), 1);
618
		$end = new BAB_DateTime(date('Y'), date('n'), date('t'), 23, 59, 59);
619
		
620
		$rightRule = $this->getRightRule();
621
	
622
		return $rightRule->isAccessibleOnPeriod($begin->getTimeStamp(), $end->getTimeStamp());
623
	}
624
	
625
	
626