Get rid of pregReplaceCurry and use closures instead

Perks of PHP 5.3+, we can use closures instead of currying our way to pass scope into the callbacks, saves us from a lot of create_function hell

Signed-off-by: Shitiz Garg <mail@dragooon.net>
* A small leftover .half
Signed-off-by: Antes <antes@simplemachines.org>
! Move to language file
Signed-off-by: Antes <antes@simplemachines.org>
Signed-off-by: Antes <antes@simplemachines.org>
logActions(): Misplaced use of $action instead of $log['action']

Fixes #1664

Signed-off-by: Shitiz Garg <mail@dragooon.net>
EditTheme() was suing $theme_dir instead of $context['theme_dir']

Fixes #1668

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Use of undefined $attachmentOptions while checking for attachments

Should be $_SESSION['temp_attachments'][$attachID] instead.
Fixes #1667

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Incorrect WHERE comparison (or lack thereof) in list_getLogins()

Query was just loading up the number without comparing it to anything which would always evaluate as true

Fixes #1666

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Optimise displayDebug a little to get rid of a loop and use array_keys instead

Fixes #1665

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Remove use of deprecated logAction and use logActions instead in ReportMembers

Fixes #1662

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Fix incorrect querying for recycle boards while fetching recent posts

Fixes #1661

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Improve SQLite3 error detection

In some queries such as SET NAMES utf8; it would return false as technically it'd fail but it's not an error (that's what SQLite literally says). SMF should also verify that there's a valid error code in order to ensure sqlite isn't simply skipping the query.

Related to #40

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Fix SQLite3 installer

The installer had a few problems:
1) It was using multi-value/multi-row INSERTs, something which are not supported by SQLite3
2) Double declaration of primary keys in some tables, causing them to be not created (and the installer would skip them thinking they're duplicates
3) messages table had incorrect definition for modified_reason column

Related to #40

Signed-off-by: Shitiz Garg <mail@dragooon.net>
Merge pull request #1655 from Dragooon/fix-curry

Get rid of pregReplaceCurry and use closures instead
Merge pull request #1669 from Dragooon/fix-logActions

logActions(): Misplaced use of $action instead of $log['action']
Merge pull request #1670 from Dragooon/fix-misc

Miscellaneous fixes for issues
Merge pull request #1671 from Dragooon/sqlite

Some SQLite Fixes
Merge pull request #1672 from Antes/sctnz

! Move to language file
Merge pull request #1673 from Antes/small-fix

Small fix
! it''s dir, not theme_dir

Signed-off-by: John Rayes <live627@gmail.com>