diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-08-29 10:50:55 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-08-29 10:50:55 +0200 |
commit | 6816c6765009538aec31cde3128c1cb69ca272e9 (patch) | |
tree | ec369ff0429c30438e1492e4a0877b22dcdcfa79 | |
parent | 471a14613f554aa7765974a3e58c9833b5273f2f (diff) |
Remove useless checks for variables that should always be defined.
-rw-r--r-- | index.php | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -97,8 +97,7 @@ final class LookingGlass { private function render_header() { print '<a href="." title="Home">'; print '<div class="header_bar">'; - if (!isset($this->frontpage['show_title']) || - $this->frontpage['show_title']) { + if ($this->frontpage['show_title']) { print '<h1>'.htmlentities($this->frontpage['title']).'</h1><br />'; } if (isset($this->frontpage['image'])) { @@ -162,8 +161,7 @@ final class LookingGlass { print '<div class="footer_bar">'; print '<p class="text-center">'; - if (!isset($this->frontpage['show_visitor_ip']) || - $this->frontpage['show_visitor_ip']) { + if ($this->frontpage['show_visitor_ip']) { if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { print 'Your IP address: '.htmlentities($_SERVER['HTTP_X_FORWARDED_FOR']).'<br />'; } else { |