mirror of
https://github.com/e107inc/e107.git
synced 2025-04-19 20:21:51 +02:00
PM Notification datestamp fix.
This commit is contained in:
parent
0bb010649c
commit
a21d351cd2
@ -1180,7 +1180,7 @@ class e_form
|
||||
|
||||
/**
|
||||
* User auto-complete search
|
||||
*
|
||||
* XXX EXPERIMENTAL - subject to change.
|
||||
* @param string $name_fld field name for user name
|
||||
* @param string $id_fld field name for user id
|
||||
* @param string $default_name default user name value
|
||||
@ -4667,7 +4667,7 @@ class e_form
|
||||
if(!isset($parms['__options'])) $parms['__options'] = array();
|
||||
if(!is_array($parms['__options'])) parse_str($parms['__options'], $parms['__options']);
|
||||
|
||||
if((empty($value) && varset($parms['currentInit'],USERID)!=0) || vartrue($parms['current'])) // include current user by default.
|
||||
if((empty($value) && varset($parms['currentInit'],USERID)!=0 && varset($parms['default']) !=0) || vartrue($parms['current'])) // include current user by default.
|
||||
{
|
||||
$value = USERID;
|
||||
if(vartrue($parms['current']))
|
||||
@ -4687,6 +4687,14 @@ class e_form
|
||||
if(!$value) $value = array();
|
||||
$uname = varset($value[$colname]);
|
||||
$value = varset($value['user_id'], 0);
|
||||
|
||||
if(!empty($parms['max']))
|
||||
{
|
||||
$parms['__options']['selectize']['maxItems'] = intval($parms['max']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$ret = $this->userpicker(vartrue($parms['nameField'], $key), $key, $uname, $value, vartrue($parms['__options']));
|
||||
break;
|
||||
|
||||
|
@ -272,6 +272,7 @@ class private_message
|
||||
if(check_class($this->pmPrefs['notify_class'], null, $vars['to_info']['user_id']))
|
||||
{
|
||||
set_time_limit(20);
|
||||
$vars['pm_sent'] = $timestamp;
|
||||
$this->pm_send_notify($vars['to_info']['user_id'], $vars, $pmid, count($a_list));
|
||||
}
|
||||
$ret .= LAN_PM_40.": {$vars['to_info']['user_name']}<br />";
|
||||
@ -435,8 +436,7 @@ class private_message
|
||||
* Send PM read receipt
|
||||
*
|
||||
* @param array $pmInfo - PM details
|
||||
*
|
||||
* @return none
|
||||
* @return boolean
|
||||
*/
|
||||
function pm_send_receipt($pmInfo) //TODO Add Template and combine with method above..
|
||||
{
|
||||
@ -450,16 +450,20 @@ class private_message
|
||||
$txt .= LAN_PM_103.$pmInfo['pm_subject']."\n";
|
||||
$txt .= LAN_PM_105."\n".$pmlink."\n";
|
||||
|
||||
sendemail($pmInfo['from_email'], $subject, $txt, $pmInfo['from_name']);
|
||||
if(sendemail($pmInfo['from_email'], $subject, $txt, $pmInfo['from_name']))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get list of users blocked from sending to a specific user ID.
|
||||
* Get list of users blocked from sending to a specific user ID.
|
||||
*
|
||||
* @param integer $to - user ID
|
||||
*
|
||||
* @return array of blocked users as user IDs
|
||||
* @param int|mixed $to - user ID
|
||||
* @return array of blocked users as user IDs
|
||||
*/
|
||||
function block_get($to = USERID)
|
||||
{
|
||||
@ -643,7 +647,9 @@ class private_message
|
||||
$regex = "(^|,)(".e107::getParser()->toDB($class).")(,|$)";
|
||||
$qry = "SELECT user_id, user_name, user_email, user_class FROM `#user` WHERE user_class REGEXP '{$regex}'";
|
||||
}
|
||||
if($sql->gen($qry))
|
||||
|
||||
|
||||
if(!empty($qry) && $sql->gen($qry))
|
||||
{
|
||||
$ret = $sql->db_getList();
|
||||
return $ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user