Skip to content

Commit 7b0fb11

Browse files
author
Rustam
committed
Fixed bug with private projects
1 parent b702123 commit 7b0fb11

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

CacheUpdater/Task.cls.xml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2016.1 (Build 656U)" ts="2016-08-03 15:01:48">
2+
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2016.1 (Build 656U)" ts="2016-08-22 12:29:27">
33
<Class name="CacheUpdater.Task">
44
<Super>%SYS.Task.Definition</Super>
5-
<TimeChanged>64133,53990.540278</TimeChanged>
5+
<TimeChanged>64152,44773.510857</TimeChanged>
66
<TimeCreated>63603,52252.541311</TimeCreated>
77

88
<Parameter name="TaskName">
@@ -206,6 +206,12 @@ Imports the file in UDL file in the project
206206
<ReturnType>%Status</ReturnType>
207207
<Implementation><![CDATA[
208208
Set st = $$$OK
209+
210+
set params = $find(url, "?")
211+
if params {
212+
set url = $extract(url, 1, params - 2)
213+
}
214+
209215
Set ext = ..GetExt(url)
210216
If ext = "cls" {
211217
Set st = ..CreateClass(contentStream, url)
@@ -245,6 +251,10 @@ Creates and imports the class into the project from stream
245251
Set namespace = $namespace
246252
247253
Set st = ##class(%Compiler.UDL.TextServices).SetTextFromStream(namespace, className, contentStream)
254+
255+
if st {
256+
w !, "Imported " _ className, !
257+
}
248258
Return st
249259
]]></Implementation>
250260
</Method>
@@ -268,6 +278,9 @@ Creates and imports the dfi file into the project from stream
268278
Return:$$$ISERR(st) st
269279
270280
Set st = tDoc.Save()
281+
if st {
282+
w !, "Imported " _ name, !
283+
}
271284
Return:$$$ISERR(st) st
272285
} Catch e {
273286
Set st = e.AsStatus()
@@ -344,6 +357,9 @@ Creates and imports other files into the project from stream
344357
Return:$$$ISERR(status) status
345358
346359
Set status = rtn.Compile()
360+
if st {
361+
w !, "Imported " _ internalName, !
362+
}
347363
Return status
348364
]]></Implementation>
349365
</Method>
@@ -355,7 +371,9 @@ Get extension of the file by url
355371
<ClassMethod>1</ClassMethod>
356372
<FormalSpec>url:%String</FormalSpec>
357373
<ReturnType>%String</ReturnType>
358-
<Implementation><![CDATA[ Return $ZConvert($Piece(url, ".", *), "l")
374+
<Implementation><![CDATA[
375+
376+
Return $ZConvert($Piece(url, ".", *), "l")
359377
]]></Implementation>
360378
</Method>
361379

@@ -368,16 +386,14 @@ Checks whether the url contains a file in udl format
368386
<FormalSpec>contentStream:%GlobalCharacterStream,url:%String</FormalSpec>
369387
<ReturnType>%Boolean</ReturnType>
370388
<Implementation><![CDATA[
389+
set params = $find(url, "?")
390+
if params {
391+
set url = $extract(url, 1, params - 2)
392+
}
393+
371394
Set extensions = "cls,mac,int,inc,dfi"
372395
If $Find(extensions, $Piece(url, ".", *)) {
373-
Set st = ##class(%XML.TextReader).ParseStream(contentStream)
374-
Do contentStream.Rewind()
375-
If $$$ISERR(st) {
376-
Return $$$YES
377-
}
378-
Else {
379-
Return $$$NO
380-
}
396+
return $$$YES
381397
}
382398
Else {
383399
Return $$$NO

0 commit comments

Comments
 (0)