Skip to content
Snippets Groups Projects

fix #1647 V7.4 Mail Manager Action Menu Missing Sometimes

+ 14
4
Compare changes
  • Side-by-side
  • Inline
+ 14
4
@@ -1550,7 +1550,7 @@ class Vtiger_Functions {
switch ($type) {
case 'id' : $ok = (preg_match('/[^0-9xH]/', $value)) ? false : $ok;
break;
case 'email' : $ok = (!filter_var($value, FILTER_VALIDATE_EMAIL)) ? false : $ok;
case 'email' : $ok = self::validateTypeEmail($value);
break;
case 'idlist' : $ok = (preg_match('/[a-zA-Z]/', $value)) ? false : $ok;
break;
@@ -1567,6 +1567,16 @@ class Vtiger_Functions {
return $ok;
}
public static function validateTypeEmail(string $value):bool {
$ok = TRUE;
$mailaddresses = explode(',', $value);
foreach($mailaddresses as $mailaddress){
if(!filter_var($mailaddress, FILTER_VALIDATE_EMAIL)) $ok = FALSE;
}
return $ok;
}
/**
* Function to get file public url to access outside of CRM (from emails)
* @param <Integer> $fileId
@@ -1582,12 +1592,12 @@ class Vtiger_Functions {
}
return $publicUrl;
}
/**
* Function to get the attachmentsid to given crmid
* @param type $crmid
* @param type $webaservice entity id
* @return <Array>
* @return <Array>
*/
static function getAttachmentIds($crmid, $WsEntityId) {
$adb = PearDatabase::getInstance();
@@ -1604,7 +1614,7 @@ class Vtiger_Functions {
}
return $attachmentIds;
}
static function generateTrackingURL($params = []){
$options = array(
'handler_path' => 'modules/Emails/handlers/Tracker.php',
Loading