merged latest develop branch, fixed changelog conflict.
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index fb154e5..947aedd 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -49,9 +49,23 @@
public $empty_cells = '';
public $function = FALSE;
- public function __construct()
+ // --------------------------------------------------------------------------
+
+ /**
+ * Set the template from the table config file if it exists
+ *
+ * @param array $config (default: array())
+ * @return void
+ */
+ public function __construct($config = array())
{
log_message('debug', "Table Class Initialized");
+
+ // initialize config
+ foreach ($config as $key => $val)
+ {
+ $this->template[$key] = $val;
+ }
}
// --------------------------------------------------------------------
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index b5fb52d..069dc07 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -85,6 +85,7 @@
- Minor speed optimizations and method & property visibility declarations in the Calendar Library.
- Removed SHA1 function in the :doc:`Encryption Library <libraries/encryption>`.
- Added $config['csrf_regeneration'] to the CSRF protection in the :doc:`Security library <libraries/security>`, which makes token regeneration optional.
+ - Allowed for setting table class defaults in a config file.
- Added function error_array() to return all error messages as an array in the Form_validation class.
- Added function set_data() to Form_validation library, which can be used in place of the default $_POST array.
- Added function reset_validation() to form validation library, which resets internal validation variables in case of multiple validation routines.
diff --git a/user_guide_src/source/libraries/table.rst b/user_guide_src/source/libraries/table.rst
index 9bc3f34..6a808ab 100644
--- a/user_guide_src/source/libraries/table.rst
+++ b/user_guide_src/source/libraries/table.rst
@@ -116,6 +116,8 @@
$tmpl = array ( 'table_open' => '<table border="1" cellpadding="2" cellspacing="1" class="mytable">' );
$this->table->set_template($tmpl);
+
+You can also set defaults for these in a config file.
******************
Function Reference