Code Duplication    Length = 19-19 lines in 2 locations

programs/utilit/right.class.php 2 locations

@@ 922-940 (lines=19) @@
919
		
920
		// Disponibilite en fonction d'une date anterieure
921
		
922
		if ($this->earlier)
923
		{
924
			$f = $this->getDirFieldLabel($this->earlier);
925
			$cond = array();
926
			
927
			if ($this->earlier_begin_valid)
928
			{
929
				$cond[] = sprintf(absences_translate('%d years later "%s"'), $this->earlier_begin_valid, $f);
930
			} else {
931
				$cond[] = sprintf(absences_translate('after "%s"'), $f);
932
			}
933
			
934
			if ($this->earlier_end_valid)
935
			{
936
				$cond[] = sprintf(absences_translate('in the %d years next to "%s"'), $this->earlier_end_valid, $f);
937
			} 
938
			
939
			$conditions[] = absences_translate('To request a period').' '.implode(' '.absences_translate('and').' ', $cond).'.';
940
		}
941
		
942
		
943
		// Disponibilite en fonction d'une date posterieure
@@ 945-963 (lines=19) @@
942
		
943
		// Disponibilite en fonction d'une date posterieure
944
		
945
		if ($this->later)
946
		{
947
			$f = $this->getDirFieldLabel($this->later);
948
			$cond = array();
949
			
950
			if ($this->later_begin_valid)
951
			{
952
				$cond[] = sprintf(absences_translate('in the %d years preceding "%s"'), $this->later_begin_valid, $f);
953
			} else {
954
				$cond[] = sprintf(absences_translate('after "%s"'), $f);
955
			}
956
			
957
			if ($this->later_end_valid)
958
			{
959
				$cond[] = sprintf(absences_translate('at least %d years before the "%s"'), $this->later_end_valid, $f);
960
			}
961
			
962
			$conditions[] = absences_translate('To request a period').' '.implode(' '.absences_translate('and').' ', $cond).'.';
963
		}
964
		
965
		if($this->delay_before)
966
		{