Skip to content
Snippets Groups Projects
Commit df65034a authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge remote branch 'upstream/develop' into develop-next

parents eafb34d3 43a5900e
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,6 @@ For more information on how to write a good [bug report](https://github.com/osTi
### Versions
Admin panel -> Dashboard -> Information which also additionally gives you information about you server.
Admin panel -> Dashboard -> Information which also additionally gives you information about your server.
Also, please include the OS and what version of the OS you're running. As well as your browser and browser version.
......@@ -151,6 +151,8 @@ class DynamicFormsAjaxAPI extends AjaxController {
function saveListItem($list_id, $item_id) {
global $thisstaff;
$errors = array();
if (!$thisstaff)
Http::response(403, 'Login required');
......@@ -179,7 +181,7 @@ class DynamicFormsAjaxAPI extends AjaxController {
'name' => $basic['name'],
'value' => $basic['value'],
'abbrev' => $basic['extra'],
]);
], $errors);
}
}
......
......@@ -358,7 +358,7 @@ class TicketsAjaxAPI extends AjaxController {
$format.='.plain';
$varReplacer = function (&$var) use($ticket) {
return $ticket->replaceVars($var);
return $ticket->replaceVars($var, array('recipient' => $ticket->getOwner()));
};
include_once(INCLUDE_DIR.'class.canned.php');
......
......@@ -18,12 +18,14 @@ if($_REQUEST['q'] || $_REQUEST['cid'] || $_REQUEST['topicId']) { //Search
$faqs->filter(array('topics__topic_id'=>$_REQUEST['topicId']));
if ($_REQUEST['q'])
$faqs->filter(Q::ANY(array(
'question__contains'=>$_REQUEST['q'],
'answer__contains'=>$_REQUEST['q'],
'keywords__contains'=>$_REQUEST['q'],
'category__name__contains'=>$_REQUEST['q'],
'category__description__contains'=>$_REQUEST['q'],
$faqs->filter(Q::all(array(
Q::ANY(array(
'question__contains'=>$_REQUEST['q'],
'answer__contains'=>$_REQUEST['q'],
'keywords__contains'=>$_REQUEST['q'],
'category__name__contains'=>$_REQUEST['q'],
'category__description__contains'=>$_REQUEST['q'],
))
)));
include CLIENTINC_DIR . 'kb-search.inc.php';
......
......@@ -4,7 +4,7 @@ if (!defined('OSTSCPINC') || !$thisstaff
die('Access Denied');
$info = $qs = array();
if($faq){
if($faq && $faq->getId()){
$title=__('Update FAQ').': '.$faq->getQuestion();
$action='update';
$submit_text=__('Save Changes');
......
......@@ -39,7 +39,7 @@ if(!defined('OSTSCPINC') || !$thisstaff || !$thisstaff->isAdmin()) die('Access D
<div class="sidebar pull-right">
<h3><?php echo __('Upgrade Tips');?></h3>
<p>1. <?php echo __('Remember to back up your osTicket database');?></p>
<p>2. <?php echo sprintf(__('Refer to %1$s Upgrade Guide %2$s for the latest tips'), '<a href="http://osticket.com/wiki/Upgrade_and_Migration" target="_blank">', '</a>');?></p>
<p>2. <?php echo sprintf(__('Refer to %1$s Upgrade Guide %2$s for the latest tips'), '<a href="https://docs.osticket.com/en/latest/Getting%20Started/Upgrade%20and%20Migration.html" target="_blank">', '</a>');?></p>
<p>3. <?php echo __('If you experience any problems, you can always restore your files/database backup.');?></p>
<p>4. <?php echo sprintf(__('We can help. Feel free to %1$s contact us %2$s for professional help.'), '<a href="http://osticket.com/support/" target="_blank">', '</a>');?></p>
......
......@@ -143,7 +143,7 @@ if ($_POST) {
}
$inc='faq-categories.inc.php'; //FAQs landing page.
if($faq) {
if($faq && $faq->getId()) {
$inc='faq-view.inc.php';
if ($_REQUEST['a']=='edit'
&& $thisstaff->hasPerm(FAQ::PERM_MANAGE))
......
......@@ -1167,15 +1167,16 @@ $(document).on('change', 'select[data-quick-add]', function() {
});
// Quick note interface
$(document).on('click.note', '.quicknote .action.edit-note', function() {
$(document).on('click.note', '.quicknote .action.edit-note', function(e) {
// Prevent Auto-Scroll to top of page
e.preventDefault();
var note = $(this).closest('.quicknote'),
body = note.find('.body'),
T = $('<textarea>').text(body.html());
if (note.closest('.dialog, .tip_box').length)
T.addClass('no-bar small');
body.replaceWith(T);
$.redact(T);
$(T).redactor('focus.setStart');
$.redact(T, { focusEnd: true });
note.find('.action.edit-note').hide();
note.find('.action.save-note').show();
note.find('.action.cancel-edit').show();
......@@ -1248,8 +1249,7 @@ $(document).on('click', '#new-note', function() {
note.replaceWith(T);
$('<p>').addClass('submit').css('text-align', 'center')
.append(button).appendTo(T.parent());
$.redact(T);
$(T).redactor('focus.setStart');
$.redact(T, { focusEnd: true });
return false;
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment