Completed
Branch master (d966c0)
by Florian
02:20
created
code/SecionIO.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -85,6 +85,9 @@
 block discarded – undo
85 85
 		return false;
86 86
 	}
87 87
 	
88
+	/**
89
+	 * @param string $banExpression
90
+	 */
88 91
 	private static function performFlush($banExpression) {
89 92
 		
90 93
 		$success = true;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 		$image = Image::get()->byID($imageID);
33 33
 		if ($image && $image->exists()) {
34 34
 			$exp 	= 'obj.http.x-url ~ "^/' . preg_quote($image->getFilename()) . '$"'; // image itself
35
-			$exp 	.= ' || obj.http.x-url ~ "^/' . preg_quote($image->Parent()->getFilename())
35
+			$exp .= ' || obj.http.x-url ~ "^/' . preg_quote($image->Parent()->getFilename())
36 36
 					. '_resampled/(.*)\-' . preg_quote($image->Name) . '$"'; // resampled versions
37 37
 			return self::performFlush($exp);
38 38
 		}
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 				);
152 152
 				
153 153
 				// prepare API call
154
-				$fetch = new RestfulService (
154
+				$fetch = new RestfulService(
155 155
 					$url,
156 156
 					0 // expiry time 0: do not cache the API call
157 157
 				);
@@ -181,10 +181,10 @@  discard block
 block discarded – undo
181 181
 				$conn = $fetch->request(null, 'POST', null, $headers, $options);
182 182
 				
183 183
 				if ($conn->isError()) {
184
-					SS_Log::log("SectionIO::performFlush :: ".$conn->getStatusCode()." : ".$conn->getStatusDescription(), SS_Log::WARN);
184
+					SS_Log::log("SectionIO::performFlush :: " . $conn->getStatusCode() . " : " . $conn->getStatusDescription(), SS_Log::WARN);
185 185
 					$success = $success && false;
186 186
 				} else {
187
-					SS_Log::log("SectionIO::performFlush :: ban successful. application ID: ".$application_id."; ban expression: '".$banExpression."'", SS_Log::NOTICE);
187
+					SS_Log::log("SectionIO::performFlush :: ban successful. application ID: " . $application_id . "; ban expression: '" . $banExpression . "'", SS_Log::NOTICE);
188 188
 				}
189 189
 			}
190 190
 		}
Please login to merge, or discard this patch.