Move Object\Contact to Model\Contact

This commit is contained in:
Hypolite Petovan 2017-12-07 09:04:24 -05:00
parent d4ca30a6db
commit 18d93cddf6
50 changed files with 62 additions and 64 deletions

View file

@ -27,8 +27,7 @@ use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Util\Lock;
use Friendica\Model\Contact;
require_once 'include/network.php';
require_once 'include/plugin.php';

View file

@ -6,8 +6,8 @@ use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
require_once "include/contact_selectors.php";
require_once "include/contact_widgets.php";

View file

@ -12,6 +12,7 @@ use Friendica\Core\Config;
use Friendica\Core\NotificationsManager;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Photo;
use Friendica\Model\User;
use Friendica\Network\FKOAuth1;
@ -24,7 +25,6 @@ use Friendica\Network\HTTPException\NotFoundException;
use Friendica\Network\HTTPException\NotImplementedException;
use Friendica\Network\HTTPException\UnauthorizedException;
use Friendica\Network\HTTPException\TooManyRequestsException;
use Friendica\Object\Contact;
use Friendica\Object\Image;
use Friendica\Protocol\Diaspora;
use Friendica\Util\XML;

View file

@ -2,8 +2,8 @@
use Friendica\App;
use Friendica\Core\System;
use Friendica\Model\Contact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use League\HTMLToMarkdown\HtmlConverter;

View file

@ -5,7 +5,7 @@ use Friendica\Content\Smilies;
use Friendica\Core\Cache;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/oembed.php';
require_once 'include/event.php';

View file

@ -8,7 +8,7 @@ use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
use Friendica\Object\Conversation;
use Friendica\Object\Item;

View file

@ -7,8 +7,8 @@ use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\OStatus;
use Friendica\Protocol\PortableContact;

View file

@ -12,7 +12,7 @@ use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/bbcode.php';
require_once 'mod/proxy.php';

View file

@ -10,8 +10,8 @@ use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
use Friendica\Object\Image;
use Friendica\Protocol\DFRN;
use Friendica\Protocol\OStatus;

View file

@ -4,7 +4,7 @@ use Friendica\App;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
use Friendica\Protocol\Diaspora;
/**

View file

@ -5,8 +5,8 @@
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
/**
* @brief Calls the post update functions

View file

@ -6,7 +6,7 @@ use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
function create_tags_from_item($itemid) {
$profile_base = System::baseUrl();

View file

@ -3,7 +3,7 @@
use Friendica\App;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
function add_thread($itemid, $onlyshadow = false) {
$items = q("SELECT `uid`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`,

View file

@ -10,8 +10,8 @@ use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\User;
use Friendica\Object\Contact;
require_once 'include/enotify.php';
require_once 'include/text.php';

View file

@ -5,8 +5,8 @@
use Friendica\App;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
require_once 'include/contact_selectors.php';
require_once 'mod/contacts.php';

View file

@ -11,7 +11,7 @@ use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/event.php';
require_once 'include/redir.php';

View file

@ -4,8 +4,8 @@
*/
use Friendica\App;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
require_once 'include/contact_selectors.php';
require_once 'mod/contacts.php';

View file

@ -6,9 +6,9 @@ use Friendica\App;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
require_once 'include/contact_selectors.php';
require_once 'mod/proxy.php';

View file

@ -5,7 +5,7 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/contact_selectors.php';
require_once 'mod/contacts.php';

View file

@ -24,8 +24,8 @@ use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Protocol\Diaspora;
require_once 'include/enotify.php';

View file

@ -9,7 +9,7 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
use Friendica\Protocol\DFRN;
require_once 'include/items.php';

View file

@ -15,8 +15,8 @@ use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
require_once 'include/enotify.php';
require_once 'include/group.php';

View file

