Skip to content
Snippets Groups Projects
Commit f1fddeb0 authored by Jared Hancock's avatar Jared Hancock
Browse files

Deprecate 'show_related_tickets'

Client accounts now that the user is verified either via staff or the
client's email mailbox, there's a much lower risk to showing a verified user
other tickets and virtually no reason that an administrator should have to
turn the feature on.
parent b7a9fa86
No related branches found
No related tags found
No related merge requests found
...@@ -296,10 +296,6 @@ class OsticketConfig extends Config { ...@@ -296,10 +296,6 @@ class OsticketConfig extends Config {
return $this->get('passwd_reset_period'); return $this->get('passwd_reset_period');
} }
function showRelatedTickets() {
return $this->get('show_related_tickets');
}
function isHtmlThreadEnabled() { function isHtmlThreadEnabled() {
return $this->get('enable_html_thread'); return $this->get('enable_html_thread');
} }
......
...@@ -282,7 +282,7 @@ class UserNav { ...@@ -282,7 +282,7 @@ class UserNav {
$navs['new']=array('desc'=>'Open New Ticket','href'=>'open.php','title'=>''); $navs['new']=array('desc'=>'Open New Ticket','href'=>'open.php','title'=>'');
if($user && $user->isValid()) { if($user && $user->isValid()) {
if(!$user->isGuest() && $cfg && $cfg->showRelatedTickets()) { if(!$user->isGuest()) {
$navs['tickets']=array('desc'=>sprintf('Tickets (%d)',$user->getNumTickets()), $navs['tickets']=array('desc'=>sprintf('Tickets (%d)',$user->getNumTickets()),
'href'=>'tickets.php', 'href'=>'tickets.php',
'title'=>'Show all tickets'); 'title'=>'Show all tickets');
......
...@@ -48,11 +48,7 @@ header("Content-Type: text/html; charset=UTF-8\r\n"); ...@@ -48,11 +48,7 @@ header("Content-Type: text/html; charset=UTF-8\r\n");
echo Format::htmlchars($thisclient->getName()).' |'; echo Format::htmlchars($thisclient->getName()).' |';
?> ?>
<a href="<?php echo ROOT_PATH; ?>account.php">Profile</a> | <a href="<?php echo ROOT_PATH; ?>account.php">Profile</a> |
<?php
if($cfg->showRelatedTickets()) {?>
<a href="<?php echo ROOT_PATH; ?>tickets.php">Tickets <b>(<?php echo $thisclient->getNumTickets(); ?>)</b></a> - <a href="<?php echo ROOT_PATH; ?>tickets.php">Tickets <b>(<?php echo $thisclient->getNumTickets(); ?>)</b></a> -
<?php
} ?>
<a href="<?php echo ROOT_PATH; ?>logout.php?auth=<?php echo $ost->getLinkToken(); ?>">Log Out</a> <a href="<?php echo ROOT_PATH; ?>logout.php?auth=<?php echo $ost->getLinkToken(); ?>">Log Out</a>
<?php <?php
}elseif($nav){ ?> }elseif($nav){ ?>
......
<?php <?php
if(!defined('OSTCLIENTINC') || !is_object($thisclient) || !$thisclient->isValid() || !$cfg->showRelatedTickets()) die('Access Denied'); if(!defined('OSTCLIENTINC') || !is_object($thisclient) || !$thisclient->isValid()) die('Access Denied');
$qstr='&'; //Query string collector $qstr='&'; //Query string collector
$status=null; $status=null;
......
...@@ -76,13 +76,6 @@ if(!($maxfileuploads=ini_get('max_file_uploads'))) ...@@ -76,13 +76,6 @@ if(!($maxfileuploads=ini_get('max_file_uploads')))
<em>(Minutes to lock a ticket on activity - enter 0 to disable locking)</em> <em>(Minutes to lock a ticket on activity - enter 0 to disable locking)</em>
</td> </td>
</tr> </tr>
<tr>
<td width="180">Show Related Tickets:</td>
<td>
<input type="checkbox" name="show_related_tickets" value="1" <?php echo $config['show_related_tickets'] ?'checked="checked"':''; ?> >
<em>(Show all related tickets on user login - otherwise access is restricted to one ticket view per login)</em>
</td>
</tr>
<tr> <tr>
<td>Human Verification:</td> <td>Human Verification:</td>
<td> <td>
......
...@@ -85,6 +85,9 @@ CREATE TABLE `%TABLE_PREFIX%organization` ( ...@@ -85,6 +85,9 @@ CREATE TABLE `%TABLE_PREFIX%organization` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8; ) DEFAULT CHARSET=utf8;
DELETE FROM `%TABLE_PREFIX%config` where `namespace`='core'
AND `key` = 'show_related_tickets';
-- Finished with patch -- Finished with patch
UPDATE `%TABLE_PREFIX%config` UPDATE `%TABLE_PREFIX%config`
SET `value` = '4323a6a81c35efbf7722b7fc4e475440' SET `value` = '4323a6a81c35efbf7722b7fc4e475440'
......
...@@ -102,7 +102,7 @@ if($ticket && $ticket->checkUserAccess($thisclient)) { ...@@ -102,7 +102,7 @@ if($ticket && $ticket->checkUserAccess($thisclient)) {
} }
else else
$inc='view.inc.php'; $inc='view.inc.php';
} elseif($cfg->showRelatedTickets() && $thisclient->getNumTickets()) { } elseif($thisclient->getNumTickets()) {
$inc='tickets.inc.php'; $inc='tickets.inc.php';
} else { } else {
$nav->setActiveNav('new'); $nav->setActiveNav('new');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment