Lines Matching +full:delete +full:- +full:user -(+path:inc +path:lang) -(+path:lib +path:plugins +path:lang) -(+path:lib +path:tpl +path:dokuwiki +path:lang)
29 $options->registerOption(
34 $options->registerOption(
35 'user',
36 'work as this user. defaults to current CLI user',
40 $options->setHelp(
46 $options->registerCommand(
54 $options->registerArgument(
60 $options->registerArgument(
68 $options->registerCommand(
73 $options->registerArgument(
79 $options->registerArgument(
85 $options->registerOption(
92 $options->registerOption(
101 $options->registerCommand(
105 $options->registerArgument(
113 $options->registerCommand(
117 $options->registerArgument(
125 $options->registerCommand(
129 $options->registerArgument(
135 $options->registerArgument(
139 'For retrieving items that are stored in sub-arrays, separate the ' .
156 $this->force = $options->getOpt('force', false);
157 $this->username = $options->getOpt('user', $this->getUser());
159 $command = $options->getCmd();
160 $args = $options->getArgs();
165 $this->commandCheckout($wiki_id, $localfile);
170 $this->commandCommit(
173 $options->getOpt('message', ''),
174 $options->getOpt('trivial', false)
179 $this->obtainLock($wiki_id);
180 $this->success("$wiki_id locked");
184 $this->clearLock($wiki_id);
185 $this->success("$wiki_id unlocked");
195 echo $options->help();
213 $this->fatal("$wiki_id does not yet exist");
221 $this->fatal("Working file $localfile cannot be a directory");
225 $this->fatal("Directory " . dirname($localfile) . " does not exist");
229 $this->fatal("Attempt to check out file into data directory - not allowed");
232 $this->obtainLock($wiki_id);
235 $this->clearLock($wiki_id);
236 $this->fatal("Unable to copy $wiki_fn to $localfile");
239 $this->success("$wiki_id > $localfile");
256 $this->fatal("$localfile does not exist");
260 $this->fatal("Cannot read from $localfile");
264 $this->fatal("Summary message required");
267 $this->obtainLock($wiki_id);
271 $this->clearLock($wiki_id);
273 $this->success("$localfile > $wiki_id");
283 if ($this->force) $this->deleteLock($wiki_id);
285 $_SERVER['REMOTE_USER'] = $this->username;
288 $this->error("Page $wiki_id is already locked by another user");
295 $this->error("Unable to obtain lock for $wiki_id ");
308 if ($this->force) $this->deleteLock($wiki_id);
310 $_SERVER['REMOTE_USER'] = $this->username;
312 $this->error("Page $wiki_id is locked by another user");
319 $this->error("Unable to clear lock for $wiki_id");
335 $this->error("Unable to delete $wikiLockFN");
342 * Get the current user's username from the environment
348 $user = getenv('USER');
349 if (empty($user)) {
350 $user = getenv('USERNAME');
352 return $user;
354 if (empty($user)) {
355 $user = 'admin';
357 return $user;
363 $cli->run();