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