Changeset 22759

Show
Ignore:
Timestamp:
07/01/09 14:26:59 (1 year ago)
Author:
bergie
Message:

Make it possible to skip loading templates from database

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom_core/configuration/defaults.yml

    r22557 r22759  
    55services_templating_components: 
    66    - midcom_core 
     7services_templating_database_enabled: true 
    78services_sessioning: midcom_core_services_sessioning_midgard 
    89services_uimessages: midcom_core_services_uimessages_simple 
  • trunk/midcom/midcom_core/midcom.php

    r22557 r22759  
    266266        } 
    267267 
    268         // And finally append style and page to template stack 
    269         $_MIDCOM->templating->append_style($this->context->style_id); 
    270         $_MIDCOM->templating->append_page($this->context->page->id); 
     268        if ($this->configuration->services_templating_database_enabled) 
     269        { 
     270            // And finally append style and page to template stack 
     271            $_MIDCOM->templating->append_style($this->context->style_id); 
     272            $_MIDCOM->templating->append_page($this->context->page->id); 
     273        } 
    271274        if ($this->timer) 
    272275        { 
  • trunk/midcom/midcom_core/services/templating/midgard.php

    r22574 r22759  
    6666    public function append_style($style_id) 
    6767    { 
     68        if (!$_MIDCOM->configuration->services_templating_database_enabled) 
     69        { 
     70            return; 
     71        } 
    6872        $stack = $_MIDCOM->context->get_current_context(); 
    6973        if (!isset($this->stacks[$stack])) 
     
    7882    public function append_page($page_id) 
    7983    { 
     84        if (!$_MIDCOM->configuration->services_templating_database_enabled) 
     85        { 
     86            return; 
     87        } 
    8088        if ($page_id != $_MIDCOM->context->page->id) 
    8189        {