Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zvonimir
ISPConfig 3
Commits
0baa5d4d
Commit
0baa5d4d
authored
Sep 10, 2012
by
mcramer
Browse files
Do not process sub templates if no main template (master template) is present!
parent
341c3dd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/client_templates.inc.php
View file @
0baa5d4d
...
...
@@ -9,11 +9,9 @@
class
client_templates
{
function
apply_client_templates
(
$clientId
,
$limits
=
array
()
)
{
function
apply_client_templates
(
$clientId
)
{
global
$app
;
if
(
!
is_array
(
$limits
))
$limits
=
array
();
/*
* Get the master-template for the client
*/
...
...
@@ -28,6 +26,11 @@ class client_templates {
if
(
$masterTemplateId
>
0
){
$sql
=
"SELECT * FROM client_template WHERE template_id = "
.
intval
(
$masterTemplateId
);
$limits
=
$app
->
db
->
queryOneRecord
(
$sql
);
}
else
{
// if there is no master template it makes NO SENSE adding sub templates.
// adding subtemplates are stored in client limits, so they would add up
// on every save action for the client -> too high limits!
return
;
}
/*
...
...
interface/lib/plugins/clients_template_plugin.inc.php
View file @
0baa5d4d
...
...
@@ -29,6 +29,6 @@ class clients_template_plugin {
global
$app
;
$app
->
uses
(
'client_templates'
);
$app
->
client_templates
->
apply_client_templates
(
$page_form
->
id
,
$page_form
->
dataRecord
);
$app
->
client_templates
->
apply_client_templates
(
$page_form
->
id
);
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment