From 2cb1563f63386b35a69e460051aa9b4a2851d104 Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Wed, 30 May 2012 07:30:44 -0400 Subject: [PATCH] - Added (clickable) placeholders to client messaging function. - Added check so that the client password isn't inserted into the message (for security reasons). --- interface/web/client/client_template_del.php | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/interface/web/client/client_template_del.php b/interface/web/client/client_template_del.php index c4d3e90..dbe8639 100644 --- a/interface/web/client/client_template_del.php +++ b/interface/web/client/client_template_del.php @@ -1,6 +1,6 @@ <?php /* -Copyright (c) 2007-2008, Till Brehm, projektfarm Gmbh and Oliver Vogel www.muv.com +Copyright (c) 2007-2010, Till Brehm, projektfarm Gmbh and Oliver Vogel www.muv.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -44,11 +44,21 @@ //* Check permissions for module $app->auth->check_module_permissions('client'); +if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are for Admins only.'); $app->uses('tpl,tform'); $app->load('tform_actions'); class page_action extends tform_actions { + function onBeforeDelete() { + global $app; + + $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ".$this->id." OR template_additional like '%/".$this->id."/%'"); + if($rec['number'] > 0) { + $app->error($app->tform->lng('template_del_aborted_txt')); + } + + } } $page = new page_action; -- Gitblit v1.9.1