Code Duplication    Length = 19-19 lines in 2 locations

programs/utilit/right.class.php 2 locations

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