Skip to content
Snippets Groups Projects
Commit a21adaa6 authored by Jared Hancock's avatar Jared Hancock
Browse files

upgrade: Fix nasty message in footer on 1.6

This happens when upgrading from 1.6, the company information does not yet
exist (neither do the form tables)

Properly escape company name for display
parent e5bf9530
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,11 @@ class Company {
}
function __toString() {
return $this->getName();
try {
if ($name = $this->getForm()->getAnswer('name'))
return $name->display();
} catch (Exception $e) {}
return '';
}
/**
......
</div>
</div>
<div id="footer">
<p>Copyright &copy; <?php echo date('Y'); ?> <?php echo $ost->company ?: 'osTicket.com'; ?> - All rights reserved.</p>
<p>Copyright &copy; <?php echo date('Y'); ?> <?php echo (string) $ost->company :? 'osTicket.com'; ?> - All rights reserved.</p>
<a id="poweredBy" href="http://osticket.com" target="_blank">Helpdesk software - powered by osTicket</a>
</div>
<div id="overlay"></div>
......
</div>
<div id="footer">
Copyright &copy; 2006-<?php echo date('Y'); ?>&nbsp;<?php echo $ost->company ?: 'osTicket.com'; ?>&nbsp;All Rights Reserved.
Copyright &copy; 2006-<?php echo date('Y'); ?>&nbsp;<?php echo (string) $ost->company ?: 'osTicket.com'; ?>&nbsp;All Rights Reserved.
</div>
<?php
if(is_object($thisstaff) && $thisstaff->isStaff()) { ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment