Completed
Branch master (de1ee7)
by Jacob
05:01
created
controller/images/HomeController.class.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@  discard block
 block discarded – undo
16 16
 	{
17 17
 		$file = URLDecode::getURI();
18 18
 		
19
-		if(
19
+		if (
20 20
 			URLDecode::getSite() == 'images' ||
21 21
 			URLDecode::getExtension() == 'ico')
22 22
 			$file = "/css/{$file}";
23
-		else if(URLDecode::getSite() == 'portfolio')
23
+		else if (URLDecode::getSite() == 'portfolio')
24 24
 			$file = "/portfolio/{$file}";
25
-		else if(substr($file, 0, 7) == '/photo/')
25
+		else if (substr($file, 0, 7) == '/photo/')
26 26
 			$file = '/photo/processed/' . substr($file, 7);
27 27
 		
28 28
 		$this->use_old_image_logic($file);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 	private function send_headers($extension, $last_modified)
34 34
 	{
35
-		switch($extension)
35
+		switch ($extension)
36 36
 		{
37 37
 			case 'gif' :
38 38
 				Header::sendGIF($last_modified);
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 	private function use_old_image_logic($file)
53 53
 	{
54 54
 		$image = new ImageOld($file);
55
-		if(!$image->isValid()) {
55
+		if (!$image->isValid()) {
56 56
 			$this->eject();
57 57
 		}
58 58
 		
59
-		switch($image->getExtension())
59
+		switch ($image->getExtension())
60 60
 		{
61 61
 			case 'gif' :
62 62
 				Header::sendGIF($image->getLastModified());
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 	protected function eject()
80 80
 	{
81
-		if(get_class($this) !== 'Error404Controller')
81
+		if (get_class($this) !== 'Error404Controller')
82 82
 			Loader::loadNew('controller', '/Error404Controller')->activate();
83 83
 	}
84 84
 
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/lifestream/HomeController.class.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	protected function get_page_number()
39 39
 	{
40 40
 		$page = URLDecode::getPiece(2);
41
-		if(isset($page) && is_numeric($page))
41
+		if (isset($page) && is_numeric($page))
42 42
 			return $page;
43 43
 		return 1;
44 44
 	}
@@ -58,16 +58,16 @@  discard block
 block discarded – undo
58 58
 
59 59
 	protected function get_list_next_link()
60 60
 	{
61
-		if($this->page == 1)
61
+		if ($this->page == 1)
62 62
 			return;
63
-		if($this->page == 2)
63
+		if ($this->page == 2)
64 64
 			return Loader::getRootUrl('lifestream');
65 65
 		return Loader::getRootUrl('lifestream') . 'page/' . ($this->page - 1) . '/';
66 66
 	}
67 67
 
68 68
 	protected function get_list_prev_link()
69 69
 	{
70
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
70
+		if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
71 71
 			return;
72 72
 		return Loader::getRootUrl('lifestream') . 'page/' . ($this->page + 1) . '/';
73 73
 	}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	private $total_post_count;
76 76
 	protected function get_total_post_count()
77 77
 	{
78
-		if(!isset($this->total_post_count))
78
+		if (!isset($this->total_post_count))
79 79
 			$this->total_post_count = ActivityCollector::getCount();
80 80
 		return $this->total_post_count;
81 81
 	}
Please login to merge, or discard this patch.
controller/lifestream/PostController.class.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 		parent::__construct();
21 21
 		
22 22
 		$id = URLDecode::getPiece(2);
23
-		if(!$id || !is_numeric($id))
23
+		if (!$id || !is_numeric($id))
24 24
 			$this->eject();
25 25
 		
26 26
 		$post = ActivityCollector::getPost($id);
27
-		if(!$post)
27
+		if (!$post)
28 28
 			$this->eject();
29 29
 		
30
-		if(URLDecode::getPiece(1) != $post->type)
30
+		if (URLDecode::getPiece(1) != $post->type)
31 31
 			$this->eject();
32 32
 		
33 33
 		$this->post = $post;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 	private function get_title()
61 61
 	{
62
-		switch($this->post->type)
62
+		switch ($this->post->type)
63 63
 		{
64 64
 			case 'blog' :
65 65
 				return 'Jacob blogged';
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 	private function get_description()
86 86
 	{
87
-		switch($this->post->type)
87
+		switch ($this->post->type)
88 88
 		{
89 89
 			case 'blog' :
90 90
 				return 'Another awesome blog post from Jacob. Did I mention it was awesome?';
Please login to merge, or discard this patch.
controller/lifestream/TagController.class.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 	private function get_title()
48 48
 	{
49
-		switch($this->tag)
49
+		switch ($this->tag)
50 50
 		{
51 51
 			case 'blog' :
52 52
 				return 'Jacob has a Blog';
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
 	private function get_description()
73 73
 	{
74
-		switch($this->tag)
74
+		switch ($this->tag)
75 75
 		{
76 76
 			case 'blog' :
77 77
 				return 'Yeah, Jacob has a blog. Check out his posting activity.';
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	protected function get_page_number()
98 98
 	{
99 99
 		$page = URLDecode::getPiece(3);
100
-		if(isset($page) && is_numeric($page))
100
+		if (isset($page) && is_numeric($page))
101 101
 			return $page;
102 102
 		return 1;
103 103
 	}
@@ -117,16 +117,16 @@  discard block
 block discarded – undo
117 117
 
118 118
 	protected function get_list_next_link()
119 119
 	{
120
-		if($this->page == 1)
120
+		if ($this->page == 1)
121 121
 			return;
122
-		if($this->page == 2)
122
+		if ($this->page == 2)
123 123
 			return Loader::getRootUrl('lifestream') . $this->tag . '/';
124 124
 		return Loader::getRootUrl('lifestream') . $this->tag . '/page/' . ($this->page - 1) . '/';
125 125
 	}
126 126
 
127 127
 	protected function get_list_prev_link()
128 128
 	{
129
-		if(($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
129
+		if (($this->page * self::$POSTS_PER_PAGE) >= $this->get_total_post_count())
130 130
 			return;
131 131
 		return Loader::getRootUrl('lifestream') . $this->tag . '/page/' . ($this->page + 1) . '/';
132 132
 	}
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	private $total_post_count;
135 135
 	protected function get_total_post_count()
136 136
 	{
137
-		if(!isset($this->total_post_count))
137
+		if (!isset($this->total_post_count))
138 138
 			$this->total_post_count = ActivityCollector::getCountForTag($this->tag);
139 139
 		return $this->total_post_count;
140 140
 	}
Please login to merge, or discard this patch.
controller/portfolio/ContactController.class.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,17 +28,17 @@  discard block
 block discarded – undo
28 28
 
29 29
 	private function process_form_data()
30 30
 	{
31
-		if(!Request::hasPost())
31
+		if (!Request::hasPost())
32 32
 			return array();
33 33
 		
34
-		if(!Validate::checkRequest('post', 'name', 'string'))
34
+		if (!Validate::checkRequest('post', 'name', 'string'))
35 35
 			$error_message['name'] = 'Please enter a value for your name.';
36
-		if(!Validate::checkRequest('post', 'email', 'string'))
36
+		if (!Validate::checkRequest('post', 'email', 'string'))
37 37
 			$error_message['email'] = 'Please enter a valid email address.';
38
-		if(!Validate::checkRequest('post', 'message', 'string'))
38
+		if (!Validate::checkRequest('post', 'message', 'string'))
39 39
 			$error_message['message'] = 'Please enter a message.';
40 40
 		
41
-		if(!empty($error_message))
41
+		if (!empty($error_message))
42 42
 		{
43 43
 			return array(
44 44
 				'error_message' => $error_message,
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 			$mail->send();
59 59
 			
60 60
 			return array(
61
-				'success_message' => "Thank you for your message, ".Request::getPost('name')."! I'll get back to you as soon as possible.");
61
+				'success_message' => "Thank you for your message, " . Request::getPost('name') . "! I'll get back to you as soon as possible.");
62 62
 		}
63 63
 	}
64 64
 
Please login to merge, or discard this patch.
controller/portfolio/DefaultPageController.class.inc.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 				'name' => 'Contact',
40 40
 				'link' => Loader::getRootURL() . 'contact/'));
41 41
 		
42
-		if(!URLDecode::getPiece(1))
42
+		if (!URLDecode::getPiece(1))
43 43
 			$active_page = 'About';
44 44
 		else
45 45
 			$active_page = ucfirst(URLDecode::getPiece(1));
46 46
 		
47
-		foreach($menu as $menu_item)
47
+		foreach ($menu as $menu_item)
48 48
 		{
49 49
 			$menu_item = (object) $menu_item;
50 50
 			$menu_item->active = ($menu_item->name == $active_page);
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 		Loader::load('collector', 'portfolio/PortfolioCollector');
60 60
 		$portfolio_result = PortfolioCollector::getPiecesForCategory($category_id);
61 61
 		
62
-		foreach($portfolio_result as $piece)
62
+		foreach ($portfolio_result as $piece)
63 63
 		{
64 64
 			$piece_obj = new stdclass();
65 65
 			$piece_obj->title = $piece->title;
66
-			if("{$piece->category}" == 1)
66
+			if ("{$piece->category}" == 1)
67 67
 				$piece_obj->url = Loader::getRootURL() . "web/{$piece->title_url}/";
68 68
 			else
69 69
 				$piece_obj->url = Loader::getRootURL() . "print/{$piece->title_url}/";
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 			$piece_array[] = $piece_obj;
72 72
 		}
73 73
 		
74
-		switch($category_id)
74
+		switch ($category_id)
75 75
 		{
76 76
 			case 1 :
77 77
 				$title = "Sites I've worked on";
Please login to merge, or discard this patch.
controller/portfolio/PieceController.class.inc.php 1 patch
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.
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.