Merge branch 'develop' into feature/nonce
This commit is contained in:
commit
d93361d821
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -1,6 +1,16 @@
|
||||||
# v1.0.1
|
# v1.0.2
|
||||||
## 10/21/2015
|
## 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)
|
1. [](#improved)
|
||||||
* Use onAdminMenu instead of the deprecated onAdminTemplateNavPluginHook
|
* Use onAdminMenu instead of the deprecated onAdminTemplateNavPluginHook
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: Comments
|
name: Comments
|
||||||
version: 1.0.0
|
version: 1.0.1
|
||||||
description: Adds a commenting functionality to your site
|
description: Adds a commenting functionality to your site
|
||||||
icon: comment
|
icon: comment
|
||||||
author:
|
author:
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Grav\Plugin;
|
namespace Grav\Plugin;
|
||||||
|
|
||||||
|
use Grav\Common\Filesystem\Folder;
|
||||||
use Grav\Common\GPM\GPM;
|
use Grav\Common\GPM\GPM;
|
||||||
use Grav\Common\Grav;
|
use Grav\Common\Grav;
|
||||||
use Grav\Common\Page\Page;
|
use Grav\Common\Page\Page;
|
||||||
|
@ -205,6 +206,10 @@ class CommentsPlugin extends Plugin
|
||||||
$path = DATA_DIR . 'comments';
|
$path = DATA_DIR . 'comments';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!file_exists($path)) {
|
||||||
|
Folder::mkdir($path);
|
||||||
|
}
|
||||||
|
|
||||||
$dirItr = new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS);
|
$dirItr = new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||||
$filterItr = new RecursiveFolderFilterIterator($dirItr);
|
$filterItr = new RecursiveFolderFilterIterator($dirItr);
|
||||||
$itr = new \RecursiveIteratorIterator($filterItr, \RecursiveIteratorIterator::SELF_FIRST);
|
$itr = new \RecursiveIteratorIterator($filterItr, \RecursiveIteratorIterator::SELF_FIRST);
|
||||||
|
|
Loading…
Reference in New Issue