Skip to content

Commit

Permalink
Fixes annoying warning in logs by defaulting var like a responsible a…
Browse files Browse the repository at this point in the history
…dult
  • Loading branch information
jacobemerick committed Sep 23, 2021
1 parent 2eca18e commit d8af390
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
30 changes: 15 additions & 15 deletions controller/PageController.class.inc.php
Expand Up @@ -6,7 +6,7 @@ abstract class PageController
{

private static $TRACKING_CODE = 'UA-11745070-1';

protected static $DEPRECATED_BLOGS = array(
10 => 63,
55 => 67,
Expand All @@ -27,10 +27,10 @@ protected function set_data() {}
public function __construct()
{
$this->set_header_method('sendHTML');

$this->set_head('google_verification', 'sgAISiuoWfK54KXnOfm2oU4vQdad8eyNCQX7LkZ1OxM');
$this->set_head('bing_verification', 'AF1A4CEA30A7589590E9294C4B512607');

$this->set_body('domain_container', $this->get_domain_container());
$this->set_body('footer', array(
'link' => Loader::getRootUrl('site'),
Expand All @@ -41,14 +41,14 @@ public function __construct()
protected function get_domain_container()
{
$domain_container = new stdclass();

$domain_container->blog = Loader::getRootUrl('blog');
$domain_container->home = Loader::getRootUrl('home');
$domain_container->lifestream = Loader::getRootUrl('lifestream');
$domain_container->map = Loader::getRootUrl('map');
$domain_container->portfolio = Loader::getRootUrl('portfolio');
$domain_container->waterfalls = Loader::getRootUrl('waterfalls');

return $domain_container;
}

Expand Down Expand Up @@ -89,9 +89,9 @@ public function activate()
$this->set_head_data();
$this->set_body_data();
$this->set_data();

$this->load_assets();

$headers = $this->headers;
Header::$headers();
Loader::load('view', '/Head', $this->data_array['head']);
Expand All @@ -102,13 +102,13 @@ public function activate()
else
Loader::load('view', URLDecode::getSite() . '/' . $view, $this->data_array['body']);
}

if (URLDecode::getSite() == 'waterfalls') {
Loader::load('view', '/WaterfallFoot');
} else {
Loader::load('view', '/Foot', array('tracking_code' => self::$TRACKING_CODE));
}

if($view == '/404' || $view == '/503')
exit;
}
Expand Down Expand Up @@ -137,7 +137,7 @@ protected function set_keywords($array)
{
$this->set_head('keywords', implode(', ', $array));
}

protected function set_canonical($url)
{
$this->set_head('canonical', $url);
Expand Down Expand Up @@ -178,7 +178,7 @@ private function load_assets()
}
return "/js/{$script}.min.js";
}, $this->js_array);

$this->set_head('css_link_array', $css_array);
$this->set_head('js_link_array', $js_array);
}
Expand Down Expand Up @@ -218,23 +218,23 @@ protected function redirect($uri, $method = 301)
final protected function get_parsed_date($date)
{
$parsed_date = new stdclass();

$parsed_date->stamp = date('c', strtotime($date));
$parsed_date->friendly = date('F j, Y', strtotime($date));
$parsed_date->elapsed = Content::instance('ElapsedTime', $date)->activate();

return $parsed_date;
}

private $comment_errors;
private $comment_errors = array();
protected function handle_comment_submit($site_id, $path, $redirect_url, $page_title)
{
if(Request::hasPost() && Request::getPost('submit') == 'Submit Comment')
{
$parameters = array($site_id, $path, $redirect_url, $page_title);
$this->comment_errors = Loader::loadNew('module', 'form/CommentSubmitModule', $parameters)->activate();
}

return;
}

Expand Down
4 changes: 2 additions & 2 deletions view/common/CommentForm.tpl.php
Expand Up @@ -21,9 +21,9 @@
</li>
<li>
<input type="hidden" name="type" value="<?= (isset($comment)) ? $comment->id : 'new' ?>" />
<input type="submit" name="submit" value="Submit Comment" /> or
<input type="submit" name="submit" value="Submit Comment" /> or
<input type="reset" name="reset" value="Discard" onclick="document.getElementById('<?= (isset($comment)) ? "comment-form-{$comment->id}" : 'comment-form-new' ?>').style.display = 'none'; return true;" />
</li>
</ul>
</form>
</div>
</div>

0 comments on commit d8af390

Please sign in to comment.