Completed
Push — master ( d12ea0...ec656c )
by Jacob
04:20
created
controller/portfolio/PieceController.class.inc.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		Loader::load('collector', 'portfolio/PortfolioCollector');
37 37
 		$portfolio_result = PortfolioCollector::getPieceByURI($this->title_url);
38 38
 		
39
-		if($portfolio_result === null)
39
+		if ($portfolio_result === null)
40 40
 			$this->eject();
41 41
 		
42 42
 		$portfolio_image_result = PortfolioCollector::getImagesForPiece($portfolio_result->id, 2);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		$main_image->width = $dimensions[0];
52 52
 		$main_image->height = $dimensions[1];
53 53
 		
54
-		foreach($portfolio_image_result as $portfolio_image)
54
+		foreach ($portfolio_image_result as $portfolio_image)
55 55
 		{
56 56
 			$thumb = $portfolio_image->name;
57 57
 			$thumb_array = explode('.', $thumb);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		
73 73
 		$portfolio_tag_result = PortfolioCollector::getTagsForPiece($portfolio_result->id);
74 74
 		
75
-		foreach($portfolio_tag_result as $portfolio_tag)
75
+		foreach ($portfolio_tag_result as $portfolio_tag)
76 76
 		{
77 77
 			$tag_array[] = $portfolio_tag->name;
78 78
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
36 36
 		Loader::load('collector', 'portfolio/PortfolioCollector');
37 37
 		$portfolio_result = PortfolioCollector::getPieceByURI($this->title_url);
38 38
 		
39
-		if($portfolio_result === null)
40
-			$this->eject();
39
+		if($portfolio_result === null) {
40
+					$this->eject();
41
+		}
41 42
 		
42 43
 		$portfolio_image_result = PortfolioCollector::getImagesForPiece($portfolio_result->id, 2);
43 44
 		$image = new ImageOld("portfolio/{$portfolio_image_result[0]->name}");
Please login to merge, or discard this patch.
controller/robot/WaterfallsRobotController.class.inc.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 class WaterfallsRobotController extends RobotController
6 6
 {
7 7
 
8
-    protected function set_data()
9
-    {
10
-        $this->disallow_for_all_robots('/search/');
11
-    }
8
+	protected function set_data()
9
+	{
10
+		$this->disallow_for_all_robots('/search/');
11
+	}
12 12
 
13 13
 }
Please login to merge, or discard this patch.
controller/rss/BlogPostRSSController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	{
27 27
 		$post_result = PostCollector::getMainList(250);
28 28
 		
29
-		foreach($post_result as $post)
29
+		foreach ($post_result as $post)
30 30
 		{
31 31
 			$this->addItem(
32 32
 				$post->title,
Please login to merge, or discard this patch.
controller/site/ChangelogController.class.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 		Loader::load('collector', 'data/ChangelogCollector');
30 30
 		$changelog_result = ChangelogCollector::getLast20Changes();
31 31
 		
32
-		foreach($changelog_result as $change)
32
+		foreach ($changelog_result as $change)
33 33
 		{
34 34
 			$changelog[] = (object) array(
35 35
 				'date' => (object) array(
Please login to merge, or discard this patch.
controller/site/ContactController.class.inc.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,17 +29,17 @@
 block discarded – undo
29 29
 
30 30
 	private function get_form_results()
31 31
 	{
32
-		if(!Request::hasPost())
32
+		if (!Request::hasPost())
33 33
 			return array();
34 34
 		
35
-		if(!Validate::checkRequest('post', 'name', 'string'))
35
+		if (!Validate::checkRequest('post', 'name', 'string'))
36 36
 			$error_message['name'] = 'Please enter a value for your name.';
37
-		if(!Validate::checkRequest('post', 'email', 'string'))
37
+		if (!Validate::checkRequest('post', 'email', 'string'))
38 38
 			$error_message['email'] = 'Please enter a valid email address.';
39
-		if(!Validate::checkRequest('post', 'message', 'string'))
39
+		if (!Validate::checkRequest('post', 'message', 'string'))
40 40
 			$error_message['message'] = 'Please enter a message.';
41 41
 		
42
-		if(!empty($error_message))
42
+		if (!empty($error_message))
43 43
 		{
44 44
 			return array(
45 45
 				'error_message' => $error_message,
Please login to merge, or discard this 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.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 	public function __construct()
14 14
 	{
15
-        global $config;
15
+		global $config;
16 16
 		$this->headers['From'] = self::$FROM;
17 17
 		$this->headers['Reply-To'] = "Jacob <{$config->admin_email}>";
18 18
 		$this->headers['Bcc'] = "Jacob <{$config->admin_email}>";
Please login to merge, or discard this patch.
controller/site/DefaultPageController.class.inc.php 2 patches
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.
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/BlogSitemapController.class.inc.php 2 patches
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.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -64,6 +64,9 @@
 block discarded – undo
64 64
 		}
65 65
 	}
66 66
 
67
+	/**
68
+	 * @param string $changefreq
69
+	 */
67 70
 	private function add_paginated_pages($posts, $base_url, $changefreq, $rank)
68 71
 	{
69 72
 		switch($changefreq)
Please login to merge, or discard this patch.
controller/sitemap/PortfolioSitemapController.class.inc.php 2 patches
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.
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/AboutController.class.inc.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -5,29 +5,29 @@
 block discarded – undo
5 5
 final class AboutController extends DefaultPageController
6 6
 {
7 7
 
8
-    private static $TITLE = 'About the Website | Waterfalls of the Keweenaw';
9
-    private static $DESCRIPTION = 'A little bit about the website, the area, and the reason why someone would hunt down a hundred and fifty waterfalls in the Upper Peninsula.';
10
-    private static $KEYWORD_ARRAY = array(
11
-        'about',
12
-        'waterfalls',
13
-        'birthday trip',
14
-        'Jacob Emerick',
15
-    );
8
+	private static $TITLE = 'About the Website | Waterfalls of the Keweenaw';
9
+	private static $DESCRIPTION = 'A little bit about the website, the area, and the reason why someone would hunt down a hundred and fifty waterfalls in the Upper Peninsula.';
10
+	private static $KEYWORD_ARRAY = array(
11
+		'about',
12
+		'waterfalls',
13
+		'birthday trip',
14
+		'Jacob Emerick',
15
+	);
16 16
 
17
-    protected function set_head_data()
18
-    {
19
-        parent::set_head_data();
17
+	protected function set_head_data()
18
+	{
19
+		parent::set_head_data();
20 20
         
21
-        $this->set_title(self::$TITLE);
22
-        $this->set_description(self::$DESCRIPTION);
23
-        $this->set_keywords(self::$KEYWORD_ARRAY);
24
-    }
21
+		$this->set_title(self::$TITLE);
22
+		$this->set_description(self::$DESCRIPTION);
23
+		$this->set_keywords(self::$KEYWORD_ARRAY);
24
+	}
25 25
 
26
-    protected function set_body_data($page_type = 'normal')
27
-    {
28
-        parent::set_body_data($page_type);
26
+	protected function set_body_data($page_type = 'normal')
27
+	{
28
+		parent::set_body_data($page_type);
29 29
         
30
-        $this->set_body('view', 'About');
31
-    }
30
+		$this->set_body('view', 'About');
31
+	}
32 32
 
33 33
 }
Please login to merge, or discard this patch.