mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 01:35:12 +00:00
Merge https://github.com/friendica/red into zpull
This commit is contained in:
commit
9551f6b404
2 changed files with 27 additions and 4 deletions
|
@ -468,6 +468,28 @@ function admin_page_site(&$a) {
|
|||
}
|
||||
function admin_page_hubloc_post(&$a){
|
||||
check_form_security_token_redirectOnErr('/admin/hubloc', 'admin_hubloc');
|
||||
|
||||
//prepare for ping
|
||||
|
||||
if ( $_POST['hublocid']) {
|
||||
$hublocid = $_POST['hublocid'];
|
||||
$arrhublocurl = q("SELECT hubloc_url FROM hubloc WHERE hubloc_id = %d ",
|
||||
intval($hublocid)
|
||||
);
|
||||
$hublocurl = $arrhublocurl[0]['hubloc_url'] . '/post';
|
||||
logger('hubloc_url : ' . $hublocurl , LOGGER_DEBUG);
|
||||
}
|
||||
|
||||
//if ( $_POST'' == "check" ) {
|
||||
// //todo
|
||||
//}
|
||||
|
||||
//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;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<div class="generic-content-wrapper" id='adminpage'>
|
||||
<h1>{{$title}} - {{$page}}</h1>
|
||||
|
||||
<form action="{{$baseurl}}/admin/hubloc" method="post">
|
||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||
|
||||
<table id='server'>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -14,9 +11,13 @@
|
|||
|
||||
{{foreach $hubloc as $hub}}<tr>
|
||||
<td>{{$hub.hubloc_id}}</td><td>{{$hub.hubloc_addr}}</td><td>{{$hub.hubloc_host}}</td><td>{{$hub.hubloc_status}}</td>
|
||||
<td><input type="hidden" name="hublocid" value="{{$hub.hubloc_id}}">
|
||||
<td>
|
||||
<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="submit" name="check" value="check" >
|
||||
<input type="submit" name="repair" value="repair" ></td>
|
||||
</form>
|
||||
</tr>{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue