]> git.mxchange.org Git - friendica.git/commitdiff
Removed just more old diaspora function calls.
authorMichael Vogel <icarus@dabo.de>
Mon, 14 Mar 2016 19:53:44 +0000 (20:53 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 1 May 2016 11:46:08 +0000 (13:46 +0200)
13 files changed:
database.sql
doc/database.md
doc/database/db_dsprphotoq.md [deleted file]
include/cron.php
include/dbstructure.php
include/delivery.php
include/diaspora2.php
include/dsprphotoq.php [deleted file]
include/follow.php
mod/dfrn_confirm.php
mod/p.php
mod/receive.php
object/Item.php

index 25faf0f4c094f56be93a2ab873675b9d7f6710d2..02e5c9b37832bfd221481b4cd81b99471c8a39b3 100644 (file)
@@ -201,17 +201,6 @@ CREATE TABLE IF NOT EXISTS `deliverq` (
         PRIMARY KEY(`id`)
 ) DEFAULT CHARSET=utf8;
 
---
--- TABLE dsprphotoq
---
-CREATE TABLE IF NOT EXISTS `dsprphotoq` (
-       `id` int(10) unsigned NOT NULL auto_increment,
-       `uid` int(11) NOT NULL DEFAULT 0,
-       `msg` mediumtext NOT NULL,
-       `attempt` tinyint(4) NOT NULL DEFAULT 0,
-        PRIMARY KEY(`id`)
-) DEFAULT CHARSET=utf8;
-
 --
 -- TABLE event
 --
index e37df05e099e51bc65e3b2cec14964399c152923..f48404c17d0bc219e66c40d8d84248386b948a3a 100644 (file)
@@ -15,7 +15,6 @@ Database Tables
 | [contact](help/database/db_contact)                  | contact table                                    |
 | [conv](help/database/db_conv)                        | private messages                                 |
 | [deliverq](help/database/db_deliverq)                |                                                  |
-| [dsprphotoq](help/database/db_dsprphotoq)            |                                                  |
 | [event](help/database/db_event)                      | Events                                           |
 | [fcontact](help/database/db_fcontact)                | friend suggestion stuff                          |
 | [ffinder](help/database/db_ffinder)                  | friend suggestion stuff                          |
diff --git a/doc/database/db_dsprphotoq.md b/doc/database/db_dsprphotoq.md
deleted file mode 100644 (file)
index 6af4d03..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Table dsprphotoq
-================
-
-| Field   | Description      | Type             | Null | Key | Default | Extra          |
-|---------|------------------|------------------|------|-----|---------|----------------|
-| id      | sequential ID    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
-| uid     |                  | int(11)          | NO   |     | 0       |                |
-| msg     |                  | mediumtext       | NO   |     | NULL    |                |
-| attempt |                  | tinyint(4)       | NO   |     | 0       |                |
-
-Return to [database documentation](help/database)
index db7d44be0b9c583cccef8be4b99090b88cf433a1..60c62786e6d22287c897f06f8102c7073d9966a6 100644 (file)
@@ -71,10 +71,6 @@ function cron_run(&$argv, &$argc){
 
        proc_run('php',"include/queue.php");
 
-       // run diaspora photo queue process in the background
-
-       proc_run('php',"include/dsprphotoq.php");
-
        // run the process to discover global contacts in the background
 
        proc_run('php',"include/discover_poco.php");
index ddf036f2c1cbe7edfedae0361d99e7523a9fecae..e5e748bb24f046da3d93c4da3cf4a1046cefe2ff 100644 (file)
@@ -537,17 +537,6 @@ function db_definition() {
                                        "PRIMARY" => array("id"),
                                        )
                        );
-       $database["dsprphotoq"] = array(
-                       "fields" => array(
-                                       "id" => array("type" => "int(10) unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
-                                       "uid" => array("type" => "int(11)", "not null" => "1", "default" => "0"),
-                                       "msg" => array("type" => "mediumtext", "not null" => "1"),
-                                       "attempt" => array("type" => "tinyint(4)", "not null" => "1", "default" => "0"),
-                                       ),
-                       "indexes" => array(
-                                       "PRIMARY" => array("id"),
-                                       )
-                       );
        $database["event"] = array(
                        "fields" => array(
                                        "id" => array("type" => "int(11)", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
index 1e1dadcd934e3ca0e01be582a88279ff4e9ce9d3..9ac9f2391b6d2001c89414e6aba7d5b70ab46cbe 100644 (file)
@@ -501,7 +501,6 @@ function delivery_run(&$argv, &$argc){
 
                                if ($mail) {
                                        diaspora::send_mail($item,$owner,$contact);
-                                       //diaspora_send_mail($item,$owner,$contact);
                                        break;
                                }
 
@@ -524,25 +523,21 @@ function delivery_run(&$argv, &$argc){
                                        // top-level retraction
                                        logger('diaspora retract: '.$loc);
                                        diaspora::send_retraction($target_item,$owner,$contact,$public_message);
-                                       //diaspora_send_retraction($target_item,$owner,$contact,$public_message);
                                        break;
                                } elseif ($followup) {
                                        // send comments and likes to owner to relay
                                        logger('diaspora followup: '.$loc);
                                        diaspora::send_followup($target_item,$owner,$contact,$public_message);
-                                       //diaspora_send_followup($target_item,$owner,$contact,$public_message);
                                        break;
                                } elseif ($target_item['uri'] !== $target_item['parent-uri']) {
                                        // we are the relay - send comments, likes and relayable_retractions to our conversants
                                        logger('diaspora relay: '.$loc);
                                        diaspora::send_relay($target_item,$owner,$contact,$public_message);
-                                       //diaspora_send_relay($target_item,$owner,$contact,$public_message);
                                        break;
                                } elseif ($top_level && !$walltowall) {
                                        // currently no workable solution for sending walltowall
                                        logger('diaspora status: '.$loc);
                                        diaspora::send_status($target_item,$owner,$contact,$public_message);
-                                       //diaspora_send_status($target_item,$owner,$contact,$public_message);
                                        break;
                                }
 
index c0e054c384a6e89faaea7a5eb31de2409d55f6cf..1a354e9cf2504a7c0ad02da1369d229a94d82a5e 100644 (file)
@@ -2093,7 +2093,7 @@ class diaspora {
                return self::build_and_transmit($owner, $contact, "retraction", $message);
        }
 
-       private function is_reshare($body) {
+       public static function is_reshare($body) {
                $body = trim($body);
 
                // Skip if it isn't a pure repeated messages
diff --git a/include/dsprphotoq.php b/include/dsprphotoq.php
deleted file mode 100644 (file)
index 0d8088d..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-require_once("boot.php");
-require_once('include/diaspora.php');
-
-function dsprphotoq_run($argv, $argc){
-       global $a, $db;
-
-       if(is_null($a)){
-               $a = new App;
-       }
-
-       if(is_null($db)){
-               @include(".htconfig.php");
-               require_once("include/dba.php");
-               $db = new dba($db_host, $db_user, $db_pass, $db_data);
-               unset($db_host, $db_user, $db_pass, $db_data);
-       };
-
-       logger("diaspora photo queue: running", LOGGER_DEBUG);
-
-       $r = q("SELECT * FROM dsprphotoq");
-       if(!$r)
-               return;
-
-       $dphotos = $r;
-
-       logger("diaspora photo queue: processing " . count($dphotos) . " photos");
-
-       foreach($dphotos as $dphoto) {
-
-               $r = array();
-
-               if ($dphoto['uid'] == 0)
-                       $r[0] = array("uid" => 0, "page-flags" => PAGE_FREELOVE);
-               else
-                       $r = q("SELECT * FROM user WHERE uid = %d",
-                               intval($dphoto['uid']));
-
-               if(!$r) {
-                       logger("diaspora photo queue: user " . $dphoto['uid'] . " not found");
-                       return;
-               }
-
-               $ret = diaspora_dispatch($r[0],unserialize($dphoto['msg']),$dphoto['attempt']);
-               q("DELETE FROM dsprphotoq WHERE id = %d",
-                  intval($dphoto['id'])
-               );
-       }
-}
-
-
-if (array_search(__file__,get_included_files())===0){
-  dsprphotoq_run($_SERVER["argv"],$_SERVER["argc"]);
-  killme();
-}
index 6eab7e12fa677a7bf7b6c627fa35f86a84fa3bf9..d0411a466af0411045ed9455f2c25019a67a3c00 100644 (file)
@@ -304,7 +304,7 @@ function new_contact($uid,$url,$interactive = false) {
                if($contact['network'] == NETWORK_DIASPORA) {
                        require_once('include/diaspora.php');
                        $ret = diaspora::send_share($a->user,$contact);
-                       logger('mod_follow: diaspora_share returns: ' . $ret);
+                       logger('share returns: '.$ret);
                }
        }
 
index 68950ec285a5f29a6be7fb037fdeb43c6f00ee99..cc09021dcaa980b67af133e880401cdb67e2bccb 100644 (file)
@@ -427,8 +427,8 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
 
                        if(($contact) && ($contact['network'] === NETWORK_DIASPORA)) {
                                require_once('include/diaspora.php');
-                               $ret = diaspora_share($user[0],$r[0]);
-                               logger('mod_follow: diaspora_share returns: ' . $ret);
+                               $ret = diaspora::send_share($user[0],$r[0]);
+                               logger('share returns: ' . $ret);
                        }
 
                        // Send a new friend post if we are allowed to...
index 92b72dc1cec8c19fa4a467a0f9fb19226056f825..20d6cfdbafeb181ca263aec232a33d53722dab8a 100644 (file)
--- a/mod/p.php
+++ b/mod/p.php
@@ -28,14 +28,14 @@ function p_init($a){
 
        $post = array();
 
-       $reshared = diaspora_is_reshare($item[0]["body"]);
+       $reshared = diaspora::is_reshare($item[0]["body"]);
 
        if ($reshared) {
                $nodename = "reshare";
                $post["root_diaspora_id"] = $reshared["root_handle"];
                $post["root_guid"] = $reshared["root_guid"];
                $post["guid"] = $item[0]["guid"];
-               $post["diaspora_handle"] = diaspora_handle_from_contact($item[0]["contact-id"]);
+               $post["diaspora_handle"] = diaspora::handle_from_contact($item[0]["contact-id"]);
                $post["public"] = (!$item[0]["private"] ? 'true':'false');
                $post["created_at"] = datetime_convert('UTC','UTC',$item[0]["created"]);
        } else {
@@ -48,7 +48,7 @@ function p_init($a){
                $nodename = "status_message";
                $post["raw_message"] = str_replace("&", "&amp;", $body);
                $post["guid"] = $item[0]["guid"];
-               $post["diaspora_handle"] = diaspora_handle_from_contact($item[0]["contact-id"]);
+               $post["diaspora_handle"] = diaspora::handle_from_contact($item[0]["contact-id"]);
                $post["public"] = (!$item[0]["private"] ? 'true':'false');
                $post["created_at"] = datetime_convert('UTC','UTC',$item[0]["created"]);
                $post["provider_display_name"] = $item[0]["app"];
index 051ea8c25c9b7657bd5141d07c80de270d315e01..4991ac47e81811b473597398a4c129df2c00b330 100644 (file)
@@ -54,7 +54,6 @@ function receive_post(&$a) {
        logger('mod-diaspora: message is okay', LOGGER_DEBUG);
 
        $msg = diaspora::decode($importer,$xml);
-       //$msg = diaspora_decode($importer,$xml);
 
        logger('mod-diaspora: decoded', LOGGER_DEBUG);
 
@@ -68,10 +67,8 @@ function receive_post(&$a) {
        $ret = 0;
        if($public) {
                diaspora::dispatch_public($msg);
-               //diaspora_dispatch_public($msg);
        } else {
                $ret = diaspora::dispatch($importer,$msg);
-               //$ret = diaspora_dispatch($importer,$msg);
        }
 
        http_status_exit(($ret) ? $ret : 200);
index e9c96cf159311f888ec9b96f0a8941cc81ded38a..59659cdaff2e4816df0f42bcdfc4447ef10d51a3 100644 (file)
@@ -324,7 +324,7 @@ class Item extends BaseObject {
 
                // Diaspora isn't able to do likes on comments - but red does
                if (($item["item_network"] == NETWORK_DIASPORA) AND ($indent == 'comment') AND
-                       !diaspora_is_redmatrix($item["owner-link"]) AND isset($buttons["like"]))
+                       !diaspora::is_redmatrix($item["owner-link"]) AND isset($buttons["like"]))
                        unset($buttons["like"]);
 
                // Diaspora doesn't has multithreaded comments