1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 12:21:45 +02:00

admin UI: templates & layouts field types added, bugfixes and improvements; Featurebox plugin administration ready, front-end in progress

This commit is contained in:
secretr
2009-11-28 15:34:46 +00:00
parent 76ffe278f0
commit 9626059142
9 changed files with 335 additions and 148 deletions

View File

@@ -9,8 +9,8 @@
* e107 Base Model
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/model_class.php,v $
* $Revision: 1.45 $
* $Date: 2009-11-26 17:14:06 $
* $Revision: 1.46 $
* $Date: 2009-11-28 15:34:46 $
* $Author: secretr $
*/
@@ -806,6 +806,26 @@ class e_model
return $this;
}
/**
* Set model message stack
* @param string $stack_name
* @return e_model
*/
public function setMessageStackName($stack_name)
{
$this->_message_stack = $stack_name;
return $this;
}
/**
* Get model message stack name
* @return string
*/
public function getMessageStackName()
{
return $this->_message_stack;
}
/**
* User defined model validation
* Awaiting for child class implementation
@@ -2075,7 +2095,7 @@ class e_tree_model extends e_model
if($this->getParam('db_query') && $this->getParam('model_class') && class_exists($this->getParam('model_class')))
{
$sql = e107::getDb();
$class_name = $this->getParam('model_class');
$class_name = $this->getParam('model_class', 'e_model');
$this->_total = $sql->total_results = false;
if($sql->db_Select_gen($this->getParam('db_query')))
{
@@ -2085,6 +2105,10 @@ class e_tree_model extends e_model
while($tmp = $sql->db_Fetch())
{
$tmp = new $class_name($tmp);
if($this->getParam('model_message_stack'))
{
$tmp->setMessageStackName($this->getParam('model_message_stack'));
}
$this->setNode($tmp->get($this->getFieldIdName()), $tmp);
}