Completed
Push — master ( b1edf3...c330e2 )
by Jacob
03:28
created
utility/Asset.class.inc.php 1 patch
Braces   +25 added lines, -19 removed lines patch added patch discarded remove patch
@@ -103,12 +103,13 @@  discard block
 block discarded – undo
103 103
 
104 104
 	private static function process_complex_pieces($type, $array)
105 105
 	{
106
-		if(in_array(404, $array))
107
-			$site = '404';
108
-		else if(in_array(503, $array))
109
-			$site = '503';
110
-		else
111
-			$site = strtolower(URLDecode::getSite());
106
+		if(in_array(404, $array)) {
107
+					$site = '404';
108
+		} else if(in_array(503, $array)) {
109
+					$site = '503';
110
+		} else {
111
+					$site = strtolower(URLDecode::getSite());
112
+		}
112 113
 		
113 114
 		$final_path = self::get_final_path($type, $site);
114 115
 		
@@ -133,11 +134,13 @@  discard block
 block discarded – undo
133 134
 		{
134 135
 			$piece_path = self::get_piece_path($type, $file);
135 136
 			$contents .= file_get_contents($piece_path);
136
-			if(filemtime($final_path) < filemtime($piece_path))
137
-				$create_new = true;
137
+			if(filemtime($final_path) < filemtime($piece_path)) {
138
+							$create_new = true;
139
+			}
138 140
 		}
139
-		if($create_new)
140
-			return self::make_final_file($type, $contents, $file_name, true);
141
+		if($create_new) {
142
+					return self::make_final_file($type, $contents, $file_name, true);
143
+		}
141 144
 		
142 145
 		return self::get_final_link($type, $file_name);
143 146
 	}
@@ -147,8 +150,9 @@  discard block
 block discarded – undo
147 150
 		$path = Loader::getRoot() . "/{$type}/final/{$file}*";
148 151
 		
149 152
 		$files = glob($path); 
150
-		if(count($files) > 0)
151
-			return $files[0];
153
+		if(count($files) > 0) {
154
+					return $files[0];
155
+		}
152 156
 		return;
153 157
 	}
154 158
 
@@ -157,8 +161,9 @@  discard block
 block discarded – undo
157 161
 		$path = Loader::getRoot() . "/{$type}/piece/{$file}*";
158 162
 		
159 163
 		$files = glob($path);
160
-		if(count($files) > 0)
161
-			return $files[0];
164
+		if(count($files) > 0) {
165
+					return $files[0];
166
+		}
162 167
 		return;
163 168
 	}
164 169
 
@@ -174,9 +179,9 @@  discard block
 block discarded – undo
174 179
 				$version = substr($version, 2, strpos($version, '.') - 2);
175 180
 				$version++;
176 181
 				$file_name = substr($file_name, 0, strpos($file_name, '-v'));
177
-			}
178
-			else
179
-				$version = 2;
182
+			} else {
183
+							$version = 2;
184
+			}
180 185
 			$file_name .= "-v{$version}";
181 186
 		}
182 187
 		
@@ -193,8 +198,9 @@  discard block
 block discarded – undo
193 198
 		}
194 199
 		
195 200
 		file_put_contents($path, $contents);
196
-		if($exists)
197
-			unlink($old_file);
201
+		if($exists) {
202
+					unlink($old_file);
203
+		}
198 204
 		Debugger::logMessage("New {$type} file created - {$file_name}.");
199 205
 		return self::get_final_link($type, $file_name);
200 206
 	}
Please login to merge, or discard this patch.
utility/Search.class.inc.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,8 +42,9 @@  discard block
 block discarded – undo
42 42
 		foreach($this->result as $row)
43 43
 		{
44 44
 			$weight = $this->get_search_weight($row);
45
-			if($weight > 0)
46
-				$weighted_array[$row->id] = $weight;
45
+			if($weight > 0) {
46
+							$weighted_array[$row->id] = $weight;
47
+			}
47 48
 		}
48 49
 		arsort($weighted_array);
49 50
 		
@@ -52,8 +53,9 @@  discard block
 block discarded – undo
