mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Prevent method name conflict and some notice removal.
This commit is contained in:
@@ -9,9 +9,9 @@
|
|||||||
* Administration Area - User classes
|
* Administration Area - User classes
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/userclass2.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/userclass2.php,v $
|
||||||
* $Revision: 1.32 $
|
* $Revision: 1.33 $
|
||||||
* $Date: 2009-11-05 17:32:18 $
|
* $Date: 2009-11-06 00:02:12 $
|
||||||
* $Author: secretr $
|
* $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -910,7 +910,7 @@ class uclass_manager
|
|||||||
|
|
||||||
foreach($classes as $row)
|
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 .= "</tbody></table></fieldset></form>";
|
$text .= "</tbody></table></fieldset></form>";
|
||||||
|
@@ -2634,6 +2634,7 @@ class e_admin_form_ui extends e_form
|
|||||||
*/
|
*/
|
||||||
protected $_controller = null;
|
protected $_controller = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param e_admin_ui $controller
|
* @param e_admin_ui $controller
|
||||||
@@ -2643,8 +2644,34 @@ class e_admin_form_ui extends e_form
|
|||||||
{
|
{
|
||||||
$this->_controller = $controller;
|
$this->_controller = $controller;
|
||||||
parent::__construct($tabindex);
|
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 .= "<h2>ERROR: The field name (".$val.") is not allowed.</h2>";
|
||||||
|
$err .= "Please rename the key (".$val.") to something else in your fields array and database table.<br /><br />";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($err)
|
||||||
|
{
|
||||||
|
echo $err;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User defined init
|
* User defined init
|
||||||
*/
|
*/
|
||||||
|
@@ -9,9 +9,9 @@
|
|||||||
* e107 Base Model
|
* e107 Base Model
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/model_class.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_handlers/model_class.php,v $
|
||||||
* $Revision: 1.32 $
|
* $Revision: 1.33 $
|
||||||
* $Date: 2009-11-05 17:32:19 $
|
* $Date: 2009-11-06 00:02:12 $
|
||||||
* $Author: secretr $
|
* $Author: e107coders $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@@ -463,7 +463,7 @@ class e_model
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->${data_src} = $key;
|
$this->$data_src = $key;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user