Browse Source

Update rest of files to HESK 2.7.6

master
Mike Koch 1 year ago
parent
commit
f40df54772
No account linked to committer's email address

+ 46
- 46
.gitignore View File

@@ -197,52 +197,52 @@ inc/tabs/tabber-minimized.js
inc/tabs/tabber.css
inc/timer/hesk_timer.js
inc/timer/index.htm
inc/tiny_mce/3.5.11/langs/en.js
inc/tiny_mce/3.5.11/license.txt
inc/tiny_mce/3.5.11/themes/advanced/about.htm
inc/tiny_mce/3.5.11/themes/advanced/anchor.htm
inc/tiny_mce/3.5.11/themes/advanced/charmap.htm
inc/tiny_mce/3.5.11/themes/advanced/color_picker.htm
inc/tiny_mce/3.5.11/themes/advanced/editor_template.js
inc/tiny_mce/3.5.11/themes/advanced/image.htm
inc/tiny_mce/3.5.11/themes/advanced/img/colorpicker.jpg
inc/tiny_mce/3.5.11/themes/advanced/img/flash.gif
inc/tiny_mce/3.5.11/themes/advanced/img/icons.gif
inc/tiny_mce/3.5.11/themes/advanced/img/iframe.gif
inc/tiny_mce/3.5.11/themes/advanced/img/pagebreak.gif
inc/tiny_mce/3.5.11/themes/advanced/img/quicktime.gif
inc/tiny_mce/3.5.11/themes/advanced/img/realmedia.gif
inc/tiny_mce/3.5.11/themes/advanced/img/shockwave.gif
inc/tiny_mce/3.5.11/themes/advanced/img/trans.gif
inc/tiny_mce/3.5.11/themes/advanced/img/video.gif
inc/tiny_mce/3.5.11/themes/advanced/img/windowsmedia.gif
inc/tiny_mce/3.5.11/themes/advanced/js/about.js
inc/tiny_mce/3.5.11/themes/advanced/js/anchor.js
inc/tiny_mce/3.5.11/themes/advanced/js/charmap.js
inc/tiny_mce/3.5.11/themes/advanced/js/color_picker.js
inc/tiny_mce/3.5.11/themes/advanced/js/image.js
inc/tiny_mce/3.5.11/themes/advanced/js/link.js
inc/tiny_mce/3.5.11/themes/advanced/js/source_editor.js
inc/tiny_mce/3.5.11/themes/advanced/langs/en.js
inc/tiny_mce/3.5.11/themes/advanced/langs/en_dlg.js
inc/tiny_mce/3.5.11/themes/advanced/link.htm
inc/tiny_mce/3.5.11/themes/advanced/shortcuts.htm
inc/tiny_mce/3.5.11/themes/advanced/skins/default/content.css
inc/tiny_mce/3.5.11/themes/advanced/skins/default/dialog.css
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/buttons.png
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/items.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/menu_arrow.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/menu_check.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/progress.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/img/tabs.gif
inc/tiny_mce/3.5.11/themes/advanced/skins/default/ui.css
inc/tiny_mce/3.5.11/themes/advanced/source_editor.htm
inc/tiny_mce/3.5.11/tiny_mce.js
inc/tiny_mce/3.5.11/tiny_mce_popup.js
inc/tiny_mce/3.5.11/utils/editable_selects.js
inc/tiny_mce/3.5.11/utils/form_utils.js
inc/tiny_mce/3.5.11/utils/mctabs.js
inc/tiny_mce/3.5.11/utils/validate.js
inc/tiny_mce/3.5.12/langs/en.js
inc/tiny_mce/3.5.12/license.txt
inc/tiny_mce/3.5.12/themes/advanced/about.htm
inc/tiny_mce/3.5.12/themes/advanced/anchor.htm
inc/tiny_mce/3.5.12/themes/advanced/charmap.htm
inc/tiny_mce/3.5.12/themes/advanced/color_picker.htm
inc/tiny_mce/3.5.12/themes/advanced/editor_template.js
inc/tiny_mce/3.5.12/themes/advanced/image.htm
inc/tiny_mce/3.5.12/themes/advanced/img/colorpicker.jpg
inc/tiny_mce/3.5.12/themes/advanced/img/flash.gif
inc/tiny_mce/3.5.12/themes/advanced/img/icons.gif
inc/tiny_mce/3.5.12/themes/advanced/img/iframe.gif
inc/tiny_mce/3.5.12/themes/advanced/img/pagebreak.gif
inc/tiny_mce/3.5.12/themes/advanced/img/quicktime.gif
inc/tiny_mce/3.5.12/themes/advanced/img/realmedia.gif
inc/tiny_mce/3.5.12/themes/advanced/img/shockwave.gif
inc/tiny_mce/3.5.12/themes/advanced/img/trans.gif
inc/tiny_mce/3.5.12/themes/advanced/img/video.gif
inc/tiny_mce/3.5.12/themes/advanced/img/windowsmedia.gif
inc/tiny_mce/3.5.12/themes/advanced/js/about.js
inc/tiny_mce/3.5.12/themes/advanced/js/anchor.js
inc/tiny_mce/3.5.12/themes/advanced/js/charmap.js
inc/tiny_mce/3.5.12/themes/advanced/js/color_picker.js
inc/tiny_mce/3.5.12/themes/advanced/js/image.js
inc/tiny_mce/3.5.12/themes/advanced/js/link.js
inc/tiny_mce/3.5.12/themes/advanced/js/source_editor.js
inc/tiny_mce/3.5.12/themes/advanced/langs/en.js
inc/tiny_mce/3.5.12/themes/advanced/langs/en_dlg.js
inc/tiny_mce/3.5.12/themes/advanced/link.htm
inc/tiny_mce/3.5.12/themes/advanced/shortcuts.htm
inc/tiny_mce/3.5.12/themes/advanced/skins/default/content.css
inc/tiny_mce/3.5.12/themes/advanced/skins/default/dialog.css
inc/tiny_mce/3.5.12/themes/advanced/skins/default/img/buttons.png
inc/tiny_mce/3.5.12/themes/advanced/skins/default/img/items.gif
inc/tiny_mce/3.5.12/themes/advanced/skins/default/img/menu_arrow.gif
inc/tiny_mce/3.5.12/themes/advanced/skins/default/img/menu_check.gif
inc/tiny_mce/3.5.12/themes/advanced/skins/default/img/progress.gif
inc/tiny_mce/3.5.12/themes/advanced/skins/default/img/tabs.gif
inc/tiny_mce/3.5.12/themes/advanced/skins/default/ui.css
inc/tiny_mce/3.5.12/themes/advanced/source_editor.htm
inc/tiny_mce/3.5.12/tiny_mce.js
inc/tiny_mce/3.5.12/tiny_mce_popup.js
inc/tiny_mce/3.5.12/utils/editable_selects.js
inc/tiny_mce/3.5.12/utils/form_utils.js
inc/tiny_mce/3.5.12/utils/mctabs.js
inc/tiny_mce/3.5.12/utils/validate.js
inc/treemenu/TreeMenu.php
inc/treemenu/index.htm
inc/zip/Zip.php

