|
1 | 1 | <?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-07-25 16:07:12"> |
| 2 | +<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2016.1 (Build 656U)" ts="2016-08-03 15:01:48"> |
3 | 3 | <Class name="CacheUpdater.Task"> |
4 | 4 | <Super>%SYS.Task.Definition</Super> |
5 | | -<TimeChanged>64121,39819.499352</TimeChanged> |
| 5 | +<TimeChanged>64133,53990.540278</TimeChanged> |
6 | 6 | <TimeCreated>63603,52252.541311</TimeCreated> |
7 | 7 |
|
8 | 8 | <Parameter name="TaskName"> |
@@ -180,7 +180,7 @@ Download list of files on https://raw.githubusercontent.com/ server.<br> |
180 | 180 | |
181 | 181 | |
182 | 182 | Set strload = "" |
183 | | - If ..IsUDLFormat(link) { |
| 183 | + If ..IsUDLFormat(stream, link) { |
184 | 184 | Set stload = ..LoadUDLFile(stream, link) |
185 | 185 | } |
186 | 186 | Else { |
@@ -362,13 +362,26 @@ Get extension of the file by url |
362 | 362 | <Method name="IsUDLFormat"> |
363 | 363 | <Description><![CDATA[ |
364 | 364 | Checks whether the url contains a file in udl format |
| 365 | +<b>contentStream</b> - the stream which contains the source code.<br> |
365 | 366 | <b>url</b> - the url where the file is located in the web.<br>]]></Description> |
366 | 367 | <ClassMethod>1</ClassMethod> |
367 | | -<FormalSpec>url:%String</FormalSpec> |
| 368 | +<FormalSpec>contentStream:%GlobalCharacterStream,url:%String</FormalSpec> |
368 | 369 | <ReturnType>%Boolean</ReturnType> |
369 | 370 | <Implementation><![CDATA[ |
370 | 371 | Set extensions = "cls,mac,int,inc,dfi" |
371 | | - Return $Find(extensions, $Piece(url, ".", *)) |
| 372 | + 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 | + } |
| 381 | + } |
| 382 | + Else { |
| 383 | + Return $$$NO |
| 384 | + } |
372 | 385 | ]]></Implementation> |
373 | 386 | </Method> |
374 | 387 |
|
|
0 commit comments