Commit 814e0b4a authored by pedro_morgan's avatar pedro_morgan
Browse files

Simplifies loading of classes. No is_object check

parent a5b1ff27
......@@ -67,10 +67,11 @@ class app {
public function uses($classes)
{
$cl = explode(',',$classes);
$cl = explode(',',$classes);
if(is_array($cl)) {
foreach($cl as $classname){
$classname = trim($classname);
//* Class is not loaded so load it
if(!array_key_exists($classname, $this->_loaded_classes)){
require_once($this->_conf['classpath'] . '/'.$classname.'.inc.php');
$this->$classname = new $classname();
......
......@@ -47,10 +47,7 @@ class listform_actions {
{
global $app, $conf, $list_def_file;
//TODO: this is_object checking should be in the $appobject - pedro notes
if(!@is_object($app->tpl)) $app->uses('tpl');
if(!@is_object($app->listform)) $app->uses('listform');
if(!@is_object($app->tform)) $app->uses('tform');
$app->uses('tpl,listform,tform');
//* Clear session variable that is used when lists are embedded with the listview plugin
$_SESSION['s']['form']['return_to'] = '';
......
......@@ -9,7 +9,7 @@
<script src="js/scrigo.js"></script>
</head>
<body bgcolor="#FFFFFF" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad="loadInitContent()">
###
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr bgcolor="#496FA8">
<td height="30" colspan="2" align="right" valign="top" backgrosund="themes/default/images/bg_nav_1.jpg"><!--<img src="themes/default/images/mydnsconfig_logo.gif" border="0" alt="">--></td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment