Commit 3ae19ed1 authored by mmarkus1's avatar mmarkus1
Browse files

add restriction and error msg to publish functionality

parent fa3bce6f
......@@ -17,9 +17,11 @@ let $uri as xs:string := request:get-parameter("uri", ""),
return
if( $uri = "" ) then
error(QName("https://sade.textgrid.de/ns/error", "PUBLISH01"), "no URI provided")
else
else if (contains($uri, '34zmq') or contains($uri, '3r3nn') or contains($uri, '34zs7') or contains($uri, '3ptwg') or contains($uri, '3qr4f') or contains($uri, '34znb') or contains($uri, '3czfj') or contains($uri, '3q4rq') or contains($uri, '3r0fv') or contains($uri, '350mg') or contains($uri, '3c0m2') or contains($uri, '3czn9') ) then
<div>{
for $i in tgconnect:publish($uri,$sid,$target,$user,$password,$project,$surface,$login)
return
<ok>{ $uri } » { $i }</ok>
}</div>
else
error(QName("https://sade.textgrid.de/ns/error", "PUBLISH09"), "Please publish only the xml files of the 12 editions/translations.")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment