Completed
Push — master ( acb423...2a302c )
by Jacob
03:45
created
controller/home/HomeController.class.inc.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -8,58 +8,58 @@
 block discarded – undo
8 8
 final class HomeController extends DefaultPageController
9 9
 {
10 10
 
11
-	private static $TITLE = "Jacob Emerick's Home | Web Developer, Hiker, Innovator";
12
-	private static $DESCRIPTION = 'Home page for Jacob Emerick, with links to his blog, waterfall site, and other side projects';
11
+    private static $TITLE = "Jacob Emerick's Home | Web Developer, Hiker, Innovator";
12
+    private static $DESCRIPTION = 'Home page for Jacob Emerick, with links to his blog, waterfall site, and other side projects';
13 13
 
14
-	private static $KEYWORD_ARRAY = array(
15
-		'Jacob Emerick',
16
-		'jacobemerick',
17
-		'jpemeric',
18
-		'home',
19
-		'web developer',
20
-		'hiker',
21
-		'application programmer',
22
-		'innovator');
14
+    private static $KEYWORD_ARRAY = array(
15
+        'Jacob Emerick',
16
+        'jacobemerick',
17
+        'jpemeric',
18
+        'home',
19
+        'web developer',
20
+        'hiker',
21
+        'application programmer',
22
+        'innovator');
23 23
 
24
-	private static $POST_LENGTH_SHORT = 160;
25
-	private static $POST_LENGTH_LONG = 240;
24
+    private static $POST_LENGTH_SHORT = 160;
25
+    private static $POST_LENGTH_LONG = 240;
26 26
 
27
-	protected function set_head_data()
28
-	{
29
-		$this->set_title(self::$TITLE);
30
-		$this->set_description(self::$DESCRIPTION);
31
-		$this->set_keywords(self::$KEYWORD_ARRAY);
27
+    protected function set_head_data()
28
+    {
29
+        $this->set_title(self::$TITLE);
30
+        $this->set_description(self::$DESCRIPTION);
31
+        $this->set_keywords(self::$KEYWORD_ARRAY);
32 32
 		
33
-		parent::set_head_data();
34
-	}
33
+        parent::set_head_data();
34
+    }
35 35
 
36
-	protected function set_body_data()
37
-	{
38
-		$this->set_body('post_array', $this->get_recent_posts());
39
-		$this->set_body_view('Home');
36
+    protected function set_body_data()
37
+    {
38
+        $this->set_body('post_array', $this->get_recent_posts());
39
+        $this->set_body_view('Home');
40 40
 		
41
-		parent::set_body_data();
42
-	}
41
+        parent::set_body_data();
42
+    }
43 43
 
44
-	private function get_recent_posts()
45
-	{
44
+    private function get_recent_posts()
45
+    {
46 46
     global $container;
47 47
     $postRepository = new MysqlPostRepository($container['db_connection_locator']);
48 48
     $recentPosts = $postRepository->getActivePosts(3);
49 49
 
50
-		$recent_post_array = array();
51
-		foreach($recentPosts as $postResult)
52
-		{
53
-			$post = new stdclass();
54
-			$post->title = $postResult['title'];
55
-			$post->url = Loader::getRootUrl('blog') . "{$postResult['category']}/{$postResult['path']}/";
56
-			$post->category = ucwords(str_replace('-', ' ', $postResult['category']));
57
-			$post->thumb = Content::instance('FetchFirstPhoto', $postResult['body'])->activate();
58
-			$post->body = Content::instance('SmartTrim', $postResult['body'])->activate(($post->thumb !== '') ? self::$POST_LENGTH_SHORT : self::$POST_LENGTH_LONG);
50
+        $recent_post_array = array();
51
+        foreach($recentPosts as $postResult)
52
+        {
53
+            $post = new stdclass();
54
+            $post->title = $postResult['title'];
55
+            $post->url = Loader::getRootUrl('blog') . "{$postResult['category']}/{$postResult['path']}/";
56
+            $post->category = ucwords(str_replace('-', ' ', $postResult['category']));
57
+            $post->thumb = Content::instance('FetchFirstPhoto', $postResult['body'])->activate();
58
+            $post->body = Content::instance('SmartTrim', $postResult['body'])->activate(($post->thumb !== '') ? self::$POST_LENGTH_SHORT : self::$POST_LENGTH_LONG);
59 59
 						
60
-			$recent_post_array[] = $post;
61
-		}
62
-		return $recent_post_array;
63
-	}
60
+            $recent_post_array[] = $post;
61
+        }
62
+        return $recent_post_array;
63
+    }
64 64
 
65 65
 }
