Skip to content
Permalink
Browse files

Fixed critical file locking error in del method. Tried to lock file t…

…wice instead of locking and releasing.

Signed-off-by: Michael Wilmes <mwilmes@wilminator.com>
  • Loading branch information...
Michael Wilmes
Michael Wilmes committed Sep 10, 2015
1 parent 2808564 commit 5f5933439e3359b7d4cf756e456fed8ff78784ce
Showing with 5 additions and 6 deletions.
  1. +1 −1 README.md
  2. +2 −3 helper.php
  3. +2 −2 plugin.info.txt
@@ -1,4 +1,4 @@
# attribute
Arbitrary attribute definition and storage for user associated data.

See detail on: (I hope) https://www.dokuwiki.org/plugin:attribute
See detail on: https://www.dokuwiki.org/plugin:attribute
@@ -21,7 +21,7 @@ public function __construct() {
$this->loadConfig();
// Create the path used for attribute data.
$path = substr($this->conf['store'], 0, 1) == '/' ? $this->conf['store'] : DOKU_INC . $this->conf['store'];
$this->storepath = ($this->conf['store'] === '' || !is_dir($path)) ? null : $path;
$this->storepath = ($this->conf['store'] === '' || !io_mkdir_p($path)) ? null : $path;
// A directory is needed.
if(is_null($this->storepath)) {
msg("Attribute: Configuration item 'store' is not set to a writeable directory.", -1);
@@ -395,8 +395,7 @@ public function del($namespace, $attribute, $user = null) {
$result = false;
}
$lock = $namespace . '.' . $user;
io_lock($lock);
io_unlock($lock);
return $result;
}
@@ -4,10 +4,10 @@ author Michael Wilmes

email mwilmes@avc.edu

date 2015-09-03
date 2015-09-10

name attribute plugin

desc Arbitrary attribute definition and storage for user associated data.

url None at this time, would like https://www.dokuwiki.org/plugin:attribute
url https://www.dokuwiki.org/plugin:attribute

0 comments on commit 5f59334

Please sign in to comment.
You can’t perform that action at this time.