Fix wrong use of class constants
http://php.net/manual/language.oop5.constants.php
This commit is contained in:
parent
b1cb955110
commit
41a8c62bee
1 changed files with 13 additions and 13 deletions
|
@ -2141,7 +2141,7 @@ class DFRN
|
||||||
|
|
||||||
$changed = true;
|
$changed = true;
|
||||||
|
|
||||||
if ($entrytype == DFRN_REPLY_RC) {
|
if ($entrytype == DFRN::DFRN_REPLY_RC) {
|
||||||
Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $current["id"]);
|
Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $current["id"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2211,12 +2211,12 @@ class DFRN
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_a_remote_action) {
|
if ($is_a_remote_action) {
|
||||||
return DFRN_REPLY_RC;
|
return DFRN::DFRN_REPLY_RC;
|
||||||
} else {
|
} else {
|
||||||
return DFRN_REPLY;
|
return DFRN::DFRN_REPLY;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return DFRN_TOP_LEVEL;
|
return DFRN::DFRN_TOP_LEVEL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2290,7 +2290,7 @@ class DFRN
|
||||||
{
|
{
|
||||||
logger("Process verb ".$item["verb"]." and object-type ".$item["object-type"]." for entrytype ".$entrytype, LOGGER_DEBUG);
|
logger("Process verb ".$item["verb"]." and object-type ".$item["object-type"]." for entrytype ".$entrytype, LOGGER_DEBUG);
|
||||||
|
|
||||||
if (($entrytype == DFRN_TOP_LEVEL)) {
|
if (($entrytype == DFRN::DFRN_TOP_LEVEL)) {
|
||||||
// The filling of the the "contact" variable is done for legcy reasons
|
// The filling of the the "contact" variable is done for legcy reasons
|
||||||
// The functions below are partly used by ostatus.php as well - where we have this variable
|
// The functions below are partly used by ostatus.php as well - where we have this variable
|
||||||
$r = q("SELECT * FROM `contact` WHERE `id` = %d", intval($importer["id"]));
|
$r = q("SELECT * FROM `contact` WHERE `id` = %d", intval($importer["id"]));
|
||||||
|
@ -2634,7 +2634,7 @@ class DFRN
|
||||||
$entrytype = self::getEntryType($importer, $item);
|
$entrytype = self::getEntryType($importer, $item);
|
||||||
|
|
||||||
// Now assign the rest of the values that depend on the type of the message
|
// Now assign the rest of the values that depend on the type of the message
|
||||||
if (in_array($entrytype, [DFRN_REPLY, DFRN_REPLY_RC])) {
|
if (in_array($entrytype, [DFRN::DFRN_REPLY, DFRN::DFRN_REPLY_RC])) {
|
||||||
if (!isset($item["object-type"])) {
|
if (!isset($item["object-type"])) {
|
||||||
$item["object-type"] = ACTIVITY_OBJ_COMMENT;
|
$item["object-type"] = ACTIVITY_OBJ_COMMENT;
|
||||||
}
|
}
|
||||||
|
@ -2656,10 +2656,10 @@ class DFRN
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($entrytype == DFRN_REPLY_RC) {
|
if ($entrytype == DFRN::DFRN_REPLY_RC) {
|
||||||
$item["type"] = "remote-comment";
|
$item["type"] = "remote-comment";
|
||||||
$item["wall"] = 1;
|
$item["wall"] = 1;
|
||||||
} elseif ($entrytype == DFRN_TOP_LEVEL) {
|
} elseif ($entrytype == DFRN::DFRN_TOP_LEVEL) {
|
||||||
if (!isset($item["object-type"])) {
|
if (!isset($item["object-type"])) {
|
||||||
$item["object-type"] = ACTIVITY_OBJ_NOTE;
|
$item["object-type"] = ACTIVITY_OBJ_NOTE;
|
||||||
}
|
}
|
||||||
|
@ -2708,7 +2708,7 @@ class DFRN
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($entrytype, [DFRN_REPLY, DFRN_REPLY_RC])) {
|
if (in_array($entrytype, [DFRN::DFRN_REPLY, DFRN::DFRN_REPLY_RC])) {
|
||||||
$posted_id = Item::insert($item);
|
$posted_id = Item::insert($item);
|
||||||
$parent = 0;
|
$parent = 0;
|
||||||
|
|
||||||
|
@ -2731,14 +2731,14 @@ class DFRN
|
||||||
$parent_uri = $r[0]["parent-uri"];
|
$parent_uri = $r[0]["parent-uri"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($posted_id && $parent && ($entrytype == DFRN_REPLY_RC)) {
|
if ($posted_id && $parent && ($entrytype == DFRN::DFRN_REPLY_RC)) {
|
||||||
logger("Notifying followers about comment ".$posted_id, LOGGER_DEBUG);
|
logger("Notifying followers about comment ".$posted_id, LOGGER_DEBUG);
|
||||||
Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $posted_id);
|
Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $posted_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else { // $entrytype == DFRN_TOP_LEVEL
|
} else { // $entrytype == DFRN::DFRN_TOP_LEVEL
|
||||||
if (($importer["uid"] == 0) && ($importer["importer_uid"] != 0)) {
|
if (($importer["uid"] == 0) && ($importer["importer_uid"] != 0)) {
|
||||||
logger("Contact ".$importer["id"]." isn't known to user ".$importer["importer_uid"].". The post will be ignored.", LOGGER_DEBUG);
|
logger("Contact ".$importer["id"]." isn't known to user ".$importer["importer_uid"].". The post will be ignored.", LOGGER_DEBUG);
|
||||||
return;
|
return;
|
||||||
|
@ -2838,9 +2838,9 @@ class DFRN
|
||||||
|
|
||||||
Item::deleteById($item["id"]);
|
Item::deleteById($item["id"]);
|
||||||
|
|
||||||
if ($entrytype != DFRN_TOP_LEVEL) {
|
if ($entrytype != DFRN::DFRN_TOP_LEVEL) {
|
||||||
// if this is a relayed delete, propagate it to other recipients
|
// if this is a relayed delete, propagate it to other recipients
|
||||||
if ($entrytype == DFRN_REPLY_RC) {
|
if ($entrytype == DFRN::DFRN_REPLY_RC) {
|
||||||
logger("Notifying followers about deletion of post " . $item["id"], LOGGER_DEBUG);
|
logger("Notifying followers about deletion of post " . $item["id"], LOGGER_DEBUG);
|
||||||
Worker::add(PRIORITY_HIGH, "Notifier", "drop", $item["id"]);
|
Worker::add(PRIORITY_HIGH, "Notifier", "drop", $item["id"]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue