Completed
Push — master ( a1f655...a0345d )
by Jacob
08:14
created
controller/AJAXController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
 	protected function set_response($message, $type = 'internal')
30 30
 	{
31
-		switch($type)
31
+		switch ($type)
32 32
 		{
33 33
 			case 'internal' :
34 34
 				$this->response['internal'] = $message;
Please login to merge, or discard this patch.
controller/lifestream/DefaultListController.class.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@
 block discarded – undo
55 55
 	final private function get_list_posts()
56 56
 	{
57 57
 		$post_array = array();
58
-		foreach($this->get_list_results() as $post)
58
+		foreach ($this->get_list_results() as $post)
59 59
 		{
60 60
 			$post_array[] = $this->expand_post($post, 'full');
61 61
 		}
62
-		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
62
+		if (count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
63 63
 			$this->eject();
64 64
 		return $post_array;
65 65
 	}
Please login to merge, or discard this patch.
controller/waterfalls/DefaultLogListController.class.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		$companion_result = CompanionCollector::getCompanionList();
43 43
 		$companion_list = array();
44 44
 		
45
-		foreach($companion_result as $companion_row)
45
+		foreach ($companion_result as $companion_row)
46 46
 		{
47 47
 			$companion = new stdclass();
48 48
 			$companion->name = $companion_row->name;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$period_result = PeriodCollector::getPeriodList();
56 56
 		$period_list = array();
57 57
 		
58
-		foreach($period_result as $period_row)
58
+		foreach ($period_result as $period_row)
59 59
 		{
60 60
 			$period = new stdclass();
61 61
 			$period->name = $period_row->name;
Please login to merge, or discard this patch.
controller/waterfalls/SearchListController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 	protected function get_page_number()
28 28
 	{
29 29
 		$page = URLDecode::getPiece(2);
30
-		if(isset($page) && is_numeric($page))
30
+		if (isset($page) && is_numeric($page))
31 31
 			return $page;
32 32
 		return 1;
33 33
 	}
Please login to merge, or discard this patch.
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/blog/DefaultListController.class.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@
 block discarded – undo
56 56
 	final private function get_list_posts()
57 57
 	{
58 58
 		$post_array = array();
59
-		foreach($this->get_list_results() as $post)
59
+		foreach ($this->get_list_results() as $post)
60 60
 		{
61 61
 			$post_array[] = $this->format_post($post, true);
62 62
 		}
63
-		if(count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
63
+		if (count($post_array) < 1 && URLDecode::getPiece(1) !== 'search')
64 64
 			$this->eject();
65 65
 		return $post_array;
66 66
 	}
Please login to merge, or discard this patch.
controller/site/DefaultPageController.class.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		$active_page = $this->get_active_page();
42 42
 		
43 43
 		$menu = array();
44
-		foreach(self::$MENU as $item)
44
+		foreach (self::$MENU as $item)
45 45
 		{
46 46
 			$menu[] = (object) array(
47 47
 				'name' => $item['name'],
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
 	{
57 57
 		$current_uri = URLDecode::getPiece(1);
58 58
 		
59
-		if(!isset($current_uri))
59
+		if (!isset($current_uri))
60 60
 			return 'About';
61 61
 		
62 62
 		$menu = self::$MENU;
63
-		foreach($menu as $link)
63
+		foreach ($menu as $link)
64 64
 		{
65
-			if($link['uri'] == $current_uri)
65
+			if ($link['uri'] == $current_uri)
66 66
 				return $link['name'];
67 67
 		}
68 68
 		
Please login to merge, or discard this patch.
utility/content/MarkupCodeContent.class.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 	protected function execute($title = '')
11 11
 	{
12 12
 		preg_match_all(self::$MARKUP_DELIMITER, $this->content, $matches);
13
-		if(count($matches[1]) == 0)
13
+		if (count($matches[1]) == 0)
14 14
 			return;
15 15
 		
16
-		foreach($matches[3] as $key => $match)
16
+		foreach ($matches[3] as $key => $match)
17 17
 		{
18 18
 			$replacement = $match;
19 19
 			$replacement = $this->wrap_in_list($replacement);
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	{
30 30
 		$content_array = explode("\n", $content);
31 31
 		
32
-		foreach($content_array as $key => $row)
32
+		foreach ($content_array as $key => $row)
33 33
 		{
34 34
 			$new_row = ($key % 2 == 0) ? '<li class="even">' : '<li class="odd">';
35 35
 			$new_row .= '<p>';
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 	private function highlight_code($content, $type)
48 48
 	{
49
-		switch($type)
49
+		switch ($type)
50 50
 		{
51 51
 			default :
52 52
 				return $content;
Please login to merge, or discard this patch.
utility/content/ElapsedTimeContent.class.inc.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -10,61 +10,61 @@
 block discarded – undo
10 10
 		$previous_time = strtotime($this->content);
11 11
 		$current_time = time();
12 12
 		
13
-		if($current_time <= $previous_time)
13
+		if ($current_time <= $previous_time)
14 14
 			$this->content = 'few seconds ago';
15
-		else if(($current_time - $previous_time) < 30)
15
+		else if (($current_time - $previous_time) < 30)
16 16
 			$this->content = 'few seconds ago';
17
-		else if(($current_time - $previous_time) < 1.5 * 60)
17
+		else if (($current_time - $previous_time) < 1.5 * 60)
18 18
 			$this->content = 'a minute ago';
19
-		else if(($current_time - $previous_time) < 4 * 60)
19
+		else if (($current_time - $previous_time) < 4 * 60)
20 20
 			$this->content = 'few minutes ago';
21
-		else if(($current_time - $previous_time) < 7 * 60)
21
+		else if (($current_time - $previous_time) < 7 * 60)
22 22
 			$this->content = 'five minutes ago';
23
-		else if(($current_time - $previous_time) < 12 * 60)
23
+		else if (($current_time - $previous_time) < 12 * 60)
24 24
 			$this->content = 'ten minutes ago';
25
-		else if(($current_time - $previous_time) < 17 * 60)
25
+		else if (($current_time - $previous_time) < 17 * 60)
26 26
 			$this->content = 'fifteen minutes ago';
27
-		else if(($current_time - $previous_time) < 22 * 60)
27
+		else if (($current_time - $previous_time) < 22 * 60)
28 28
 			$this->content = 'twenty minutes ago';
29
-		else if(($current_time - $previous_time) < 37 * 60)
29
+		else if (($current_time - $previous_time) < 37 * 60)
30 30
 			$this->content = 'half hour ago';
31
-		else if(($current_time - $previous_time) < 52 * 60)
31
+		else if (($current_time - $previous_time) < 52 * 60)
32 32
 			$this->content = 'forty-five minutes ago';
33
-		else if(($current_time - $previous_time) < 1.5 * 60 * 60)
33
+		else if (($current_time - $previous_time) < 1.5 * 60 * 60)
34 34
 			$this->content = 'an hour ago';
35
-		else if(($current_time - $previous_time) < 2.5 * 60 * 60)
35
+		else if (($current_time - $previous_time) < 2.5 * 60 * 60)
36 36
 			$this->content = 'two hours ago';
37
-		else if(($current_time - $previous_time) < 3.5 * 60 * 60)
37
+		else if (($current_time - $previous_time) < 3.5 * 60 * 60)
38 38
 			$this->content = 'three hours ago';
39
-		else if(($current_time - $previous_time) < 4.5 * 60 * 60)
39
+		else if (($current_time - $previous_time) < 4.5 * 60 * 60)
40 40
 			$this->content = 'few hours ago';
41
-		else if(($current_time - $previous_time) < 1 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) && date('a', $previous_time) == 'pm')
41
+		else if (($current_time - $previous_time) < 1 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) && date('a', $previous_time) == 'pm')
42 42
 			$this->content = 'this afternoon';
43
-		else if(($current_time - $previous_time) < 1 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) && date('a', $previous_time) == 'am')
43
+		else if (($current_time - $previous_time) < 1 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) && date('a', $previous_time) == 'am')
44 44
 			$this->content = 'this morning';
45
-		else if(($current_time - $previous_time) < 2 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 1 && date('a', $previous_time) == 'pm' && date('G', $previous_time) >= 17)
45
+		else if (($current_time - $previous_time) < 2 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 1 && date('a', $previous_time) == 'pm' && date('G', $previous_time) >= 17)
46 46
 			$this->content = 'yesterday evening';
47
-		else if(($current_time - $previous_time) < 2 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 1 && date('a', $previous_time) == 'pm')
47
+		else if (($current_time - $previous_time) < 2 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 1 && date('a', $previous_time) == 'pm')
48 48
 			$this->content = 'yesterday afternoon';
49
-		else if(($current_time - $previous_time) < 2 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 1 && date('a', $previous_time) == 'am')
49
+		else if (($current_time - $previous_time) < 2 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 1 && date('a', $previous_time) == 'am')
50 50
 			$this->content = 'yesterday morning';
51
-		else if(($current_time - $previous_time) < 3 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 2)
51
+		else if (($current_time - $previous_time) < 3 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 2)
52 52
 			$this->content = 'two days ago';
53
-		else if(($current_time - $previous_time) < 4 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 3)
53
+		else if (($current_time - $previous_time) < 4 * 24 * 60 * 60 && date('j', $current_time) == date('j', $previous_time) + 3)
54 54
 			$this->content = 'three days ago';
55
-		else if(($current_time - $previous_time) < 1 * 7 * 24 * 60 * 60 && date('W', $current_time) == date('W', $previous_time))
55
+		else if (($current_time - $previous_time) < 1 * 7 * 24 * 60 * 60 && date('W', $current_time) == date('W', $previous_time))
56 56
 			$this->content = 'earlier this week';
57
-		else if(($current_time - $previous_time) < 2 * 7 * 24 * 60 * 60 && date('W', $current_time) == date('W', $previous_time) + 1 && date('w', $previous_time) >= 3)
57
+		else if (($current_time - $previous_time) < 2 * 7 * 24 * 60 * 60 && date('W', $current_time) == date('W', $previous_time) + 1 && date('w', $previous_time) >= 3)
58 58
 			$this->content = 'late last week';
59
-		else if(($current_time - $previous_time) < 2 * 7 * 24 * 60 * 60 && date('W', $current_time) == date('W', $previous_time) + 1)
59
+		else if (($current_time - $previous_time) < 2 * 7 * 24 * 60 * 60 && date('W', $current_time) == date('W', $previous_time) + 1)
60 60
 			$this->content = 'early last week';
61
-		else if(($current_time - $previous_time) < 3 * 7 * 24 * 60 * 60)
61
+		else if (($current_time - $previous_time) < 3 * 7 * 24 * 60 * 60)
62 62
 			$this->content = 'few weeks ago';
63
-		else if(($current_time - $previous_time) < 1.25* 4 * 7 * 24 * 60 * 60 && date('n', $current_time) == date('n', $previous_time))
63
+		else if (($current_time - $previous_time) < 1.25 * 4 * 7 * 24 * 60 * 60 && date('n', $current_time) == date('n', $previous_time))
64 64
 			$this->content = 'earlier this month';
65
-		else if(($current_time - $previous_time) < 2 * 4 * 7 * 24 * 60 * 60 && date('n', $current_time) == date('n', $previous_time) + 1)
65
+		else if (($current_time - $previous_time) < 2 * 4 * 7 * 24 * 60 * 60 && date('n', $current_time) == date('n', $previous_time) + 1)
66 66
 			$this->content = 'last month';
67
-		else if(($current_time - $previous_time) < 4 * 4 * 7 * 24 * 60 * 60)
67
+		else if (($current_time - $previous_time) < 4 * 4 * 7 * 24 * 60 * 60)
68 68
 			$this->content = 'several months ago';
69 69
 		else
70 70
 			$this->content = 'long ago';
Please login to merge, or discard this patch.