Completed
Push — master ( 34318d...75f992 )
by Jacob
03:35
created
controller/site/ContactController.class.inc.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,15 +29,19 @@
 block discarded – undo
29 29
 
30 30
 	private function get_form_results()
31 31
 	{
32
-		if(!Request::hasPost())
33
-			return array();
32
+		if(!Request::hasPost()) {
33
+					return array();
34
+		}
34 35
 		
35
-		if(!Validate::checkRequest('post', 'name', 'string'))
36
-			$error_message['name'] = 'Please enter a value for your name.';
37
-		if(!Validate::checkRequest('post', 'email', 'string'))
38
-			$error_message['email'] = 'Please enter a valid email address.';
39
-		if(!Validate::checkRequest('post', 'message', 'string'))
40
-			$error_message['message'] = 'Please enter a message.';
36
+		if(!Validate::checkRequest('post', 'name', 'string')) {
37
+					$error_message['name'] = 'Please enter a value for your name.';
38
+		}
39
+		if(!Validate::checkRequest('post', 'email', 'string')) {
40
+					$error_message['email'] = 'Please enter a valid email address.';
41
+		}
42
+		if(!Validate::checkRequest('post', 'message', 'string')) {
43
+					$error_message['message'] = 'Please enter a message.';
44
+		}
41 45
 		
42 46
 		if(!empty($error_message))
43 47
 		{
Please login to merge, or discard this patch.
controller/site/DefaultPageController.class.inc.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,14 +56,16 @@
 block discarded – undo
56 56
 	{
57 57
 		$current_uri = URLDecode::getPiece(1);
58 58
 		
59
-		if(!isset($current_uri))
60
-			return 'About';
59
+		if(!isset($current_uri)) {
60
+					return 'About';
61
+		}
61 62
 		
62 63
 		$menu = self::$MENU;
63 64
 		foreach($menu as $link)
64 65
 		{
65
-			if($link['uri'] == $current_uri)
66
-				return $link['name'];
66
+			if($link['uri'] == $current_uri) {
67
+							return $link['name'];
68
+			}
67 69
 		}
68 70
 		
69 71
 		return 'About';
Please login to merge, or discard this patch.
controller/sitemap/PortfolioSitemapController.class.inc.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,10 +18,11 @@
 block discarded – undo
18 18
 		
19 19
 		foreach($pieces as $piece)
20 20
 		{
21
-			if($piece->category == 1)
22
-				$this->addURL("web/{$piece->title_url}/", date('Y-01-01'), 'yearly', .7);
23
-			else
24
-				$this->addURL("print/{$piece->title_url}/", date('Y-01-01'), 'yearly', .7);
21
+			if($piece->category == 1) {
22
+							$this->addURL("web/{$piece->title_url}/", date('Y-01-01'), 'yearly', .7);
23
+			} else {
24
+							$this->addURL("print/{$piece->title_url}/", date('Y-01-01'), 'yearly', .7);
25
+			}
25 26
 		}
26 27
 	}
27 28
 
Please login to merge, or discard this patch.
controller/waterfalls/CompanionListController.class.inc.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
 		$alias = URLDecode::getPiece(2);
28 28
 		$this->companion = CompanionCollector::getByAlias($alias);
29 29
 		
30
-		if(!$this->companion)
31
-			$this->eject();
30
+		if(!$this->companion) {
31
+					$this->eject();
32
+		}
32 33
 		
33 34
 		parent::__construct();
34 35
 	}
Please login to merge, or discard this patch.
controller/waterfalls/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.
controller/waterfalls/CountyListController.class.inc.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@
 block discarded – undo
28 28
 		$path = URLDecode::getPiece(1);
29 29
 		$this->county = CountyCollector::getByAlias($path);
30 30
 		
31
-		if(!$this->county)
32
-			$this->eject();
31
+		if(!$this->county) {
32
+					$this->eject();
33
+		}
33 34
 		
34 35
 		parent::__construct();
35 36
 	}
