Browse Source

#39 Ticket screen now shows parent/children of that ticket

merge-requests/2/head
Mike Koch 7 years ago
parent
commit
a4fa98d010
  1. 29
      admin/admin_ticket.php
  2. 5
      install/updateTo1-4-0.php
  3. 3
      language/en/text.php

29
admin/admin_ticket.php

@ -500,6 +500,35 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
}
?>
</li>
<li class="list-group-item">
<strong><?php echo $hesklang['parent']; ?></strong>
<p><?php
if ($ticket['parent'] != null) {
//-- Get the tracking ID of the parent
$parent = hesk_dbQuery('SELECT `trackid` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets`
WHERE `ID` = '.hesk_dbEscape($ticket['parent']))->fetch_assoc();
echo '<a href="admin_ticket.php?track='.$parent['trackid'].'&Refresh='.mt_rand(10000,99999).'">'.$parent['trackid'].'</a>';
} else {
echo $hesklang['none'];
}
?></p>
</li>
<li class="list-group-item">
<strong><?php echo $hesklang['children']; ?></strong>
<p><?php
//-- Check if any tickets have a parent set to this tracking ID
$hasRows = false;
$childrenRS = hesk_dbQuery('SELECT `trackid` FROM `'.hesk_dbEscape($hesk_settings['db_pfix']).'tickets`
WHERE `parent` = '.hesk_dbEscape($ticket['id']));
while ($row = $childrenRS->fetch_assoc()) {
$hasRows = true;
echo '<a href="admin_ticket.php?track='.$row['trackid'].'&Refresh='.mt_rand(10000,99999).'">'.$row['trackid'].'</a><br>';
}
if (!$hasRows) {
echo $hesklang['none'];
}
?></p>
</li>
</ul>
</div>
</div>

5
install/updateTo1-4-0.php

@ -4,11 +4,12 @@ define('HESK_PATH','../');
require(HESK_PATH . 'install/install_functions.inc.php');
require(HESK_PATH . 'hesk_settings.inc.php');
hesk_dbConnect();
hesk_dbQuery("CREATE TABLE `".$hesk_settings['db_pfix']."denied_ips` (
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_ips` (
`ID` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`RangeStart` VARCHAR(100) NOT NULL,
`RangeEnd` VARCHAR(100) NOT NULL)");
hesk_dbQuery("CREATE TABLE `".$hesk_settings['db_pfix']."denied_emails` (ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Email VARCHAR(100) NOT NULL PRIMARY KEY);");
hesk_dbQuery("CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."denied_emails` (ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Email VARCHAR(100) NOT NULL PRIMARY KEY);");
hesk_dbQuery("ALTER TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."tickets` ADD COLUMN `parent` MEDIUMINT(8) NULL AFTER `custom20`;");
?>
<h1>Update complete!</h1>

3
language/en/text.php

@ -59,6 +59,9 @@ $hesklang['email_bans'] = 'Email Bans';
$hesklang['ip_email_bans'] = 'IP / Email Bans';
$hesklang['ip_banned'] = 'Your IP has been banned by the help desk. You will be unable to submit a ticket until your IP ban has been removed.';
$hesklang['email_banned'] = 'The email address you have entered has been banned by the help desk. You will be unable to submit a ticket until your email ban has been removed.';
$hesklang['none'] = 'None';
$hesklang['parent'] = 'Parent';
$hesklang['children'] = 'Children';
// ADDED OR MODIFIED IN NuMods 1.3.1
$hesklang['autorefresh'] = 'Autorefresh:';

Loading…
Cancel
Save