Please login to merge, or discard this patch.
controller/site/TermsController.class.inc.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,22 +5,22 @@
 block discarded – undo
5 5
 final class TermsController extends DefaultPageController
6 6
 {
7 7
 
8
-	protected function set_head_data()
9
-	{
10
-		$this->set_title("Terms of Use for Jacob Emerick's Sites");
11
-		$this->set_description("Some basic (and boring) legal jargon and perferred usage of the content on Jacob Emerick's sites. Includes re-use terms and advice on retracing hikes.");
12
-		$this->set_keywords(array('terms of use', 'legal', 'accountability', 'trespassing', 'Jacob Emerick'));
8
+    protected function set_head_data()
9
+    {
10
+        $this->set_title("Terms of Use for Jacob Emerick's Sites");
11
+        $this->set_description("Some basic (and boring) legal jargon and perferred usage of the content on Jacob Emerick's sites. Includes re-use terms and advice on retracing hikes.");
12
+        $this->set_keywords(array('terms of use', 'legal', 'accountability', 'trespassing', 'Jacob Emerick'));
13 13
 		
14
-		parent::set_head_data();
15
-	}
14
+        parent::set_head_data();
15
+    }
16 16
 
17
-	protected function set_body_data()
18
-	{
19
-		$this->set_body('top_data', array('title' => 'Terms of Use'));
17
+    protected function set_body_data()
18
+    {
19
+        $this->set_body('top_data', array('title' => 'Terms of Use'));
20 20
 		
21
-		$this->set_body('body_view', 'Terms');
21
+        $this->set_body('body_view', 'Terms');
22 22
 		
23
-		parent::set_body_data();
24
-	}
23
+        parent::set_body_data();
24
+    }
25 25
 
26 26
 }
Please login to merge, or discard this patch.
controller/site/ChangelogController.class.inc.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -7,42 +7,42 @@
 block discarded – undo
7 7
 final class ChangelogController extends DefaultPageController
8 8
 {
9 9
 
10
-	protected function set_head_data()
11
-	{
12
-		$this->set_title("Changelog for Jacob Emerick's Sites");
13
-		$this->set_description("Listing of the last changes done on the framework behind Jacob Emerick's websites. Yeah, he's down with that version control.");
14
-		$this->set_keywords(array('changelog', 'version control', 'code', 'comments', 'Jacob Emerick'));
10
+    protected function set_head_data()
11
+    {
12
+        $this->set_title("Changelog for Jacob Emerick's Sites");
13
+        $this->set_description("Listing of the last changes done on the framework behind Jacob Emerick's websites. Yeah, he's down with that version control.");
14
+        $this->set_keywords(array('changelog', 'version control', 'code', 'comments', 'Jacob Emerick'));
15 15
 		
16
-		parent::set_head_data();
17
-	}
16
+        parent::set_head_data();
17
+    }
18 18
 
19
-	protected function set_body_data()
20
-	{
21
-		parent::set_body_data();
19
+    protected function set_body_data()
20
+    {
21
+        parent::set_body_data();
22 22
 		
23
-		$this->set_body('top_data', array('title' => 'Change Log'));
23
+        $this->set_body('top_data', array('title' => 'Change Log'));
24 24
 		
25
-		$this->set_body('body_data', $this->get_changelog());
26
-		$this->set_body('body_view', 'Changelog');
27
-	}
25
+        $this->set_body('body_data', $this->get_changelog());
26
+        $this->set_body('body_view', 'Changelog');
27
+    }
28 28
 
29
-	private function get_changelog()
30
-	{
29
+    private function get_changelog()
30
+    {
31 31
     global $container;
32 32
     $changelogRepository = new MysqlChangelogRepository($container['db_connection_locator']);
33 33
     $changelog_result = $changelogRepository->getChanges(40);
34 34
 		
35
-		foreach($changelog_result as $change)
36
-		{
37
-			$changelog[] = (object) array(
38
-				'date' => (object) array(
39
-					'stamp' => date('c', strtotime($change['datetime'])),
40
-					'short' => date('M j', strtotime($change['datetime'])),
41
-					'friendly' => date('F j, Y g:i A', strtotime($change['datetime']))),
42
-				'message' => $change['message_short']);
43
-		}
35
+        foreach($changelog_result as $change)
36
+        {
37
+            $changelog[] = (object) array(
38
+                'date' => (object) array(
39
+                    'stamp' => date('c', strtotime($change['datetime'])),
40
+                    'short' => date('M j', strtotime($change['datetime'])),
41
+                    'friendly' => date('F j, Y g:i A', strtotime($change['datetime']))),
42
+                'message' => $change['message_short']);
43
+        }
44 44
 		
45
-		return array('changelog' => $changelog);
46
-	}
45
+        return array('changelog' => $changelog);
46
+    }
47 47
 
48 48
 }
