From f28b21f99d563b08e9d0ddb4a27fb223ad1ce432 Mon Sep 17 00:00:00 2001 From: Michael Meer Date: Wed, 22 Jan 2014 09:16:22 +0100 Subject: start with hubloc ping --- mod/admin.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mod/admin.php') diff --git a/mod/admin.php b/mod/admin.php index 749b94de2..a373fa772 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -457,6 +457,15 @@ function admin_page_site(&$a) { } function admin_page_hubloc_post(&$a){ check_form_security_token_redirectOnErr('/admin/hubloc', 'admin_hubloc'); + + //prepare for ping + logger('POST input: '.$_POST , LOGGER_DEBUG); + //perform ping + //handle results and set the hubloc flags in db to make results visible + + //in case of repair store new pub key for tested hubloc (all channel with this hubloc) in db + //after repair set hubloc flags to 0 + goaway($a->get_baseurl(true) . '/admin/hubloc' ); return; } -- cgit v1.2.3 From ffabb4cc867f59d86380eced3253053d368327f2 Mon Sep 17 00:00:00 2001 From: Michael Meer Date: Wed, 22 Jan 2014 11:29:49 +0100 Subject: reorg formula data for hubloc checks --- mod/admin.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mod/admin.php') diff --git a/mod/admin.php b/mod/admin.php index a373fa772..57e285781 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -459,7 +459,16 @@ function admin_page_hubloc_post(&$a){ check_form_security_token_redirectOnErr('/admin/hubloc', 'admin_hubloc'); //prepare for ping - logger('POST input: '.$_POST , LOGGER_DEBUG); + logger('POST input: '. print_r($_POST,true), LOGGER_DEBUG); + + if ( $_POST['hublocid']) { + logger('hublocid is not empty: ' . $_POST['hublocid'], LOGGER_DEBUG); + } + + //if ( $_POST'' == "check" ) { + // //todo + //} + //perform ping //handle results and set the hubloc flags in db to make results visible -- cgit v1.2.3 From 524fff3a17fec184c87e855d09bf6a60f68e4e88 Mon Sep 17 00:00:00 2001 From: Michael Meer Date: Thu, 23 Jan 2014 12:09:35 +0100 Subject: preperation for ping, need training in SQL :( --- mod/admin.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mod/admin.php') diff --git a/mod/admin.php b/mod/admin.php index 57e285781..33b42d264 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -462,7 +462,12 @@ function admin_page_hubloc_post(&$a){ logger('POST input: '. print_r($_POST,true), LOGGER_DEBUG); if ( $_POST['hublocid']) { - logger('hublocid is not empty: ' . $_POST['hublocid'], LOGGER_DEBUG); + $hublocid = $_POST['hublocid']; + logger('hublocid is not empty: ' . $hublocid , LOGGER_DEBUG); + $hublocurl = q("SELECT hubloc_url FROM hubloc WHERE hubloc_id = %d ", + intval($hublocid) + ); + logger('hubloc_url : ' . print_r($hublocurl, true) , LOGGER_DEBUG); } //if ( $_POST'' == "check" ) { -- cgit v1.2.3 From a2b07ed2814972507bf971a5ac6ed09c399e29e7 Mon Sep 17 00:00:00 2001 From: Michael Meer Date: Thu, 23 Jan 2014 13:58:14 +0100 Subject: build url, deleted logger commands --- mod/admin.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mod/admin.php') diff --git a/mod/admin.php b/mod/admin.php index 33b42d264..fbd342425 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -459,15 +459,14 @@ function admin_page_hubloc_post(&$a){ check_form_security_token_redirectOnErr('/admin/hubloc', 'admin_hubloc'); //prepare for ping - logger('POST input: '. print_r($_POST,true), LOGGER_DEBUG); if ( $_POST['hublocid']) { $hublocid = $_POST['hublocid']; - logger('hublocid is not empty: ' . $hublocid , LOGGER_DEBUG); - $hublocurl = q("SELECT hubloc_url FROM hubloc WHERE hubloc_id = %d ", + $arrhublocurl = q("SELECT hubloc_url FROM hubloc WHERE hubloc_id = %d ", intval($hublocid) ); - logger('hubloc_url : ' . print_r($hublocurl, true) , LOGGER_DEBUG); + $hublocurl = $arrhublocurl[0]['hubloc_url'] . '/post'; + logger('hubloc_url : ' . $hublocurl , LOGGER_DEBUG); } //if ( $_POST'' == "check" ) { -- cgit v1.2.3