diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php
index 7c42123..f243a28 100644
--- a/system/libraries/Loader.php
+++ b/system/libraries/Loader.php
@@ -837,6 +837,11 @@
*/
function _ci_assign_to_models()
{
+ if (count($this->_ci_models) == 0)
+ {
+ return;
+ }
+
if ($this->_ci_is_instance())
{
$CI =& get_instance();
diff --git a/system/libraries/Model.php b/system/libraries/Model.php
index dfb48a5..2fe93dd 100644
--- a/system/libraries/Model.php
+++ b/system/libraries/Model.php
@@ -37,6 +37,7 @@
{
// If the magic __get() method is used in a Model references can't be used.
$this->_assign_libraries( (method_exists($this, '__get')) ? FALSE : TRUE );
+ //$this->_assign_libraries( (method_exists($this, '__get') OR method_exists('__set')) ? FALSE : TRUE );
// We don't want to assign the model object to itself when using the
// assign_libraries function below so we'll grab the name of the model parent
diff --git a/system/libraries/Table.php b/system/libraries/Table.php
index f3f9b32..da7bbbe 100644
--- a/system/libraries/Table.php
+++ b/system/libraries/Table.php
@@ -28,10 +28,11 @@
*/
class CI_Table {
- var $rows = array();
- var $heading = array();
- var $template = NULL;
- var $newline = "\n";
+ var $rows = array();
+ var $heading = array();
+ var $template = NULL;
+ var $newline = "\n";
+ var $empty_cells = "";
function CI_Table()
@@ -78,6 +79,22 @@
// --------------------------------------------------------------------
/**
+ * Set "empty" cells
+ *
+ * Can be passed as an array or discreet params
+ *
+ * @access public
+ * @param mixed
+ * @return void
+ */
+ function set_empty($value)
+ {
+ $this->empty_cells = $value;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Add a table row
*
* Can be passed as an array or discreet params
@@ -166,10 +183,19 @@
$out .= $this->template['row_'.$alt.'start'];
$out .= $this->newline;
- foreach($row as $cells)
+ foreach($row as $cell)
{
$out .= $this->template['cell_'.$alt.'start'];
- $out .= $cells;
+
+ if ($cell == "")
+ {
+ $out .= $this->empty_cells;
+ }
+ else
+ {
+ $out .= $cell;
+ }
+
$out .= $this->template['cell_'.$alt.'end'];
}