Please login to merge, or discard this patch.
controller/site/DefaultPageController.class.inc.php 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -5,68 +5,68 @@
 block discarded – undo
5 5
 abstract class DefaultPageController extends PageController
6 6
 {
7 7
 
8
-	private static $MENU = array(
9
-		array(
10
-			'name' => 'About',
11
-			'uri' => ''),
12
-		array(
13
-			'name' => 'Terms',
14
-			'uri' => 'terms'),
15
-		array(
16
-			'name' => 'Change Log',
17
-			'uri' => 'change-log'),
18
-		array(
19
-			'name' => 'Contact',
20
-			'uri' => 'contact'));
8
+    private static $MENU = array(
9
+        array(
10
+            'name' => 'About',
11
+            'uri' => ''),
12
+        array(
13
+            'name' => 'Terms',
14
+            'uri' => 'terms'),
15
+        array(
16
+            'name' => 'Change Log',
17
+            'uri' => 'change-log'),
18
+        array(
19
+            'name' => 'Contact',
20
+            'uri' => 'contact'));
21 21
 
22
-	protected function set_head_data()
23
-	{
24
-		$this->add_css('reset');
25
-		$this->add_css('site');
26
-	}
22
+    protected function set_head_data()
23
+    {
24
+        $this->add_css('reset');
25
+        $this->add_css('site');
26
+    }
27 27
 
28
-	protected function set_body_data()
29
-	{
30
-		$this->set_body('top_data', array());
31
-		$this->set_body('body_data', array());
28
+    protected function set_body_data()
29
+    {
30
+        $this->set_body('top_data', array());
31
+        $this->set_body('body_data', array());
32 32
 		
33
-		$this->set_body('left_side_data', array('menu' => $this->get_menu()));
33
+        $this->set_body('left_side_data', array('menu' => $this->get_menu()));
34 34
 		
35
-		$this->set_body('activity_array', $this->get_recent_activity());
36
-		$this->set_body_view('Page');
37
-	}
35
+        $this->set_body('activity_array', $this->get_recent_activity());
36
+        $this->set_body_view('Page');
37
+    }
38 38
 
39
-	private function get_menu()
40
-	{
41
-		$active_page = $this->get_active_page();
39
+    private function get_menu()
40
+    {
41
+        $active_page = $this->get_active_page();
42 42
 		
43
-		$menu = array();
44
-		foreach(self::$MENU as $item)
45
-		{
46
-			$menu[] = (object) array(
47
-				'name' => $item['name'],
48
-				'uri' => (strlen($item['uri']) > 0) ? "/{$item['uri']}/" : '/',
49
-				'is_active' => ($item['name'] == $active_page));
50
-		}
43
+        $menu = array();
44
+        foreach(self::$MENU as $item)
45
+        {
46
+            $menu[] = (object) array(
47
+                'name' => $item['name'],
48
+                'uri' => (strlen($item['uri']) > 0) ? "/{$item['uri']}/" : '/',
49
+                'is_active' => ($item['name'] == $active_page));
50
+        }
51 51
 		
52
-		return $menu;
53
-	}
52
+        return $menu;
53
+    }
54 54
 
55
-	private function get_active_page()
56
-	{
57
-		$current_uri = URLDecode::getPiece(1);
55
+    private function get_active_page()
56
+    {
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
-		$menu = self::$MENU;
63
-		foreach($menu as $link)
64
-		{
65
-			if($link['uri'] == $current_uri)
66
-				return $link['name'];
67
-		}
62
+        $menu = self::$MENU;
63
+        foreach($menu as $link)
64
+        {
65
+            if($link['uri'] == $current_uri)
66
+                return $link['name'];
67
+        }
68 68
 		
69
-		return 'About';
70
-	}
69
+        return 'About';
70
+    }
71 71
 
72 72
 }
