diff --git a/e107_admin/userclass2.php b/e107_admin/userclass2.php index d728a8402..4e50ac8c9 100644 --- a/e107_admin/userclass2.php +++ b/e107_admin/userclass2.php @@ -9,9 +9,9 @@ * Administration Area - User classes * * $Source: /cvs_backup/e107_0.8/e107_admin/userclass2.php,v $ - * $Revision: 1.32 $ - * $Date: 2009-11-05 17:32:18 $ - * $Author: secretr $ + * $Revision: 1.33 $ + * $Date: 2009-11-06 00:02:12 $ + * $Author: e107coders $ * */ @@ -910,7 +910,7 @@ class uclass_manager foreach($classes as $row) { - $text .= $frm->trow($this->fields, $this->fieldpref, $row, 'userclass_id'); + $text .= $frm->renderTableRow($this->fields, $this->fieldpref, $row, 'userclass_id'); } } $text .= ""; diff --git a/e107_handlers/admin_handler.php b/e107_handlers/admin_handler.php index 79e87e0aa..3285fd553 100644 --- a/e107_handlers/admin_handler.php +++ b/e107_handlers/admin_handler.php @@ -2634,6 +2634,7 @@ class e_admin_form_ui extends e_form */ protected $_controller = null; + /** * Constructor * @param e_admin_ui $controller @@ -2643,8 +2644,34 @@ class e_admin_form_ui extends e_form { $this->_controller = $controller; parent::__construct($tabindex); + + // protect current methods from conflict. + $this->preventConflict(); + } + protected function preventConflict() + { + $err = ""; + $fields = array_keys($this->getController()->getFields()); + foreach($fields as $val) + { + if(method_exists(e_form,$val)) // check even if type is not method. - just in case of an upgrade later by 3rd-party. + { + $err .= "

ERROR: The field name (".$val.") is not allowed.

"; + $err .= "Please rename the key (".$val.") to something else in your fields array and database table.

"; + } + } + + if($err) + { + echo $err; + exit; + } + } + + + /** * User defined init */ diff --git a/e107_handlers/model_class.php b/e107_handlers/model_class.php index 4dd1532f7..6659b2a7e 100644 --- a/e107_handlers/model_class.php +++ b/e107_handlers/model_class.php @@ -9,9 +9,9 @@ * e107 Base Model * * $Source: /cvs_backup/e107_0.8/e107_handlers/model_class.php,v $ - * $Revision: 1.32 $ - * $Date: 2009-11-05 17:32:19 $ - * $Author: secretr $ + * $Revision: 1.33 $ + * $Date: 2009-11-06 00:02:12 $ + * $Author: e107coders $ */ if (!defined('e107_INIT')) { exit; } @@ -463,7 +463,7 @@ class e_model return $this; } - $this->${data_src} = $key; + $this->$data_src = $key; return $this; }