mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:50:15 +00:00
Removed just more old diaspora function calls.
This commit is contained in:
parent
2446c56e50
commit
07bd89c35f
13 changed files with 8 additions and 109 deletions
|
@ -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");
|
||||
|
|
|
@ -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"),
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue