From 1fa8f425b71db332a03ceef2d1e165083d0ba241 Mon Sep 17 00:00:00 2001
From: Falko Timme <ft@falkotimme.com>
Date: Fri, 05 Dec 2014 17:50:34 -0500
Subject: [PATCH] - Directive snippets can now be made available to clients; clients can select an available directive snippet for a website - the appropriate snippet will then be written to the vhost configuration file. This is useful for example on nginx where clients have no access to the Options tab of a website.
---
interface/web/admin/server_php_edit.php | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/interface/web/admin/server_php_edit.php b/interface/web/admin/server_php_edit.php
index e88575e..f60ae99 100644
--- a/interface/web/admin/server_php_edit.php
+++ b/interface/web/admin/server_php_edit.php
@@ -43,6 +43,7 @@
//* Check permissions for module
$app->auth->check_module_permissions('admin');
+$app->auth->check_security_permissions('admin_allow_server_php');
// Loading classes
$app->uses('tpl,tform,tform_actions');
@@ -56,7 +57,7 @@
//* Check if the server has been changed
// We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) && isset($this->dataRecord["server_id"])) {
- $rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$this->id);
+ $rec = $app->db->queryOneRecord("SELECT server_id from server_php WHERE server_php_id = ".$app->functions->intval($this->id));
if($rec['server_id'] != $this->dataRecord["server_id"]) {
//* Add a error message and switch back to old server
$app->tform->errorMessage .= $app->lng('The Server can not be changed.');
--
Gitblit v1.9.1