<pre class="prettyprint lang-lua">
-r:mpm_query(number) -- Queries the server for MPM information using ap_mpm_query:
+r.mpm_query(number) -- Queries the server for MPM information using ap_mpm_query:
local mpm = r.mpm_query(14)
if mpm == 1 then
<pre class="prettyprint lang-lua">
r:get_direntries(dir) -- Returns a table with all directory entries.
--- Return path splitted into components dir, file, ext
-function split_path(path)
- return path:match("(.-)([^\\/]-%.?([^%.\\/]*))$")
-end
-
function handle(r)
- local cwd, _, _ = split_path(r.filename)
- for _, f in ipairs(r:get_direntries(cwd)) do
- local info = r:stat(cwd .. f)
+ local dir = r.context_document_root
+ for _, f in ipairs(r:get_direntries(dir)) do
+ local info = r:stat(dir .. "/" .. f)
if info then
local mtime = os.date(fmt, info.mtime / 1000000)
local ftype = (info.filetype == 2) and "[dir] " or "[file]"
- r:puts( ("%s %s %10i %s\n"):format(ftype, mtime, info.size, f) )
+ r:puts( ("%s %s %10i %s\n"):format(ftype, mtime, info.size, f) )
end
end
end
<?xml version="1.0"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
-<!-- English Revision : 1495666 -->
+<!-- English Revision: 1495666:1498179 (outdated) -->
<!-- French translation : Lucien GENTIS -->
<!-- Reviewed by : Vincent Deffontaines -->