• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revisionee61786391717368972adcc9802dfa14b0be2786 (tree)
Time2017-09-07 22:33:28
Authorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2427 Control data file permission

Change Summary

Incremental Difference

--- 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): ' .