summaryrefslogtreecommitdiff
path: root/bin/dwpage.php
diff options
context:
space:
mode:
authorGuy Brand <gb@unistra.fr>2015-08-10 10:03:27 +0200
committerGuy Brand <gb@unistra.fr>2015-08-10 10:03:27 +0200
commit53a57d16b9c741bb44099fd93bf79efa06796341 (patch)
tree24a90a50afe9325926c8ebaa2ed90f9fa093e5b9 /bin/dwpage.php
parentcf6e6645c31a9f185cef3fb9452fb188882ede47 (diff)
parenta060d9973e7c1d5051f2cc426937881826e4972e (diff)
downloadrpg-53a57d16b9c741bb44099fd93bf79efa06796341.tar.gz
rpg-53a57d16b9c741bb44099fd93bf79efa06796341.tar.bz2
Merge branch master into stable
Diffstat (limited to 'bin/dwpage.php')
-rwxr-xr-xbin/dwpage.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/dwpage.php b/bin/dwpage.php
index a777fd3e1..d7f6e9bb8 100755
--- a/bin/dwpage.php
+++ b/bin/dwpage.php
@@ -28,7 +28,8 @@ class PageCLI extends DokuCLI {
$options->registerOption(
'user',
'work as this user. defaults to current CLI user',
- 'u'
+ 'u',
+ 'username'
);
$options->setHelp(
'Utility to help command line Dokuwiki page editing, allow '.
@@ -239,6 +240,7 @@ class PageCLI extends DokuCLI {
if($this->force) $this->deleteLock($wiki_id);
$_SERVER['REMOTE_USER'] = $this->username;
+
if(checklock($wiki_id)) {
$this->error("Page $wiki_id is already locked by another user");
exit(1);
@@ -246,7 +248,6 @@ class PageCLI extends DokuCLI {
lock($wiki_id);
- $_SERVER['REMOTE_USER'] = '_'.$this->username.'_';
if(checklock($wiki_id) != $this->username) {
$this->error("Unable to obtain lock for $wiki_id ");
var_dump(checklock($wiki_id));