Browse Source

Move Object\Contact to Model\Contact

pull/4036/head
Hypolite Petovan 4 years ago
parent
commit
a42595a30c
  1. 3
      boot.php
  2. 2
      include/acl_selectors.php
  3. 2
      include/api.php
  4. 2
      include/bb2diaspora.php
  5. 2
      include/bbcode.php
  6. 2
      include/follow.php
  7. 2
      include/identity.php
  8. 2
      include/items.php
  9. 2
      include/like.php
  10. 2
      include/post_update.php
  11. 20
      include/tags.php
  12. 2
      include/threads.php
  13. 2
      mod/admin.php
  14. 2
      mod/allfriends.php
  15. 2
      mod/cal.php
  16. 2
      mod/common.php
  17. 2
      mod/contacts.php
  18. 2
      mod/crepair.php
  19. 2
      mod/dfrn_confirm.php
  20. 2
      mod/dfrn_notify.php
  21. 2
      mod/dfrn_request.php
  22. 2
      mod/directory.php
  23. 2
      mod/dirfind.php
  24. 2
      mod/display.php
  25. 2
      mod/follow.php
  26. 2
      mod/hovercard.php
  27. 2
      mod/item.php
  28. 2
      mod/match.php
  29. 2
      mod/message.php
  30. 2
      mod/network.php
  31. 2
      mod/nogroup.php
  32. 2
      mod/photos.php
  33. 2
      mod/ping.php
  34. 2
      mod/suggest.php
  35. 2
      mod/unfollow.php
  36. 2
      mod/videos.php
  37. 2
      mod/viewcontacts.php
  38. 2
      src/Core/NotificationsManager.php
  39. 9
      src/Model/Contact.php
  40. 2
      src/Model/GlobalContact.php
  41. 2
      src/Model/User.php
  42. 2
      src/Protocol/DFRN.php
  43. 2
      src/Protocol/Diaspora.php
  44. 2
      src/Protocol/OStatus.php
  45. 2
      src/Worker/CronJobs.php
  46. 2
      src/Worker/Delivery.php
  47. 2
      src/Worker/Notifier.php
  48. 2
      src/Worker/OnePoll.php
  49. 2
      util/global_community_block.php

3
boot.php

@ -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';

2
include/acl_selectors.php

@ -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";

2
include/api.php

@ -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;

2
include/bb2diaspora.php

@ -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;

2
include/bbcode.php

@ -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';

2
include/follow.php

@ -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;

2
include/identity.php

@ -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';

2
include/items.php

@ -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;

2
include/like.php

@ -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;
/**

2
include/post_update.php

@ -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

20
include/tags.php

@ -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();
@ -157,13 +157,13 @@ function update_items() {
/**
* @brief Get alphabetical sorted array of used tags/terms of an user including
* a weighting by frequency of use.
*
*
* @param int $uid The user ID.
* @param int $count Max number of displayed tags/terms.
* @param int $owner_id The contact id of the owner of the tagged items.
* @param string $flags Special item flags.
* @param int $type The tag/term type.
*
*
* @return arr Alphabetical sorted array of used tags of an user.
*/
function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HASHTAG) {
@ -197,19 +197,19 @@ function tagadelic($uid, $count = 0, $owner_id = 0, $flags = '', $type = TERM_HA
if(!DBM::is_result($r)) {
return array();
}
return tag_calc($r);
}
/**
* @brief Construct a tag/term cloud block for an user.
*
*
* @param int $uid The user ID.
* @param int $count Max number of displayed tags/terms.
* @param int $owner_id The contact ID of the owner of the tagged items.
* @param string $flags Special item flags.
* @param int $type The tag/term type.
*
*
* @return string HTML formatted output.
*/
function wtagblock($uid, $count = 0,$owner_id = 0, $flags = '', $type = TERM_HASHTAG) {
@ -244,7 +244,7 @@ function wtagblock($uid, $count = 0,$owner_id = 0, $flags = '', $type = TERM_HAS
/**
* @brief Calculate weighting of tags according to the frequency of use.
*
*
* @param array $arr Array of tags/terms with tag/term name and total count of use.
* @return array Alphabetical sorted array of used tags/terms of an user.
*/
@ -279,10 +279,10 @@ function tag_calc($arr) {
/**
* @brief Compare function to sort tags/terms alphabetically.
*
*
* @param type $a
* @param type $b
*
*
* @return int
*/
function tags_sort($a, $b) {
@ -294,7 +294,7 @@ function tags_sort($a, $b) {
/**
* @brief Insert a tag cloud widget for the present profile.
*
*
* @param int $limit Max number of displayed tags.
* @return string HTML formattat output.
*/

2
include/threads.php

@ -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`,

2
mod/admin.php

@ -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';

2
mod/allfriends.php

@ -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';

2
mod/cal.php

@ -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';

2
mod/common.php

@ -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';

2
mod/contacts.php

@ -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';

2
mod/crepair.php

@ -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';

2
mod/dfrn_confirm.php

@ -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';

2
mod/dfrn_notify.php

@ -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';

2
mod/dfrn_request.php

@ -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';

2
mod/directory.php

@ -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);

2
mod/dirfind.php

@ -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';

2
mod/display.php

@ -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) {

2
mod/follow.php

@ -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';

2
mod/hovercard.php

@ -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

2
mod/item.php

@ -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;

2
mod/match.php

@ -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';

2
mod/message.php

@ -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';

2
mod/network.php

@ -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';

2
mod/nogroup.php

@ -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';

2
mod/photos.php

@ -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';

2
mod/ping.php

@ -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';

2
mod/suggest.php

@ -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';

2
mod/unfollow.php

@ -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';

2
mod/videos.php

@ -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');

2
mod/viewcontacts.php

@ -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');

2
src/Core/NotificationsManager.php

@ -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';

9
src/Object/Contact.php → src/Model/Contact.php

@ -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(

2
src/Model/GlobalContact.php

@ -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;

2
src/Model/User.php

@ -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;

2
src/Protocol/DFRN.php

@ -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;

2
src/Protocol/Diaspora.php

@ -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;

2
src/Protocol/OStatus.php

@ -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;

2
src/Worker/CronJobs.php

@ -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;

2
src/Worker/Delivery.php

@ -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;

2
src/Worker/Notifier.php

@ -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;

2
src/Worker/OnePoll.php

@ -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;

2
util/global_community_block.php

@ -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';

Loading…
Cancel
Save