template: remove magic behaviour of set('debug', ...)

This was mentioned in the old docs, but we're not using it anywhere.
If you use any of these names:

    debug|active_theme|default_theme|current_view|layout|parse_views|
    data|blocks|message|theme_paths|site_path|orig_view_path|ci

they will set class properties of Template, instead of adding a
variable to the view data.  I noticed this when trying to pass a
variable called 'debug' to the view.  The name 'data' also looks ready
to cause many man-hours of debugging fun.

There's no alternative setter for $debug, so I just made it public.
(Remember that without this change, _all_ the properties of the
Template class are effectively public.)  The other properties could
already be set as desired without using this magic.
emailer lib: process_emails(): respect enable_debug() and fix return value

There's not much point testing for CI_Session because it will always exist.
It's loaded by the users auth library, which is loaded by MY_Controller.

OTOH, it may well make sense to respect enable_debug().  This will help
make the debug code a bit more consistent in future.  I.e. we can use a
single PHP variable to hold debug messages, so we don't need to abuse the
session for it.  Being consistent about enable_debug() would make that
easier to explain and understand.

Also fix the return value to indicate success or failure.  It's what the
function comment says, and you shouldn't have to enable debugging just to
tell whether the function succeeded or not.
emailer lib: fix return value of send() and unify debugging messages

The function comment, users module, and create method of the email
settings controller think it returns boolean, but it doesn't.
Returning boolean would make good sense here.  Most callers won't
use the extra debug information - you already have to do extra
work to enable the debugging messages.  And for those that do use them,
grabbing them from a global variable is no big hardship.

(PHP does not do threading - or signal handling - and process_emails()
cannot be called recursively, so a "global variable" is not so bad).

Let's fix send() so it matches the documentation, and so the naive callers
who believed it will now notice when send() fails.

Also fix resend_activation(), which was trying to display the debug
messages, but would actually have errored out trying to display the value
of the private $debug flag.
Replace use of mysql_error()

Note I didn't touch the portion of install that actually sets up the
database, since that section is all mysql-specific.
default theme: Allow front-end pages to set $page_title

The user module expected this to work.
created protected method to retrieve db error message

Considering just checking $this->db->platform() and calling the
appropriate function rather than calling $this->db->_error_message()
add get_db_error_message to install model
use platform to determine action, fallback on _error_message
install: fix double-wrapping of errors (invalid markup and visibly wrong)

The message() function in install_helpers.php already wraps the messages
once.  Remove the outer layer of markup.  This avoids nested <p> tags, as
well as the visual effect of doubly-nested boxes.

All the view needs to do is echo a single variable.  This is similar to
how Template::message() is used, in the main part of Bonfire.
htaccess: installer doesn't have a "system folder" of its own
Fix error (notice) undefined index on role update

When updating a role the system briefly displays a PHP error and logs:
ERROR - 2012-09-27 20:44:59 --> Severity: Notice --> Undefined index:
status
C:\Users\mwhitney\apache\webroot\bonfire\application\core_modules\permissions\models\permission_model.php
181

Traced it back to
/application/core_modules/roles/controllers/settings.php line 359, where
the roles controller attempts to update permissions with a call to
update_where().

Since it's conceivable someone might want to update a permission without
changing its status, it should be ok to call update without
$data['status'] being set.
Merge pull request #602 from ci-bonfire/fixes/role_update_error

Fix error (notice) undefined index on role update
fixes #597 Fixes bug when creating modules with existing tables (thanks @leerlemoniii)
Merge pull request #588 from ci-bonfire/fixes/mysql-specific

Replace use of mysql_error()
Handle array passed to permission_model->update

if the array contains the key, we can pass the key to
role_permission_model->delete_for_permission, just as we do with $id
when it is not an array. Otherwise, we have to get the key(s) to
perform the delete(s).
Revert "permission matrix: was broken by CSRF protection - fix #596"

This reverts commit bc80f1173104c006aeaea1bcf22f4caae0fb71e3.

jquery-cookie has an open issue with IE, and it doesn't look like it's
getting resolved very quickly.

https://github.com/carhartl/jquery-cookie/issues/88
Revert "themes: add jquery.cookie, v1.2-8-g107eb9f (currently unmerged!)"

This reverts commit 4b94165074b0484b3e9f925f0244c5641162d356.
permission matrix: revised fix following CSRF protection - issue #596

1. jquery-cookie has an open issue with IE, and it doesn't look like it's
getting resolved very quickly.

    https://github.com/carhartl/jquery-cookie/issues/88

2. Put the JS file in the global assets folder; it didn't really belong in
    the themes.

The Changelog entry is amended accordingly.
Merge pull request #605 from ci-bonfire/fixes/permission_model

Handle array passed to permission_model->update
Merge pull request #594 from ci-bonfire/page_title

Allow page title to be set on the front-end