Commit graph

9 commits

Author SHA1 Message Date
Ed Sanders b024fddb4d Make mapName deterministic so it can be tested
Change-Id: Ia906b46fbe8d84ae1482f8efaeb609d08c53bfa8
2019-08-30 17:43:37 +01:00
Alex Ezell 9f962fbad1 Allow negative coordinates in poly image maps
Previous attempts to clean this up followed similar logic to the
circle and rect types of imagemaps. However, in reality, we have
many image maps in our content that have negative values for poly
coordinates. While this isn't logical, breaking them so loudly
in the page isn't desirable.

This change then removes the check for positive value and passes
along the negative coordinate.

Bug: T217087
Change-Id: I0ee84f059dacde79a7e4fb0a172ac6937360d864
2019-04-11 09:23:14 -04:00
Ed Sanders fb20685b48 Use is_numeric instead of ctype_digit for 'poly' validation
Duplicates the logic from tokenizeCoords which is used by
'rect' & 'circle'.

Bug: T217087
Change-Id: I7c59bb9ea410bae8800922356829bca669d2e69c
2019-03-31 00:21:43 +00:00
Alex Ezell 70a6b723c7 Warn user about invalid coordinates
If a user provides a non-numeric coordinate in an image map, it
results in an unhandled exception. This change detects the incorrect
coordinate and warns the user with an error message.

This also cleans up a type casting that was old fashioned.

Bug: T217087
Change-Id: Ic1254dd0fe41d0499f71140466277fb58d1d194c
2019-03-22 15:20:22 -04:00
Umherirrender c0eb4fdb18 Declare local vars set on first run of foreach
PhanUndeclaredVariable is reported, because the vars are not declared
outside of the loop and only conditional inside the loop.
The condition is run on first loop, so it is always run and the old code
works.
Declare the vars to make them visible before the loop

Change-Id: Ic33170fcb0e5b7e02b7269c83f27120989a6ca10
2019-03-11 20:15:07 +01:00
zoranzoki21 b0b5b63fd9 Move images in resources directory
Change-Id: Id76a292e75c1ef82410439235b6d25eb0cff4284
2019-03-02 22:06:50 +01:00
Reedy f0355fab4c Update MediaWiki namespaced AtEase global functions
Change-Id: Ic1342ad266084bd1ad6ae89e31020afef825870d
2019-02-13 05:29:51 +00:00
Umherirrender b9f43bd8f1 Add method scope visibility
Change-Id: I5ac480fe2af502645d539e0e05b6872d3854168a
2018-10-31 23:37:19 +01:00
Kunal Mehta 3297749b56 Move classes into includes/
Change-Id: I390b0e09406e61c19e2e3eb9a115327cf013ad3a
2018-02-24 13:10:38 -08:00