aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-20 03:40:00 -0800
committerfriendica <info@friendica.com>2014-01-20 03:40:00 -0800
commitf563ea4b39df459df25a590a7f7a5bb2afcd5cc1 (patch)
tree98a8c1c7a8277ae8da0a4507783caa082fe6a85a
parente68748afabee36a0c60fdf071cdc7c458080f13b (diff)
parenta13593590b5e5488554225ba9ff9bced24cffd0c (diff)
downloadvolse-hubzilla-f563ea4b39df459df25a590a7f7a5bb2afcd5cc1.tar.gz
volse-hubzilla-f563ea4b39df459df25a590a7f7a5bb2afcd5cc1.tar.bz2
volse-hubzilla-f563ea4b39df459df25a590a7f7a5bb2afcd5cc1.zip
Merge pull request #275 from MicMee/master
added buttons to perform later hubloc actions
-rw-r--r--include/security.php2
-rw-r--r--mod/admin.php6
-rwxr-xr-xview/tpl/admin_hubloc.tpl2
3 files changed, 7 insertions, 3 deletions
diff --git a/include/security.php b/include/security.php
index a87442d42..9943cf88d 100644
--- a/include/security.php
+++ b/include/security.php
@@ -339,7 +339,7 @@ function get_form_security_token($typename = '') {
$timestamp = time();
$sec_hash = hash('whirlpool', $a->user['guid'] . $a->user['prvkey'] . session_id() . $timestamp . $typename);
-
+
return $timestamp . '.' . $sec_hash;
}
diff --git a/mod/admin.php b/mod/admin.php
index 91dd0b56e..984e12777 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -456,7 +456,8 @@ function admin_page_site(&$a) {
}
function admin_page_hubloc_post(&$a){
- check_form_security_token_redirectOnErr('/admin/hubloc', 'hubloc');
+ check_form_security_token_redirectOnErr('/admin/hubloc', 'admin_hubloc');
+ goaway($a->get_baseurl(true) . '/admin/hubloc' );
return;
}
@@ -479,7 +480,8 @@ function admin_page_hubloc(&$a) {
'$queues' => $queues,
//'$accounts' => $accounts, /*$accounts is empty here*/
'$pending' => Array( t('Pending registrations'), $pending),
- '$plugins' => Array( t('Active plugins'), $a->plugins )
+ '$plugins' => Array( t('Active plugins'), $a->plugins ),
+ '$form_security_token' => get_form_security_token("admin_hubloc")
));
return $o;
}
diff --git a/view/tpl/admin_hubloc.tpl b/view/tpl/admin_hubloc.tpl
index a9f250652..e1c8b3647 100755
--- a/view/tpl/admin_hubloc.tpl
+++ b/view/tpl/admin_hubloc.tpl
@@ -14,6 +14,8 @@
{{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}}"><input type="submit" name="check" value="check" ></td>
+ <td><input type="hidden" name="hublocid" value="{{$hub.hubloc_id}}"><input type="submit" name="repair" value="repair" ></td>
</tr>{{/foreach}}
</tbody>
</table>