@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | switch($type) |
33 | 33 | { |
34 | 34 | case 'blog' : |
35 | - global $container; |
|
36 | - $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']); |
|
37 | - $post = $repository->findPostByPath($uri); |
|
35 | + global $container; |
|
36 | + $repository = new Jacobemerick\Web\Domain\Blog\Post\MysqlPostRepository($container['db_connection_locator']); |
|
37 | + $post = $repository->findPostByPath($uri); |
|
38 | 38 | |
39 | 39 | if($post === NULL) |
40 | 40 | return; |
@@ -73,38 +73,38 @@ discard block |
||
73 | 73 | |
74 | 74 | break; |
75 | 75 | case 'falls' : |
76 | - $pieces = explode('/', $uri); |
|
77 | - if (count($pieces) == 1) { |
|
78 | - Loader::load('collector', 'waterfall/WatercourseCollector'); |
|
79 | - list ($watercourse_alias) = $pieces; |
|
80 | - $watercourse = WatercourseCollector::getByAlias($watercourse_alias); |
|
76 | + $pieces = explode('/', $uri); |
|
77 | + if (count($pieces) == 1) { |
|
78 | + Loader::load('collector', 'waterfall/WatercourseCollector'); |
|
79 | + list ($watercourse_alias) = $pieces; |
|
80 | + $watercourse = WatercourseCollector::getByAlias($watercourse_alias); |
|
81 | 81 | |
82 | - if ($watercourse == null) { |
|
83 | - return; |
|
84 | - } |
|
82 | + if ($watercourse == null) { |
|
83 | + return; |
|
84 | + } |
|
85 | 85 | |
86 | - $link .= ($is_absolute) ? Loader::getRootURL('waterfalls') : '/'; |
|
87 | - $link .= "{$watercourse->alias}/"; |
|
86 | + $link .= ($is_absolute) ? Loader::getRootURL('waterfalls') : '/'; |
|
87 | + $link .= "{$watercourse->alias}/"; |
|
88 | 88 | |
89 | - if ($anchor == '') { |
|
90 | - $anchor = $watercourse->name; |
|
91 | - } |
|
92 | - } else if (count($pieces) == 2) { |
|
93 | - Loader::load('collector', 'waterfall/WaterfallCollector'); |
|
94 | - list ($watercourse_alias, $waterfall_alias) = $pieces; |
|
95 | - $waterfall = WaterfallCollector::getByAlias($watercourse_alias, $waterfall_alias); |
|
89 | + if ($anchor == '') { |
|
90 | + $anchor = $watercourse->name; |
|
91 | + } |
|
92 | + } else if (count($pieces) == 2) { |
|
93 | + Loader::load('collector', 'waterfall/WaterfallCollector'); |
|
94 | + list ($watercourse_alias, $waterfall_alias) = $pieces; |
|
95 | + $waterfall = WaterfallCollector::getByAlias($watercourse_alias, $waterfall_alias); |
|
96 | 96 | |
97 | - if ($waterfall == null) { |
|
98 | - return; |
|
99 | - } |
|
97 | + if ($waterfall == null) { |
|
98 | + return; |
|
99 | + } |
|
100 | 100 | |
101 | - $link .= ($is_absolute) ? Loader::getRootURL('waterfalls') : '/'; |
|
102 | - $link .= "{$waterfall->watercourse_alias}/{$waterfall->alias}/"; |
|
101 | + $link .= ($is_absolute) ? Loader::getRootURL('waterfalls') : '/'; |
|
102 | + $link .= "{$waterfall->watercourse_alias}/{$waterfall->alias}/"; |
|
103 | 103 | |
104 | - if ($anchor == '') { |
|
105 | - $anchor = $waterfall->name; |
|
106 | - } |
|
107 | - } |
|
104 | + if ($anchor == '') { |
|
105 | + $anchor = $waterfall->name; |
|
106 | + } |
|
107 | + } |
|
108 | 108 | break; |
109 | 109 | default : |
110 | 110 | break; |