X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=inc%2Fpoche%2FTools.class.php;h=8661ab6e60fa76a4b718c43c273d3b199bed9290;hb=83954e711d7f79173db00ad7160f6d1d6a3a9c5d;hp=0eb0d9ea26e3807c1e6a9ec2d40a8cc5cb0ea4bf;hpb=667009727a38890eb651815843c1bc02869a4119;p=github%2Fwallabag%2Fwallabag.git diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 0eb0d9ea..8661ab6e 100644 --- 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, '