aboutsummaryrefslogtreecommitdiffstats
path: root/admin/site_manager.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-19 22:25:39 +0000
committerplegall <plg@piwigo.org>2010-03-19 22:25:39 +0000
commitc695136e4d75695178a9fc848a7cf6bfa2b9346c (patch)
treeefba21de4995d7bd6b2f792e6d118a8e6e6bd405 /admin/site_manager.php
parentff7e537e2b4bceaef241096a377d12af4b917c43 (diff)
bug 1328: backport the pwg_token on trunk
bug 1329: backport the check_input_parameter on trunk feature 1026: add pwg_token feature for edit/delete comment. Heavy refactoring on this feature to make the code simpler and easier to maintain (I hope). git-svn-id: http://piwigo.org/svn/trunk@5195 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/site_manager.php')
-rw-r--r--admin/site_manager.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/admin/site_manager.php b/admin/site_manager.php
index ee25bd826..595605f59 100644
--- a/admin/site_manager.php
+++ b/admin/site_manager.php
@@ -33,6 +33,11 @@ include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
// +-----------------------------------------------------------------------+
check_status(ACCESS_ADMINISTRATOR);
+if (!empty($_POST) or isset($_GET['action']))
+{
+ check_pwg_token();
+}
+
/**
* requests the given $url (a remote create_listing_file.php) and fills a
* list of lines corresponding to request output
@@ -198,11 +203,13 @@ SELECT galleries_url
}
}
-$template->assign( array(
- 'U_HELP' => get_root_url().'popuphelp.php?page=site_manager',
- 'F_ACTION' => get_root_url().'admin.php'
- .get_query_string_diff( array('action','site') )
- ) );
+$template->assign(
+ array(
+ 'U_HELP' => get_root_url().'popuphelp.php?page=site_manager',
+ 'F_ACTION' => get_root_url().'admin.php'.get_query_string_diff(array('action','site','pwg_token')),
+ 'PWG_TOKEN' => get_pwg_token(),
+ )
+ );
// +-----------------------------------------------------------------------+
// | remote sites list |
@@ -242,6 +249,7 @@ while ($row = pwg_db_fetch_assoc($result))
$base_url = PHPWG_ROOT_PATH.'admin.php';
$base_url.= '?page=site_manager';
$base_url.= '&amp;site='.$row['id'];
+ $base_url.= '&amp;pwg_token='.get_pwg_token();
$base_url.= '&amp;action=';
$update_url = PHPWG_ROOT_PATH.'admin.php';