forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: a$h on April 22, 2006, 01:30:23 am
-
Hi there.
I think there is an error in report_file.php
Everything seemse to work ok, but when you receive e-mail instead to receive name of sender you receive <input type="text" class="textinput" value="Rekomandim" name="sender_name" style="width: 100%;" /> <ariani_sh@yahoo.co.uk>
Also instead to recive Subject, you recive A report from <input type="text" class="textinput" value="Guest" name="sender_name" style="width: 100%;" /> on a gallery file
Can somebody please help me with this?
Many thanks.
-
link and non-admin test user account please
-
GauGau,
thanks for your quick response.
user: test
pass: test
I dont will this help, but the problem that I mentioned before (in my first post) I only get it when an anonymous reports to admin. I dont have problem when a regisetred user report to admin.
Thanks.
-
what language are you testing with?
-
Im testing it with English language, but as I said in previous post I only get error when an anynomus/guest user submit the notification to admin.
Thanks GauGau
-
I was able to confirm this on my gallery (after someone tried to spam for ambien :P) using English. I submitted a report as an anonymous user to replicate the spammer's "report".
I think it has to do with this:
if ($USER_DATA['user_email']){
$sender_email = $USER_DATA['user_email'];
$sender_box = $sender_email;
} else {
$sender_email = get_post_var('sender_email',$USER['email'] ? $USER['email'] : '');
$sender_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_email\" name=\"sender_email\" style=\"width: 100%;\" />";
$sender_name = "<input type=\"text\" class=\"textinput\" value=\"$sender_name\" name=\"sender_name\" style=\"width: 100%;\" />";
}
The input fields are for displaying in the report form when it's an anonymous user. But the problem is the $sender_name variable goes unchanged into the email message.
-
Thanks TranzNDance.
Hopefully someone will have a solution for this?
Till then...
Regards,
a$h
-
Got it. Please confirm fix.
Edit report_file.php
FIND:
$sender_name = "<input type=\"text\" class=\"textinput\" value=\"$sender_name\" name=\"sender_name\" style=\"width: 100%;\" />";
REPLACE with:
$sender_name = get_post_var('sender_name',$USER['name'] ? $USER['name'] : '');
$sender_name_box = "<input type=\"text\" class=\"textinput\" value=\"$sender_name\" name=\"sender_name\" style=\"width: 100%;\" />";
FIND:
{$sender_name}
REPLACE with:
{$sender_name_box}
-
Thanks TranzNDance,
I can confirm that the fix that you provided is working. But you only need to modify the frist part and you DON'T need to replace {$sender_name} with {$sender_name_box}.
Once again thanks very much.
Kind regards,
Arian Sh.
-
Thanks for confirming. However, I tried what you suggested and used $sender_name only and it resulted in no input box showing.
-
TranzNDance,
My mistake. You are right. If you dont make both modification provided by you in previous post, then there is no input filed for the name. I only realised this after I've deleted my cookies.
Once again thanks very much ;)
-
@Thu: could you commit to stable and devel branch of svn please?
-
done and done. :)
-
I think there is something that need to be clarificated (at least to me). I though I had discovered a bug on report_file.php but after searching the forum I realised this is a know issue.
I was going to report a nedeed modification in the file:
In "report_file.php"
Search: (line 200)
<td valign="top" class="tableb" width="60%">
{$sender_name_box}
</td>
I think must be:
<td valign="top" class="tableb" width="60%">
{$sender_name}
</td>
Later, searching the forum I see this: http://forum.coppermine-gallery.net/index.php/topic,30694.msg143762.html#msg143762 (http://forum.coppermine-gallery.net/index.php/topic,30694.msg143762.html#msg143762)
But doing that, resulted in no input box showing. TranzNDance already noticed that, but never was fixed.
So, what to do in order to get both features working properly?
-
So? I think this is a thing that must be fixed. Am I missing something? :-\
-
Merged fabri's new thread with the existing one. Thu, could you please look into this once again?
-
Sorry for the delay. I think I fixed it for real this time. I added:
$sender_name = $USER_DATA['user_name'];
$sender_name_box = $sender_name;
after:
if ($USER_DATA['user_email']){
$sender_email = $USER_DATA['user_email'];
$sender_box = $sender_email;
I have committed the change for versions 1.4 and 1.5.
Thanks for reporting the bug, Fabricio.
-
Working both features at least to me :)
Thanks Thu!