mirror of
https://github.com/friendica/friendica
synced 2025-04-25 19:10:11 +00:00
Revert "Move Objects to Model"
This commit is contained in:
parent
e437c74d0e
commit
5747cfc79c
77 changed files with 593 additions and 636 deletions
|
@ -12,9 +12,10 @@ namespace Friendica\Protocol;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Photo;
|
||||
use Friendica\Object\Profile;
|
||||
use dba;
|
||||
use DOMDocument;
|
||||
use DomXPath;
|
||||
|
@ -192,10 +193,10 @@ class PortableContact
|
|||
"generation" => $generation);
|
||||
|
||||
try {
|
||||
$gcontact = GContact::sanitize($gcontact);
|
||||
$gcid = GContact::update($gcontact);
|
||||
$gcontact = GlobalContact::sanitize($gcontact);
|
||||
$gcid = GlobalContact::update($gcontact);
|
||||
|
||||
GContact::link($gcid, $uid, $cid, $zcid);
|
||||
GlobalContact::link($gcid, $uid, $cid, $zcid);
|
||||
} catch (Exception $e) {
|
||||
logger($e->getMessage(), LOGGER_DEBUG);
|
||||
}
|
||||
|
@ -424,7 +425,7 @@ class PortableContact
|
|||
|
||||
$contact = array_merge($contact, $noscrape);
|
||||
|
||||
GContact::update($contact);
|
||||
GlobalContact::update($contact);
|
||||
|
||||
if (trim($noscrape["updated"]) != "") {
|
||||
q(
|
||||
|
@ -446,7 +447,7 @@ class PortableContact
|
|||
if (!$force && !self::updateNeeded($gcontacts[0]["created"], $gcontacts[0]["updated"], $gcontacts[0]["last_failure"], $gcontacts[0]["last_contact"])) {
|
||||
logger("Profile ".$profile." was last updated at ".$gcontacts[0]["updated"]." (cached)", LOGGER_DEBUG);
|
||||
|
||||
GContact::update($contact);
|
||||
GlobalContact::update($contact);
|
||||
return $gcontacts[0]["updated"];
|
||||
}
|
||||
|
||||
|
@ -467,8 +468,8 @@ class PortableContact
|
|||
$gcontact["server_url"] = $data["baseurl"];
|
||||
|
||||
try {
|
||||
$gcontact = GContact::sanitize($gcontact);
|
||||
GContact::update($gcontact);
|
||||
$gcontact = GlobalContact::sanitize($gcontact);
|
||||
GlobalContact::update($gcontact);
|
||||
|
||||
self::lastUpdated($data["url"], $force);
|
||||
} catch (Exception $e) {
|
||||
|
@ -494,7 +495,7 @@ class PortableContact
|
|||
|
||||
$contact["server_url"] = $data["baseurl"];
|
||||
|
||||
GContact::update($contact);
|
||||
GlobalContact::update($contact);
|
||||
|
||||
$feedret = z_fetch_url($data["poll"]);
|
||||
|
||||
|
@ -1600,8 +1601,8 @@ class PortableContact
|
|||
"generation" => $generation);
|
||||
|
||||
try {
|
||||
$gcontact = GContact::sanitize($gcontact);
|
||||
GContact::update($gcontact);
|
||||
$gcontact = GlobalContact::sanitize($gcontact);
|
||||
GlobalContact::update($gcontact);
|
||||
} catch (Exception $e) {
|
||||
logger($e->getMessage(), LOGGER_DEBUG);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue