Lines Matching defs:localfile
164 $localfile = array_shift($args);
165 $this->commandCheckout($wiki_id, $localfile);
168 $localfile = array_shift($args);
171 $localfile,
203 * @param string $localfile
205 protected function commandCheckout($wiki_id, $localfile)
216 if (empty($localfile)) {
217 $localfile = getcwd() . '/' . PhpString::basename($wiki_fn);
220 if (!file_exists(dirname($localfile))) {
221 $this->fatal("Directory " . dirname($localfile) . " does not exist");
224 if (stristr(realpath(dirname($localfile)), (string) realpath($conf['datadir'])) !== false) {
230 if (!copy($wiki_fn, $localfile)) {
232 $this->fatal("Unable to copy $wiki_fn to $localfile");
235 $this->success("$wiki_id > $localfile");
241 * @param string $localfile
246 protected function commandCommit($localfile, $wiki_id, $message, $minor)
251 if (!file_exists($localfile)) {
252 $this->fatal("$localfile does not exist");
255 if (!is_readable($localfile)) {
256 $this->fatal("Cannot read from $localfile");
265 saveWikiText($wiki_id, file_get_contents($localfile), $message, $minor);
269 $this->success("$localfile > $wiki_id");