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("Directory " . dirname($localfile) . " does not exist");
225 $this->fatal("Attempt to check out file into data directory - not allowed");
228 $this->obtainLock($wiki_id);
231 $this->clearLock($wiki_id);
232 $this->fatal("Unable to copy $wiki_fn to $localfile");
235 $this->success("$wiki_id > $localfile");
252 $this->fatal("$localfile does not exist");
256 $this->fatal("Cannot read from $localfile");
260 $this->fatal("Summary message required");
263 $this->obtainLock($wiki_id);
267 $this->clearLock($wiki_id);
269 $this->success("$localfile > $wiki_id");
279 if ($this->force) $this->deleteLock($wiki_id);
281 $_SERVER['REMOTE_USER'] = $this->username;
284 $this->error("Page $wiki_id is already locked by another user");
291 $this->error("Unable to obtain lock for $wiki_id ");
304 if ($this->force) $this->deleteLock($wiki_id);
306 $_SERVER['REMOTE_USER'] = $this->username;
308 $this->error("Page $wiki_id is locked by another user");
315 $this->error("Unable to clear lock for $wiki_id");
331 $this->error("Unable to delete $wikiLockFN");
338 * Get the current user's username from the environment
344 $user = getenv('USER');
345 if (empty($user)) {
346 $user = getenv('USERNAME');
348 return $user;
350 if (empty($user)) {
351 $user = 'admin';
353 return $user;
359 $cli->run();