From b64a882696ba6c403c36f9434230fc636741b7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 23 Aug 2013 21:30:55 +0200 Subject: notice with poche_version undefined' --- inc/poche/Tools.class.php | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 1baf745d..52d0f2d5 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -238,25 +238,20 @@ class Tools 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 (version_compare(POCHE_VERSION, '1.0-beta3') == 1) { - # $myconfig_file is only created with poche > 1.0-beta3 - # in 1.0-beta3, the update script creates $myconfig_file - - 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, '