Code Duplication    Length = 8-10 lines in 2 locations

programs/utilit/right.class.php 1 location

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

programs/utilit/agent_right.class.php 1 location

@@ 1184-1191 (lines=8) @@
1181
	 * 
1182
	 * @return bool
1183
	 */
1184
	public function isAccessibleOnMonth()
1185
	{
1186
		require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php';
1187
		$begin = new BAB_DateTime(date('Y'), date('n'), 1);
1188
		$end = new BAB_DateTime(date('Y'), date('n'), date('t'), 23, 59, 59);
1189
		
1190
		return $this->isAccessibleOnPeriod($begin->getTimeStamp(), $end->getTimeStamp());
1191
	}
1192
	
1193
	
1194