mirror of
https://github.com/friendica/friendica
synced 2025-04-24 23:50:20 +00:00
Separate Object\Photo into Model\Photo and Object\Image
- Renamed a bunch of functions to shorter or clearer names
This commit is contained in:
parent
7499824381
commit
3fc3e67b70
22 changed files with 464 additions and 408 deletions
|
@ -5,7 +5,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\ParseUrl;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Object\Photo;
|
||||
use Friendica\Object\Image;
|
||||
|
||||
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 = Photo::getInfoFromURL($matches[1]);
|
||||
$picturedata = Image::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 = Photo::getInfoFromURL($pictures[0][1]);
|
||||
$imgdata = Image::getInfoFromURL($pictures[0][1]);
|
||||
if (substr($imgdata["mime"], 0, 6) == "image/") {
|
||||
$post["type"] = "photo";
|
||||
$post["image"] = $pictures[0][1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue