Skip to content
Snippets Groups Projects
Commit a4306b74 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

touch an attic file after writing it

This should ensure it has the same lastmod timestamp as the revision it
stores.
parent 7f48c40e
No related branches found
No related tags found
No related merge requests found
......@@ -202,7 +202,12 @@ function io_writeWikiPage($file, $content, $id, $rev=false) {
*/
function _io_writeWikiPage_action($data) {
if (is_array($data) && is_array($data[0]) && count($data[0])===3) {
return call_user_func_array('io_saveFile', $data[0]);
$ok = call_user_func_array('io_saveFile', $data[0]);
// for attic files make sure the file has the mtime of the revision
if($ok && is_int($data[3]) && $data[3] > 0) {
@touch($data[0][0], $data[3]);
}
return $ok;
} else {
return false; //callback error
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment