]> git.plutz.net Git - shellwiki/blobdiff - handlers/20_page.sh
make tools language aware
[shellwiki] / handlers / 20_page.sh
index 87af6850279a517c957be9440221c8a0f4a4b8e2..5c3da0ccf77573169383d756ebe2593d38bbf079 100755 (executable)
@@ -11,7 +11,7 @@ wiki() {
   # Get page from data or underlay dir, handle caching
   local page="$(PATH "$1")" mdfile cache cachetime
 
-  cache="$_DATA/pages/$page/#page.${USER_ID}.cache"
+  cache="$_DATA/pages/$page/#page:${LANGUAGE}.${USER_ID}.cache"
 
   mdfile="$(mdfile "$page")" || return 4
   acl_read "$page" || return 3
@@ -56,7 +56,7 @@ case "${PATH_INFO}" in
     return 1
     ;;
   */)
-    if [ ! "$(mdfile "$PATH_INFO")" ]; then
+    if ! mdfile "$PATH_INFO" >&-; then
       theme_error 404
     elif ! acl_read "$PATH_INFO"; then
       theme_error 403