From 71c74b1b572f3bdf00ba99009cc23f8f48072a1c Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Sat, 08 Mar 2014 11:58:49 -0500 Subject: [PATCH] Fixed: FS#3372 - Web browser password autofill function overwrites settings --- interface/lib/plugins/clients_template_plugin.inc.php | 42 ++++++++++++++++++++++-------------------- 1 files changed, 22 insertions(+), 20 deletions(-) diff --git a/interface/lib/plugins/clients_template_plugin.inc.php b/interface/lib/plugins/clients_template_plugin.inc.php index 51f1e98..c4899bf 100644 --- a/interface/lib/plugins/clients_template_plugin.inc.php +++ b/interface/lib/plugins/clients_template_plugin.inc.php @@ -1,34 +1,36 @@ <?php /** * clients_template_plugin plugin - * + * * @author Marius Cramer <m.cramer@pixcept.de> pixcept KG * @author (original tools.inc.php) Till Brehm, projektfarm Gmbh * @author (original tools.inc.php) Oliver Vogel www.muv.com */ - + + class clients_template_plugin { var $plugin_name = 'clients_template_plugin'; var $class_name = 'clients_template_plugin'; - - /* + + /* This function is called when the plugin is loaded */ - function onLoad() { - global $app; - //Register for the events - $app->plugin->registerEvent('client:client:on_after_insert','clients_template_plugin','apply_client_templates'); - $app->plugin->registerEvent('client:client:on_after_update','clients_template_plugin','apply_client_templates'); - $app->plugin->registerEvent('client:reseller:on_after_insert','clients_template_plugin','apply_client_templates'); - $app->plugin->registerEvent('client:reseller:on_after_update','clients_template_plugin','apply_client_templates'); - } - - function apply_client_templates($event_name, $page_form) { - global $app; - - $app->uses('client_templates'); - $app->client_templates->apply_client_templates($page_form->id, $page_form->dataRecord); - } -} \ No newline at end of file + function onLoad() { + global $app; + //Register for the events + $app->plugin->registerEvent('client:client:on_after_insert', 'clients_template_plugin', 'apply_client_templates'); + $app->plugin->registerEvent('client:client:on_after_update', 'clients_template_plugin', 'apply_client_templates'); + $app->plugin->registerEvent('client:reseller:on_after_insert', 'clients_template_plugin', 'apply_client_templates'); + $app->plugin->registerEvent('client:reseller:on_after_update', 'clients_template_plugin', 'apply_client_templates'); + } + + function apply_client_templates($event_name, $page_form) { + global $app; + + $app->uses('client_templates'); + $app->client_templates->apply_client_templates($page_form->id); + } + +} -- Gitblit v1.9.1