Line 242 in /usr/www/users/ppsafn/devmac-core/src/Pages/DownloadPage.php
233 } 234 return $r; 235 } 236 return $files; 237 } 238 239 public function getfile(){ 240 // determine if the link is external 241 $isExternal = true ; 242 if(Director::protocolAndHost() == substr($_SERVER['HTTP_REFERER'],0,strlen(Director::protocolAndHost()))){ 243 $isExternal = false ; 244 } 245 // redirect the user to the download page if they can't download externally 246 if($isExternal && !$this->AllowExternal){ 247 return $this->redirect($this->Link().'?external=1'); 248 }