aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meer <michael@meer.name>2014-01-30 10:39:09 +0100
committerMichael Meer <michael@meer.name>2014-01-30 10:39:09 +0100
commit0a2b2a139080b41c10bbc7fc0f3b24129f2c3c38 (patch)
tree29906db19f930d0585c9978d2d3fbaf8ca47041b
parente5d1e20ff50f49909e7df6fe7efe0d7488e58eaa (diff)
downloadvolse-hubzilla-0a2b2a139080b41c10bbc7fc0f3b24129f2c3c38.tar.gz
volse-hubzilla-0a2b2a139080b41c10bbc7fc0f3b24129f2c3c38.tar.bz2
volse-hubzilla-0a2b2a139080b41c10bbc7fc0f3b24129f2c3c38.zip
attempt with fix URL for testing works
-rw-r--r--include/network.php12
-rw-r--r--include/zot.php1
-rwxr-xr-xindex.php5
-rw-r--r--mod/admin.php7
-rwxr-xr-xview/tpl/admin_hubloc.tpl1
5 files changed, 19 insertions, 7 deletions
diff --git a/include/network.php b/include/network.php
index 3fe7f5400..ca6fa1bfc 100644
--- a/include/network.php
+++ b/include/network.php
@@ -78,7 +78,7 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
@curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
- // don't let curl abort the entire application
+ // dont let curl abort the entire application
// if it throws any errors.
$s = @curl_exec($ch);
@@ -86,7 +86,7 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
$base = $s;
$curl_info = @curl_getinfo($ch);
$http_code = $curl_info['http_code'];
-// logger('fetch_url:' . $http_code . ' data: ' . $s);
+ logger('fetch_url:' . $http_code . ' data: ' . $s);
$header = '';
// Pull out multiple headers, e.g. proxy and continuation headers
@@ -129,7 +129,11 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
function z_post_url($url,$params, $redirects = 0, $opts = array()) {
-
+
+ logger('z_post_url',LOGGER_DEBUG);
+ logger('z_post_url url ' . $url ,LOGGER_DEBUG);
+ logger('z_post_url params' . $params ,LOGGER_DEBUG);
+ logger('z_post_url redirects ' . $redirects ,LOGGER_DEBUG);
$ret = array('return_code' => 0, 'success' => false, 'header' => "", 'body' => "");
$ch = curl_init($url);
@@ -181,10 +185,12 @@ function z_post_url($url,$params, $redirects = 0, $opts = array()) {
// if it throws any errors.
$s = @curl_exec($ch);
+ logger('z_post_url s ' . $s ,LOGGER_DEBUG);
$base = $s;
$curl_info = curl_getinfo($ch);
$http_code = $curl_info['http_code'];
+ logger('z_post_url http_code ' . $http_code ,LOGGER_DEBUG);
$header = '';
diff --git a/include/zot.php b/include/zot.php
index 7c2cfe019..de2fb4202 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -134,6 +134,7 @@ function zot_build_packet($channel,$type = 'notify',$recipients = null, $remote_
function zot_zot($url,$data) {
+ logger('zot_zot ',LOGGER_DEBUG);
return z_post_url($url,array('data' => $data));
}
diff --git a/index.php b/index.php
index 6ffef19cb..15fa264bd 100755
--- a/index.php
+++ b/index.php
@@ -19,7 +19,7 @@ $a = new App;
/**
*
* Load the configuration file which contains our DB credentials.
- * Ignore errors. If the file doesn't exist or is empty, we are running in installation mode.
+ * Ignore errors. If the file doesnt exist or is empty, we are running in installation mode.
*
*/
@@ -181,7 +181,8 @@ if(strlen($a->module)) {
* If the site has a custom module to over-ride the standard module, use it.
* Otherwise, look for the standard program module in the 'mod' directory
*/
-
+ logger('Index.php', LOGGER_DEBUG);
+ //logger('Index.php array ' . print_r($a,true), LOGGER_DEBUG);
if(! $a->module_loaded) {
if(file_exists("custom/{$a->module}.php")) {
diff --git a/mod/admin.php b/mod/admin.php
index 1a284c42f..360eddd2a 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -9,7 +9,7 @@
* @param App $a
*/
function admin_post(&$a){
-
+ logger('admin_post', LOGGER_DEBUG);
if(!is_site_admin()) {
return;
@@ -74,6 +74,7 @@ function admin_post(&$a){
*/
function admin_content(&$a) {
+ logger('admin_content', LOGGER_DEBUG);
if(!is_site_admin()) {
return login(false);
}
@@ -478,11 +479,13 @@ function admin_page_hubloc_post(&$a){
intval($hublocid)
);
$hublocurl = $arrhublocurl[0]['hubloc_url'] . '/post';
+ $hublocurl = "http://fred-dev.michameer.dyndns.org/post";
//perform ping
$m = zot_build_packet($a->get_channel(),'ping');
logger('ping message : ' . print_r($m,true), LOGGER_DEBUG);
- $r = zot_zot($hubloc_url,$m);
+ logger('ping _REQUEST ' . print_r($_REQUEST,true), LOGGER_DEBUG);
+ $r = zot_zot($hublocurl,$m);
logger('ping answer: ' . print_r($r,true), LOGGER_DEBUG);
//unfotunatly zping wont work, I guess return format is not correct
diff --git a/view/tpl/admin_hubloc.tpl b/view/tpl/admin_hubloc.tpl
index ea840e1b3..06a8cdf6a 100755
--- a/view/tpl/admin_hubloc.tpl
+++ b/view/tpl/admin_hubloc.tpl
@@ -15,6 +15,7 @@
<form action="{{$baseurl}}/admin/hubloc" method="post">
<input type="hidden" name="hublocid" value="{{$hub.hubloc_id}}">
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
+ <input type='hidden' name='url' value='{{$hub.hubloc_host}}'>
<input type="submit" name="check" value="check" >
<input type="submit" name="repair" value="repair" ></td>
</form>