Completed
Push — master ( 70260c...fc1b09 )
by Jacob
03:23
created
controller/blog/PostController.class.inc.php 1 patch
Indentation   +31 added lines, -31 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,18 +126,18 @@  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
-        strpos($post_row['title'], 'Dripping Springs Loop') === 0
134
-      ) {
135
-        $title = $post_row['title'];
136
-        $title = explode(':', $title);
137
-        $title = array_pop($title);
138
-        $title = trim($title);
139
-        $post->title = $title;
140
-      } 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
+		strpos($post_row['title'], 'Dripping Springs Loop') === 0
134
+	  ) {
135
+		$title = $post_row['title'];
136
+		$title = explode(':', $title);
137
+		$title = array_pop($title);
138
+		$title = trim($title);
139
+		$post->title = $title;
140
+	  } else if (strpos($post_row['title'], 'Isle Royale') === 0) {
141 141
 				$title = $post_row['title'];
142 142
 				$title = explode(',', $title);
143 143
 				$title = array_pop($title);
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
 	private $series_posts;
169 169
 	private function fetch_series_posts()
170 170
 	{
171
-      if(!isset($this->series_posts)) {
172
-          global $container;
173
-          $repository = new Jacobemerick\Web\Domain\Blog\Series\MysqlSeriesRepository($container['db_connection_locator']);
174
-          $this->series_posts = $repository->getSeriesForPost($this->post['id']);
175
-      }
176
-      return $this->series_posts;
171
+	  if(!isset($this->series_posts)) {
172
+		  global $container;
173
+		  $repository = new Jacobemerick\Web\Domain\Blog\Series\MysqlSeriesRepository($container['db_connection_locator']);
174
+		  $this->series_posts = $repository->getSeriesForPost($this->post['id']);
175
+	  }
176
+	  return $this->series_posts;
177 177
 	}
178 178
 
179 179
 	private function get_related_posts()
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
 			$exclude_post_array[] = $series_post['post'];
192 192
 		}
193 193
 
194
-        global $container;
195
-        $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
196
-        $post_result = $repository->getActivePostsByRelatedTags($this->post['id']);
194
+		global $container;
195
+		$repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']);
196
+		$post_result = $repository->getActivePostsByRelatedTags($this->post['id']);
197 197
 
198
-        $post_array = array();
198
+		$post_array = array();
199 199
 		
200 200
 		foreach($post_result as $post_row)
201 201
 		{
Please login to merge, or discard this patch.