As set Phocadownload sends me an email when a file is downloaded. This works perfectly.
However it used to send me an email like this
File "49:denise / ALEX.ZIP" was downloaded where denise is the category.
However it now only sends me
File " ALEX.ZIP" was downloaded without the category.
I am sure there is an easy answer to this and I have changed something by mistake but how can I get the category to show again please?
Many thanks
Email from Phocadownload
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Email from Phocadownload
Hi, just compare the file you have modified with the original file (e.g. in the installation ZIP) to find the modification 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 14
- Joined: 27 Nov 2012, 17:52
Re: Email from Phocadownload
Thanks but I haven't modified any file. I have, though, found a solution.
I changed line 1955 of the phocadownlaod.php to
$messageText = JText::_( 'File') . ' "' .$_GET["id"].'/'.$fileName . '" '.JText::_('was downloaded by'). ' '.$name . $userName.'.';
The $_get["id"} returns the category.
I changed line 1955 of the phocadownlaod.php to
$messageText = JText::_( 'File') . ' "' .$_GET["id"].'/'.$fileName . '" '.JText::_('was downloaded by'). ' '.$name . $userName.'.';
The $_get["id"} returns the category.
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Email from Phocadownload
Hi, maybe you should somehow make the string safe in $_GET
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 14
- Joined: 27 Nov 2012, 17:52
Re: Email from Phocadownload
Sorry I don't understand, What do you mean by safe?
Thanks but I haven't modified any file. I have, though, found a solution.
I changed line 1955 of the phocadownlaod.php to
$messageText = JText::_( 'File') . ' "' .$_GET["id"].'/'.$fileName . '" '.JText::_('was downloaded by'). ' '.$name . $userName.'.';
The $_get["id"} returns the category.
Thanks but I haven't modified any file. I have, though, found a solution.
I changed line 1955 of the phocadownlaod.php to
$messageText = JText::_( 'File') . ' "' .$_GET["id"].'/'.$fileName . '" '.JText::_('was downloaded by'). ' '.$name . $userName.'.';
The $_get["id"} returns the category.
- Jan
- Phoca Hero
- Posts: 48566
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Email from Phocadownload
Hi, $_GET is raw method how to get id from get request
But you need to protect it against possible attacks
In Joomla! there are different methods do protect the get input.
At least you should use:
$id = (int)$_GET['id'];
so the ID will be always the number and nobody can change it to some unsecure string.
Jan
But you need to protect it against possible attacks
In Joomla! there are different methods do protect the get input.
At least you should use:
$id = (int)$_GET['id'];
so the ID will be always the number and nobody can change it to some unsecure string.
Jan
If you find Phoca extensions useful, please support the project