x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.
Completed
Push — master ( 3bc018...c23a2d )
by Jacob
03:34
created
utility/content/FetchFirstPhotoContent.class.inc.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,10 +11,11 @@  discard block
 block discarded – undo
11 11
 
12 12
 	protected function execute($is_absolute = false, $size = 'thumb')
13 13
 	{
14
-		if(preg_match(self::$PHOTO_PLACEHOLDER_MATCH, $this->content, $match) === 1)
15
-			$this->content = $this->get_thumb($match[1], $is_absolute, $size);
16
-		else
17
-			$this->content = self::$DEFAULT_RETURN;
14
+		if(preg_match(self::$PHOTO_PLACEHOLDER_MATCH, $this->content, $match) === 1) {
15
+					$this->content = $this->get_thumb($match[1], $is_absolute, $size);
16
+		} else {
17
+					$this->content = self::$DEFAULT_RETURN;
18
+		}
18 19
 		return;
19 20
 	}
20 21
 
@@ -34,16 +35,18 @@  discard block
 block discarded – undo
34 35
 		
35 36
 		Loader::load('collector', 'image/PhotoCollector');
36 37
 		$photo_result = PhotoCollector::fetchRow($category, $photo);
37
-		if($photo_result == false)
38
-			return '';
38
+		if($photo_result == false) {
39
+					return '';
40
+		}
39 41
 		
40 42
 		$height = $file_size[1];
41 43
 		$width = $file_size[0];
42 44
 		$description = $photo_result->description;
43 45
 		
44 46
 		$domain = '/';
45
-		if($is_absolute)
46
-			$domain = Loader::getRootURL(URLDecode::getSite());
47
+		if($is_absolute) {
48
+					$domain = Loader::getRootURL(URLDecode::getSite());
49
+		}
47 50
 
48 51
 		return sprintf(self::$IMAGE_NODE, $domain, $category, $photo, $size, $extension, $height, $width, $description);
49 52
 	}
Please login to merge, or discard this patch.