Marius Cramer
2015-06-07 fc0edb2f00bcdc6baaaa29f9041e82f3003b9b44
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;