Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Webslice
ISPConfig 3
Commits
0baa5d4d
Commit
0baa5d4d
authored
12 years ago
by
mcramer
Browse files
Options
Downloads
Patches
Plain Diff
Do not process sub templates if no main template (master template) is present!
parent
341c3dd5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/lib/classes/client_templates.inc.php
+6
-3
6 additions, 3 deletions
interface/lib/classes/client_templates.inc.php
interface/lib/plugins/clients_template_plugin.inc.php
+1
-1
1 addition, 1 deletion
interface/lib/plugins/clients_template_plugin.inc.php
with
7 additions
and
4 deletions
interface/lib/classes/client_templates.inc.php
+
6
−
3
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
;
}
/*
...
...
This diff is collapsed.
Click to expand it.
interface/lib/plugins/clients_template_plugin.inc.php
+
1
−
1
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment