Code Duplication    Length = 5-5 lines in 3 locations

programs/utilit/right.act.php 3 locations

@@ 187-191 (lines=5) @@
184
		
185
		if(empty(self::$post['id']))
186
		{
187
			if (absences_Right::REPORT === (int) self::$post['kind'])
188
			{
189
				$babBody->addError(absences_translate("A report right cannot be created by a manager, they are created automaticaly after expiration of a right"));
190
				return false;
191
			}
192
			
193
			if (absences_Right::RECOVERY === (int) self::$post['kind'])
194
			{
@@ 193-197 (lines=5) @@
190
				return false;
191
			}
192
			
193
			if (absences_Right::RECOVERY === (int) self::$post['kind'])
194
			{
195
				$babBody->addError(absences_translate("A recovery right cannot be created by a manager, they are created after approval of a workingday entitling recovery"));
196
				return false;
197
			}
198
		}
199
		
200
		
@@ 584-588 (lines=5) @@
581
				return false;
582
			}
583
	
584
			if($right->date_begin_fixed != '0000-00-00 00:00:00' && absences_Right::FIXED !== (int) self::$post['kind'])
585
				{
586
				$babBody->addError(absences_translate("A fixed vacation right cannot be changed to another right because vacation entries can be associated with it, please delete the right to remove all vacation entries created by this right"));
587
				return false;
588
			}
589
	
590
			
591
			$fixedModified = self::isFixedModified($right);