Lines Matching refs: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) argument
216 if (empty($localfile)) {
217 $localfile = getcwd() . '/' . PhpString::basename($wiki_fn);
220 if (is_dir($localfile)) {
221 $this->fatal("Working file $localfile cannot be a directory");
224 if (!file_exists(dirname($localfile))) {
225 $this->fatal("Directory " . dirname($localfile) . " does not exist");
228 if (stristr(realpath(dirname($localfile)), (string) realpath($conf['datadir'])) !== false) {
234 if (!copy($wiki_fn, $localfile)) {
236 $this->fatal("Unable to copy $wiki_fn to $localfile");
239 $this->success("$wiki_id > $localfile");
245 * @param string $localfile
250 protected function commandCommit($localfile, $wiki_id, $message, $minor) argument
255 if (!file_exists($localfile)) {
256 $this->fatal("$localfile does not exist");
259 if (!is_readable($localfile)) {
260 $this->fatal("Cannot read from $localfile");
269 saveWikiText($wiki_id, file_get_contents($localfile), $message, $minor);
273 $this->success("$localfile > $wiki_id");