From da9e99596e2fcb76a37fcc8a24c8eacd00ff186c Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Mon, 14 Sep 2015 04:23:58 -0400
Subject: [PATCH] resize openvz-server with ploop enabled
---
interface/web/client/client_template_del.php | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/interface/web/client/client_template_del.php b/interface/web/client/client_template_del.php
index 647ad7c..1288354 100644
--- a/interface/web/client/client_template_del.php
+++ b/interface/web/client/client_template_del.php
@@ -39,8 +39,8 @@
* End Form configuration
******************************************/
-require_once('../../lib/config.inc.php');
-require_once('../../lib/app.inc.php');
+require_once '../../lib/config.inc.php';
+require_once '../../lib/app.inc.php';
//* Check permissions for module
$app->auth->check_module_permissions('client');
@@ -52,23 +52,24 @@
class page_action extends tform_actions {
function onBeforeDelete() {
global $app;
-
+
// check new style
- $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client_template_assigned WHERE client_template_id = ".$this->id);
+ $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client_template_assigned WHERE client_template_id = ?", $this->id);
if($rec['number'] > 0) {
$app->error($app->tform->lng('template_del_aborted_txt'));
}
-
- // check old style
- $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ".$this->id." OR template_additional like '%/".$this->id."/%'");
+
+ // check old style
+ $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ? OR template_additional like ?", $this->id, '%/".$this->id."/%');
if($rec['number'] > 0) {
$app->error($app->tform->lng('template_del_aborted_txt'));
}
-
+
}
+
}
$page = new page_action;
$page->onDelete()
-?>
\ No newline at end of file
+?>
--
Gitblit v1.9.1