Lines Matching refs:wiki_id
163 $wiki_id = array_shift($args);
165 $this->commandCheckout($wiki_id, $localfile);
169 $wiki_id = array_shift($args);
172 $wiki_id,
178 $wiki_id = array_shift($args);
179 $this->obtainLock($wiki_id);
180 $this->success("$wiki_id locked");
183 $wiki_id = array_shift($args);
184 $this->clearLock($wiki_id);
185 $this->success("$wiki_id unlocked");
188 $wiki_id = array_shift($args);
190 $meta = p_get_metadata($wiki_id, $key, METADATA_RENDER_UNLIMITED);
202 * @param string $wiki_id
205 protected function commandCheckout($wiki_id, $localfile) argument
209 $wiki_id = cleanID($wiki_id);
210 $wiki_fn = wikiFN($wiki_id);
213 $this->fatal("$wiki_id does not yet exist");
232 $this->obtainLock($wiki_id);
235 $this->clearLock($wiki_id);
239 $this->success("$wiki_id > $localfile");
246 * @param string $wiki_id
250 protected function commandCommit($localfile, $wiki_id, $message, $minor) argument
252 $wiki_id = cleanID($wiki_id);
267 $this->obtainLock($wiki_id);
269 saveWikiText($wiki_id, file_get_contents($localfile), $message, $minor);
271 $this->clearLock($wiki_id);
273 $this->success("$localfile > $wiki_id");
279 * @param string $wiki_id
281 protected function obtainLock($wiki_id) argument
283 if ($this->force) $this->deleteLock($wiki_id);
287 if (checklock($wiki_id)) {
288 $this->error("Page $wiki_id is already locked by another user");
292 lock($wiki_id);
294 if (checklock($wiki_id)) {
295 $this->error("Unable to obtain lock for $wiki_id ");
296 var_dump(checklock($wiki_id));
304 * @param string $wiki_id
306 protected function clearLock($wiki_id) argument
308 if ($this->force) $this->deleteLock($wiki_id);
311 if (checklock($wiki_id)) {
312 $this->error("Page $wiki_id is locked by another user");
316 unlock($wiki_id);
318 if (file_exists(wikiLockFN($wiki_id))) {
319 $this->error("Unable to clear lock for $wiki_id");
327 * @param string $wiki_id
329 protected function deleteLock($wiki_id) argument
331 $wikiLockFN = wikiLockFN($wiki_id);