Code Duplication    Length = 10-11 lines in 2 locations

programs/vacadma.php 2 locations

@@ 409-419 (lines=11) @@
406
			{
407
				$agent = new absences_Agent;
408
				$agent->setRow($arr);
409
				if ($agent->addRight($right))
410
				{
411
					try {
412
						$agent->addFixedEntry($right);
413
					} 
414
					catch(absences_EntryException $e)
415
					{
416
						$page->addError($agent->getName().' : '.$e->getMessage());
417
						$agent->removeRight($right);
418
					}
419
				}
420
			}
421
		}
422
		
@@ 806-815 (lines=10) @@
803
		{
804
		    bab_setTimeLimit(10);
805
			$agent = absences_Agent::getFromIdUser($userids[$i]);
806
			if ($agent->addRight($right))
807
			{
808
				try {
809
					$agent->addFixedEntry($right);
810
				} catch(absences_EntryException $e)
811
				{
812
					$babBody->addError($agent->getName().' : '.$e->getMessage());
813
					$agent->removeRight($right);
814
				}
815
			}
816
		}
817
	}
818