Added a test for poll creation. Fixed the default values in createPoll function because
test failed from the beginning with them. ;D

Signed-off-by: Norv <a.w.norv@gmail.com>
Add tests for poll subs functions.

Signed-off-by: Norv <a.w.norv@gmail.com>
Disable testing by default (we're using db). Add documentation.

Signed-off-by: Norv <a.w.norv@gmail.com>
The 'disregarded' column wasn't set for existing entries, causing a DB error in some cases

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>
The 'disregarded' column wasn't set for existing entries, causing a DB error in some cases
(elk files)

Signed-off-by: Norv <a.w.norv@gmail.com>
In some cases, validation was done multiple times for the same token

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>

Signed-off-by: Norv <a.w.norv@gmail.com>
Merge pull request #568 from norv/picks

Picks
Merge pull request #566 from norv/unittest

Small additions for testing
Merge pull request #549 from emanuele45/ajax_improved

Ajax improved
Bit of standarization, add action_index() to Display controller.

Signed-off-by: Norv <a.w.norv@gmail.com>
Merge pull request #569 from norv/display

Display controller.
Security policy: reject magic_quotes configuration if enabled. Cleanup QueryString.php of magic quotes.

Signed-off-by: Norv <a.w.norv@gmail.com>
Move utility functions _recursive() to Util class. They aren't currently used, but potentially useful...

Signed-off-by: Norv <a.w.norv@gmail.com>
htmlspecialchars() HTTP_USER_AGENT. (from Util.) This removes db entirely from QueryString.php..

Signed-off-by: Norv <a.w.norv@gmail.com>
Refactor $smcFunc['db_unescape_string'] -> $db->unescape_string() and remove it from $smcFunc.

Signed-off-by: Norv <a.w.norv@gmail.com>
Move cleanRequest() up in the execution chain. (before loading the db)

Signed-off-by: Norv <a.w.norv@gmail.com>
Remove a custom $_SERVER['is_cli'] var

Signed-off-by: Norv <a.w.norv@gmail.com>
Add Request class, for the request and its environment. It holds currently client/ban ips and user agent, will hold http scheme.
cleanRequest() uses it.

Signed-off-by: Norv <a.w.norv@gmail.com>
Remove $_SERVER['BAN_CHECK_IP'] -> ban_ip() method of Request

Signed-off-by: Norv <a.w.norv@gmail.com>
Remove the last trace of $_SERVER['BAN_CHECK_IP'] which was for compatibility

Signed-off-by: Norv <a.w.norv@gmail.com>