Please login to merge, or discard this patch.
controller/waterfalls/DefaultListController.class.inc.php 1 patch
Braces   +47 added lines, -35 removed lines patch added patch discarded remove patch
@@ -20,15 +20,17 @@  discard block
 block discarded – undo
20 20
 		$this->offset = ($this->page - 1) * $this->get_item_count_per_page();
21 21
 		
22 22
 		$items = $this->get_items();
23
-		if(count($items) < 1)
24
-			$this->eject();
23
+		if(count($items) < 1) {
24
+					$this->eject();
25
+		}
25 26
 	}
26 27
 
27 28
 	final protected function get_page_number()
28 29
 	{
29 30
 		$page = $this->get_page_number_piece();
30
-		if(isset($page) && is_numeric($page))
31
-			return $page;
31
+		if(isset($page) && is_numeric($page)) {
32
+					return $page;
33
+		}
32 34
 		return 1;
33 35
 	}
34 36
 
@@ -41,8 +43,9 @@  discard block
 block discarded – undo
41 43
 
42 44
 	final private function get_introduction()
43 45
 	{
44
-		if($this->page == 1)
45
-			return $this->get_initial_introduction();
46
+		if($this->page == 1) {
47
+					return $this->get_initial_introduction();
48
+		}
46 49
 		
47 50
 		return $this->get_subsequent_introduction();
48 51
 	}
@@ -68,8 +71,9 @@  discard block
 block discarded – undo
68 71
 	private $item_count;
69 72
 	final private function get_item_count()
70 73
 	{
71
-		if(!isset($this->item_count))
72
-			$this->item_count = $this->get_item_count_result();
74
+		if(!isset($this->item_count)) {
75
+					$this->item_count = $this->get_item_count_result();
76
+		}
73 77
 		return $this->item_count;
74 78
 	}
75 79
 
@@ -82,10 +86,11 @@  discard block
 block discarded – undo
82 86
 		$this->set_head('next_link', $this->get_list_next_link());
83 87
 		$this->set_head('previous_link', $this->get_list_prev_link());
84 88
 		
85
-		if($this->page == 1)
86
-			$meta_array = $this->get_initial_meta();
87
-		else
88
-			$meta_array = $this->get_subsequent_meta();
89
+		if($this->page == 1) {
90
+					$meta_array = $this->get_initial_meta();
91
+		} else {
92
+					$meta_array = $this->get_subsequent_meta();
93
+		}
89 94
 		
90 95
 		$this->set_title($meta_array['title']);
91 96
 		$this->set_description($meta_array['description']);
@@ -119,17 +124,20 @@  discard block
 block discarded – undo
119 124
 
120 125
 	final private function get_list_prev_link()
121 126
 	{
122
-		if($this->page == 1)
123
-			return;
124
-		if($this->page == 2)
125
-			return $this->get_list_link_root();
127
+		if($this->page == 1) {
128
+					return;
129
+		}
130
+		if($this->page == 2) {
131
+					return $this->get_list_link_root();
132
+		}
126 133
 		return $this->get_list_link_root() . ($this->page - 1) . '/';
127 134
 	}
128 135
 
129 136
 	final private function get_list_next_link()
130 137
 	{
131
-		if(($this->page * $this->get_item_count_per_page()) >= $this->get_item_count())
132
-			return;
138
+		if(($this->page * $this->get_item_count_per_page()) >= $this->get_item_count()) {
139
+					return;
140
+		}
133 141
 		return $this->get_list_link_root() . ($this->page + 1) . '/';
134 142
 	}
135 143
 
@@ -139,15 +147,17 @@  discard block
 block discarded – undo
