09-15-2014, 04:14 PM
hi, is it possible to add the following in github :
1. mail receipt : when sending an email , it's good to know it the recipient has read or just deleted the email, good for marketing purpose
affected file : modules/Emails/mail.php
line 72 : add
$mail->ConfirmReadingTo = $mail->From; //MSL
2. order the widgets by sequence
affected file : vtlib/Vtiger/Link.php
function getAllTypes
static function getAllByType($tabid, $type=false, $parameters=false) {
global $adb, $current_user;
self::__initSchema();
$multitype = false;
$orderby = " order by linktype,sequence"; //MSL
if($type) {
// Multiple link type selection?
if(is_array($type)) {
$multitype = true;
if($tabid === self::IGNORE_MODULE) {
$sql = 'SELECT * FROM vtiger_links WHERE linktype IN ('.
Vtiger_Utils::implodestr('?', count($type), ',') .') ';
$params = $type;
$permittedTabIdList = getPermittedModuleIdList();
if(count($permittedTabIdList) > 0 && $current_user->is_admin !== 'on') {
$sql .= ' and tabid IN ('.
Vtiger_Utils::implodestr('?', count($permittedTabIdList), ',').')';
$params[] = $permittedTabIdList;
}
$result = $adb->pquery($sql . $orderby , Array($adb->flatten_array($params))); //MSL
} else {
$result = $adb->pquery('SELECT * FROM vtiger_links WHERE tabid=? AND linktype IN ('.
Vtiger_Utils::implodestr('?', count($type), ',') .')' . $orderby,
Array($tabid, $adb->flatten_array($type))); //MSL
}
} else {
// Single link type selection
if($tabid === self::IGNORE_MODULE) {
$result = $adb->pquery('SELECT * FROM vtiger_links WHERE linktype=?' . $orderby, Array($type)); //MSL
} else {
$result = $adb->pquery('SELECT * FROM vtiger_links WHERE tabid=? AND linktype=?' . $orderby, Array($tabid, $type)); //MSL
}
}
} else {
$result = $adb->pquery('SELECT * FROM vtiger_links WHERE tabid=?' . $orderby, Array($tabid)); //MSL
}
then set the order in the vtiger_links directly
more to come ...
1. mail receipt : when sending an email , it's good to know it the recipient has read or just deleted the email, good for marketing purpose
affected file : modules/Emails/mail.php
line 72 : add
$mail->ConfirmReadingTo = $mail->From; //MSL
2. order the widgets by sequence
affected file : vtlib/Vtiger/Link.php
function getAllTypes
static function getAllByType($tabid, $type=false, $parameters=false) {
global $adb, $current_user;
self::__initSchema();
$multitype = false;
$orderby = " order by linktype,sequence"; //MSL
if($type) {
// Multiple link type selection?
if(is_array($type)) {
$multitype = true;
if($tabid === self::IGNORE_MODULE) {
$sql = 'SELECT * FROM vtiger_links WHERE linktype IN ('.
Vtiger_Utils::implodestr('?', count($type), ',') .') ';
$params = $type;
$permittedTabIdList = getPermittedModuleIdList();
if(count($permittedTabIdList) > 0 && $current_user->is_admin !== 'on') {
$sql .= ' and tabid IN ('.
Vtiger_Utils::implodestr('?', count($permittedTabIdList), ',').')';
$params[] = $permittedTabIdList;
}
$result = $adb->pquery($sql . $orderby , Array($adb->flatten_array($params))); //MSL
} else {
$result = $adb->pquery('SELECT * FROM vtiger_links WHERE tabid=? AND linktype IN ('.
Vtiger_Utils::implodestr('?', count($type), ',') .')' . $orderby,
Array($tabid, $adb->flatten_array($type))); //MSL
}
} else {
// Single link type selection
if($tabid === self::IGNORE_MODULE) {
$result = $adb->pquery('SELECT * FROM vtiger_links WHERE linktype=?' . $orderby, Array($type)); //MSL
} else {
$result = $adb->pquery('SELECT * FROM vtiger_links WHERE tabid=? AND linktype=?' . $orderby, Array($tabid, $type)); //MSL
}
}
} else {
$result = $adb->pquery('SELECT * FROM vtiger_links WHERE tabid=?' . $orderby, Array($tabid)); //MSL
}
then set the order in the vtiger_links directly
more to come ...