improper/mediawiki-extensions-yasec — pull request #3 by rennerocha (2014-02-25 01:51:16+00:00)
Title: Database agnosticism (REGEXP)

Fixes #1

I didn' t find a way to use the PDO method sqliteCreateFunction (http://www.php.net/manual/en/pdo.sqlitecreatefunction.php) to define REGEXP in SQLite. To be able to do that, I need to have access to the protected property *mConn* of *DatabaseSqlite* class.

The solution I found is to retrieve all page titles and check with PHP function preg_match if the title is from an event. It will be slower than a direct search in database, but I can't find a better way.

For working in PostgreSQL I just set the right regex operator based on *DatabaseBase* subclass.