139 147
 	{
140 148
 		$link_array = array();
141 149
 		
142
-		if($this->get_item_count_per_page() >= $this->get_item_count())
143
-			return $link_array;
150
+		if($this->get_item_count_per_page() >= $this->get_item_count()) {
151
+					return $link_array;
152
+		}
144 153
 		
145 154
 		$link = new stdclass();
146 155
 		$link->anchor = '&laquo; previous';
147
-		if($this->get_list_prev_link() !== null)
148
-			$link->uri = $this->get_list_prev_link();
149
-		else
150
-			$link->class = 'inactive';
156
+		if($this->get_list_prev_link() !== null) {
157
+					$link->uri = $this->get_list_prev_link();
158
+		} else {
159
+					$link->class = 'inactive';
160
+		}
151 161
 		$link_array[] = $link;
152 162
 		
153 163
 		for($i = 1; $i <= ceil($this->get_item_count() / $this->get_item_count_per_page()); $i++)
@@ -155,14 +165,15 @@  discard block
 block discarded – undo
155 165
 			$link = new stdclass();
156 166
 			$link->anchor = $i;
157 167
 			
158
-			if($i == $this->page)
159
-				$link->class = 'current';
160
-			else
168
+			if($i == $this->page) {
169
+							$link->class = 'current';
170
+			} else
161 171
 			{
162
-				if($i == 1)
163
-					$link->uri = $this->get_list_link_root();
164
-				else
165
-					$link->uri = $this->get_list_link_root() . $i . '/';
172
+				if($i == 1) {
173
+									$link->uri = $this->get_list_link_root();
174
+				} else {
175
+									$link->uri = $this->get_list_link_root() . $i . '/';
176
+				}
166 177
 			}
167 178
 			
168 179
 			$link_array[] = $link;
@@ -170,10 +181,11 @@  discard block
 block discarded – undo
170 181
 		
171 182
 		$link = new stdclass();
172 183
 		$link->anchor = 'next &raquo;';
173
-		if($this->get_list_next_link() !== null)
174
-			$link->uri = $this->get_list_next_link();
175
-		else
176
-			$link->class = 'inactive';
184
+		if($this->get_list_next_link() !== null) {
185
+					$link->uri = $this->get_list_next_link();
186
+		} else {
187
+					$link->class = 'inactive';
188
+		}
177 189
 		$link_array[] = $link;
178 190
 		
179 191
 		return $link_array;
Please login to merge, or discard this patch.
controller/waterfalls/LogController.class.inc.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
         $log_path = URLDecode::getPiece(2);
26 26
         
27 27
         $this->log = LogCollector::getByAlias($log_path);
28
-        if(!$this->log)
29
-            $this->eject();
28
+        if(!$this->log) {
29
+                    $this->eject();
30
+        }
30 31
 
31 32
         $this->parent_navigation_item = 'journal';
32 33
         
@@ -182,8 +183,9 @@  discard block
 block discarded – undo
182 183
     {
183 184
         $album = array();
184 185
         
185
-        if($this->log->album == 0)
186
-            return $album;
186
+        if($this->log->album == 0) {
187
+                    return $album;
188
+        }
187 189
         
188 190
         $photo_list = AlbumCollector::getPhotoListForAlbum($this->log->album);
189 191
         foreach($photo_list as $photo)
@@ -192,10 +194,11 @@  discard block
 block discarded – undo
192 194
             $photo_array['full_link'] = sprintf(self::$FULL_IMAGE_LINK, $photo->category, $photo->name);
193 195
             $photo_array['description'] = $photo->description;
194 196
             
195
-            if($photo->height < $photo->width)
196
-                list($height, $width) = array(75, 100);
197
-            else
198
-                list($height, $width) = array(100, 75);
197
+            if($photo->height < $photo->width) {
198
+                            list($height, $width) = array(75, 100);
199
+            } else {
200
+                            list($height, $width) = array(100, 75);
201
+            }
199 202
             
200 203
             if ($photo->description == '') {
201 204
                 Debugger::logMessage("No description for {$photo->category}/{$photo->name}");
Please login to merge, or discard this patch.
controller/waterfalls/LogTagListController.class.inc.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
 		$alias = URLDecode::getPiece(3);
28 28
 		$this->tag = LogTagCollector::getTag($alias);
29 29
 		
30
-		if(!$this->tag)
31
-			$this->eject();
30
+		if(!$this->tag) {
31
+					$this->eject();
32
+		}
32 33
 		
33 34
 		parent::__construct();
34 35
 	}
Please login to merge, or discard this patch.