]> git.plutz.net Git - shellwiki/blobdiff - index.cgi
move functions to tools
[shellwiki] / index.cgi
index 0c7e914062c3d99c38420e106c32b6a29c3dc59d..8975ccaa0cc1b2b6e76d4f8d13474648ca0d1311 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -4,20 +4,9 @@
 . "${_EXEC}/cgilite/session.sh"
 . "${_EXEC}/cgilite/file.sh"
 . "${_EXEC}/cgilite/users.sh"
+. "${_EXEC}/tools.sh"
 . "${_EXEC}/acl.sh"
 
-mdfile(){
-  local page="$(PATH "$1")"
-
-  if   [ -f "$_DATA/pages/$page/#page.md" ]; then
-    printf %s\\n "$_DATA/pages/$page/#page.md"
-  elif [ -f "$_EXEC/pages/$page/#page.md" ]; then
-    printf %s\\n "$_EXEC/pages/$page/#page.md"
-  else
-    return 1
-  fi
-}
-
 wiki_text() {
   # Print source text of a wiki page
   # Get page from data or underlay dir