• R/O
  • HTTP
  • SSH
  • HTTPS

pukiwiki: Commit


Commit MetaInfo

Revisiónee61786391717368972adcc9802dfa14b0be2786 (tree)
Tiempo2017-09-07 22:33:28
Autorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2427 Control data file permission

Cambiar Resumen

Diferencia incremental

--- a/lib/file.php
+++ b/lib/file.php
@@ -15,6 +15,9 @@ define('PKWK_MAXSHOW_CACHE', 'recent.dat');
1515 // AutoLink
1616 define('PKWK_AUTOLINK_REGEX_CACHE', 'autolink.dat');
1717
18+// File mode for pkwk_touch
19+//define('PKWK_DATA_FILE_PERMS', 0644);
20+
1821 // Get source(wiki text) data of the page
1922 // Returns FALSE if error occurerd
2023 function get_source($page = NULL, $lock = TRUE, $join = FALSE)
@@ -859,6 +862,9 @@ function pkwk_touch_file($filename, $time = FALSE, $atime = FALSE)
859862 } else {
860863 $result = touch($filename, $time, $atime);
861864 }
865+ if (defined('PKWK_DATA_FILE_PERMS')) {
866+ chmod($filename, PKWK_DATA_FILE_PERMS);
867+ }
862868 return $result;
863869 } else {
864870 die('pkwk_touch_file(): Invalid UID and (not writable for the directory or not a flie): ' .
Show on old repository browser