diff --git a/.gitignore b/.gitignore index bdfa288b..7689f581 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ docs/docs_style.css docs/index.html docs/quick-guide.html docs/step-by-step-guide.html +download_attachment.php file_limits.php footer.txt header.txt diff --git a/admin/admin_ticket.php b/admin/admin_ticket.php index c7a74042..7f680d12 100644 --- a/admin/admin_ticket.php +++ b/admin/admin_ticket.php @@ -39,7 +39,6 @@ define('HESK_PATH','../'); require(HESK_PATH . 'hesk_settings.inc.php'); require(HESK_PATH . 'inc/common.inc.php'); require(HESK_PATH . 'inc/admin_functions.inc.php'); -require(HESK_PATH . 'inc/posting_functions.inc.php'); hesk_load_database_functions(); hesk_session_start(); @@ -239,31 +238,7 @@ if (isset($_POST['notemsg']) && hesk_token_check('POST')) { /* Add note to database */ $msg = nl2br(hesk_makeURL($msg)); - hesk_dbInsertID(); hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."notes` (`ticket`,`who`,`dt`,`message`) VALUES ('".intval($ticket['id'])."','".intval($_SESSION['id'])."',NOW(),'".hesk_dbEscape($msg)."')"); - $noteId = hesk_dbInsertID(); - - /* Upload attachments to database */ - if ($hesk_settings['attachments']['use']) - { - require(HESK_PATH . 'inc/attachments.inc.php'); - $attachments = array(); - for ($i=1;$i<=$hesk_settings['attachments']['max_number'];$i++) - { - $att = hesk_uploadFile($i); - if ($att !== false && !empty($att)) - { - $attachments[$i] = $att; - } - } - } - if ($hesk_settings['attachments']['use'] && !empty($attachments)) - { - foreach ($attachments as $myatt) - { - hesk_dbQuery("INSERT INTO `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` (`note_id`,`saved_name`,`real_name`,`size`) VALUES ('".hesk_dbEscape($noteId)."','".hesk_dbEscape($myatt['saved_name'])."','".hesk_dbEscape($myatt['real_name'])."','".intval($myatt['size'])."')"); - } - } /* Notify assigned staff that a note has been added if needed */ @@ -427,45 +402,6 @@ if (isset($_GET['delatt']) && hesk_token_check()) hesk_process_messages($hesklang['kb_att_rem'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999),'SUCCESS'); } -/* Delete note attachment option */ -if (isset($_GET['delete-note-att']) && hesk_token_check()) { - if ( ! $can_delete || ! $can_edit) - { - hesk_process_messages($hesklang['no_permission'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999)); - } - - $att_id = intval( hesk_GET('delete-note-att') ) or hesk_error($hesklang['inv_att_id']); - - $reply = intval( hesk_GET('reply', 0) ); - if ($reply < 1) - { - $reply = 0; - } - - /* Get attachment info */ - $res = hesk_dbQuery("SELECT * FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` WHERE `att_id`='".intval($att_id)."' LIMIT 1"); - if (hesk_dbNumRows($res) != 1) - { - hesk_process_messages($hesklang['id_not_valid'].' (att_id)','admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999)); - } - $att = hesk_dbFetchAssoc($res); - - /* Is note ID valid for this attachment? */ - if (!isset($_GET['note_id']) || $att['note_id'] != $_GET['note_id']) - { - hesk_process_messages($hesklang['trackID_not_found'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999)); - } - - /* Delete file from server */ - hesk_unlink(HESK_PATH.$hesk_settings['attach_dir'].'/'.$att['saved_name']); - - /* Delete attachment from database */ - hesk_dbQuery("DELETE FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."attachments` WHERE `att_id`='".intval($att_id)."'"); - - hesk_process_messages($hesklang['kb_att_rem'],'admin_ticket.php?track='.$trackingID.'&Refresh='.mt_rand(10000,99999),'SUCCESS'); -} - - if (isset($_POST['note_message'])) { $n = $_POST['note_id']; if ($can_del_notes) @@ -911,31 +847,16 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');

-

-
-
-

- - -
-
- - - '.$noteAttachment['real_name'].'
'; - } ?> -
-
+

+ 0) { ?>

@@ -946,6 +867,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); ?>
+ :
diff --git a/download_attachment.php b/download_attachment.php deleted file mode 100644 index a7b713b1..00000000 --- a/download_attachment.php +++ /dev/null @@ -1,174 +0,0 @@ - $chunksize) -{ - $handle = fopen($realpath, 'rb'); - $buffer = ''; - while ( ! feof($handle)) - { - set_time_limit(300); - $buffer = fread($handle, $chunksize); - echo $buffer; - flush(); - } - fclose($handle); -} -else -{ - readfile($realpath); -} - -exit(); -?> diff --git a/install/updateTo1-7-0.php b/install/updateTo1-7-0.php index 1808270f..5adb55d0 100644 --- a/install/updateTo1-7-0.php +++ b/install/updateTo1-7-0.php @@ -90,16 +90,11 @@ if (!file_put_contents(HESK_PATH.'modsForHesk_settings.inc.php', $file)) //-- Set this to 1 to enable email verification for new customers $modsForHesk_settings[\'customer_email_verification_required\'] = 0; - -

-

Now you can delete the install folder for security reasons, and then proceed back to the Help Desk

'; + +

After you have done this, click this link to continue installation

'; } if ($updateSuccess) { -?> - -

Installation / Update complete!

-

Please delete the install folder for security reasons, and then proceed back to the Help Desk

- - \ No newline at end of file + header('Location: updateTo2-0-0.php'); +} ?> \ No newline at end of file diff --git a/install/updateTo2-0-0.php b/install/updateTo2-0-0.php new file mode 100644 index 00000000..6dff80aa --- /dev/null +++ b/install/updateTo2-0-0.php @@ -0,0 +1,19 @@ + + +

Installation / Update complete!

+

Please delete the install folder for security reasons, and then proceed back to the Help Desk

+ + \ No newline at end of file diff --git a/language/en/text.php b/language/en/text.php index ba17d865..4c9f1c0d 100644 --- a/language/en/text.php +++ b/language/en/text.php @@ -61,8 +61,6 @@ $hesklang['note_last_edit'] = 'Note last edited on: %s'; // %s: timestamp of las $hesklang['total_number_of_edits'] = 'Total number of edits: %s'; // %s: total number of edits $hesklang['add_row'] = 'Add row'; $hesklang['addnote'] = 'Add note'; -$hesklang['no_noteID'] = 'No Note ID'; -$hesklang['note_id_not_found'] = 'Note ID not found'; $hesklang['mods_for_hesk'] = 'Mods for HESK'; $hesklang['err_modsForHesk_settings'] = 'Can\'t open file modsForHesk_settings.inc.php for writing. Please CHMOD this file to 666 (rw-rw-rw-)'; $hesklang['mods_for_hesk_version'] = 'Mods for HESK Version';