Hi,
I am sorry but your patch is not a valid patch.
That's why that patch has not been added in HikaShop.
The variable $path is already set in the plugin
if(!empty($plugin->params['path']))
$path=$plugin->params['path'];
else{
$messages[] = 'No file path specified';
return true;
}
And if that patch does not match to the regex:
if(!preg_match('#^(https?|ftp)://#',$path)){
It can be modify:
$path=$this->_getRelativePath($path);
/* ... */
$path=JURI::base().$path;
$path=str_replace('administrator','',$path);
Now you patch is just to forget all that code ; code which provide something and code which is used by other HikaShop users.
You just rewrite the variable $path and all the process made before become useless.
$helper->header_errors = false;
$contentFile = true;
//-----
$path=$plugin->params['path'];
//$fhandle = fopen($path,"r");
//$contentFile = fread($fhandle,filesize($path));
//fclose($fhandle);
$contentFile = file_get_contents($path);
if(empty($contentFile)){
If you want an improvement in the plugin ; please ask for it.
But we can't possibly integrate your patch in HikaShop which will break the datafeed plugin in a lot of HikaShop websites.
More than that, the code in the plugin datafeed is there for the security ; to avoid using an absolute path which would be outside the Joomla website. Which avoid you targeting any file in the web server.
So, the code in the datafeed is important and would stay as it ; otherwise the plugin will become unsafe.
Regards,