Please login to merge, or discard this patch.
controller/site/ContactController.class.inc.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -2,62 +2,62 @@
 block discarded – undo
2 2
 
3 3
 Loader::load('controller', 'site/DefaultPageController');
4 4
 Loader::load('utility', array(
5
-	'Validate'));
5
+    'Validate'));
6 6
 
7 7
 final class ContactController extends DefaultPageController
8 8
 {
9 9
 
10
-	protected function set_head_data()
11
-	{
12
-		$this->set_title("Contact Form for Jacob Emerick's Sites");
13
-		$this->set_description("Want to reach out to Jacob Emerick with questions or concerns? Well, then here's a handy contact form for you that will connect you with the man himself.");
14
-		$this->set_keywords(array('contact', 'webmaster', 'support', 'help', 'Jacob Emerick'));
10
+    protected function set_head_data()
11
+    {
12
+        $this->set_title("Contact Form for Jacob Emerick's Sites");
13
+        $this->set_description("Want to reach out to Jacob Emerick with questions or concerns? Well, then here's a handy contact form for you that will connect you with the man himself.");
14
+        $this->set_keywords(array('contact', 'webmaster', 'support', 'help', 'Jacob Emerick'));
15 15
 		
16
-		parent::set_head_data();
17
-	}
16
+        parent::set_head_data();
17
+    }
18 18
 
19
-	protected function set_body_data()
20
-	{
21
-		parent::set_body_data();
19
+    protected function set_body_data()
20
+    {
21
+        parent::set_body_data();
22 22
 		
23
-		$this->set_body('top_data', array('title' => 'Contact Me'));
23
+        $this->set_body('top_data', array('title' => 'Contact Me'));
24 24
 		
25
-		$this->set_body('body_data', $this->get_form_results());
26
-		$this->set_body('body_view', 'Contact');
27
-	}
28
-
29
-	private function get_form_results()
30
-	{
31
-		if(!Request::hasPost())
32
-			return array();
25
+        $this->set_body('body_data', $this->get_form_results());
26
+        $this->set_body('body_view', 'Contact');
27
+    }
28
+
29
+    private function get_form_results()
30
+    {
31
+        if(!Request::hasPost())
32
+            return array();
33 33
 		
34
-		if(!Validate::checkRequest('post', 'name', 'string'))
35
-			$error_message['name'] = 'Please enter a value for your name.';
36
-		if(!Validate::checkRequest('post', 'email', 'string'))
37
-			$error_message['email'] = 'Please enter a valid email address.';
38
-		if(!Validate::checkRequest('post', 'message', 'string'))
39
-			$error_message['message'] = 'Please enter a message.';
34
+        if(!Validate::checkRequest('post', 'name', 'string'))
35
+            $error_message['name'] = 'Please enter a value for your name.';
36
+        if(!Validate::checkRequest('post', 'email', 'string'))
37
+            $error_message['email'] = 'Please enter a valid email address.';
38
+        if(!Validate::checkRequest('post', 'message', 'string'))
39
+            $error_message['message'] = 'Please enter a message.';
40 40
 		
41
-		if(!empty($error_message))
42
-		{
43
-			return array(
44
-				'error_message' => $error_message,
45
-				'value' => Request::getPost());
46
-		}
41
+        if(!empty($error_message))
42
+        {
43
+            return array(
44
+                'error_message' => $error_message,
45
+                'value' => Request::getPost());
46
+        }
47 47
 
48 48
     global $container;
49 49
     $sent = $container['mail']
50
-      ->addTo($container['config']->admin_email)
51
-      ->setSubject('Site Contact')
52
-      ->setPlainMessage(
50
+        ->addTo($container['config']->admin_email)
51
+        ->setSubject('Site Contact')
52
+        ->setPlainMessage(
53 53
         'Name: ' . Request::getPost('name') . "\n" .
54 54
         'Email: ' . Request::getPost('email') . "\n" .
55 55
         'Message: ' . Request::getPost('message')
56
-      )
57
-      ->send();
56
+        )
57
+        ->send();
58 58
 
59
-		return array(
60
-			'success_message' => "Thank you for your message, " . Request::getPost('name') . "! I'll get back to you as soon as possible.");
61
-	}
59
+        return array(
60
+            'success_message' => "Thank you for your message, " . Request::getPost('name') . "! I'll get back to you as soon as possible.");
61
+    }
62 62
 
63 63
 }
