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