Lines Matching refs:link
75 $link = $INPUT->str('link');
76 return $this->lockAndDownload($page, $link);
82 protected function lockAndDownload($pageId, $link) { argument
89 $results = $this->downloadExternalFile($pageId, $link);
97 protected function downloadExternalFile($pageId, $link) { argument
100 $fn = $this->constructFileName($link);
104 if (filter_var($link, FILTER_VALIDATE_URL)) {
106 $headers = get_headers($link);
117 if (!file_exists($link)) {
121 if (is_dir($link)) {
125 if (!is_readable($link)) {
131 $res = fopen($link, 'rb');
165 $newText = $this->replaceLinkInText($text, $link, $mediaID);
172 … saveWikiText($pageId, $newText, 'File ' . hsc($link) . ' downloaded by fetchmedia plugin');
284 public function constructFileName($link) { argument
285 $urlFNstart = strrpos($link, '/') + 1;
286 $windosFNstart = strrpos($link, '\\') + 1;
288 return substr($link, $fnStart);