Completed
Push — master ( 2684cd...5325e1 )
by Jacob
08:52
created
controller/blog/PostController.class.inc.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	{
24 24
 		parent::__construct();
25 25
 		
26
-        global $container;
27
-        $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
28
-        $this->post = $repository->findPostByPath(URLDecode::getPiece(2));
26
+		global $container;
27
+		$repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
28
+		$this->post = $repository->findPostByPath(URLDecode::getPiece(2));
29 29
 
30 30
 		if($this->post == null)
31 31
 			$this->eject();
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 			Loader::getRootUrl('blog') . $this->post['category'] . '/' . $this->post['path'] . '/',
37 37
 			$this->post['title']);
38 38
 
39
-        global $container;
40
-        $repository = new Jacobemerick\Web\Domain\Blog\Tag\MysqlTagRepository($container['db_connection_locator']);
41
-        $this->tags = $repository->getTagsForPost($this->post['id']);
39
+		global $container;
40
+		$repository = new Jacobemerick\Web\Domain\Blog\Tag\MysqlTagRepository($container['db_connection_locator']);
41
+		$this->tags = $repository->getTagsForPost($this->post['id']);
42 42
 	}
43 43
 
44 44
 	protected function set_head_data()
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 		$this->set_keywords($this->get_post_keywords());
51 51
 		$this->set_author(self::$AUTHOR);
52 52
 
53
-    $photo = Content::instance('FetchFirstPhoto', $this->post['body'])->activate(true);
54
-    $photo = preg_match('/^<img src="([a-z-:\.\/]+)" [^>]+>$/', $photo, $matches);
55
-    $this->set_head('thumbnail', $matches[1]);
53
+	$photo = Content::instance('FetchFirstPhoto', $this->post['body'])->activate(true);
54
+	$photo = preg_match('/^<img src="([a-z-:\.\/]+)" [^>]+>$/', $photo, $matches);
55
+	$this->set_head('thumbnail', $matches[1]);
56 56
 
57 57
 		if (array_key_exists($this->post['id'], self::$DEPRECATED_BLOGS)) {
58 58
 			$log_id = self::$DEPRECATED_BLOGS[$this->post['id']];
@@ -126,17 +126,17 @@  discard block
 block discarded – undo
126 126
 			
127 127
 			$post = new stdclass();
128 128
 
129
-      if (
130
-        strpos($post_row['title'], 'Rainy Supe Loop') === 0 ||
131
-        strpos($post_row['title'], 'Malapais Loop') === 0 ||
132
-        strpos($post_row['title'], 'Mazatzal Peak Loop') === 0
133
-      ) {
134
-        $title = $post_row['title'];
135
-        $title = explode(':', $title);
136
-        $title = array_pop($title);
137
-        $title = trim($title);
138
-        $post->title = $title;
139
-      } else if (strpos($post_row['title'], 'Isle Royale') === 0) {
129
+	  if (
130
+		strpos($post_row['title'], 'Rainy Supe Loop') === 0 ||
131
+		strpos($post_row['title'], 'Malapais Loop') === 0 ||
132
+		strpos($post_row['title'], 'Mazatzal Peak Loop') === 0
133
+	  ) {
134
+		$title = $post_row['title'];
135
+		$title = explode(':', $title);
136
+		$title = array_pop($title);
137
+		$title = trim($title);
138
+		$post->title = $title;
139
+	  } else if (strpos($post_row['title'], 'Isle Royale') === 0) {
140 140
 				$title = $post_row['title'];
141 141
 				$title = explode(',', $title);
142 142
 				$title = array_pop($title);
@@ -167,12 +167,12 @@  discard block
 block discarded – undo
167 167
 	private $series_posts;
168 168
 	private function fetch_series_posts()
169 169
 	{
170
-      if(!isset($this->series_posts)) {
171
-          global $container;
172
-          $repository = new Jacobemerick\Web\Domain\Blog\Series\MysqlSeriesRepository($container['db_connection_locator']);
173
-          $this->series_posts = $repository->getSeriesForPost($this->post['id']);
174
-      }
175
-      return $this->series_posts;
170
+	  if(!isset($this->series_posts)) {
171
+		  global $container;
172
+		  $repository = new Jacobemerick\Web\Domain\Blog\Series\MysqlSeriesRepository($container['db_connection_locator']);
173
+		  $this->series_posts = $repository->getSeriesForPost($this->post['id']);
174
+	  }
175
+	  return $this->series_posts;
176 176
 	}
177 177
 
178 178
 	private function get_related_posts()
@@ -190,11 +190,11 @@  discard block
 block discarded – undo
190 190
 			$exclude_post_array[] = $series_post['post'];
191 191
 		}
192 192
 
193
-        global $container;
194
-        $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
195
-        $post_result = $repository->getActivePostsByRelatedTags($this->post['id']);
193
+		global $container;
194
+		$repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
195
+		$post_result = $repository->getActivePostsByRelatedTags($this->post['id']);
196 196
 
197
-        $post_array = array();
197
+		$post_array = array();
198 198
 		
199 199
 		foreach($post_result as $post_row)
200 200
 		{
Please login to merge, or discard this patch.