Completed
Push — master ( bdeb23...871b7c )
by Jacob
05:36
created
controller/sitemap/BlogSitemapController.class.inc.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -9,19 +9,19 @@  discard block
 block discarded – undo
9 9
 final class BlogSitemapController extends SitemapController
10 10
 {
11 11
 
12
-	private static $HOME_PAGE_RANK			= .9;
13
-	private static $CATEGORY_PAGE_RANK		= .3;
14
-	private static $TAG_PAGE_RANK			= .2;
15
-	private static $PAGINATED_PAGE_RANK		= .1;
16
-	private static $POST_PAGE_RANK			= .8;
12
+	private static $HOME_PAGE_RANK = .9;
13
+	private static $CATEGORY_PAGE_RANK = .3;
14
+	private static $TAG_PAGE_RANK = .2;
15
+	private static $PAGINATED_PAGE_RANK = .1;
16
+	private static $POST_PAGE_RANK = .8;
17 17
 
18 18
 	private static $HOME_PAGE_CHANGEFREQ		= 'daily';
19
-	private static $CATEGORY_PAGE_CHANGEFREQ	= 'weekly';
19
+	private static $CATEGORY_PAGE_CHANGEFREQ = 'weekly';
20 20
 	private static $TAG_PAGE_CHANGEFREQ			= 'monthly';
21
-	private static $PAGINATED_PAGE_CHANGEFREQ	= 'monthly';
21
+	private static $PAGINATED_PAGE_CHANGEFREQ = 'monthly';
22 22
 	private static $POST_PAGE_CHANGEFREQ		= 'weekly';
23 23
 
24
-	private static $POSTS_PER_PAGE		= 10;
24
+	private static $POSTS_PER_PAGE = 10;
25 25
 
26 26
 	private static $CATEGORY_ARRAY = array(
27 27
 		'hiking',
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	{
51 51
 		$categories = self::$CATEGORY_ARRAY;
52 52
 		
53
-		foreach($categories as $category)
53
+		foreach ($categories as $category)
54 54
 		{
55 55
 			$post_count = PostCollector::getPostCountForCategory($category);
56 56
 			
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	{
64 64
 		$tags = TagCollector::getAllTags();
65 65
 		
66
-		foreach($tags as $tag)
66
+		foreach ($tags as $tag)
67 67
 		{
68 68
 			$post_count = PostCollector::getPostCountForTag($tag->id);
69 69
 			
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	{
77 77
 		$posts = PostCollector::getMainList(500);
78 78
 		
79
-		foreach($posts as $post)
79
+		foreach ($posts as $post)
80 80
 		{
81 81
 			$base_url = "{$post->category}/{$post->path}/";
82 82
 			$this->addURL($base_url, date('Y-m-d', strtotime('last Monday')), self::$POST_PAGE_CHANGEFREQ, self::$POST_PAGE_RANK);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
 	private function add_paginated_pages($post_count, $base_url, $changefreq, $rank)
87 87
 	{
88
-		switch($changefreq)
88
+		switch ($changefreq)
89 89
 		{
90 90
 			case 'daily' :
91 91
 				$lastmod = date('Y-m-d');
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		}
100 100
 		
101 101
 		$this->addURL($base_url, $lastmod, $changefreq, $rank);
102
-		for($i = 2; (($i - 1) * self::$POSTS_PER_PAGE) < $post_count; $i++)
102
+		for ($i = 2; (($i - 1) * self::$POSTS_PER_PAGE) < $post_count; $i++)
103 103
 		{
104 104
 			$this->addURL("{$base_url}{$i}/", date('Y-m-01'), self::$PAGINATED_PAGE_CHANGEFREQ, self::$PAGINATED_PAGE_RANK);
105 105
 		}
Please login to merge, or discard this patch.
controller/sitemap/LifestreamSitemapController.class.inc.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@  discard block
 block discarded – undo
7 7
 {
8 8
 
9 9
 	private static $HOME_PAGE_RANK			= .9;
10
-	private static $TAG_PAGE_RANK			= .3;
11
-	private static $PAGINATED_PAGE_RANK		= .1;
10
+	private static $TAG_PAGE_RANK = .3;
11
+	private static $PAGINATED_PAGE_RANK = .1;
12 12
 	private static $POST_PAGE_RANK			= .5;
13
-	private static $ABOUT_PAGE_RANK			= .7;
13
+	private static $ABOUT_PAGE_RANK = .7;
14 14
 
15 15
 	private static $HOME_PAGE_CHANGEFREQ		= 'hourly';
16 16
 	private static $TAG_PAGE_CHANGEFREQ			= 'daily';
17
-	private static $PAGINATED_PAGE_CHANGEFREQ	= 'daily';
17
+	private static $PAGINATED_PAGE_CHANGEFREQ = 'daily';
18 18
 	private static $POST_PAGE_CHANGEFREQ		= 'weekly';
19
-	private static $ABOUT_PAGE_CHANGEFREQ		= 'monthly';
19
+	private static $ABOUT_PAGE_CHANGEFREQ = 'monthly';
20 20
 
21 21
 	private static $POSTS_PER_PAGE = 15;
22 22
 
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 		$posts = ActivityCollector::getAll();
43 43
 		
44 44
 		$tag_post_holder = array();
45
-		foreach($posts as $post)
45
+		foreach ($posts as $post)
46 46
 		{
47 47
 			$tag_post_holder[$post->type][] = $post;
48 48
 		}
49 49
 		
50
-		foreach($tag_post_holder as $tag => $posts)
50
+		foreach ($tag_post_holder as $tag => $posts)
51 51
 		{
52 52
 			$url = "{$tag}/";
53 53
 			$this->add_paginated_pages($posts, $url, self::$TAG_PAGE_CHANGEFREQ, self::$TAG_PAGE_RANK);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	{
59 59
 		$posts = ActivityCollector::getAll();
60 60
 		
61
-		foreach($posts as $post)
61
+		foreach ($posts as $post)
62 62
 		{
63 63
 			$this->addURL("{$post->type}/{$post->id}/", date('Y-m-d', strtotime('last Monday')), self::$POST_PAGE_CHANGEFREQ, self::$POST_PAGE_RANK);
64 64
 		}
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
 	private function add_paginated_pages($posts, $base_url, $changefreq, $rank)
68 68
 	{
69
-		switch($changefreq)
69
+		switch ($changefreq)
70 70
 		{
71 71
 			case 'hourly' :
72 72
 				$lastmod = date('Y-m-d H:00:00');
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		}
84 84
 		
85 85
 		$this->addURL($base_url, $lastmod, $changefreq, $rank);
86
-		for($i = 2; (($i - 1) * self::$POSTS_PER_PAGE) < count($posts); $i++)
86
+		for ($i = 2; (($i - 1) * self::$POSTS_PER_PAGE) < count($posts); $i++)
87 87
 		{
88 88
 			$this->addURL("{$base_url}page/{$i}/", date('Y-m-01'), self::$PAGINATED_PAGE_CHANGEFREQ, self::$PAGINATED_PAGE_RANK);
89 89
 		}
Please login to merge, or discard this patch.
controller/sitemap/PortfolioSitemapController.class.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
16 16
 		
17 17
 		$pieces = PortfolioCollector::getAllPieces();
18 18
 		
19
-		foreach($pieces as $piece)
19
+		foreach ($pieces as $piece)
20 20
 		{
21
-			if($piece->category == 1)
21
+			if ($piece->category == 1)
22 22
 				$this->addURL("web/{$piece->title_url}/", date('Y-01-01'), 'yearly', .7);
23 23
 			else
24 24
 				$this->addURL("print/{$piece->title_url}/", date('Y-01-01'), 'yearly', .7);
Please login to merge, or discard this patch.
controller/sitemap/WaterfallSitemapController.class.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
     private function add_paginated_pages($count, $items_per_page, $base_url, $type)
137 137
     {
138
-        switch($type) {
138
+        switch ($type) {
139 139
             case 'waterfall':
140 140
                 $lastmod = date('Y-m-01');
141 141
                 $changefreq = self::$WATERFALL_LISTING_SUBPAGES_CHANGEFREQ;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 break;
149 149
         }
150 150
 
151
-        for($i = 2; (($i - 1) * $items_per_page) < $count; $i++) {
151
+        for ($i = 2; (($i - 1) * $items_per_page) < $count; $i++) {
152 152
             $this->addURL("{$base_url}/{$i}/", $lastmod, $changefreq, $rank);
153 153
         }
154 154
     }
Please login to merge, or discard this patch.
controller/waterfalls/CompanionListController.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
 		$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.
controller/waterfalls/ContactController.class.inc.php 1 patch
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.
controller/waterfalls/CountyListController.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
 		$path = URLDecode::getPiece(1);
29 29
 		$this->county = CountyCollector::getByAlias($path);
30 30
 		
31
-		if(!$this->county)
31
+		if (!$this->county)
32 32
 			$this->eject();
33 33
 		
34 34
 		parent::__construct();
Please login to merge, or discard this patch.
controller/waterfalls/DefaultListController.class.inc.php 1 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.
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.