Code Duplication    Length = 15-15 lines in 2 locations

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
}

programs/utilit/agent.class.php 1 location

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