MidCOM svn: r21348 - in trunk/midcom/midcom_core: configuration services/templating

bergie midcom-commits at lists.midgard-project.org
Sat Mar 21 10:37:17 CET 2009


Author: bergie
Date: Sat Mar 21 10:37:17 2009
New Revision: 21348
URL: http://trac.midgard-project.org/changeset/21348

Log:
Change filters so that multiple can be called from same component


Modified:
   trunk/midcom/midcom_core/configuration/defaults.yml
   trunk/midcom/midcom_core/services/templating/midgard.php

Modified: trunk/midcom/midcom_core/configuration/defaults.yml
==============================================================================
--- trunk/midcom/midcom_core/configuration/defaults.yml	(original)
+++ trunk/midcom/midcom_core/configuration/defaults.yml	Sat Mar 21 10:37:17 2009
@@ -35,9 +35,8 @@
 uimessages_configuration:
     js:
         enable_comet: 'false'
-output_filters:
-#    net_protoblogr_filters: 
-#        tidy
+#output_filters:
+#    - net_protoblogr_filters: tidy
 routes:
     page_show:
         controller: midcom_core_controllers_page

Modified: trunk/midcom/midcom_core/services/templating/midgard.php
==============================================================================
--- trunk/midcom/midcom_core/services/templating/midgard.php	(original)
+++ trunk/midcom/midcom_core/services/templating/midgard.php	Sat Mar 21 10:37:17 2009
@@ -501,14 +501,17 @@
         $filters = $_MIDCOM->configuration->get('output_filters');
         if ($filters)
         {
-            foreach ($filters as $component => $filter)
+            foreach ($filters as $filter)
             {
-                $instance = $_MIDCOM->componentloader->load($component);
-                if (!$instance)
+                foreach ($filter as $component => $method)
                 {
-                    continue;
+                    $instance = $_MIDCOM->componentloader->load($component);
+                    if (!$instance)
+                    {
+                        continue;
+                    }
+                    $content = $instance->$method($content);
                 }
-                $content = $instance->$filter($content);
             }
         }
 


More information about the midcom-commits mailing list