Changeset 516 in t29-www for lib/ressourceloader.php


Ignore:
Timestamp:
Feb 19, 2014, 12:39:35 PM (5 years ago)
Author:
sven
Message:

Bug #51 gefixt (http://labs.technikum29.de/ticket/51).
Jetzt sollten neue Pagestyles gleich beim Erstellen erkannt werden.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/ressourceloader.php

    r357 r516  
    4848        }
    4949       
    50         private static $conf_for_type;
    5150        static function create_from_type($type, $baseconf=null) {
    52                 global $lib, $webroot;
    53                 if(!self::$conf_for_type) {
    54                         define('T29_GRAB_LOADER_DEFS', true);
    55                         include "$lib/loader.php";
    56                         self::$conf_for_type = $conf_for_type;
    57                 }
    58 
    59                 $conf = call_user_func(self::$conf_for_type, $type, isset($baseconf['debug']) && $baseconf['debug']);
     51                global $lib, $webroot, $host;
     52                $conf = $host->get_ressources($type, $webroot, isset($baseconf['debug']) && $baseconf['debug']);
    6053                if($conf === null) return null;
    61                
    62                 return new $conf['class']($conf);
     54       
     55                return new $conf['class']($conf);               
    6356        }
    6457       
     
    241234
    242235        function compression_filter($code) {
    243                 global $lib;
    244                 require "$lib/host.php";
    245                 $host = t29Host::detect();
     236                global $lib, $host;
    246237                if($host->has_web_prefix)
    247238                        // rewrite CSS image includes
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License