diff --git a/include/class.forms.php b/include/class.forms.php index 6f28d71f98dbf476523733f75c87bcaf3b5251fd..ae165e085ceeeb8331ca2ae73c3211a608b3f27e 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -1795,6 +1795,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; @@ -2641,7 +2646,7 @@ class PriorityField extends ChoiceField { } FormField::addFieldTypes(/*@trans*/ 'Dynamic Fields', function() { return array( - 'priority' => array(__('Priority Level'), PriorityField), + 'priority' => array(__('Priority Level'), 'PriorityField'), ); }); @@ -2812,7 +2817,7 @@ class DepartmentField extends ChoiceField { } FormField::addFieldTypes(/*@trans*/ 'Dynamic Fields', function() { return array( - 'department' => array(__('Department'), DepartmentField), + 'department' => array(__('Department'), 'DepartmentField'), ); }); @@ -3000,7 +3005,7 @@ class AssigneeField extends ChoiceField { } FormField::addFieldTypes(/*@trans*/ 'Dynamic Fields', function() { return array( - 'assignee' => array(__('Assignee'), AssigneeField), + 'assignee' => array(__('Assignee'), 'AssigneeField'), ); }); @@ -3090,7 +3095,7 @@ class TicketStateField extends ChoiceField { } FormField::addFieldTypes('Dynamic Fields', function() { return array( - 'state' => array('Ticket State', TicketStateField, false), + 'state' => array('Ticket State', 'TicketStateField', false), ); }); @@ -3149,7 +3154,7 @@ class TicketFlagField extends ChoiceField { FormField::addFieldTypes('Dynamic Fields', function() { return array( - 'flags' => array('Ticket Flags', TicketFlagField, false), + 'flags' => array('Ticket Flags', 'TicketFlagField', false), ); }); diff --git a/include/class.list.php b/include/class.list.php index dbda898deedf46e5d65f209c213aa3108187b9be..b504d1bb94437b15ff973555ef73a209df3a31bf 100644 --- a/include/class.list.php +++ b/include/class.list.php @@ -522,7 +522,7 @@ class DynamicList extends VerySimpleModel implements CustomList { foreach (DynamicList::objects() as $list) { $selections['list-'.$list->id] = array($list->getPluralName(), - SelectionField, $list->get('id')); + 'SelectionField', $list->get('id')); } return $selections; } diff --git a/include/class.thread.php b/include/class.thread.php index e8da34ca0e93b089a4f2c800cd25d6ba203979cd..f658a25ba762f63b537ebd48e96dd9f569158311 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -2527,7 +2527,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 28c7605bb99945bf893df6fbbb6bb4625aeb5ec5..92b131690ce0d877012568fa01e0a7234a79d4ac 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/scp/js/scp.js b/scp/js/scp.js index e016087d3bfb0fb13260e7500736f6c40eb0535c..5092f7175aad8a9b8aa565df83775f53d9cbab00 100644 --- a/scp/js/scp.js +++ b/scp/js/scp.js @@ -193,6 +193,8 @@ var scp_prep = function() { } }); + $('form select#cannedResp').select2({width: '300px'}); + $('form select#cannedResp').change(function() { var fObj = $(this).closest('form'); 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>