Little fix for generate admin tables
This commit is contained in:
parent
38c882c6ee
commit
40719f8931
2 changed files with 11 additions and 1 deletions
|
|
@ -72,7 +72,9 @@ function padminConsole($options)
|
|||
foreach($arr_classes as $class)
|
||||
{
|
||||
|
||||
if(get_parent_class($class)==='PhangoApp\PhaModels\Webmodel')
|
||||
$parent_class=get_parent_class($class);
|
||||
|
||||
if($parent_class==='PhangoApp\PhaModels\Webmodel' && !isset(Webmodel::$model_type[$parent_class]))
|
||||
{
|
||||
|
||||
if(!isset(Webmodel::$model[strtolower($class)]))
|
||||
|
|
|
|||
|
|
@ -386,6 +386,12 @@ class Webmodel {
|
|||
*/
|
||||
|
||||
static public $form_type_checked=array();
|
||||
|
||||
/**
|
||||
* A simple array for control if was loaded a model from a class for use in padmin.
|
||||
*/
|
||||
|
||||
static public $model_type=array();
|
||||
|
||||
/**
|
||||
* A simple switch for know if updated or insert this model
|
||||
|
|
@ -465,6 +471,8 @@ class Webmodel {
|
|||
|
||||
Webmodel::$m->$name_model=&Webmodel::$model[$name_model];
|
||||
|
||||
Webmodel::$model_type[get_class($this)]=1;
|
||||
|
||||
$this->load_components();
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue