Move Notify::TYPE_SYSTEM
This commit is contained in:
parent
c6915dc672
commit
511556085a
4 changed files with 7 additions and 15 deletions
11
boot.php
11
boot.php
|
@ -134,17 +134,6 @@ $netgroup_ids = [
|
||||||
*/
|
*/
|
||||||
define('MAX_LIKERS', 75);
|
define('MAX_LIKERS', 75);
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Notify
|
|
||||||
*
|
|
||||||
* Email notification options
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('NOTIFY_SYSTEM', 32768);
|
|
||||||
/* @}*/
|
|
||||||
|
|
||||||
|
|
||||||
/** @deprecated since 2019.03, use Term::UNKNOWN instead */
|
/** @deprecated since 2019.03, use Term::UNKNOWN instead */
|
||||||
define('TERM_UNKNOWN', Term::UNKNOWN);
|
define('TERM_UNKNOWN', Term::UNKNOWN);
|
||||||
/** @deprecated since 2019.03, use Term::HASHTAG instead */
|
/** @deprecated since 2019.03, use Term::HASHTAG instead */
|
||||||
|
|
|
@ -375,7 +375,7 @@ function notification($params)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['type'] == NOTIFY_SYSTEM) {
|
if ($params['type'] == Notify\Type::SYSTEM) {
|
||||||
switch($params['event']) {
|
switch($params['event']) {
|
||||||
case "SYSTEM_REGISTER_REQUEST":
|
case "SYSTEM_REGISTER_REQUEST":
|
||||||
$itemlink = $params['link'];
|
$itemlink = $params['link'];
|
||||||
|
@ -456,7 +456,7 @@ function notification($params)
|
||||||
|
|
||||||
// send email notification if notification preferences permit
|
// send email notification if notification preferences permit
|
||||||
if ((intval($params['notify_flags']) & intval($params['type']))
|
if ((intval($params['notify_flags']) & intval($params['type']))
|
||||||
|| $params['type'] == NOTIFY_SYSTEM) {
|
|| $params['type'] == Notify\Type::SYSTEM) {
|
||||||
|
|
||||||
Logger::log('sending notification email');
|
Logger::log('sending notification email');
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Friendica\Model\Notify;
|
||||||
class Type
|
class Type
|
||||||
{
|
{
|
||||||
/** @var int Notification about a introduction */
|
/** @var int Notification about a introduction */
|
||||||
const INTRO = 1;
|
const INTRO = 1;
|
||||||
/** @var int Notification about a confirmed introduction */
|
/** @var int Notification about a confirmed introduction */
|
||||||
const CONFIRM = 2;
|
const CONFIRM = 2;
|
||||||
/** @var int Notification about a post on your wall */
|
/** @var int Notification about a post on your wall */
|
||||||
|
@ -33,4 +33,7 @@ class Type
|
||||||
const POKE = 512;
|
const POKE = 512;
|
||||||
/** @var int Notification about either a contact had posted something directly or the contact is a mentioned forum */
|
/** @var int Notification about either a contact had posted something directly or the contact is a mentioned forum */
|
||||||
const SHARE = 1024;
|
const SHARE = 1024;
|
||||||
|
|
||||||
|
/** @var int Global System notifications */
|
||||||
|
const SYSTEM = 32768;
|
||||||
}
|
}
|
||||||
|
|
|
@ -348,7 +348,7 @@ class Register extends BaseModule
|
||||||
// send notification to admins
|
// send notification to admins
|
||||||
while ($admin = DBA::fetch($admins_stmt)) {
|
while ($admin = DBA::fetch($admins_stmt)) {
|
||||||
\notification([
|
\notification([
|
||||||
'type' => NOTIFY_SYSTEM,
|
'type' => Model\Notify\Type::SYSTEM,
|
||||||
'event' => 'SYSTEM_REGISTER_REQUEST',
|
'event' => 'SYSTEM_REGISTER_REQUEST',
|
||||||
'source_name' => $user['username'],
|
'source_name' => $user['username'],
|
||||||
'source_mail' => $user['email'],
|
'source_mail' => $user['email'],
|
||||||
|
|
Loading…
Reference in a new issue