#275 Add setting for knowledgebase attachments folder
This commit is contained in:
parent
598e19130b
commit
698e0b678a
@ -697,9 +697,9 @@ if ( defined('HESK_DEMO') )
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="s_attach_dir" class="col-sm-3 control-label"><?php echo $hesklang['atf']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#62','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<label for="s_attach_dir" class="col-sm-3 control-label"><?php echo $hesklang['ticket_attach_dir']; ?> <a href="Javascript:void(0)" onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#62','400','500')"><i class="fa fa-question-circle settingsquestionmark"></i></a></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['atf']); ?>" name="s_attach_dir" size="40" maxlength="255" value="<?php echo $hesk_settings['attach_dir']; ?>" />
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['ticket_attach_dir']); ?>" name="s_attach_dir" size="40" maxlength="255" value="<?php echo $hesk_settings['attach_dir']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -1287,6 +1287,21 @@ if ( defined('HESK_DEMO') )
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="kb_attach_dir" class="col-sm-4 control-label">
|
||||
<span class="label label-primary"
|
||||
data-toggle="tooltip"
|
||||
title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
|
||||
<?php echo $hesklang['kb_attach_dir']; ?>
|
||||
<i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
|
||||
title="<?php echo $hesklang['kb_attach_dir']; ?>"
|
||||
data-content="<?php echo $hesklang['kb_attach_dir_help']; ?>"></i>
|
||||
</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" placeholder="<?php echo htmlspecialchars($hesklang['kb_attach_dir']); ?>" name="kb_attach_dir" size="40" maxlength="255" value="<?php echo $modsForHesk_settings['kb_attach_dir']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="knowledgebase-visibility-setting" class="col-sm-4 col-xs-12 control-label">
|
||||
<span class="label label-primary"
|
||||
|
@ -518,6 +518,7 @@ $set['request_location'] = empty($_POST['request_location']) ? 0 : 1;
|
||||
$set['category_order_column'] = empty($_POST['category_order_column']) ? 'cat_order' : 'name';
|
||||
$set['rich_text_for_tickets'] = empty($_POST['rich_text_for_tickets']) ? 0 : 1;
|
||||
$set['statuses_order_column'] = empty($_POST['statuses_order_column']) ? 'sort' : 'name';
|
||||
$set['kb_attach_dir'] = hesk_POST('kb_attach_dir', 'attachments');
|
||||
|
||||
if ($set['customer-email-verification-required'])
|
||||
{
|
||||
@ -592,7 +593,10 @@ $modsForHesk_settings[\'category_order_column\'] = \''.$set['category_order_colu
|
||||
$modsForHesk_settings[\'rich_text_for_tickets\'] = '.$set['rich_text_for_tickets'].';
|
||||
|
||||
//-- Column to sort statuses by. Can be either \'sort\' or \'name\'
|
||||
$modsForHesk_settings[\'statuses_order_column\'] = \''.$set['statuses_order_column'].'\';';
|
||||
$modsForHesk_settings[\'statuses_order_column\'] = \''.$set['statuses_order_column'].'\';
|
||||
|
||||
//-- Directory to store knowledgebase articles in.
|
||||
$modsForHesk_settings[\'kb_attach_dir\'] = \''.$set['kb_attach_dir'].'\';';
|
||||
|
||||
// Write the file
|
||||
if ( ! file_put_contents(HESK_PATH . 'modsForHesk_settings.inc.php', $modsForHesk_file_content) )
|
||||
|
@ -615,6 +615,8 @@ function initializeXrefTable() {
|
||||
}
|
||||
|
||||
function execute240FileUpdate() {
|
||||
global $hesk_settings;
|
||||
|
||||
$file = file_get_contents(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
|
||||
//-- Only add the additional settings if they aren't already there.
|
||||
@ -632,6 +634,13 @@ $modsForHesk_settings[\'category_order_column\'] = \'cat_order\';';
|
||||
//-- Setting for using rich-text editor for tickets. 0 = Disable, 1 = Enable
|
||||
$modsForHesk_settings[\'rich_text_for_tickets\'] = 0;';
|
||||
}
|
||||
if (strpos($file, '$modsForHesk_settings[\'kb_attach_dir\']') === false)
|
||||
{
|
||||
$file .= '
|
||||
|
||||
//-- Directory to store knowledgebase articles in.
|
||||
$modsForHesk_settings[\'kb_attach_dir\'] = \''.$hesk_settings['attach_dir'].'\';';
|
||||
}
|
||||
|
||||
return file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file);
|
||||
}
|
@ -54,6 +54,10 @@ $hesklang['status_sort_help'] = 'Determines if statuses shown on the manage stat
|
||||
$hesklang['cannot_delete_status_tickets'] = 'This status cannot be deleted because there are tickets set to this status.';
|
||||
$hesklang['default_statuses_updated'] = 'Default statuses have been updated!';
|
||||
$hesklang['download_count'] = 'Download Count';
|
||||
$hesklang['kb_attach_dir'] = 'Knowledgebase attachments folder';
|
||||
$hesklang['kb_attach_dir_help'] = 'Name of the folder, where knowledgebase attachments will be stored.<br><br>The folder needs to exist within the main HESK folder and be writable by PHP. On most systems names are CaSe SeNSiTiVe.
|
||||
<br><br>Allowed chars (other will be removed): a-z A-Z 0-9 _ -';
|
||||
$hesklang['ticket_attach_dir'] = 'Ticket attachments folder';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.3.0
|
||||
$hesklang['sm_icon'] = 'Icon';
|
||||
|
@ -55,4 +55,7 @@ $modsForHesk_settings['category_order_column'] = 'cat_order';
|
||||
$modsForHesk_settings['rich_text_for_tickets'] = 0;
|
||||
|
||||
//-- Column to sort statuses by. Can be either 'sort' or 'name'
|
||||
$modsForHesk_settings['statuses_order_column'] = 'sort';
|
||||
$modsForHesk_settings['statuses_order_column'] = 'sort';
|
||||
|
||||
//-- Directory to store knowledgebase articles in.
|
||||
$modsForHesk_settings['kb_attach_dir'] = 'attachments';
|
Loading…
x
Reference in New Issue
Block a user