@ -3,7 +3,7 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
function directory_init(App $a) {
$a->set_pager_itemspage(60);

View file

@ -6,9 +6,9 @@ use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Protocol\PortableContact;
require_once 'include/contact_widgets.php';

View file

@ -4,7 +4,7 @@ use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
use Friendica\Protocol\DFRN;
function display_init(App $a) {

View file

@ -3,8 +3,8 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Model\Contact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
require_once 'include/follow.php';
require_once 'include/contact_selectors.php';

View file

@ -10,8 +10,8 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
function hovercard_init(App $a) {
// Just for testing purposes

View file

@ -22,9 +22,9 @@ use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\Email;
use Friendica\Util\Emailer;

View file

@ -6,7 +6,7 @@ use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/text.php';
require_once 'include/contact_widgets.php';

View file

@ -4,7 +4,7 @@ use Friendica\App;
use Friendica\Content\Smilies;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/acl_selectors.php';
require_once 'include/message.php';

View file

@ -9,7 +9,7 @@ use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/conversation.php';
require_once 'include/group.php';

View file

@ -4,7 +4,7 @@
*/
use Friendica\App;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/contact_selectors.php';

View file

@ -8,9 +8,9 @@ use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Photo;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Object\Image;
require_once 'include/photos.php';

View file

@ -9,7 +9,7 @@ use Friendica\Core\Cache;
use Friendica\Core\System;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
use Friendica\Util\XML;
require_once 'include/datetime.php';

View file

@ -5,8 +5,8 @@
use Friendica\App;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
require_once 'include/contact_widgets.php';

View file

@ -3,7 +3,7 @@
use Friendica\App;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/follow.php';
require_once 'include/contact_selectors.php';

View file

@ -5,7 +5,7 @@ use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once('include/items.php');
require_once('include/acl_selectors.php');

View file

@ -3,7 +3,7 @@
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once('include/contact_selectors.php');

View file

@ -9,7 +9,7 @@ namespace Friendica\Core;
use Friendica\Core\Pconfig;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'include/html2plain.php';
require_once 'include/datetime.php';

View file

@ -1,19 +1,18 @@
<?php
/**
* @file src/Object/Contact.php
* @file src/Model/Contact.php
*/
namespace Friendica\Object;
namespace Friendica\Model;
use Friendica\App;
use Friendica\BaseObject;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Network\Probe;
use Friendica\Object\Photo;
use Friendica\Object\Image;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\DFRN;
use Friendica\Protocol\OStatus;
@ -922,7 +921,7 @@ class Contact extends BaseObject
}
if (($r["avatar"] != $avatar) || $force) {
$photos = Photo::importProfilePhoto($avatar, $uid, $cid, true);
$photos = Image::importProfilePhoto($avatar, $uid, $cid, true);
if ($photos) {
dba::update(

View file

@ -10,7 +10,7 @@ use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
use Friendica\Object\Profile;
use Friendica\Protocol\PortableContact;
use dba;

View file

@ -11,8 +11,8 @@ use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Photo;
use Friendica\Object\Contact;
use Friendica\Object\Image;
use dba;

View file

@ -13,9 +13,9 @@ use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Model\Profile;
use Friendica\Object\Contact;
use Friendica\Object\Image;
use Friendica\Protocol\OStatus;
use Friendica\Util\XML;

View file

@ -16,10 +16,10 @@ use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Model\Profile;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Util\XML;
use dba;

View file

@ -9,9 +9,9 @@ use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Object\Image;
use Friendica\Util\Lock;
use Friendica\Util\XML;

View file

@ -10,9 +10,9 @@ use Friendica\App;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GlobalContact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Protocol\PortableContact;
use dba;

View file

@ -9,7 +9,7 @@ use Friendica\App;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\DFRN;
use Friendica\Protocol\Email;

View file

@ -7,8 +7,8 @@ namespace Friendica\Worker;
use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Network\Probe;
use Friendica\Object\Contact;
use Friendica\Protocol\Diaspora;
use Friendica\Protocol\OStatus;
use Friendica\Protocol\Salmon;

View file

@ -7,7 +7,7 @@ namespace Friendica\Worker;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
use Friendica\Protocol\Email;
use Friendica\Protocol\PortableContact;
use dba;

View file

@ -29,7 +29,7 @@ if ($argc != 2 || $argv[1] == "-h" || $argv[1] == "--help" || $argv[1] == "-?")
}
use Friendica\BaseObject;
use Friendica\Object\Contact;
use Friendica\Model\Contact;
require_once 'boot.php';
require_once 'include/dba.php';