public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
Search Repo:
Removed the old style module callbacks from the plugins directory

Signed-off-by: Ted Kulp <ted@cmsmadesimple.org>


git-svn-id: http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk@4334 
3d254a34-79dc-0310-9e5f-be208747d8a0
tedkulp (author)
Mon Feb 04 11:53:07 -0800 2008
commit  82618e1555d273d4933d11cafa88cdae5b7e1b03
tree    17f604d8211adb4ca239665b36829adc2b5511a2
parent  0c2fd695557f2959938ee4229e4df67c82582a7c
...
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
 
41
 
42
43
44
45
46
47
48
49
50
51
52
53
54
 
55
56
57
58
59
60
61
62
63
64
65
66
67
 
 
 
68
 
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 
85
86
87
...
25
26
27
 
 
 
 
 
 
 
 
 
 
 
 
 
28
29
30
31
32
 
 
 
 
 
 
 
 
 
 
 
 
33
34
 
 
 
 
 
 
 
 
 
 
 
 
35
36
37
38
39
40
41
42
43
44
 
 
 
 
 
 
 
 
 
45
 
46
47
48
49
0
@@ -25,63 +25,25 @@ function smarty_cms_postfilter_postcompilefunc($tpl_output, &$smarty)
0
   {
0
     switch ($result[0])
0
     {
0
- case "content":
0
- #Perform the content prerender callback
0
- foreach($gCms->modules as $key=>$value)
0
- {
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- {
0
- $gCms->modules[$key]['object']->ContentPostCompile($tpl_output);
0
- }
0
- }
0
-
0
- CmsEvents::SendEvent('Core', 'ContentPostCompile', array('content' => &$tpl_output));
0
-
0
+ case "content":
0
+ CmsEvents::send_event('Core', 'ContentPostCompile', array('content' => &$tpl_output));
0
         break;
0
+
0
       case "template":
0
- #Perform the content prerender callback
0
- foreach($gCms->modules as $key=>$value)
0
- {
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- {
0
- $gCms->modules[$key]['object']->TemplatePostCompile($tpl_output);
0
- }
0
- }
0
-
0
- CmsEvents::SendEvent('Core', 'TemplatePostCompile', array('template' => &$tpl_output));
0
-
0
+ CmsEvents::send_event('Core', 'TemplatePostCompile', array('template' => &$tpl_output));
0
         break;
0
- case "globalcontent":
0
- foreach($gCms->modules as $key=>$value)
0
- {
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- {
0
- $gCms->modules[$key]['object']->GlobalContentPostCompile($tpl_output);
0
- }
0
- }
0
-
0
- CmsEvents::SendEvent('Core', 'GlobalContentPostCompile', array('global_content' => &$tpl_output));
0
-
0
+
0
+ case "globalcontent":
0
+ CmsEvents::send_event('Core', 'GlobalContentPostCompile', array('global_content' => &$tpl_output));
0
         break;
0
+
0
       default:
0
         break;
0
     }
0
 
0
   }
0
-
0
- foreach($gCms->modules as $key=>$value)
0
- {
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- {
0
- $gCms->modules[$key]['object']->SmartyPostCompile($tpl_output);
0
- }
0
- }
0
   
0
- CmsEvents::SendEvent('Core', 'SmartyPostCompile', array('content' => &$tpl_output));
0
+ CmsEvents::send_event('Core', 'SmartyPostCompile', array('content' => &$tpl_output));
0
 
0
   return $tpl_output;
0
 }
...
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
40
41
42
43
44
45
46
47
48
49
50
51
52
 
 
 
53
54
55
56
57
58
59
60
61
62
63
64
65
 
 
 
66
 
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
 
83
84
85
...
26
27
28
 
 
 
 
 
 
 
 
 
 
 
29
30
 
 
 
 
 
 
 
 
 
 
 
 
31
32
33
34
 
 
 
 
 
 
 
 
 
 
 
 
35
36
37
38
39
40
41
42
43
44
 
 
 
 
 
 
 
 
 
45
 
46
47
48
49
0
@@ -26,60 +26,24 @@ function smarty_cms_prefilter_precompilefunc($tpl_output, &$smarty)
0
     switch ($result[0])
0
     {
0
       case "content":
0
- foreach($gCms->modules as $key=>$value)
0
- {
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- {
0
- $gCms->modules[$key]['object']->ContentPreCompile($tpl_output);
0
- }
0
- }
0
-
0
- CmsEvents::SendEvent('Core', 'ContentPreCompile', array('content' => &$tpl_output));
0
-
0
+ CmsEvents::send_event('Core', 'ContentPreCompile', array('content' => &$tpl_output));
0
         break;
0
- case "template":
0
- foreach($gCms->modules as $key=>$value)
0
- {
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- {
0
- $gCms->modules[$key]['object']->TemplatePreCompile($tpl_output);
0
- }
0
- }
0
-
0
- CmsEvents::SendEvent('Core', 'TemplatePreCompile', array('template' => &$tpl_output));
0
-
0
+
0
+ case "template":
0
+ CmsEvents::send_event('Core', 'TemplatePreCompile', array('template' => &$tpl_output));
0
         break;
0
- case "globalcontent":
0
- foreach($gCms->modules as $key=>$value)
0
- {
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- {
0
- $gCms->modules[$key]['object']->GlobalContentPreCompile($tpl_output);
0
- }
0
- }
0
-
0
- CmsEvents::SendEvent('Core', 'GlobalContentPreCompile', array('global_content' => &$tpl_output));
0
-
0
+
0
+ case "globalcontent":
0
+ CmsEvents::send_event('Core', 'GlobalContentPreCompile', array('global_content' => &$tpl_output));
0
         break;
0
+
0
       default:
0
         break;
0
     }
0
 
0
   }
0
-
0
- foreach($gCms->modules as $key=>$value)
0
- {
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- {
0
- $gCms->modules[$key]['object']->SmartyPreCompile($tpl_output);
0
- }
0
- }
0
   
0
- CmsEvents::SendEvent('Core', 'SmartyPreCompile', array('content' => &$tpl_output));
0
+ CmsEvents::send_event('Core', 'SmartyPreCompile', array('content' => &$tpl_output));
0
 
0
   return $tpl_output;
0
 }

Comments

    No one has commented yet.