You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface/web/client/client_template_del.php
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,12 +44,21 @@
44
44
45
45
//* Check permissions for module
46
46
$app->auth->check_module_permissions('client');
47
-
if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.');
47
+
if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are for Admins only.');
48
48
49
49
$app->uses('tpl,tform');
50
50
$app->load('tform_actions');
51
51
52
52
class page_action extends tform_actions {
53
+
functiononBeforeDelete() {
54
+
global$app;
55
+
56
+
$rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ".$this->id." OR template_additional like '%/".$this->id."/%'");
0 commit comments