Skip to content

Commit

Permalink
replaced baseHref with function call
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Jan 17, 2014
1 parent 9c61d01 commit 90fcb74
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions webapp/modules/config.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,15 @@ declare function config:app-meta($node as node(), $model as map(*)) as element()
: @return xs:string the option value as string identified by the key otherwise the empty string
:)
declare function config:get-option($key as xs:string?) as xs:string {
let $dic := $config:options-file
let $item := $dic//id($key)
return normalize-space($item)
switch ($key)
(: this serves as a shortcut for legacy code :)
(: Please use core:link-to-current-app() directly! :)
case 'baseHref' return core:link-to-current-app(())
default return (
let $dic := $config:options-file
let $item := $dic//id($key)
return normalize-space($item)
)
};

(:~
Expand Down

0 comments on commit 90fcb74

Please sign in to comment.