Completed
Push — master ( 614b63...a2526c )
by Jacob
03:14
created
controller/waterfalls/DefaultWaterfallListController.class.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		$county_result = CountyCollector::getCountyList();
42 42
 		$county_list = array();
43 43
 		
44
-		foreach($county_result as $county_row)
44
+		foreach ($county_result as $county_row)
45 45
 		{
46 46
 			$county = new stdclass();
47 47
 			$county->name = $county_row->name;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		$watercourse_result = WatercourseCollector::getWatercourseList();
55 55
 		$watercourse_list = array();
56 56
 		
57
-		foreach($watercourse_result as $watercourse_row)
57
+		foreach ($watercourse_result as $watercourse_row)
58 58
 		{
59 59
 			$watercourse = new stdclass();
60 60
 			$watercourse->name = $watercourse_row->name;
Please login to merge, or discard this patch.
controller/waterfalls/ContactController.class.inc.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,16 +33,16 @@  discard block
 block discarded – undo
33 33
 
34 34
 	private function process_form()
35 35
 	{
36
-		if(!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
36
+		if (!Request::hasPost() || Request::getPost('submit') != 'Send Message!')
37 37
 			return (object) array('display' => 'normal');
38 38
 		
39 39
 		Loader::load('utility', 'Validate');
40 40
 		$error_result = array();
41
-		if(!Validate::checkRequest('post', 'name', 'string'))
41
+		if (!Validate::checkRequest('post', 'name', 'string'))
42 42
 			$error_result['name'] = 'please enter your name';
43
-		if(!Validate::checkRequest('post', 'email', 'string'))
43
+		if (!Validate::checkRequest('post', 'email', 'string'))
44 44
 			$error_result['email'] = 'please enter a valid email';
45
-		if(!Validate::checkRequest('post', 'message', 'string'))
45
+		if (!Validate::checkRequest('post', 'message', 'string'))
46 46
 			$error_result['message'] = 'please write a message';
47 47
 		
48 48
 		$values = (object) array(
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			'email' => Request::getPost('email'),
51 51
 			'message' => Request::getPost('message'));
52 52
 		
53
-		if(count($error_result) > 0)
53
+		if (count($error_result) > 0)
54 54
 		{
55 55
 			return (object) array(
56 56
 				'display' => 'error',
Please login to merge, or discard this 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.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -58,16 +58,16 @@
 block discarded – undo
58 58
 				'values' => $values);
59 59
 		}
60 60
 
61
-    global $container;
62
-    $sent = $container['mail']
63
-      ->addTo($container['config']->admin_email)
64
-      ->setSubject('Waterfall Site Contact')
65
-      ->setPlainMessage(
66
-        "Name: {$values->name}\n" .
67
-        "Email: {$values->email}\n" .
68
-        "Message: {$values->message}"
69
-      )
70
-      ->send();
61
+	global $container;
62
+	$sent = $container['mail']
63
+	  ->addTo($container['config']->admin_email)
64
+	  ->setSubject('Waterfall Site Contact')
65
+	  ->setPlainMessage(
66
+		"Name: {$values->name}\n" .
67
+		"Email: {$values->email}\n" .
68
+		"Message: {$values->message}"
69
+	  )
70
+	  ->send();
71 71
 
72 72
 		return (object) array('display' => 'success');
73 73
 	}
Please login to merge, or discard this patch.
controller/waterfalls/LogTagListController.class.inc.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 		$alias = URLDecode::getPiece(3);
28 28
 		$this->tag = LogTagCollector::getTag($alias);
29 29
 		
30
-		if(!$this->tag)
30
+		if (!$this->tag)
31 31
 			$this->eject();
32 32
 		
33 33
 		parent::__construct();
Please login to merge, or discard this 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.
controller/waterfalls/WatercourseListController.class.inc.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 		$path = URLDecode::getPiece(1);
30 30
 		$this->watercourse = WatercourseCollector::getByAlias($path);
31 31
 		
32
-		if(!$this->watercourse)
32
+		if (!$this->watercourse)
33 33
 			$this->eject();
34 34
 	
35 35
 		parent::__construct();
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,9 @@
 block discarded – undo
29 29
 		$path = URLDecode::getPiece(1);
30 30
 		$this->watercourse = WatercourseCollector::getByAlias($path);
31 31
 		
32
-		if(!$this->watercourse)
33
-			$this->eject();
32
+		if(!$this->watercourse) {
33
+					$this->eject();
34
+		}
34 35
 	
35 36
 		parent::__construct();
36 37
 	}
Please login to merge, or discard this patch.
controller/waterfalls/DefaultListController.class.inc.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
 	abstract protected function get_initial_meta();
96 96
 	abstract protected function get_subsequent_meta();
97 97
 
98
-    final protected function set_body_data($page_type = 'normal')
99
-    {
100
-        parent::set_body_data($page_type);
98
+	final protected function set_body_data($page_type = 'normal')
99
+	{
100
+		parent::set_body_data($page_type);
101 101
 		
102 102
 		$this->set_body('view', $this->get_list_view());
103 103
 		$this->set_body('data', $this->get_list_body_data());
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	{
108 108
 		$body_data_array = array();
109 109
 		
110
-        $body_data_array['introduction'] = $this->get_introduction();
110
+		$body_data_array['introduction'] = $this->get_introduction();
111 111
 		$body_data_array['items'] = array_map(array($this, 'format_item'), $this->get_items());
112 112
 		$body_data_array['navigation'] = array(
113 113
 				'description' => $this->get_list_description(),
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  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)
23
+		if (count($items) < 1)
24 24
 			$this->eject();
25 25
 	}
26 26
 
27 27
 	final protected function get_page_number()
28 28
 	{
29 29
 		$page = $this->get_page_number_piece();
30
-		if(isset($page) && is_numeric($page))
30
+		if (isset($page) && is_numeric($page))
31 31
 			return $page;
32 32
 		return 1;
33 33
 	}
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
 	final private function get_introduction()
43 43
 	{
44
-		if($this->page == 1)
44
+		if ($this->page == 1)
45 45
 			return $this->get_initial_introduction();
46 46
 		
47 47
 		return $this->get_subsequent_introduction();
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	private $items;
54 54
 	protected function get_items()
55 55
 	{
56
-		if(!isset($this->items))
56
+		if (!isset($this->items))
57 57
 		{
58 58
 			$total = $this->get_item_count_per_page();
59 59
 			$offset = ($this->page - 1) * $this->get_item_count_per_page();
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	private $item_count;
69 69
 	final private function get_item_count()
70 70
 	{
71
-		if(!isset($this->item_count))
71
+		if (!isset($this->item_count))
72 72
 			$this->item_count = $this->get_item_count_result();
73 73
 		return $this->item_count;
74 74
 	}
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		$this->set_head('next_link', $this->get_list_next_link());
83 83
 		$this->set_head('previous_link', $this->get_list_prev_link());
84 84
 		
85
-		if($this->page == 1)
85
+		if ($this->page == 1)
86 86
 			$meta_array = $this->get_initial_meta();
87 87
 		else
88 88
 			$meta_array = $this->get_subsequent_meta();
@@ -119,16 +119,16 @@  discard block
 block discarded – undo
119 119
 
120 120
 	final private function get_list_prev_link()
121 121
 	{
122
-		if($this->page == 1)
122
+		if ($this->page == 1)
123 123
 			return;
124
-		if($this->page == 2)
124
+		if ($this->page == 2)
125 125
 			return $this->get_list_link_root();
126 126
 		return $this->get_list_link_root() . ($this->page - 1) . '/';
127 127
 	}
128 128
 
129 129
 	final private function get_list_next_link()
130 130
 	{
131
-		if(($this->page * $this->get_item_count_per_page()) >= $this->get_item_count())
131
+		if (($this->page * $this->get_item_count_per_page()) >= $this->get_item_count())
132 132
 			return;
133 133
 		return $this->get_list_link_root() . ($this->page + 1) . '/';
134 134
 	}
@@ -139,27 +139,27 @@  discard block
 block discarded – undo
139 139
 	{
140 140
 		$link_array = array();
141 141
 		
142
-		if($this->get_item_count_per_page() >= $this->get_item_count())
142
+		if ($this->get_item_count_per_page() >= $this->get_item_count())
143 143
 			return $link_array;
144 144
 		
145 145
 		$link = new stdclass();
146 146
 		$link->anchor = '&laquo; previous';
147
-		if($this->get_list_prev_link() !== null)
147
+		if ($this->get_list_prev_link() !== null)
148 148
 			$link->uri = $this->get_list_prev_link();
149 149
 		else
150 150
 			$link->class = 'inactive';
151 151
 		$link_array[] = $link;
152 152
 		
153
-		for($i = 1; $i <= ceil($this->get_item_count() / $this->get_item_count_per_page()); $i++)
153
+		for ($i = 1; $i <= ceil($this->get_item_count() / $this->get_item_count_per_page()); $i++)
154 154
 		{
155 155
 			$link = new stdclass();
156 156
 			$link->anchor = $i;
157 157
 			
158
-			if($i == $this->page)
158
+			if ($i == $this->page)
159 159
 				$link->class = 'current';
160 160
 			else
161 161
 			{
162
-				if($i == 1)
162
+				if ($i == 1)
163 163
 					$link->uri = $this->get_list_link_root();
164 164
 				else
165 165
 					$link->uri = $this->get_list_link_root() . $i . '/';
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		
171 171
 		$link = new stdclass();
172 172
 		$link->anchor = 'next &raquo;';
173
-		if($this->get_list_next_link() !== null)
173
+		if ($this->get_list_next_link() !== null)
174 174
 			$link->uri = $this->get_list_next_link();
175 175
 		else
176 176
 			$link->class = 'inactive';
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
 	final protected function get_image_element($category, $path, $description, $size = 'small')
194 194
 	{
195
-		switch($size)
195
+		switch ($size)
196 196
 		{
197 197
 			case 'medium' :
198 198
 				$height = 375;
Please login to merge, or discard this 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/MapController.class.inc.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -6,62 +6,62 @@
 block discarded – undo
6 6
 final class MapController extends DefaultPageController
7 7
 {
8 8
 
9
-    private static $TITLE = 'Map of Upper Peninsula Waterfalls';
10
-    private static $DESCRIPTION = '';
11
-    private static $KEYWORD_ARRAY = array();
9
+	private static $TITLE = 'Map of Upper Peninsula Waterfalls';
10
+	private static $DESCRIPTION = '';
11
+	private static $KEYWORD_ARRAY = array();
12 12
 
13
-    private static $HIDE_ON_INITIAL_LOAD_LIST = array(
14
-        'Lower Tahquamenon Falls',
15
-        'Rainbow Falls',
16
-        'Sandstone Falls',
17
-        'Upper Tahquamenon Falls',
18
-    );
13
+	private static $HIDE_ON_INITIAL_LOAD_LIST = array(
14
+		'Lower Tahquamenon Falls',
15
+		'Rainbow Falls',
16
+		'Sandstone Falls',
17
+		'Upper Tahquamenon Falls',
18
+	);
19 19
 
20
-    public function __construct()
21
-    {
22
-        parent::__construct();
20
+	public function __construct()
21
+	{
22
+		parent::__construct();
23 23
 
24
-        $this->add_js('https://maps.googleapis.com/maps/api/js?sensor=false');
25
-        $this->add_waterfall_js();
26
-    }
24
+		$this->add_js('https://maps.googleapis.com/maps/api/js?sensor=false');
25
+		$this->add_waterfall_js();
26
+	}
27 27
 
28
-    protected function set_head_data()
29
-    {
30
-        parent::set_head_data();
28
+	protected function set_head_data()
29
+	{
30
+		parent::set_head_data();
31 31
         
32
-        $this->set_title(self::$TITLE . ' | ' . self::$WEBSITE_TITLE);
33
-        $this->set_description(self::$DESCRIPTION);
34
-        $this->set_keywords(self::$KEYWORD_ARRAY);
35
-    }
32
+		$this->set_title(self::$TITLE . ' | ' . self::$WEBSITE_TITLE);
33
+		$this->set_description(self::$DESCRIPTION);
34
+		$this->set_keywords(self::$KEYWORD_ARRAY);
35
+	}
36 36
 
37
-    protected function set_body_data($page_type = 'wide')
38
-    {
39
-        parent::set_body_data($page_type);
37
+	protected function set_body_data($page_type = 'wide')
38
+	{
39
+		parent::set_body_data($page_type);
40 40
         
41
-        $this->set_head('full_page_map', true);
42
-        $this->set_body('waterfall_list', $this->fetch_waterfall_list());
43
-        $this->set_body('view', 'Map');
44
-    }
41
+		$this->set_head('full_page_map', true);
42
+		$this->set_body('waterfall_list', $this->fetch_waterfall_list());
43
+		$this->set_body('view', 'Map');
44
+	}
45 45
 
46
-    private function fetch_waterfall_list()
47
-    {
48
-        $list = WaterfallCollector::getMapList();
49
-        array_walk($list, array($this, 'parse_waterfall'));
50
-        return $list;
51
-    }
46
+	private function fetch_waterfall_list()
47
+	{
48
+		$list = WaterfallCollector::getMapList();
49
+		array_walk($list, array($this, 'parse_waterfall'));
50
+		return $list;
51
+	}
52 52
 
53
-    private function parse_waterfall(&$waterfall)
54
-    {
55
-        $waterfall = (object) array(
56
-            'name'  => $waterfall->name,
57
-            'latitude' => $waterfall->latitude,
58
-            'longitude' => $waterfall->longitude,
59
-            'link' => "/{$waterfall->watercourse_alias}/{$waterfall->alias}/",
60
-            'image' => "/photo/{$waterfall->photo_category}/{$waterfall->photo}-size-medium.jpg",
61
-            'image_alt' => $waterfall->photo_description,
62
-            'watercourse' => $waterfall->watercourse,
63
-            'hide_on_initial_load' => (in_array($waterfall->name, self::$HIDE_ON_INITIAL_LOAD_LIST)),
64
-        );
65
-    }
53
+	private function parse_waterfall(&$waterfall)
54
+	{
55
+		$waterfall = (object) array(
56
+			'name'  => $waterfall->name,
57
+			'latitude' => $waterfall->latitude,
58
+			'longitude' => $waterfall->longitude,
59
+			'link' => "/{$waterfall->watercourse_alias}/{$waterfall->alias}/",
60
+			'image' => "/photo/{$waterfall->photo_category}/{$waterfall->photo}-size-medium.jpg",
61
+			'image_alt' => $waterfall->photo_description,
62
+			'watercourse' => $waterfall->watercourse,
63
+			'hide_on_initial_load' => (in_array($waterfall->name, self::$HIDE_ON_INITIAL_LOAD_LIST)),
64
+		);
65
+	}
66 66
 
67 67
 }
Please login to merge, or discard this patch.
controller/waterfalls/CompanionListController.class.inc.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 		$alias = URLDecode::getPiece(2);
28 28
 		$this->companion = CompanionCollector::getByAlias($alias);
29 29
 		
30
-		if(!$this->companion)
30
+		if (!$this->companion)
31 31
 			$this->eject();
32 32
 		
33 33
 		parent::__construct();
Please login to merge, or discard this 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/blog/PostController.class.inc.php 3 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 		parent::__construct();
28 28
 		
29 29
 		$this->post = PostCollector::getPostByURI(URLDecode::getPiece(2));
30
-		if($this->post == null)
30
+		if ($this->post == null)
31 31
 			$this->eject();
32 32
 		
33 33
 		$this->handle_comment_submit(
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		$keyword_array = array();
90 90
 		$keywords = $this->tags;
91 91
 		
92
-		foreach($keywords as $keyword)
92
+		foreach ($keywords as $keyword)
93 93
 		{
94 94
 			$keyword_array[] = $keyword->tag;
95 95
 		}
@@ -103,16 +103,16 @@  discard block
 block discarded – undo
103 103
 	private function get_series_posts()
104 104
 	{
105 105
 		$series_posts = $this->fetch_series_posts();
106
-		if(count($series_posts) < 1)
106
+		if (count($series_posts) < 1)
107 107
 			return array();
108 108
 		
109 109
 		$previous_post = new stdclass();
110 110
 		$next_post = new stdclass();
111 111
 		
112 112
 		$found_current_post = false;
113
-		foreach($series_posts as $post_row)
113
+		foreach ($series_posts as $post_row)
114 114
 		{
115
-			if($post_row->post == $this->post->id)
115
+			if ($post_row->post == $this->post->id)
116 116
 			{
117 117
 				$found_current_post = true;
118 118
 				continue;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
 			$post->url = Loader::getRootUrl('blog') . "{$post_row->category}/{$post_row->path}/";
134 134
 			
135
-			if(!$found_current_post)
135
+			if (!$found_current_post)
136 136
 				$previous_post = $post;
137 137
 			else
138 138
 			{
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	private $series_posts;
152 152
 	private function fetch_series_posts()
153 153
 	{
154
-		if(!isset($this->series_posts))
154
+		if (!isset($this->series_posts))
155 155
 			$this->series_posts = SeriesCollector::getSeriesForPost($this->post->id);
156 156
 		return $this->series_posts;
157 157
 	}
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
 	private function get_related_posts()
160 160
 	{
161 161
 		$tag_array = array();
162
-		foreach($this->tags as $tag)
162
+		foreach ($this->tags as $tag)
163 163
 		{
164 164
 			$tag_array[] = $tag->id;
165 165
 		}
166 166
 		
167 167
 		$series_posts = $this->fetch_series_posts();
168 168
 		$exclude_post_array = array();
169
-		foreach($series_posts as $series_post)
169
+		foreach ($series_posts as $series_post)
170 170
 		{
171 171
 			$exclude_post_array[] = $series_post->post;
172 172
 		}
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		$post_array = array();
175 175
 		$post_result = PostCollector::getRelatedPosts($this->post->id, $tag_array, $exclude_post_array);
176 176
 		
177
-		foreach($post_result as $post_row)
177
+		foreach ($post_result as $post_row)
178 178
 		{
179 179
 			$post = new stdclass();
180 180
 			$post->title = $post_row->title;
Please login to merge, or discard this patch.
Braces   +12 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@  discard block
 block discarded – undo
27 27
 		parent::__construct();
28 28
 		
29 29
 		$this->post = PostCollector::getPostByURI(URLDecode::getPiece(2));
30
-		if($this->post == null)
31
-			$this->eject();
30
+		if($this->post == null) {
31
+					$this->eject();
32
+		}
32 33
 		
33 34
 		$this->handle_comment_submit(
34 35
 			self::$BLOG_SITE_ID,
@@ -103,8 +104,9 @@  discard block
 block discarded – undo
103 104
 	private function get_series_posts()
104 105
 	{
105 106
 		$series_posts = $this->fetch_series_posts();
106
-		if(count($series_posts) < 1)
107
-			return array();
107
+		if(count($series_posts) < 1) {
108
+					return array();
109
+		}
108 110
 		
109 111
 		$previous_post = new stdclass();
110 112
 		$next_post = new stdclass();
@@ -132,9 +134,9 @@  discard block
 block discarded – undo
132 134
 
133 135
 			$post->url = Loader::getRootUrl('blog') . "{$post_row->category}/{$post_row->path}/";
134 136
 			
135
-			if(!$found_current_post)
136
-				$previous_post = $post;
137
-			else
137
+			if(!$found_current_post) {
138
+							$previous_post = $post;
139
+			} else
138 140
 			{
139 141
 				$next_post = $post;
140 142
 				break;
@@ -151,8 +153,9 @@  discard block
 block discarded – undo
151 153
 	private $series_posts;
152 154
 	private function fetch_series_posts()
153 155
 	{
154
-		if(!isset($this->series_posts))
155
-			$this->series_posts = SeriesCollector::getSeriesForPost($this->post->id);
156
+		if(!isset($this->series_posts)) {
157
+					$this->series_posts = SeriesCollector::getSeriesForPost($this->post->id);
158
+		}
156 159
 		return $this->series_posts;
157 160
 	}
158 161
 
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 		$this->set_keywords($this->get_post_keywords());
49 49
 		$this->set_author(self::$AUTHOR);
50 50
 
51
-    $photo = Content::instance('FetchFirstPhoto', $this->post->body)->activate(true);
52
-    $photo = preg_match('/^<img src="([a-z-:\.\/]+)" [^>]+>$/', $photo, $matches);
53
-    $this->set_head('thumbnail', $matches[1]);
51
+	$photo = Content::instance('FetchFirstPhoto', $this->post->body)->activate(true);
52
+	$photo = preg_match('/^<img src="([a-z-:\.\/]+)" [^>]+>$/', $photo, $matches);
53
+	$this->set_head('thumbnail', $matches[1]);
54 54
 
55 55
 		if (array_key_exists($this->post->id, self::$DEPRECATED_BLOGS)) {
56 56
 			$log_id = self::$DEPRECATED_BLOGS[$this->post->id];
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
 			
125 125
 			$post = new stdclass();
126 126
 
127
-      if (strpos($post_row->title, 'Rainy Supe Loop') === 0) {
128
-        $title = $post_row->title;
129
-        $title = explode(':', $title);
130
-        $title = array_pop($title);
131
-        $title = trim($title);
132
-        $post->title = $title;
133
-      } else if (strpos($post_row->title, 'Isle Royale') === 0) {
127
+	  if (strpos($post_row->title, 'Rainy Supe Loop') === 0) {
128
+		$title = $post_row->title;
129
+		$title = explode(':', $title);
130
+		$title = array_pop($title);
131
+		$title = trim($title);
132
+		$post->title = $title;
133
+	  } else if (strpos($post_row->title, 'Isle Royale') === 0) {
134 134
 				$title = $post_row->title;
135 135
 				$title = explode(',', $title);
136 136
 				$title = array_pop($title);
Please login to merge, or discard this patch.
controller/blog/AboutController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 		Loader::load('collector', 'blog/IntroductionCollector');
37 37
 		$introduction_result = IntroductionCollector::getRow('about');
38 38
 		
39
-		if($introduction_result !== null)
39
+		if ($introduction_result !== null)
40 40
 		{
41 41
 			$introduction = array();
42 42
 			$introduction['title'] = $introduction_result->title;
Please login to merge, or discard this patch.