]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Revert "Move Objects to Model"
[friendica.git] / include / items.php
index 0779ed91e19da00bf3f4eec2ac984f57cf37a3db..61a9c7a1fab5fab034050cd703a73f50df9b2e52 100644 (file)
@@ -10,11 +10,11 @@ use Friendica\Core\PConfig;
 use Friendica\Core\Worker;
 use Friendica\Core\System;
 use Friendica\Database\DBM;
-use Friendica\Model\Contact;
-use Friendica\Model\GContact;
-use Friendica\Object\Image;
+use Friendica\Model\GlobalContact;
+use Friendica\Object\Contact;
 use Friendica\Protocol\DFRN;
 use Friendica\Protocol\OStatus;
+use Friendica\Util\Lock;
 
 require_once 'include/bbcode.php';
 require_once 'include/oembed.php';
@@ -742,10 +742,10 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
                 * On comments the author is the better choice.
                 */
                if ($arr['parent-uri'] === $arr['uri']) {
-                       $arr["gcontact-id"] = GContact::getId(array("url" => $arr['owner-link'], "network" => $arr['network'],
+                       $arr["gcontact-id"] = GlobalContact::getId(array("url" => $arr['owner-link'], "network" => $arr['network'],
                                                                 "photo" => $arr['owner-avatar'], "name" => $arr['owner-name']));
                } else {
-                       $arr["gcontact-id"] = GContact::getId(array("url" => $arr['author-link'], "network" => $arr['network'],
+                       $arr["gcontact-id"] = GlobalContact::getId(array("url" => $arr['author-link'], "network" => $arr['network'],
                                                                 "photo" => $arr['author-avatar'], "name" => $arr['author-name']));
                }
        }
@@ -1887,11 +1887,11 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
                                                        $width = intval($match[1]);
                                                        $height = intval($match[2]);
 
-                                                       $Image = new Image($data, $type);
-                                                       if ($Image->isValid()) {
-                                                               $Image->scaleDown(max($width, $height));
-                                                               $data = $Image->asString();
-                                                               $type = $Image->getType();
+                                                       $ph = new Photo($data, $type);
+                                                       if ($ph->isValid()) {
+                                                               $ph->scaleImage(max($width, $height));
+                                                               $data = $ph->imageString();
+                                                               $type = $ph->getType();
                                                        }
                                                }