+ 18
- 7
admin/manage_knowledgebase.php View File

@@ -212,7 +212,8 @@ while (count($kb_cat) > 0)

if (isset($node[$up]))
{
$node[$my] = &$node[$up]->addItem(new HTML_TreeNode(array('hesk_selected' => $selected, 'text' => $text, 'text_short' => $text_short, 'menu_icons' => $menu_icons, 'hesk_catid' => $cat['id'], 'hesk_select' => 'option'.$j, 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true)));
$HTML_TreeNode[$my] = new HTML_TreeNode(array('hesk_selected' => $selected, 'text' => $text, 'text_short' => $text_short, 'menu_icons' => $menu_icons, 'hesk_catid' => $cat['id'], 'hesk_select' => 'option'.$j, 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true));
$node[$my] = &$node[$up]->addItem($HTML_TreeNode[$my]);
}
else
{
@@ -242,8 +243,11 @@ while (count($kb_cat) > 0)
$menu->addItem($node[1]);

// Create the presentation class
$treeMenu = & ref_new(new HTML_TreeMenu_DHTML($menu, array('images' => '../img', 'defaultClass' => 'treeMenuDefault', 'isDynamic' => true)));
$listBox = & ref_new(new HTML_TreeMenu_Listbox($menu));
$HTML_TreeMenu_DHTML = new HTML_TreeMenu_DHTML($menu, array('images' => '../img', 'defaultClass' => 'treeMenuDefault', 'isDynamic' => true));
$treeMenu = & ref_new($HTML_TreeMenu_DHTML);

$HTML_TreeMenu_Listbox = new HTML_TreeMenu_Listbox($menu);
$listBox = & ref_new($HTML_TreeMenu_Listbox);

/* Hide new article and new category forms by default */
if (!isset($_SESSION['hide']))
@@ -1353,7 +1357,8 @@ function edit_article()

if (isset($node[$up]))
{
$node[$my] = &$node[$up]->addItem(new HTML_TreeNode(array('hesk_parent' => $this_cat['parent'], 'text' => 'Text', 'text_short' => $text_short, 'hesk_catid' => $cat['id'], 'hesk_select' => 'option'.$j, 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true)));
$HTML_TreeNode[$my] = new HTML_TreeNode(array('hesk_parent' => $this_cat['parent'], 'text' => 'Text', 'text_short' => $text_short, 'hesk_catid' => $cat['id'], 'hesk_select' => 'option'.$j, 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true));
$node[$my] = &$node[$up]->addItem($HTML_TreeNode[$my]);
}
else
{
@@ -1383,7 +1388,8 @@ function edit_article()
$menu->addItem($node[1]);

// Create the presentation class
$listBox = & ref_new(new HTML_TreeMenu_Listbox($menu));
$HTML_TreeMenu_Listbox = new HTML_TreeMenu_Listbox($menu);
$listBox = & ref_new($HTML_TreeMenu_Listbox);

/* Print header */
require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
@@ -1610,6 +1616,9 @@ function manage_category() {

foreach ($kb_cat as $k=>$cat)
{
if ($cat['id'] == $catid) {
continue;
}

if (in_array($cat['parent'],$thislevel))
{
@@ -1622,7 +1631,8 @@ function manage_category() {

if (isset($node[$up]))
{
$node[$my] = &$node[$up]->addItem(new HTML_TreeNode(array('hesk_parent' => $this_cat['parent'], 'text' => 'Text', 'text_short' => $text_short, 'hesk_catid' => $cat['id'], 'hesk_select' => 'option'.$j, 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true)));
$HTML_TreeNode[$my] = new HTML_TreeNode(array('hesk_parent' => $this_cat['parent'], 'text' => 'Text', 'text_short' => $text_short, 'hesk_catid' => $cat['id'], 'hesk_select' => 'option'.$j, 'icon' => $icon, 'expandedIcon' => $expandedIcon, 'expanded' => true));
$node[$my] = &$node[$up]->addItem($HTML_TreeNode[$my]);
}
else
{
@@ -1652,7 +1662,8 @@ function manage_category() {
$menu->addItem($node[1]);

// Create the presentation class
$listBox = & ref_new(new HTML_TreeMenu_Listbox($menu));
$HTML_TreeMenu_Listbox = new HTML_TreeMenu_Listbox($menu);
$listBox = & ref_new($HTML_TreeMenu_Listbox);

/* Print header */
require_once(HESK_PATH . 'inc/headerAdmin.inc.php');

+ 1
- 1
admin/manage_users.php View File

@@ -736,7 +736,7 @@ function hesk_validateUserInfo($pass_required = 1, $redirect_to = './manage_user
}
}

if (strlen($myuser['signature']) > 1000) {
if (hesk_mb_strlen($myuser['signature']) > 1000) {
$hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>';
}


+ 1
- 1
admin/profile.php View File

@@ -170,7 +170,7 @@ function update_profile()
$_SESSION['new']['signature'] = hesk_input(hesk_POST('signature'));

/* Signature */
if (strlen($_SESSION['new']['signature']) > 1000) {
if (hesk_mb_strlen($_SESSION['new']['signature']) > 1000) {
$hesk_error_buffer .= '<li>' . $hesklang['signature_long'] . '</li>';
}


+ 1
- 1
api/BusinessLogic/Validators.php View File

@@ -19,7 +19,7 @@ class Validators extends \BaseClass {
$address = str_replace(';', ',', $address);

/* Check if addresses are valid */
$all = explode(',', $address);
$all = array_unique(explode(',',$address));
foreach ($all as $k => $v) {
if (!self::isValidEmail($v)) {
unset($all[$k]);

+ 19
- 4
inc/common.inc.php View File

@@ -379,6 +379,16 @@ function hesk_isREQUEST($in)
return isset($_GET[$in]) || isset($_POST[$in]) ? true : false;
} // END hesk_isREQUEST()

function hesk_mb_substr($in, $start, $length)
{
return function_exists('mb_substr') ? mb_substr($in, $start, $length, 'UTF-8') : substr($in, $start, $length);
} // END hesk_mb_substr()

function hesk_mb_strlen($in)
{
return function_exists('mb_strlen') ? mb_strlen($in, 'UTF-8') : strlen($in);
} // END hesk_mb_strlen()

function hesk_mb_strtolower($in) {
return function_exists('mb_strtolower') ? mb_strtolower($in) : strtolower($in);
} // END hesk_mb_strtolower()
@@ -477,7 +487,7 @@ function hesk_verifyEmailMatch($trackingID, $my_email = 0, $ticket_email = 0, $e
} // END hesk_verifyEmailMatch()


function hesk_getCustomerEmail($can_remember = 0, $field = '')
function hesk_getCustomerEmail($can_remember = 0, $field = '', $force_only_one = 0)
{
global $hesk_settings, $hesklang;

@@ -516,6 +526,11 @@ function hesk_getCustomerEmail($can_remember = 0, $field = '')
// Remove unwanted side-effects
$my_email = hesk_emailCleanup($my_email);

// Force only one email address? Use the first one.
if ($force_only_one) {
$my_email = strtok($my_email, ',');
}

$hesk_settings['e_param'] = '&e=' . rawurlencode($my_email);
$hesk_settings['e_query'] = '&amp;e=' . rawurlencode($my_email);
$hesk_settings['e_email'] = $my_email;
@@ -1665,7 +1680,7 @@ function hesk_input($in, $error = 0, $redirect_to = '', $force_slashes = 0, $max

// Check length
if ($max_length) {
$in = substr($in, 0, $max_length);
$in = hesk_mb_substr($in, 0, $max_length);
}

// Return processed value
@@ -1685,7 +1700,7 @@ function hesk_validateEmail($address, $error, $required = 1)
$address = str_replace(';', ',', $address);

/* Check if addresses are valid */
$all = explode(',', $address);
$all = array_unique(explode(',',$address));
foreach ($all as $k => $v) {
if (!hesk_isValidEmail($v)) {
unset($all[$k]);
@@ -1799,7 +1814,7 @@ function hesk_session_start()
return true;
} else {
global $hesk_settings, $hesklang;
hesk_error("$hesklang[no_session] $hesklang[contact_webmaster] $hesk_settings[webmaster_mail]");
hesk_error("$hesklang[no_session] $hesklang[contact_webmsater] $hesk_settings[webmaster_mail]");
}

} // END hesk_session_start()

+ 1
- 1
inc/custom_fields.inc.php View File

@@ -66,7 +66,7 @@ function hesk_load_custom_fields($category=0, $use_cache=1)

// Name for display in ticket list; punctuation removed and shortened
$row['title'] = hesk_remove_punctuation($row['name']);
$row['title'] = strlen($row['title']) > 30 ? substr($row['title'], 0, 30) . '...' : $row['title'];
$row['title'] = hesk_mb_strlen($row['title']) > 30 ? hesk_mb_substr($row['title'], 0, 30) . '...' : $row['title'];

// A version with forced punctuation
$row['name:'] = in_array(substr($row['name'], -1), array(':', '?', '!', '.') ) ? $row['name'] : $row['name'] . ':';

+ 1
- 0
inc/email_functions.inc.php View File

@@ -513,6 +513,7 @@ function hesk_mail($to, $subject, $message, $htmlMessage, $modsForHesk_settings,

// Remove duplicate recipients
$to_arr = array_unique(explode(',', $to));
$to_arr = array_values($to_arr);
$to = implode(',', $to_arr);

// Use PHP's mail function

+ 1
- 1
inc/header.inc.php View File

@@ -175,7 +175,7 @@ header('X-UA-Compatible: IE=edge');
/* If page requires WYSIWYG editor include TinyMCE Javascript */
if (defined('WYSIWYG') && $hesk_settings['kb_wysiwyg']) {
?>
<script type="text/javascript" src="<?php echo HESK_PATH; ?>inc/tiny_mce/3.5.11/tiny_mce.js"></script>
<script type="text/javascript" src="<?php echo HESK_PATH; ?>inc/tiny_mce/3.5.12/tiny_mce.js"></script>
<?php
}


+ 3
- 3
inc/knowledgebase_functions.inc.php View File

@@ -26,12 +26,12 @@ function hesk_kbArticleContentPreview($txt)
$txt = strip_tags($txt);

// If text is larger than article preview length, shorten it
if (strlen($txt) > $hesk_settings['kb_substrart']) {
if (hesk_mb_strlen($txt) > $hesk_settings['kb_substrart']) {
// The quick but not 100% accurate way (number of chars displayed may be lower than the limit)
return substr($txt, 0, $hesk_settings['kb_substrart']) . '...';
return hesk_mb_substr($txt, 0, $hesk_settings['kb_substrart']) . '...';

// If you want a more accurate, but also slower way, use this instead
// return hesk_htmlentities( substr( hesk_html_entity_decode($txt), 0, $hesk_settings['kb_substrart'] ) ) . '...';
// return hesk_htmlentities( hesk_mb_substr( hesk_html_entity_decode($txt), 0, $hesk_settings['kb_substrart'] ) ) . '...';
}

return $txt;

+ 1
- 1
inc/pipe_functions.inc.php View File

@@ -366,7 +366,7 @@ function hesk_stripQuotedText($message)
foreach ($hesk_settings['languages'] as $language => $settings) {
if (($found = strpos($message, $settings['hr'])) !== false) {
// "Reply above this line" tag found, strip quoted reply
$message = substr($message, 0, $found);
$message = hesk_mb_substr($message, 0, $found);
$message .= "\n" . $hesklang['qrr'];

// Set language to the detected language

+ 1
- 1
inc/posting_functions.inc.php View File

@@ -23,7 +23,7 @@ function hesk_newTicket($ticket, $isVerified = true)
global $hesk_settings, $hesklang, $hesk_db_link;

// Generate a subject if necessary
if (strlen($ticket['subject']) < 1)
if (hesk_mb_strlen($ticket['subject']) < 1)
{
$ticket['subject'] = sprintf($hesklang['default_subject'], $ticket['name']);
}

+ 3
- 3
inc/show_search_form.inc.php View File

@@ -57,14 +57,14 @@ $can_view_unassigned = hesk_checkPermission('can_view_unassigned', 0);
$category_options = '';
if (isset($hesk_settings['categories']) && count($hesk_settings['categories'])) {
foreach ($hesk_settings['categories'] as $row['id'] => $row['name']) {
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'], 0, 30) . '...' : $row['name'];
$row['name'] = (hesk_mb_strlen($row['name']) > 30) ? hesk_mb_substr($row['name'],0,30) . '...' : $row['name'];
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
$category_options .= '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>';
}
} else {
$res2 = hesk_dbQuery('SELECT `id`, `name` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'categories` WHERE ' . hesk_myCategories('id') . ' ORDER BY `cat_order` ASC');
while ($row = hesk_dbFetchAssoc($res2)) {
$row['name'] = (strlen($row['name']) > 30) ? substr($row['name'], 0, 30) . '...' : $row['name'];
$row['name'] = (hesk_mb_strlen($row['name']) > 30) ? hesk_mb_substr($row['name'],0,30) . '...' : $row['name'];
$selected = ($row['id'] == $category) ? 'selected="selected"' : '';
$category_options .= '<option value="' . $row['id'] . '" ' . $selected . '>' . $row['name'] . '</option>';
}
@@ -436,7 +436,7 @@ $more2 = empty($_GET['more2']) ? 0 : 1;
$v['name'] = $hesklang[$v['name']];
}

$v['name'] = (strlen($v['name']) > 30) ? substr($v['name'], 0, 30) . '...' : $v['name'];
$v['name'] = (hesk_mb_strlen($v['name']) > 30) ? hesk_mb_substr($v['name'],0,30) . '...' : $v['name'];
echo '<option style="background: #ffffff" value="' . $k . '" ' . $selected . '>' . $v['name'] . '</option>';
}
}

+ 1
- 1
inc/ticket_list.inc.php View File

@@ -246,7 +246,7 @@ if ($total > 0) {
}

// Set message (needed for row title)
$ticket['message'] = $first_line . substr(strip_tags($ticket['message']), 0, 200) . '...';
$ticket['message'] = $first_line . hesk_mb_substr(strip_tags($ticket['message']),0,200).'...';

// Start ticket row
echo '

inc/tiny_mce/3.5.11/plugins/autolink/editor_plugin.js → inc/tiny_mce/3.5.12/plugins/autolink/editor_plugin.js View File


inc/tiny_mce/3.5.11/plugins/autolink/editor_plugin_src.js → inc/tiny_mce/3.5.12/plugins/autolink/editor_plugin_src.js View File


+ 1
- 1
knowledgebase.php View File

@@ -173,7 +173,7 @@ if (!$show['show']) {
define('HESK_NO_ROBOTS', 1);

/* Print header */
$hesk_settings['tmp_title'] = $hesklang['sr'] . ': ' . substr(hesk_htmlspecialchars(stripslashes($query)), 0, 20);
$hesk_settings['tmp_title'] = $hesklang['sr'] . ': ' . hesk_mb_substr(hesk_htmlspecialchars(stripslashes($query)),0,20);
require_once(HESK_PATH . 'inc/header.inc.php');
hesk_kb_header($hesk_settings['kb_link']);


+ 2
- 2
suggest_articles.php View File

@@ -59,8 +59,8 @@ if (hesk_isREQUEST('p')) {
}

$txt = strip_tags($article['content']);
if (strlen($txt) > $hesk_settings['kb_substrart']) {
$txt = substr($txt, 0, $hesk_settings['kb_substrart']) . '...';
if (hesk_mb_strlen($txt) > $hesk_settings['kb_substrart']) {
$txt = hesk_mb_substr($txt, 0, $hesk_settings['kb_substrart']).'...';
}

echo '

+ 1
- 1
ticket.php View File

@@ -65,7 +65,7 @@ $is_form = hesk_SESSION('t_form');
$trackingID = hesk_cleanID('', hesk_SESSION('t_track'));

/* Email required to view ticket? */
$my_email = hesk_getCustomerEmail(1, 't_email');
$my_email = hesk_getCustomerEmail(1, 't_email', 1);

/* Remember email address? */
$do_remember = strlen($do_remember) || strlen(hesk_SESSION('t_remember')) ? ' checked="checked" ' : '';

Loading…
Cancel
Save