Lines Matching refs:wiki_id

160                 $wiki_id = array_shift($args);
162 $this->commandCheckout($wiki_id, $localfile);
166 $wiki_id = array_shift($args);
169 $wiki_id,
175 $wiki_id = array_shift($args);
176 $this->obtainLock($wiki_id);
177 $this->success("$wiki_id locked");
180 $wiki_id = array_shift($args);
181 $this->clearLock($wiki_id);
182 $this->success("$wiki_id unlocked");
185 $wiki_id = array_shift($args);
187 $meta = p_get_metadata($wiki_id, $key, METADATA_RENDER_UNLIMITED);
199 * @param string $wiki_id
202 protected function commandCheckout($wiki_id, $localfile) { argument
205 $wiki_id = cleanID($wiki_id);
206 $wiki_fn = wikiFN($wiki_id);
209 $this->fatal("$wiki_id does not yet exist");
224 $this->obtainLock($wiki_id);
227 $this->clearLock($wiki_id);
231 $this->success("$wiki_id > $localfile");
238 * @param string $wiki_id
242 protected function commandCommit($localfile, $wiki_id, $message, $minor) { argument
243 $wiki_id = cleanID($wiki_id);
258 $this->obtainLock($wiki_id);
260 saveWikiText($wiki_id, file_get_contents($localfile), $message, $minor);
262 $this->clearLock($wiki_id);
264 $this->success("$localfile > $wiki_id");
270 * @param string $wiki_id
272 protected function obtainLock($wiki_id) { argument
273 if($this->force) $this->deleteLock($wiki_id);
277 if(checklock($wiki_id)) {
278 $this->error("Page $wiki_id is already locked by another user");
282 lock($wiki_id);
284 if(checklock($wiki_id)) {
285 $this->error("Unable to obtain lock for $wiki_id ");
286 var_dump(checklock($wiki_id));
294 * @param string $wiki_id
296 protected function clearLock($wiki_id) { argument
297 if($this->force) $this->deleteLock($wiki_id);
300 if(checklock($wiki_id)) {
301 $this->error("Page $wiki_id is locked by another user");
305 unlock($wiki_id);
307 if(file_exists(wikiLockFN($wiki_id))) {
308 $this->error("Unable to clear lock for $wiki_id");
316 * @param string $wiki_id
318 protected function deleteLock($wiki_id) { argument
319 $wikiLockFN = wikiLockFN($wiki_id);