Added syncing (push and pull) and refactored a few functions.

This commit is contained in:
Beanow 2014-08-09 00:46:53 +02:00
commit 1fe9bb9b5b
11 changed files with 732 additions and 155 deletions

View file

@ -1,6 +1,7 @@
<?php
require_once('include/submit.php');
require_once('include/sync.php');
function submit_content(&$a) {
@ -8,10 +9,7 @@ function submit_content(&$a) {
$url = hex2bin(notags(trim($_GET['url'])));
//Currently we simply push RAW URL's to our targets.
//If we support it that is.
if($a->config['syncing']['enable_pushing']){
q("INSERT INTO `sync-queue` (`url`) VALUES ('%s')", dbesc($url));
}
sync_push($url);
//Run the submit sequence.
run_submit($url);