Skip to content

Commit 2db5ed1

Browse files
committed
Version 2.2: Also take instances of the master project into account (optionally)
1 parent d9f4058 commit 2db5ed1

3 files changed

Lines changed: 20 additions & 10 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# TemplateDependenceChecker
2-
_Version 2.1_
2+
_Version 2.2_
33

44
"TemplateDependenceChecker" is a SmartTree enhancement for the Opentext Website Management Server allowing to check the assignment of every template of a content class within all connected projects.
55

@@ -26,17 +26,19 @@ This file contains the dialog box the plugin will start with. Translate the germ
2626

2727
#### TemplateDependenceChecker_do.asp
2828

29-
This file contains the plugin script itself. Translate the german variables (lines 21-32) if necessary.
29+
This file contains the plugin script itself. Translate the german variables (lines 21-33) if necessary.
3030

3131
The plugin must be run under an administrator account. Please enter the corresponding login data in lines 18+19.
3232
This user must have the role "Administrator" and "Template Editor" in all projects, and the number of allowed sessions should be set to at least 2.
3333
The user also must have access to all language variants in every project. If a language variant is denied for him, it will not occur in the report, and there will be no error message regarding this.
3434

3535
## How to use
3636

37-
In every project, the plugin will appear in the action menu of every content class. After clicking OK, the plugin reads the project variant assignment of the selected content
37+
In every project the plugin was assigned, it will appear in the action menu of content classes. After clicking OK, the plugin reads the project variant assignment of the selected content
3838
class in every project that is connected to the corresponding content class folder.
3939

40+
Optionally it also counts the number of active instances of the content class within the master project.
41+
4042
This process can take some minutes.
4143

4244
Finally it will show a report that lists:
@@ -74,6 +76,10 @@ The following error messages can occur:
7476

7577
## Changelog
7678

79+
**Version 2.2**
80+
August 25, 2017
81+
Also take instances of the master project into account (optionally)
82+
7783
**Version 2.1**
7884
May 31, 2017
7985
Language specific counting of instances

TemplateDependenceChecker_dlg.asp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,10 @@ function submitForm() {
117117
if(submitOK) {
118118
submitOK=false;
119119
document.getElementById("messageDiv").innerText='<%=dlgPleaseWait %>...';
120+
document.TemplateDependenceCheckerForm.submit();
121+
document.getElementById("cbMaster").disabled=true;
120122
document.getElementById("btn1").disabled=true;
121123
document.getElementById("btn2").disabled=true;
122-
document.TemplateDependenceCheckerForm.submit();
123124
}
124125
}
125126
</script>
@@ -160,12 +161,15 @@ function submitForm() {
160161
<td><%=dlgContent %></td>
161162
<td></td>
162163
</tr>
164+
<% if dlgContinue then %>
165+
<tr>
166+
<td height="15" colspan="3"></td>
167+
</tr>
163168
<tr>
164169
<td></td>
165-
<td><label><input type="checkbox" name="master" value="1" /> <%=dlgAlsoMaster %></label></td>
170+
<td><label><input type="checkbox" name="master" id="cbMaster" value="1" /> <%=dlgAlsoMaster %></label></td>
166171
<td></td>
167172
</tr>
168-
<% if dlgContinue then %>
169173
<tr>
170174
<td height="15" colspan="3"></td>
171175
</tr>

TemplateDependenceChecker_do.asp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Dim xmlSendDoc ' RQL-Anfrage, die zum Server geschickt wird
6969
Dim ServerAnswer ' Antwort des Servers
7070
7171
72-
function countInstances(lGUID, sKey)
72+
function countInstances(lGUID, sKey, tGUID)
7373
7474
instancesStr = ""
7575
@@ -105,7 +105,7 @@ function countInstances(lGUID, sKey)
105105
106106
'Instanzen zählen
107107
xmlSendDoc= "<IODATA loginguid=""" & lGUID & """ sessionkey=""" & sKey & """>"&_
108-
"<PAGE action=""search"" templateguid=""" & TemplateToCheckGUID & """ flags=""0"" maxrecords=""999999""/>"&_
108+
"<PAGE action=""search"" templateguid=""" & tGUID & """ flags=""0"" maxrecords=""999999""/>"&_
109109
"</IODATA>"
110110
ServerAnswer = objIO.ServerExecuteXml (xmlSendDoc, sError)
111111
XMLInstancesDoc.loadXML(ServerAnswer)
@@ -135,7 +135,7 @@ end function
135135
if countMaster = "1" then
136136
'Instanzen im Masterprojekt zählen
137137
resultStr = resultStr & "<hr/><p><b>" & dlgMasterProject & "</b></p>"
138-
resultStr = resultStr & countInstances(LoginGUID, RQLKey)
138+
resultStr = resultStr & countInstances(LoginGUID, RQLKey, TemplateGUID)
139139
end if
140140
141141
@@ -260,7 +260,7 @@ if InStr(ServerAnswer,"guid")>0 then
260260
Set TemplateVariantList = nothing
261261
262262
'Instanzen zählen
263-
resultStr = resultStr & countInstances(RqlAdmLoginGUID, RqlAdmSessionKey)
263+
resultStr = resultStr & countInstances(RqlAdmLoginGUID, RqlAdmSessionKey, TemplateToCheckGUID)
264264
265265
else
266266
resultStr = resultStr & "<p><b>" & dlgError & ": " & dlgContentClassNotFound & "!</b></p>"

0 commit comments

Comments
 (0)