Merge branch 'develop' into feature/nonce

This commit is contained in:
Flavio Copes 2015-11-13 18:57:26 +01:00
commit d93361d821
3 changed files with 18 additions and 3 deletions

View File

@ -1,6 +1,16 @@
# v1.0.1
## 10/21/2015
# v1.0.2
## 11/13/2015
1. [](#improved)
* Use nonce
1. [](#improved)
* Changed form action to work with multilang
# v1.0.1
## 11/11/2015
1. [](#bugfix)
* Fix error when user/data/comments does not exist
1. [](#improved)
* Use onAdminMenu instead of the deprecated onAdminTemplateNavPluginHook

View File

@ -1,5 +1,5 @@
name: Comments
version: 1.0.0
version: 1.0.1
description: Adds a commenting functionality to your site
icon: comment
author:

View File

@ -1,6 +1,7 @@
<?php
namespace Grav\Plugin;
use Grav\Common\Filesystem\Folder;
use Grav\Common\GPM\GPM;
use Grav\Common\Grav;
use Grav\Common\Page\Page;
@ -205,6 +206,10 @@ class CommentsPlugin extends Plugin
$path = DATA_DIR . 'comments';
}
if (!file_exists($path)) {
Folder::mkdir($path);
}
$dirItr = new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS);
$filterItr = new RecursiveFolderFilterIterator($dirItr);
$itr = new \RecursiveIteratorIterator($filterItr, \RecursiveIteratorIterator::SELF_FIRST);