possible variable typo

michael
@michael
7 years ago
7,744 posts
in ujGoogleMaps/include.php ver 1.0.8 (current in the marketplace) there is some code that looks like maybe its a typo, line 217
    $conf_mtypes = $_form['form_params']['values']['quota_ujGoogleMaps_map_type'];
    $conf_mtypes = $_user['quota_ujGoogleMaps_map_type'];
The variable $conf_mytpes is set, then replaced immediately. Thinking that maybe that first variable should be $_map_types because that variable is used later, but not defined.
mtypes.jpg
mtypes.jpg  •  396KB

michael
@michael
7 years ago
7,744 posts
bit lower there is this one too in the same file:
PhpStorm is awesome at checking for this stuff, so just pointing out what its telling me.
used_but_not_defined.jpg

michael
@michael
7 years ago
7,744 posts
and the last one
last_one.jpg
last_one.jpg  •  221KB

SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Thanks Michael, I know it gets a bit messy in there, you are brave to have ventured that far ;)

I've been meaning to revisit it pretty much since the day I wrote it. There are probably many improvements which could be made quite easily, but I haven't had call to look at maps in a while.

I have some time off over Christmas to work on some other modules. If I get them done I will try to refactor that code although there aren't that many users unfortunately.

Thanks for pointing that out :)


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Wow! Looking at that file I was on a real Jamroom learning curve.

I don't think there was much documentation at all then, just figuring out how it worked 8)

All credit to the design of Jamroom's module system and the readability of the code that I can make maps work way back then. Very cool!


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags