aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-08-16 20:47:40 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-08-16 20:47:40 -0700
commitfacca43e2de1c3c30a34f38bbe7025b7216db13f (patch)
tree8d4180967a416d77ccb25c8c95707a5f76390468 /include/notifier.php
parentce515ac2e815cf6c392691743393ea6ebc42c832 (diff)
downloadvolse-hubzilla-facca43e2de1c3c30a34f38bbe7025b7216db13f.tar.gz
volse-hubzilla-facca43e2de1c3c30a34f38bbe7025b7216db13f.tar.bz2
volse-hubzilla-facca43e2de1c3c30a34f38bbe7025b7216db13f.zip
no more url in cmdline
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php27
1 files changed, 19 insertions, 8 deletions
diff --git a/include/notifier.php b/include/notifier.php
index 36ff27054..dcc772454 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -1,6 +1,7 @@
<?php
-print_r($argv);
+$debugging = false;
+
require_once("boot.php");
$a = new App;
@@ -13,19 +14,21 @@ $db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
require_once("session.php");
require_once("datetime.php");
-if($argc < 3)
+if($argc < 2)
exit;
-dbg(3);
+
+ $a->set_baseurl(get_config('system',url'));
+
$baseurl = $argv[1];
$a->set_baseurl($argv[1]);
- $cmd = $argv[2];
+ $cmd = $argv[1];
switch($cmd) {
case 'mail':
default:
- $item_id = intval($argv[3]);
+ $item_id = intval($argv[2]);
if(! $item_id)
killme();
break;
@@ -233,7 +236,10 @@ dbg(3);
}
}
$atom .= "</feed>\r\n";
-echo $atom;
+
+ if($debugging)
+ echo $atom;
+
// create a clone of this feed but with comments disabled to send to those who can't respond.
$atom_nowrite = str_replace('<dfrn:comment-allow>1','<dfrn:comment-allow>0',$atom);
@@ -265,7 +271,10 @@ echo $atom;
$url = $rr['notify'] . '?dfrn_id=' . $rr['dfrn-id'];
$xml = fetch_url($url);
-echo $xml;
+
+ if($debugging)
+ echo $xml;
+
if(! $xml)
continue;
@@ -302,7 +311,9 @@ echo $xml;
}
$xml = post_url($rr['notify'],$postvars);
-echo $xml;
+
+ if($debugging)
+ echo $xml;
$res = simplexml_load_string($xml);