]> git.mxchange.org Git - friendica-addons.git/commitdiff
GContact moved to src
authorAdam Magness <adam.magness@gmail.com>
Mon, 13 Nov 2017 04:33:14 +0000 (23:33 -0500)
committerAdam Magness <adam.magness@gmail.com>
Mon, 13 Nov 2017 04:33:14 +0000 (23:33 -0500)
Update references to socgraph to GContact namespace functions. Related to https://github.com/friendica/friendica/issues/3878

pumpio/pumpio.php
statusnet/statusnet.php
twitter/twitter.php

index 81b5e107e582eaadd28ba234223c92cfeeb0117f..11d0e190be308555c45de974498a0cb2c0f2c877 100644 (file)
@@ -6,17 +6,16 @@
  * Author: Michael Vogel <http://pirati.ca/profile/heluecht>
  */
 
-use Friendica\Core\Worker;
-
-require('addon/pumpio/oauth/http.php');
-require('addon/pumpio/oauth/oauth_client.php');
-require_once('include/enotify.php');
-require_once('include/socgraph.php');
-require_once("include/Photo.php");
-require_once("mod/share.php");
-
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
+use Friendica\Core\Worker;
+use Friendica\Model\GContact;
+
+require 'addon/pumpio/oauth/http.php';
+require 'addon/pumpio/oauth/oauth_client.php';
+require_once 'include/enotify.php';
+require_once "include/Photo.php";
+require_once "mod/share.php";
 
 define('PUMPIO_DEFAULT_POLL_INTERVAL', 5); // given in minutes
 
@@ -969,7 +968,7 @@ function pumpio_dolike(&$a, $uid, $self, $post, $own_id, $threadcompletion = tru
 
 function pumpio_get_contact($uid, $contact, $no_insert = false) {
 
-       update_gcontact(array("url" => $contact->url, "network" => NETWORK_PUMPIO, "generation" => 2,
+       GContact::updateGContact(array("url" => $contact->url, "network" => NETWORK_PUMPIO, "generation" => 2,
                        "photo" => $contact->image->url, "name" => $contact->displayName,  "hide" => true,
                        "nick" => $contact->preferredUsername, "location" => $contact->location->displayName,
                        "about" => $contact->summary, "addr" => str_replace("acct:", "", $contact->id)));
index 75b1d7d1f09378f795906e350bc7721a4fe72bd3..a482645bb54a06d622ddb8a3de50dfd4fb611fcc 100644 (file)
 
 define('STATUSNET_DEFAULT_POLL_INTERVAL', 5); // given in minutes
 
-require_once('library/twitteroauth.php');
-require_once('include/enotify.php');
-require_once("include/socgraph.php");
+require_once 'library/twitteroauth.php';
+require_once 'include/enotify.php';
 
 use Friendica\Core\Config;
 use Friendica\Core\PConfig;
+use Friendica\Model\GContact;
 
 class StatusNetOAuth extends TwitterOAuth {
     function get_maxlength() {
@@ -929,7 +929,7 @@ function statusnet_fetch_contact($uid, $contact, $create_user) {
        if ($contact->statusnet_profile_url == "")
                return(-1);
 
-       update_gcontact(array("url" => $contact->statusnet_profile_url,
+       GContact::updateGContact(array("url" => $contact->statusnet_profile_url,
                        "network" => NETWORK_STATUSNET, "photo" => $contact->profile_image_url,
                        "name" => $contact->name, "nick" => $contact->screen_name,
                        "location" => $contact->location, "about" => $contact->description,
index 21b6122ecfc4bc64bffea1e259b3524d28ade800..bd2c627a8d5c3adfc7a0676a18223ba27a675522 100644 (file)
  *     Requirements: PHP5, curl [Slinky library]
  */
 
+use Friendica\Core\Config;
+use Friendica\Core\PConfig;
 use Friendica\Core\Worker;
+use Friendica\Model\GContact;
 
-require_once('include/enotify.php');
-require_once("include/socgraph.php");
+require_once 'include/enotify.php';
 
-use Friendica\Core\Config;
-use Friendica\Core\PConfig;
 
 define('TWITTER_DEFAULT_POLL_INTERVAL', 5); // given in minutes
 
@@ -956,7 +956,7 @@ function twitter_fetch_contact($uid, $contact, $create_user) {
 
        $avatar = twitter_fix_avatar($contact->profile_image_url_https);
 
-       update_gcontact(array("url" => "https://twitter.com/".$contact->screen_name,
+       GContact::updateGContact(array("url" => "https://twitter.com/".$contact->screen_name,
                        "network" => NETWORK_TWITTER, "photo" => $avatar,  "hide" => true,
                        "name" => $contact->name, "nick" => $contact->screen_name,
                        "location" => $contact->location, "about" => $contact->description,