Please login to merge, or discard this patch.
controller/site/HomeController.class.inc.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,20 +5,20 @@
 block discarded – undo
5 5
 final class HomeController extends DefaultPageController
6 6
 {
7 7
 
8
-	protected function set_head_data()
9
-	{
10
-		$this->set_title("Jacob Emerick's Site Information | General and Technical Information");
11
-		$this->set_description("Meta information about Jacob Emerick's websites and content. Introduces the man behind the code, discusses the reasons behind the sites, and goes into some technical background of the custom framework.");
12
-		$this->set_keywords(array('site', 'technical', 'support', 'help', 'information', 'Jacob Emerick'));
8
+    protected function set_head_data()
9
+    {
10
+        $this->set_title("Jacob Emerick's Site Information | General and Technical Information");
11
+        $this->set_description("Meta information about Jacob Emerick's websites and content. Introduces the man behind the code, discusses the reasons behind the sites, and goes into some technical background of the custom framework.");
12
+        $this->set_keywords(array('site', 'technical', 'support', 'help', 'information', 'Jacob Emerick'));
13 13
 		
14
-		parent::set_head_data();
15
-	}
14
+        parent::set_head_data();
15
+    }
16 16
 
17
-	protected function set_body_data()
18
-	{
19
-		$this->set_body('body_view', 'Home');
17
+    protected function set_body_data()
18
+    {
19
+        $this->set_body('body_view', 'Home');
20 20
 		
21
-		parent::set_body_data();
22
-	}
21
+        parent::set_body_data();
22
+    }
23 23
 
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
controller/Error303Controller.class.inc.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 class Error303Controller extends PageController
6 6
 {
7 7
 
8
-	public function __construct($uri)
9
-	{
10
-		Header::redirect($uri, 303);
11
-		exit;
12
-	}
8
+    public function __construct($uri)
9
+    {
10
+        Header::redirect($uri, 303);
11
+        exit;
12
+    }
13 13
 
14
-	protected function set_head_data() {}
15
-	protected function set_body_data() {}
14
+    protected function set_head_data() {}
15
+    protected function set_body_data() {}
16 16
 
17 17
 }
Please login to merge, or discard this patch.
controller/Error404Controller.class.inc.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -5,58 +5,58 @@
 block discarded – undo
5 5
 class Error404Controller extends PageController
6 6
 {
7 7
 
8
-	protected function set_head_data()
9
-	{
10
-		$this->set_header_method('send404');
11
-		$this->add_css('normalize');
12
-		$this->add_css('404');
8
+    protected function set_head_data()
9
+    {
10
+        $this->set_header_method('send404');
11
+        $this->add_css('normalize');
12
+        $this->add_css('404');
13 13
 		
14
-		$this->set_title("Jacob Emerick's 404 Page");
15
-		$this->set_head('description', 'Global 404 page for sites under jacobemerick.com. Page not found!');
16
-		$this->set_head('keywords', '');
17
-	}
14
+        $this->set_title("Jacob Emerick's 404 Page");
15
+        $this->set_head('description', 'Global 404 page for sites under jacobemerick.com. Page not found!');
16
+        $this->set_head('keywords', '');
17
+    }
18 18
 
19
-	protected function set_body_data()
20
-	{
21
-		$this->set_body('site_list', $this->get_sites());
19
+    protected function set_body_data()
20
+    {
21
+        $this->set_body('site_list', $this->get_sites());
22 22
 		
23
-		$this->set_body_view('/404');
24
-	}
23
+        $this->set_body_view('/404');
24
+    }
25 25
 
26
-	private function get_sites()
27
-	{
26
+    private function get_sites()
27
+    {
28 28
     return [
29
-      [
29
+        [
30 30
         'url' => 'https://home.jacobemerick.com/',
31 31
         'title' => "Jacob Emerick's Home",
32 32
         'name' => 'Home'
33
-      ],
34
-      [
33
+        ],
34
+        [
35 35
         'url' => 'https://blog.jacobemerick.com/',
36 36
         'title' => "Jacob Emerick's Blog",
37 37
         'name' => 'Blog'
38
-      ],
39
-      [
38
+        ],
39
+        [
40 40
         'url' => 'https://lifestream.jacobemerick.com/',
41 41
         'title' => "Jacob Emerick's Lifestream",
42 42
         'name' => 'Lifestream'
43
-      ],
44
-      [
43
+        ],
44
+        [
45 45
         'url' => 'https://map.jacobemerick.com/',
46 46
         'title' => "Jacob Emerick's Hiking Map",
47 47
         'name' => 'Map'
48
-      ],
49
-      [
48
+        ],
49
+        [
50 50
         'url' => 'https://portfolio.jacobemerick.com/',
51 51
         'title' => "Jacob Emerick's Portfolio",
52 52
         'name' => 'Portfolio',
53
-      ],
54
-      [
53
+        ],
54
+        [
55 55
         'url' => 'https://www.waterfallsofthekeweenaw.com/',
56 56
         'title' => 'Waterfalls of the Keweenaw',
57 57
         'name' => 'Waterfalls'
58
-      ]
59
-  ];
60
-	}
58
+        ]
59
+    ];
60
+    }
61 61
 
62 62
 }
