pedro_morgan
2007-08-19 814e0b4a25ee1245f275c92e5eb8540a4c9c0e66
Simplifies loading of classes. No is_object check
3 files modified
10 ■■■■■ changed files
interface/lib/app.inc.php 3 ●●●● patch | view | raw | blame | history
interface/lib/classes/listform_actions.inc.php 5 ●●●● patch | view | raw | blame | history
interface/web/themes/pedro/templates/main.tpl.htm 2 ●●● patch | view | raw | blame | history
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();
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'] = '';
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>