mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-19 03:23:45 +00:00
Merge pull request #470 from friendica/revert-469-revert-468-task/3878-move-objects-to-src
Revert "Revert "Move objects to src""
This commit is contained in:
commit
95facaefc7
4 changed files with 1319 additions and 1164 deletions
|
@ -11,7 +11,7 @@ define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
|
||||||
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Object\Photo;
|
use Friendica\Object\Image;
|
||||||
|
|
||||||
require_once 'mod/share.php';
|
require_once 'mod/share.php';
|
||||||
require_once 'mod/parse_url.php';
|
require_once 'mod/parse_url.php';
|
||||||
|
@ -264,12 +264,12 @@ function fromgplus_cleanupgoogleproxy($fullImage, $image) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cleaned["full"] != "")
|
if ($cleaned["full"] != "")
|
||||||
$infoFull = Photo::getInfoFromURL($cleaned["full"]);
|
$infoFull = Image::getInfoFromURL($cleaned["full"]);
|
||||||
else
|
else
|
||||||
$infoFull = array("0" => 0, "1" => 0);
|
$infoFull = array("0" => 0, "1" => 0);
|
||||||
|
|
||||||
if ($cleaned["preview"] != "")
|
if ($cleaned["preview"] != "")
|
||||||
$infoPreview = Photo::getInfoFromURL($cleaned["preview"]);
|
$infoPreview = Image::getInfoFromURL($cleaned["preview"]);
|
||||||
else
|
else
|
||||||
$infoFull = array("0" => 0, "1" => 0);
|
$infoFull = array("0" => 0, "1" => 0);
|
||||||
|
|
||||||
|
@ -352,9 +352,9 @@ function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
|
||||||
$images = fromgplus_cleanupgoogleproxy($attachment->fullImage, $attachment->image);
|
$images = fromgplus_cleanupgoogleproxy($attachment->fullImage, $attachment->image);
|
||||||
} else {
|
} else {
|
||||||
if ($attachment->fullImage->url != "") {
|
if ($attachment->fullImage->url != "") {
|
||||||
$images = Photo::storePhoto($a, $uid, "", $attachment->fullImage->url);
|
$images = Image::storePhoto($a, $uid, "", $attachment->fullImage->url);
|
||||||
} elseif ($attachment->image->url != "") {
|
} elseif ($attachment->image->url != "") {
|
||||||
$images = Photo::storePhoto($a, $uid, "", $attachment->image->url);
|
$images = Image::storePhoto($a, $uid, "", $attachment->image->url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Object\Contact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
require 'addon/pumpio/oauth/http.php';
|
require 'addon/pumpio/oauth/http.php';
|
||||||
require 'addon/pumpio/oauth/oauth_client.php';
|
require 'addon/pumpio/oauth/oauth_client.php';
|
||||||
|
@ -974,7 +974,7 @@ function pumpio_dolike(&$a, $uid, $self, $post, $own_id, $threadcompletion = tru
|
||||||
|
|
||||||
function pumpio_get_contact($uid, $contact, $no_insert = false) {
|
function pumpio_get_contact($uid, $contact, $no_insert = false) {
|
||||||
|
|
||||||
GlobalContact::update(array("url" => $contact->url, "network" => NETWORK_PUMPIO, "generation" => 2,
|
GContact::update(array("url" => $contact->url, "network" => NETWORK_PUMPIO, "generation" => 2,
|
||||||
"photo" => $contact->image->url, "name" => $contact->displayName, "hide" => true,
|
"photo" => $contact->image->url, "name" => $contact->displayName, "hide" => true,
|
||||||
"nick" => $contact->preferredUsername, "location" => $contact->location->displayName,
|
"nick" => $contact->preferredUsername, "location" => $contact->location->displayName,
|
||||||
"about" => $contact->summary, "addr" => str_replace("acct:", "", $contact->id)));
|
"about" => $contact->summary, "addr" => str_replace("acct:", "", $contact->id)));
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue