Code Duplication    Length = 8-9 lines in 2 locations

controller/images/HomeController.class.inc.php 1 location

@@ 19-26 (lines=8) @@
16
	{
17
		$file = URLDecode::getURI();
18
		
19
		if(
20
			URLDecode::getSite() == 'images' ||
21
			URLDecode::getExtension() == 'ico')
22
			$file = "/css/{$file}";
23
		else if(URLDecode::getSite() == 'portfolio')
24
			$file = "/portfolio/{$file}";
25
		else if(substr($file, 0, 7) == '/photo/')
26
			$file = '/photo/processed/' . substr($file, 7);
27
		
28
		$this->use_old_image_logic($file);
29
		

router/Router.class.inc.php 1 location

@@ 113-121 (lines=9) @@
110
		if($this->get_primary_folder() == 'images') {
111
			$file = $controller_check;//URLDecode::getURI();
112
113
			if (
114
				URLDecode::getSite() == 'images' ||
115
				URLDecode::getExtension() == 'ico') {
116
				$file = "/css/{$file}";
117
			} else if (URLDecode::getSite() == 'portfolio') {
118
				$file = "/portfolio/{$file}";
119
			} else if (substr($file, 0, 7) == '/photo/') {
120
				$file = '/photo/processed/' . substr($file, 7);
121
			}
122
123
			$image = new ImageOld($file);
124
        	        if(!$image->isValid()) {