You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2015-12-06 20:06:41

chris.gralike@amis.nl
Member
From: NL
Registered: 2013-02-26
Posts: 20
Website

Suggested: altered patern mailcollector.class.php

Suggested change mailcollector.class.php:749

The regex match any . might interpret ticket notifications originated from different ticketing software.

// See in title
      if (!isset($tkt['tickets_id'])
          && preg_match('/\[.+#(\d+)\]/',$head['subject'],$match)) {
         $tkt['tickets_id'] = intval($match[1]);
      }

Better to follow the exact perso_tag configuration from the entity configuration:

$perso_tag = trim(Entity::getUsedConfig('notification_subject_tag', $this->fields['entities_id'],'', ''));
$perso_tag = (!empty($perso_tag)) ? $perso_tag : 'GLPI';
$patern = "/\[$perso_tag+#(\d)\]/";
preg_match($patern,$head['subject'],$match));

Last edited by chris.gralike@amis.nl (2015-12-06 20:50:45)


\\ [-_-] //
     |||
    // \\

Offline

Board footer

Powered by FluxBB