Fixed bug with missing directory separator and added .htaccess files to lib & cfg directories. If those are not present, the application will create them for you.

This commit is contained in:
Simon Rupf
2012-04-30 13:58:29 +02:00
parent ba90d0cae2
commit 23487ce779
5 changed files with 32 additions and 9 deletions

View File

@@ -95,6 +95,15 @@ class zerobin
*/
private function _init()
{
foreach (array('cfg', 'lib') as $dir)
{
if (!is_file(PATH . $dir . '/.htaccess')) file_put_contents(
PATH . $dir . '/.htaccess',
'Allow from none' . PHP_EOL .
'Deny from all'. PHP_EOL
);
}
$this->_conf = parse_ini_file(PATH . 'cfg/conf.ini');
$this->_model = $this->_conf['model'];
}