1
0
Fork 0

Revert "Move Objects to Model"

This commit is contained in:
Michael Vogel 2017-12-08 05:21:51 +01:00 committed by GitHub
commit 5747cfc79c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 593 additions and 636 deletions

View file

@ -5,7 +5,7 @@
use Friendica\App;
use Friendica\ParseUrl;
use Friendica\Core\PConfig;
use Friendica\Object\Image;
use Friendica\Object\Photo;
require_once "include/bbcode.php";
require_once "include/html2plain.php";
@ -51,7 +51,7 @@ function get_old_attachment_data($body) {
if (preg_match("/\[img\]([$URLSearchString]*)\[\/img\]/ism", $attacheddata, $matches)) {
$picturedata = Image::getInfoFromURL($matches[1]);
$picturedata = Photo::getInfoFromURL($matches[1]);
if (($picturedata[0] >= 500) && ($picturedata[0] >= $picturedata[1]))
$post["image"] = $matches[1];
@ -221,7 +221,7 @@ function get_attached_data($body, $item = array()) {
$post["preview"] = $pictures[0][2];
$post["text"] = str_replace($pictures[0][0], "", $body);
} else {
$imgdata = Image::getInfoFromURL($pictures[0][1]);
$imgdata = Photo::getInfoFromURL($pictures[0][1]);
if (substr($imgdata["mime"], 0, 6) == "image/") {
$post["type"] = "photo";
$post["image"] = $pictures[0][1];