Page 1 of 1

Bug in PTZ control code

Posted: Fri Aug 08, 2008 10:29 am
by W.
Found in 1.23.3, but most likely present in all previous versions as well.
Diagonal movements do not work ie UpRight, DownLeft etc.

Fix:
file web/zm_actions.php, line 462, replace regexp

Code: Select all

'/^([a-z]+)([A-Z][a-z]+)([A-Z][a-z]+)$/'
with

Code: Select all

'/^([a-z]+)([A-Z][a-z]+)([A-Z][A-Za-z]+)$/'
file web/zm_request_control.php, line 596, do the same replacement of regexp.

upd.
I just noticed that in other places Philip used

Code: Select all

/^([a-z]+)([A-Z][a-z]+)([A-Z][a-z]+)+$/
, which probably works as well, but I did not test it.