diff --git a/include/class.forms.php b/include/class.forms.php index 475795eb5d8da9403895a2ab7fe67e76d946563e..e13d73f9cea6c886ff2db38b0ca5d769810e1f96 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -1621,6 +1621,11 @@ class ChoiceField extends FormField { return (string) $value; } + function asVar($value, $id=false) { + $value = $this->to_php($value); + return $this->toString($this->getChoice($value)); + } + function whatChanged($before, $after) { $B = (array) $before; $A = (array) $after; diff --git a/include/class.thread.php b/include/class.thread.php index 082e2536af186a60c5badb54117b1cb9365ea7b5..bcc3deb6a6d759b36b0d031eaa27671c9193576a 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -2191,7 +2191,7 @@ class TextThreadEntryBody extends ThreadEntryBody { } function getClean() { - return Format::htmlchars(Format::stripEmptyLines(parent::getClean()), true); + return Format::htmlchars(Format::html_balance(Format::stripEmptyLines(parent::getClean()))); } function prepend($what) { diff --git a/include/cli/modules/unpack.php b/include/cli/modules/unpack.php index a156288846bc808f3ceba9783b537013319d89a0..a2251ddc661118f7396f254e32b4a8ecf5f83a0e 100644 --- a/include/cli/modules/unpack.php +++ b/include/cli/modules/unpack.php @@ -210,7 +210,11 @@ class Unpacker extends Module { ), $pipes); fwrite($pipes[0], "<?php - include '{$this->source}/bootstrap.php'; + if (file_exists('{$this->destination}/bootstrap.php')) + include '{$this->destination}/bootstrap.php'; + else + include '{$this->source}/bootstrap.php'; + print INCLUDE_DIR; "); fclose($pipes[0]); diff --git a/include/client/tickets.inc.php b/include/client/tickets.inc.php index 6840c252b0715c9b9ad5a5e4df52d1db5e7cc47b..fab773d8e2136c1f90a02cbf763586f272a94697 100644 --- a/include/client/tickets.inc.php +++ b/include/client/tickets.inc.php @@ -47,7 +47,7 @@ if($sort && $sortOptions[$sort]) $order_by =$sortOptions[$sort]; $order_by=$order_by ?: $sortOptions['date']; -if ($_REQUEST['order'] && $orderWays[strtoupper($_REQUEST['order'])]) +if ($_REQUEST['order'] && !is_null($orderWays[strtoupper($_REQUEST['order'])])) $order = $orderWays[strtoupper($_REQUEST['order'])]; else $order = $orderWays['DESC']; @@ -201,19 +201,19 @@ if ($closedTickets) {?> <thead> <tr> <th nowrap> - <a href="tickets.php?sort=ID&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Ticket ID"><?php echo __('Ticket #');?></a> + <a href="tickets.php?sort=ID&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Ticket ID"><?php echo __('Ticket #');?><i class="icon-sort"></i></a> </th> <th width="120"> - <a href="tickets.php?sort=date&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Date"><?php echo __('Create Date');?></a> + <a href="tickets.php?sort=date&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Date"><?php echo __('Create Date');?><i class="icon-sort"></i></a> </th> <th width="100"> - <a href="tickets.php?sort=status&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Status"><?php echo __('Status');?></a> + <a href="tickets.php?sort=status&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Status"><?php echo __('Status');?><i class="icon-sort"></i></a> </th> <th width="320"> - <a href="tickets.php?sort=subj&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Subject"><?php echo __('Subject');?></a> + <a href="tickets.php?sort=subj&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Subject"><?php echo __('Subject');?><i class="icon-sort"></i></a> </th> <th width="120"> - <a href="tickets.php?sort=dept&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Department"><?php echo __('Department');?></a> + <a href="tickets.php?sort=dept&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Department"><?php echo __('Department');?><i class="icon-sort"></i></a> </th> </tr> </thead> diff --git a/setup/inc/footer.inc.php b/setup/inc/footer.inc.php index 5bc03569e76a870ef0ded62abae2fe750393e765..a8a594a9095b504ea347bfafcc2be81b49ad3b2f 100644 --- a/setup/inc/footer.inc.php +++ b/setup/inc/footer.inc.php @@ -2,7 +2,7 @@ <div class="clear"></div> </div> <!-- content --> </div> <!-- wizard --> - <div id="footer" class="centered">Copyright © 2013 <a target="_blank" href="http://osticket.com">osTicket.com</a></div> + <div id="footer" class="centered">Copyright © <?php echo date('Y'); ?> <a target="_blank" href="http://osticket.com">osTicket.com</a></div> <script type="text/javascript" src="../js/jquery-1.11.2.min.js"></script> <script type="text/javascript" src="../js/jstz.min.js"></script>