mirror of
https://github.com/friendica/friendica
synced 2025-04-24 14:30:11 +00:00
Stopped using deprecated constants NETWORK_* (#5537)
* Rewrite: - stopped using deprecated NETWORK_* constants, now Protocol::* should be used - still left them intact for slow/lazy developers ... * Removed deprecated NETWORK_* constants as per code reviewer's request.
This commit is contained in:
parent
c623465df2
commit
e06fc2aa69
59 changed files with 527 additions and 492 deletions
|
@ -5,6 +5,7 @@
|
|||
namespace Friendica\Database;
|
||||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\ItemURI;
|
||||
|
@ -81,7 +82,7 @@ class PostUpdate
|
|||
|
||||
$r = q($query1.$query2.$query3." ORDER BY `item`.`id` LIMIT 1",
|
||||
intval($start_id), intval($end_id),
|
||||
DBA::escape(NETWORK_DFRN), DBA::escape(NETWORK_DIASPORA), DBA::escape(NETWORK_OSTATUS));
|
||||
DBA::escape(Protocol::DFRN), DBA::escape(Protocol::DIASPORA), DBA::escape(Protocol::OSTATUS));
|
||||
if (!$r) {
|
||||
Config::set("system", "post_update_version", 1194);
|
||||
logger("Update is done", LOGGER_DEBUG);
|
||||
|
@ -95,7 +96,7 @@ class PostUpdate
|
|||
|
||||
$r = q($query1.$query2.$query3." ORDER BY `item`.`id` LIMIT 1000,1",
|
||||
intval($start_id), intval($end_id),
|
||||
DBA::escape(NETWORK_DFRN), DBA::escape(NETWORK_DIASPORA), DBA::escape(NETWORK_OSTATUS));
|
||||
DBA::escape(Protocol::DFRN), DBA::escape(Protocol::DIASPORA), DBA::escape(Protocol::OSTATUS));
|
||||
if ($r) {
|
||||
$pos_id = $r[0]["id"];
|
||||
} else {
|
||||
|
@ -105,7 +106,7 @@ class PostUpdate
|
|||
|
||||
q("UPDATE `item` ".$query2." SET `item`.`global` = 1 ".$query3,
|
||||
intval($start_id), intval($pos_id),
|
||||
DBA::escape(NETWORK_DFRN), DBA::escape(NETWORK_DIASPORA), DBA::escape(NETWORK_OSTATUS));
|
||||
DBA::escape(Protocol::DFRN), DBA::escape(Protocol::DIASPORA), DBA::escape(Protocol::OSTATUS));
|
||||
|
||||
logger("Done", LOGGER_DEBUG);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue