Closed (fixed)
Project:
Clicky - Web Analytics in Real Time
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2016 at 07:06 UTC
Updated:
7 Mar 2016 at 10:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Z2222 commentedComment #3
Z2222 commentedComment #4
rsvelko commentedeven better make that trimming on settings page save. Which I did in a fresh commit:
4fe5491 2016-02-21 15:13:46
Just in case adding the trim() function also in the way you propose to avoid invalid html in already filled in settings forms...
Also will write an update hook that will trim the field variable on running the update.
Comment #5
rsvelko commentedpasting git log --oneline where u can see all trim-ing has been done everywhere.
4fe5491 2016-02-21 15:13:46 +0100 M getclicky.admin.inc: - renamed form builder function getclicky_admin_settings() -> getclicky_admin_settings_form() - added getclicky_admin_settings_form_validate() that validates the site_id number for ! empty and is_numeric - minor: added note next to site key field 'Site Key Number (Optional: needed for displaying stats here in getclicky's drupal admin area.' - minor: replaced all
to
d95071b 2016-02-21 15:22:32 +0100 M getclicky.module: trim site id and key numbers just in case; admin page trimming on save already implemented
349e907 2016-02-21 15:49:21 +0100 M getclicky.install: update hook for trimming
6cb961e 2016-02-21 15:53:52 +0100 M getclicky.install: put update hook descriptions in the right place
cf6279e 2016-02-21 15:55:54 +0100 m
32d1c8e 2016-02-21 15:59:59 +0100 M getclicky.admin.inc: trim and validate the optional site key number too
d83fb5b 2016-02-21 16:03:08 +0100 (HEAD, origin/HEAD, origin/7.x-1.x, 7.x-1.x) M getclicky.admin.inc: dont validate site key string, just trim is enough
m = minor whitespace change
Comment #6
Z2222 commentedI was thinking that existing sites that have accidentally put the wrong info in might need it trimmed on variable get, or maybe just a message letting them know that their existing key has whitespace. I had a site like that for a long time before I noticed it recently.
Comment #7
rsvelko commentedI see/saw ur point yesterday and
I made it trim both on settings-save and on variable_get stage.
The new 7.x-1.2 release comes with an updatee_hook, that will trim too when run.
You can safely git pull or use the new 1.2 release. Cheers.