X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=inc%2Fpoche%2FTools.class.php;h=52d0f2d5c7cfb90f19eba95f1c995d5b184b3967;hb=0269cd821311500acffed61edb1bc168d3fb5ec8;hp=0eb0d9ea26e3807c1e6a9ec2d40a8cc5cb0ea4bf;hpb=667009727a38890eb651815843c1bc02869a4119;p=github%2Fwallabag%2Fwallabag.git diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php old mode 100644 new mode 100755 index 0eb0d9ea..52d0f2d5 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -233,4 +233,25 @@ class Tools return $minutes; } + + + public static function createMyConfig() + { + $myconfig_file = './inc/poche/myconfig.inc.php'; + + if (!is_writable('./inc/poche/')) { + self::logm('you don\'t have write access to create ./inc/poche/myconfig.inc.php'); + die('You don\'t have write access to create ./inc/poche/myconfig.inc.php.'); + } + + if (!file_exists($myconfig_file)) + { + $fp = fopen($myconfig_file, 'w'); + fwrite($fp, '