From 814e0b4a25ee1245f275c92e5eb8540a4c9c0e66 Mon Sep 17 00:00:00 2001
From: pedro_morgan <pedro_morgan@ispconfig3>
Date: Sun, 19 Aug 2007 17:52:23 -0400
Subject: [PATCH] Simplifies loading of classes. No is_object check
---
interface/lib/classes/listform_actions.inc.php | 5 +----
interface/web/themes/pedro/templates/main.tpl.htm | 2 +-
interface/lib/app.inc.php | 3 ++-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index 7c63a56..2540998 100644
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -67,10 +67,11 @@
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();
diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php
index cfe880c..44bd1d5 100644
--- a/interface/lib/classes/listform_actions.inc.php
+++ b/interface/lib/classes/listform_actions.inc.php
@@ -47,10 +47,7 @@
{
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'] = '';
diff --git a/interface/web/themes/pedro/templates/main.tpl.htm b/interface/web/themes/pedro/templates/main.tpl.htm
index f7d5360..6e5afb5 100644
--- a/interface/web/themes/pedro/templates/main.tpl.htm
+++ b/interface/web/themes/pedro/templates/main.tpl.htm
@@ -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>
--
Gitblit v1.9.1