I create a patch that add a button (a link in fact) to Purge the statistics data. I really need it and maybe other user would also want that feature.
NOTE: If you apply the patch, don't forget to reset the Menu cache:
/admin_menu/flush-cache/menu
In the browsecap configuration page (Administer > Site configuration > Browscap), you will see the following line:
[Purge data now] This will purge all data about previous browser visit. In other words, it will reset the reports in the Browscap reports area.
If you click on [Purge data now], all the data about the previous visit will be clear.
Basically, it will execute the following SQL Query: DELETE FROM browscap_statistics
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 810502_browscap_purge.patch | 3.53 KB | gaellafond |
| #2 | browscap_purge.patch | 3.39 KB | gaellafond |
Comments
Comment #1
gregglesIt seems the patch is missing?
To avoid a Cross Site Request Forgery you should use either a token or a button or a confirmation form. See Protecting Drupal against cross site request forgeries for more information.
Comment #2
gaellafond commentedHum, I know I attached the Patch by using the Attach button. I think it disappear when I use the Preview button.
Thanks for the suggestion, I will have a look at this URL after the lunch.
Comment #3
gregglesSounds good.
Comment #4
gaellafond commentedThank you for that URL about Drupal XSS. They propose a pretty good and simple solution by adding a confirmation page using
confirm_form(). That function handle the token transparently. In addition, the confirmation page looks better and more robust than a javascript confirm window.[edit]
I don't really like the look of the line I add on the configuration page, but that's all the time I can invest on this patch for now. Feel free to modify it if you want.
[/edit]
Comment #5
devin carlson commentedUseragent recording functionality has been removed from Browscap #1795920: Remove useragent recording functionality.