52 53
 		{
53 54
 			foreach($this->result as $row)
54 55
 			{
55
-				if($row->id == $id)
56
-					$final_array[] = $row;
56
+				if($row->id == $id) {
57
+									$final_array[] = $row;
58
+				}
57 59
 			}
58 60
 		}
59 61
 		return $final_array;
Please login to merge, or discard this patch.
utility/CronController.class.inc.php 1 patch
Braces   +14 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@  discard block
 block discarded – undo
26 26
 		{
27 27
 			//if(!$this->time_to_run($frequency))
28 28
 			//	continue;
29
-            if ($cron != 'TwitterCron') continue;
29
+            if ($cron != 'TwitterCron') {
30
+            	continue;
31
+            }
30 32
 			
31 33
 			Loader::load('utility', "cron/{$cron}");
32 34
 			$reflection = new ReflectionClass($cron);
@@ -51,18 +53,21 @@  discard block
 block discarded – undo
51 53
 		
52 54
 		foreach($time as $key => $value)
53 55
 		{
54
-			if($value == '*')
55
-				continue;
56
+			if($value == '*') {
57
+							continue;
58
+			}
56 59
 			if(stristr($value, '/'))
57 60
 			{
58 61
 				$value = substr($value, 2);
59
-				if($cur[$key] % $value == 0)
60
-					continue;
61
-				else
62
-					return;
62
+				if($cur[$key] % $value == 0) {
63
+									continue;
64
+				} else {
65
+									return;
66
+				}
63 67
 			}
64
-			if($cur[$key] == $value)
65
-				continue;
68
+			if($cur[$key] == $value) {
69
+							continue;
70
+			}
66 71
 			return;
67 72
 		}
68 73
 		return true;
Please login to merge, or discard this patch.
utility/Mail.class.inc.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,10 +20,11 @@
 block discarded – undo
20 20
 
21 21
 	public function setToAddress($email, $person = null)
22 22
 	{
23
-		if($person)
24
-			$this->to[] = "{$person} <{$email}>";
25
-		else
26
-			$this->to[] = "{$email}";
23
+		if($person) {
24
+					$this->to[] = "{$person} <{$email}>";
25
+		} else {
26
+					$this->to[] = "{$email}";
27
+		}
27 28
 		return $this;
28 29
 	}
29 30
 
Please login to merge, or discard this patch.
controller/lifestream/DefaultListController.class.inc.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,9 @@
 block discarded – undo
60 60
 		{
61 61
 			$post_array[] = $this->format_post($post, true);
62 62
 		}
63
-		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
64
-			$this->eject();
63
+		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search') {
64
+					$this->eject();
65
+		}
65 66
 		return $post_array;
66 67
 	}
67 68
 
Please login to merge, or discard this patch.
controller/home/ContactController.class.inc.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,17 +33,21 @@
 block discarded – undo
33 33
 
34 34
 	private function process_form()
35 35
 	{
36
-		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
37
-			return (object) array('display' => 'normal');
36
+		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!') {
37
+					return (object) array('display' => 'normal');
38
+		}
38 39
 		
39 40
 		Loader::load('utility', 'Validate');
40 41
 		$error_result = array();
41
-		if(!Validate::checkRequest('post', 'name', 'string'))
42
-			$error_result['name'] = 'please enter your name';
43
-		if(!Validate::checkRequest('post', 'email', 'string'))
44
-			$error_result['email'] = 'please enter a valid email';
45
-		if(!Validate::checkRequest('post', 'message', 'string'))
46
-			$error_result['message'] = 'please write a message';
42
+		if(!Validate::checkRequest('post', 'name', 'string')) {
43
+					$error_result['name'] = 'please enter your name';
44
+		}
45
+		if(!Validate::checkRequest('post', 'email', 'string')) {
46
+					$error_result['email'] = 'please enter a valid email';
47
+		}
48
+		if(!Validate::checkRequest('post', 'message', 'string')) {
49
+					$error_result['message'] = 'please write a message';
50
+		}
47 51
 		
48 52
 		$values = (object) array(
49 53
 			'name' => Request::getPost('name'),
Please login to merge, or discard this patch.