use Friendica\Core\Config;
use Friendica\Core\PConfig;
-use Friendica\Object\Photo;
+use Friendica\Object\Image;
require_once 'mod/share.php';
require_once 'mod/parse_url.php';
}
if ($cleaned["full"] != "")
- $infoFull = Photo::getPhotoInfo($cleaned["full"]);
+ $infoFull = Image::getInfoFromURL($cleaned["full"]);
else
$infoFull = array("0" => 0, "1" => 0);
if ($cleaned["preview"] != "")
- $infoPreview = Photo::getPhotoInfo($cleaned["preview"]);
+ $infoPreview = Image::getInfoFromURL($cleaned["preview"]);
else
$infoFull = array("0" => 0, "1" => 0);
}
function fromgplus_handleattachments($a, $uid, $item, $displaytext, $shared) {
- require_once("include/Photo.php");
require_once("include/items.php");
require_once("include/network.php");
case "photo":
// Don't store shared pictures in your wall photos (to prevent a possible violating of licenses)
- if ($shared)
+ if ($shared) {
$images = fromgplus_cleanupgoogleproxy($attachment->fullImage, $attachment->image);
- else {
- if ($attachment->fullImage->url != "")
- $images = store_photo($a, $uid, "", $attachment->fullImage->url);
- elseif ($attachment->image->url != "")
- $images = store_photo($a, $uid, "", $attachment->image->url);
+ } else {
+ if ($attachment->fullImage->url != "") {
+ $images = Image::storePhoto($a, $uid, "", $attachment->fullImage->url);
+ } elseif ($attachment->image->url != "") {
+ $images = Image::storePhoto($a, $uid, "", $attachment->image->url);
+ }
}
if ($images["preview"] != "") {
$post .= "\n[img]".$images["full"]."[/img]\n";
$pagedata["images"][0]["src"] = $images["full"];
- if ($images["preview"] != "")
+ if ($images["preview"] != "") {
$pagedata["images"][1]["src"] = $images["preview"];
+ }
}
if (($attachment->displayName != "") && (fromgplus_cleantext($attachment->displayName) != fromgplus_cleantext($displaytext))) {