Code Duplication    Length = 15-15 lines in 2 locations

programs/utilit/agent.class.php 1 location

@@ 516-530 (lines=15) @@
513
	 * @param absences_Right $right
514
	 * @return boolean
515
	 */
516
	public function isLinkedToRight(absences_Right $right)
517
	{
518
		require_once dirname(__FILE__).'/agent_right.class.php';
519
520
		$link = new absences_AgentRight;
521
		$link->setAgent($this);
522
		$link->setRight($right);
523
		$row = $link->getRow();
524
525
		if ($row)
526
		{
527
			return true;
528
		}
529
		return false;
530
	}
531
532
533
	/**

programs/utilit/collection.class.php 1 location

@@ 225-239 (lines=15) @@
222
	 * @param absences_Right $right
223
	 * @return boolean
224
	 */
225
	public function isLinkedToRight(absences_Right $right)
226
	{
227
		require_once dirname(__FILE__).'/collection_right.class.php';
228
		
229
		$link = new absences_CollectionRight;
230
		$link->setCollection($this);
231
		$link->setRight($right);
232
		$row = $link->getRow();
233
		
234
		if ($row)
235
		{
236
			return true;
237
		}
238
		return false;
239
	}
240
	
241
	
242
}