summaryrefslogtreecommitdiffstats
path: root/app/view/common
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2016-03-06 21:42:05 -0500
committerMalf Furious <m@lfurio.us>2016-03-27 20:16:32 -0400
commit1392664aaf8d763b5cac927df01ce763d6672d36 (patch)
treed816b24a0462a00831f044c94baf333366f8ad5b /app/view/common
parent53472e75c050ce9b653cc70eeed56715d9a4163e (diff)
downloadscrott-1392664aaf8d763b5cac927df01ce763d6672d36.tar.gz
scrott-1392664aaf8d763b5cac927df01ce763d6672d36.zip
Only include the Setting modal if currently logged in
This prevents sending un-necessary HTML to the client on login/signup pages and allows code on the setting modal to assume that getCurrentUser() will always return an object.
Diffstat (limited to '')
-rw-r--r--app/view/common/topp.view.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/view/common/topp.view.php b/app/view/common/topp.view.php
index b23dc9c..d520e00 100644
--- a/app/view/common/topp.view.php
+++ b/app/view/common/topp.view.php
@@ -1,6 +1,8 @@
<?php include "view/master/topp.view.php"; ?>
-<?php include "view/common/setting.modal.view.php"; ?>
+<?php if ($mod->getCurrentUser()) { ?>
+ <?php include "view/common/setting.modal.view.php"; ?>
+<?php } ?>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">