Please login to merge, or discard this patch.
utility/URLDecode.class.inc.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -3,35 +3,35 @@  discard block
 block discarded – undo
3 3
 class URLDecode
4 4
 {
5 5
 
6
-	private static $array = array();
6
+    private static $array = array();
7 7
 
8
-	static function init()
9
-	{
10
-		$host = $_SERVER['HTTP_HOST'];
11
-		$uri = $_SERVER['REQUEST_URI'];
12
-		self::form_url_array($host, $uri);
13
-	}
8
+    static function init()
9
+    {
10
+        $host = $_SERVER['HTTP_HOST'];
11
+        $uri = $_SERVER['REQUEST_URI'];
12
+        self::form_url_array($host, $uri);
13
+    }
14 14
 
15
-	static private function form_url_array($host, $uri)
16
-	{
17
-		$uri = substr($uri, 1);
18
-		if(strpos($uri, '?'))
19
-			$uri = substr($uri, 0, strpos($uri, '?'));
20
-		$uri_array = explode('/', $uri);
15
+    static private function form_url_array($host, $uri)
16
+    {
17
+        $uri = substr($uri, 1);
18
+        if(strpos($uri, '?'))
19
+            $uri = substr($uri, 0, strpos($uri, '?'));
20
+        $uri_array = explode('/', $uri);
21 21
 		
22
-		if(!Loader::isLive())
23
-			$host = substr($host, strpos($host, '.') + 1);
22
+        if(!Loader::isLive())
23
+            $host = substr($host, strpos($host, '.') + 1);
24 24
 		
25
-		self::$array['host'] = $host;
25
+        self::$array['host'] = $host;
26 26
 		
27 27
     if (
28
-      $host == 'www.waterfallsofthekeweenaw.com' ||
28
+        $host == 'www.waterfallsofthekeweenaw.com' ||
29 29
       $host == 'waterfallsofthekeweenaw.com'
30 30
     ) {
31
-			self::$array['site'] = 'waterfalls';
32
-		} else {
33
-			self::$array['site'] = substr($host, 0, strpos($host, '.'));
34
-		}
31
+            self::$array['site'] = 'waterfalls';
32
+        } else {
33
+            self::$array['site'] = substr($host, 0, strpos($host, '.'));
34
+        }
35 35
 
36 36
     $base = '';
37 37
     $base .= (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
@@ -40,55 +40,55 @@  discard block
 block discarded – undo
40 40
     $base .= $host;
41 41
     $base .= '/';
42 42
 
43
-		self::$array['base'] = $base;
44
-		self::$array['uri'] = '/' . implode('/', $uri_array);
43
+        self::$array['base'] = $base;
44
+        self::$array['uri'] = '/' . implode('/', $uri_array);
45 45
 		
46
-		if(end($uri_array) == '')
47
-			$uri_array = array_slice($uri_array, 0, count($uri_array) - 1);
48
-		self::$array['pieces'] = (array) $uri_array;
49
-	}
46
+        if(end($uri_array) == '')
47
+            $uri_array = array_slice($uri_array, 0, count($uri_array) - 1);
48
+        self::$array['pieces'] = (array) $uri_array;
49
+    }
50 50
 
51
-	static function getSite()
52
-	{
53
-		return self::$array['site'];
54
-	}
51
+    static function getSite()
52
+    {
53
+        return self::$array['site'];
54
+    }
55 55
 
56
-	static function getHost()
57
-	{
58
-		return self::$array['host'];
59
-	}
56
+    static function getHost()
57
+    {
58
+        return self::$array['host'];
59
+    }
60 60
 
61
-	static function getBase()
62
-	{
63
-		return self::$array['base'];
64
-	}
61
+    static function getBase()
62
+    {
63
+        return self::$array['base'];
64
+    }
65 65
 
66
-	static function getURI()
67
-	{
68
-		return self::$array['uri'];
69
-	}
66
+    static function getURI()
67
+    {
68
+        return self::$array['uri'];
69
+    }
70 70
 
71
-	static function getExtension()
72
-	{
73
-		$file = self::getPiece(-1);
74
-		if(substr($file, -1) == '/')
75
-			return false;
76
-		return substr($file, strrpos($file, '.') + 1);;
77
-	}
71
+    static function getExtension()
72
+    {
73
+        $file = self::getPiece(-1);
74
+        if(substr($file, -1) == '/')
75
+            return false;
76
+        return substr($file, strrpos($file, '.') + 1);;
77
+    }
78 78
 
79
-	static function getPiece($piece = null)
80
-	{
81
-		if(!$piece)
82
-			return self::$array['pieces'];
79
+    static function getPiece($piece = null)
80
+    {
81
+        if(!$piece)
82
+            return self::$array['pieces'];
83 83
 		
84
-		if($piece == -1)
85
-			return end(self::$array['pieces']);
84
+        if($piece == -1)
85
+            return end(self::$array['pieces']);
86 86
 		
87
-		$piece = $piece - 1;
88
-		if(array_key_exists($piece, self::$array['pieces']))
89
-			return self::$array['pieces'][$piece];
90
-		return;
91
-	}
87
+        $piece = $piece - 1;
88
+        if(array_key_exists($piece, self::$array['pieces']))
89
+            return self::$array['pieces'][$piece];
90
+        return;
91
+    }
92 92
 
93 93
 }
94 94
 
Please login to merge, or discard this patch.