@@ -205,7 +205,7 @@ |
||
| 205 | 205 | private static function start_gzipping() |
| 206 | 206 | { |
| 207 | 207 | if(!ob_start('ob_gzhandler')) |
| 208 | - ob_start(); |
|
| 208 | + ob_start(); |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | } |
| 212 | 212 | \ No newline at end of file |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | switch($piece) |
| 53 | 53 | { |
| 54 | 54 | case 'jquery-1.4.2' : |
| 55 | - case 'jquery-1.10.2.min' : |
|
| 55 | + case 'jquery-1.10.2.min' : |
|
| 56 | 56 | case 'jquery-ui-1.8.2' : |
| 57 | 57 | case 'ga' : |
| 58 | 58 | $simple_pieces[] = $piece; |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | foreach($array as $file) |
| 119 | 119 | { |
| 120 | 120 | $piece_path = self::get_piece_path($type, $file); |
| 121 | - $contents .= "/*** {$file} ***/\n\n"; |
|
| 121 | + $contents .= "/*** {$file} ***/\n\n"; |
|
| 122 | 122 | $contents .= file_get_contents($piece_path); |
| 123 | - $contents .= "\n\n\n"; |
|
| 123 | + $contents .= "\n\n\n"; |
|
| 124 | 124 | } |
| 125 | 125 | return self::make_final_file($type, $contents, $site); |
| 126 | 126 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | { |
| 27 | 27 | //if(!$this->time_to_run($frequency)) |
| 28 | 28 | // continue; |
| 29 | - if ($cron != 'TwitterCron') continue; |
|
| 29 | + if ($cron != 'TwitterCron') continue; |
|
| 30 | 30 | |
| 31 | 31 | Loader::load('utility', "cron/{$cron}"); |
| 32 | 32 | $reflection = new ReflectionClass($cron); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | public function __construct() |
| 14 | 14 | { |
| 15 | - global $config; |
|
| 15 | + global $config; |
|
| 16 | 16 | $this->headers['From'] = self::$FROM; |
| 17 | 17 | $this->headers['Reply-To'] = "Jacob <{$config->admin_email}>"; |
| 18 | 18 | $this->headers['Bcc'] = "Jacob <{$config->admin_email}>"; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | public function __construct() |
| 14 | 14 | { |
| 15 | - global $config; |
|
| 15 | + global $config; |
|
| 16 | 16 | $this->headers['From'] = self::$FROM; |
| 17 | 17 | $this->headers['Reply-To'] = "Jacob <{$config->admin_email}>"; |
| 18 | 18 | $this->headers['Bcc'] = "Jacob <{$config->admin_email}>"; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | public function __construct() |
| 14 | 14 | { |
| 15 | - global $config; |
|
| 15 | + global $config; |
|
| 16 | 16 | $this->headers['From'] = self::$FROM; |
| 17 | 17 | $this->headers['Reply-To'] = "Jacob <{$config->admin_email}>"; |
| 18 | 18 | $this->headers['Bcc'] = "Jacob <{$config->admin_email}>"; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | public function __construct() |
| 14 | 14 | { |
| 15 | - global $config; |
|
| 15 | + global $config; |
|
| 16 | 16 | $this->headers['From'] = self::$FROM; |
| 17 | 17 | $this->headers['Reply-To'] = "Jacob <{$config->admin_email}>"; |
| 18 | 18 | $this->headers['Bcc'] = "Jacob <{$config->admin_email}>"; |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | $handle = @fopen($config_path, 'r'); |
| 9 | 9 | if ($handle === false) { |
| 10 | - throw new RuntimeException("Could not load config"); |
|
| 10 | + throw new RuntimeException("Could not load config"); |
|
| 11 | 11 | } |
| 12 | 12 | $config = fread($handle, filesize($config_path)); |
| 13 | 13 | fclose($handle); |
@@ -15,40 +15,40 @@ discard block |
||
| 15 | 15 | $config = json_decode($config); |
| 16 | 16 | $last_json_error = json_last_error(); |
| 17 | 17 | if ($last_json_error !== JSON_ERROR_NONE) { |
| 18 | - throw new RuntimeException("Could not parse config - JSON error detected"); |
|
| 18 | + throw new RuntimeException("Could not parse config - JSON error detected"); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | // configure the db connections holder |
| 22 | 22 | $db_connections = new Aura\Sql\ConnectionLocator(); |
| 23 | 23 | $db_connections->setDefault(function () use ($config) { |
| 24 | - $connection = $config->database->slave; |
|
| 25 | - return new Aura\Sql\ExtendedPdo( |
|
| 26 | - "mysql:host={$connection->host}", |
|
| 27 | - $connection->user, |
|
| 28 | - $connection->password |
|
| 29 | - ); |
|
| 24 | + $connection = $config->database->slave; |
|
| 25 | + return new Aura\Sql\ExtendedPdo( |
|
| 26 | + "mysql:host={$connection->host}", |
|
| 27 | + $connection->user, |
|
| 28 | + $connection->password |
|
| 29 | + ); |
|
| 30 | 30 | }); |
| 31 | 31 | $db_connections->setWrite('master', function () use ($config) { |
| 32 | - $connection = $config->database->master; |
|
| 33 | - return new Aura\Sql\ExtendedPdo( |
|
| 34 | - "mysql:host={$connection->host}", |
|
| 35 | - $connection->user, |
|
| 36 | - $connection->password |
|
| 37 | - ); |
|
| 32 | + $connection = $config->database->master; |
|
| 33 | + return new Aura\Sql\ExtendedPdo( |
|
| 34 | + "mysql:host={$connection->host}", |
|
| 35 | + $connection->user, |
|
| 36 | + $connection->password |
|
| 37 | + ); |
|
| 38 | 38 | }); |
| 39 | 39 | $db_connections->setRead('slave', function () use ($config) { |
| 40 | - $connection = $config->database->slave; |
|
| 41 | - $pdo = new Aura\Sql\ExtendedPdo( |
|
| 42 | - "mysql:host={$connection->host}", |
|
| 43 | - $connection->user, |
|
| 44 | - $connection->password |
|
| 45 | - ); |
|
| 46 | - |
|
| 47 | - $profiler = new Aura\Sql\Profiler(); |
|
| 48 | - $profiler->setActive(true); |
|
| 49 | - $pdo->setProfiler($profiler); |
|
| 50 | - |
|
| 51 | - return $pdo; |
|
| 40 | + $connection = $config->database->slave; |
|
| 41 | + $pdo = new Aura\Sql\ExtendedPdo( |
|
| 42 | + "mysql:host={$connection->host}", |
|
| 43 | + $connection->user, |
|
| 44 | + $connection->password |
|
| 45 | + ); |
|
| 46 | + |
|
| 47 | + $profiler = new Aura\Sql\Profiler(); |
|
| 48 | + $profiler->setActive(true); |
|
| 49 | + $pdo->setProfiler($profiler); |
|
| 50 | + |
|
| 51 | + return $pdo; |
|
| 52 | 52 | }); |
| 53 | 53 | |
| 54 | 54 | // setup the service locator |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | protected function get_recent_activity() |
| 62 | 62 | { |
| 63 | - global $container; |
|
| 64 | - $activityRepository = new Jacobemerick\Web\Domain\Stream\Post\MysqlPostRepository($container['db_connection_locator']); |
|
| 65 | - $post_result = $activityRepository->getPosts(5); |
|
| 63 | + global $container; |
|
| 64 | + $activityRepository = new Jacobemerick\Web\Domain\Stream\Post\MysqlPostRepository($container['db_connection_locator']); |
|
| 65 | + $post_result = $activityRepository->getPosts(5); |
|
| 66 | 66 | |
| 67 | 67 | $post_array = array(); |
| 68 | 68 | foreach($post_result as $row) |
@@ -77,13 +77,13 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | Loader::load('utility', 'Content'); |
| 79 | 79 | |
| 80 | - global $container; |
|
| 81 | - $blogRepository = new Jacobemerick\Web\Domain\Stream\Blog\MysqlBlogRepository($container['db_connection_locator']); |
|
| 82 | - $bookRepository = new Jacobemerick\Web\Domain\Stream\Book\MysqlBookRepository($container['db_connection_locator']); |
|
| 83 | - $distanceRepository = new Jacobemerick\Web\Domain\Stream\Distance\MysqlDistanceRepository($container['db_connection_locator']); |
|
| 84 | - $huluRepository = new Jacobemerick\Web\Domain\Stream\Hulu\MysqlHuluRepository($container['db_connection_locator']); |
|
| 85 | - $twitterRepository = new Jacobemerick\Web\Domain\Stream\Twitter\MysqlTwitterRepository($container['db_connection_locator']); |
|
| 86 | - $youtubeRepository = new Jacobemerick\Web\Domain\Stream\YouTube\MysqlYouTubeRepository($container['db_connection_locator']); |
|
| 80 | + global $container; |
|
| 81 | + $blogRepository = new Jacobemerick\Web\Domain\Stream\Blog\MysqlBlogRepository($container['db_connection_locator']); |
|
| 82 | + $bookRepository = new Jacobemerick\Web\Domain\Stream\Book\MysqlBookRepository($container['db_connection_locator']); |
|
| 83 | + $distanceRepository = new Jacobemerick\Web\Domain\Stream\Distance\MysqlDistanceRepository($container['db_connection_locator']); |
|
| 84 | + $huluRepository = new Jacobemerick\Web\Domain\Stream\Hulu\MysqlHuluRepository($container['db_connection_locator']); |
|
| 85 | + $twitterRepository = new Jacobemerick\Web\Domain\Stream\Twitter\MysqlTwitterRepository($container['db_connection_locator']); |
|
| 86 | + $youtubeRepository = new Jacobemerick\Web\Domain\Stream\YouTube\MysqlYouTubeRepository($container['db_connection_locator']); |
|
| 87 | 87 | |
| 88 | 88 | $post = new stdclass(); |
| 89 | 89 | |
@@ -126,9 +126,9 @@ discard block |
||
| 126 | 126 | if(strlen($row['title']) > 0) |
| 127 | 127 | $post->title .= " I was hiking up around the {$row['title']} area."; |
| 128 | 128 | } |
| 129 | - else if ($row['type'] == 'walking') { |
|
| 130 | - $post->title = "Walked {$row['distance']} miles and felt {$row['felt']}."; |
|
| 131 | - } |
|
| 129 | + else if ($row['type'] == 'walking') { |
|
| 130 | + $post->title = "Walked {$row['distance']} miles and felt {$row['felt']}."; |
|
| 131 | + } |
|
| 132 | 132 | break; |
| 133 | 133 | case 'hulu' : |
| 134 | 134 | $row = $huluRepository->getHuluById($raw_post['type_id']); |
@@ -195,11 +195,11 @@ discard block |
||
| 195 | 195 | Loader::load('view', URLDecode::getSite() . '/' . $view, $this->data_array['body']); |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - if (URLDecode::getSite() == 'waterfalls') { |
|
| 199 | - Loader::load('view', '/WaterfallFoot'); |
|
| 200 | - } else { |
|
| 201 | - Loader::load('view', '/Foot', array('tracking_code' => self::$TRACKING_CODE)); |
|
| 202 | - } |
|
| 198 | + if (URLDecode::getSite() == 'waterfalls') { |
|
| 199 | + Loader::load('view', '/WaterfallFoot'); |
|
| 200 | + } else { |
|
| 201 | + Loader::load('view', '/Foot', array('tracking_code' => self::$TRACKING_CODE)); |
|
| 202 | + } |
|
| 203 | 203 | |
| 204 | 204 | if($view == '/404' || $view == '/503') |
| 205 | 205 | exit; |