From fc0edb2f00bcdc6baaaa29f9041e82f3003b9b44 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Sun, 07 Jun 2015 12:16:19 -0400
Subject: [PATCH] Merge branch 'master' into 'master'
---
interface/web/tools/resync.php | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/interface/web/tools/resync.php b/interface/web/tools/resync.php
index 2ae7784..ef47fd7 100644
--- a/interface/web/tools/resync.php
+++ b/interface/web/tools/resync.php
@@ -145,6 +145,7 @@
'web_domain' => array (
'index_field' => 'domain_id',
'server_type' => 'web',
+ 'server_id' => $server_id,
),
'shell_user' => array (
'index_field' => 'shell_user_id',
@@ -260,6 +261,17 @@
if ($server_count > 1) $options_servers = "<option value='0'>".$app->tform->wordbook['all_active_mail_txt']."</option>" . $options_servers;
$app->tpl->setVar('mailfilter_server_id', $options_servers);
$app->tpl->setVar('mail_filter_found', 1);
+ unset($options_servers);
+ }
+
+ //* mailinglist
+ $server_list = $this->create_list($mail_server_rec, 'mail', 'mail_mailinglist');
+ $options_servers = $server_list[0];$server_count = $server_list[1];
+ unset($server_list);
+ if (isset($options_servers)) { //* server with data found
+ if ($server_count > 1) $options_servers = "<option value='0'>".$app->tform->wordbook['all_active_mail_txt']."</option>" . $options_servers;
+ $app->tpl->setVar('mailinglist_server_id', $options_servers);
+ $app->tpl->setVar('mailinglist_found', 1);
unset($options_servers);
}
@@ -379,6 +391,10 @@
}
}
+ $csrf_token = $app->auth->csrf_token_get('tools_resync');
+ $app->tpl->setVar('_csrf_id', $csrf_token['csrf_id']);
+ $app->tpl->setVar('_csrf_key', $csrf_token['csrf_key']);
+
parent::onShowEnd();
}
@@ -429,7 +445,12 @@
function onSubmit() {
global $app;
-
+
+ if(isset($_POST) && count($_POST) > 1) {
+ //* CSRF Check
+ $app->auth->csrf_token_check();
+ }
+
//* all services
if($this->dataRecord['resync_all'] == 1) {
$this->dataRecord['resync_sites'] = 1;
--
Gitblit v1.9.1