added an option to suppress email address in the search results pane for regular users

This commit is contained in:
SJ 2015-09-03 14:43:57 +02:00
parent 876f21bec0
commit 1411b53933
2 changed files with 5 additions and 1 deletions

View File

@ -258,6 +258,9 @@ $config['FOUR_EYES_LOGIN_FOR_AUDITOR'] = 0;
$config['MEMCACHED_PREFIX'] = '_piler:';
$config['MEMCACHED_TTL'] = 900;
$SUPPRESS_RECIPIENTS = array();
$memcached_servers = array(
array('127.0.0.1', 11211)
);

View File

@ -484,6 +484,7 @@ class ModelSearchSearch extends Model {
$tag = array();
$note = array();
$q = '';
global $SUPPRESS_RECIPIENTS;
if(count($ids) == 0) return $messages;
@ -498,7 +499,7 @@ class ModelSearchSearch extends Model {
if(isset($query->rows)) {
foreach($query->rows as $r) {
if(!isset($rcpt[$r['id']])) {
if(!isset($rcpt[$r['id']]) && !in_array($r['to'], $SUPPRESS_RECIPIENTS)) {
$srcpt[$r['id']] = $r['to'];
$rcpt[$r['id']] = $r['to'];
}