Take the 2008 Git User's Survey and help out! [ hide ]

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 assign parameter from the header tag.  It can't work anymore 
because of the post processing.
Fixed the showtemplate handling for modules
Removed some annoying debug messages

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


git-svn-id: http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk@4381 
3d254a34-79dc-0310-9e5f-be208747d8a0
tedkulp (author)
Sat Mar 08 14:28:50 -0800 2008
commit  b30dc3d753d3b85bd6ad0d8948a64ab9c2ae23bc
tree    18acd13b6cb682d64fb06694462506652cc92be2
parent  33bca6f98dfd0ef6901f6a2c8f0b725c6a288528
...
187
188
189
190
191
 
 
192
193
194
 
195
196
197
...
187
188
189
 
 
190
191
192
193
 
194
195
196
197
0
@@ -187,11 +187,11 @@ echo "<!-- CMS Made Simple - Released under the GPL - http://cmsmadesimple.org -
0
 
0
 //var_dump(CmsLogin::get_current_user());
0
 
0
-#if (CmsConfig::get('debug'))
0
-#{
0
+if (CmsConfig::get('debug'))
0
+{
0
   echo "<p>Generated in ".$endtime." seconds by CMS Made Simple using ".CmsDatabase::query_count()." SQL queries and " . $memory . " bytes of memory</p>";
0
   echo CmsProfiler::get_instance()->report();
0
-#}
0
+}
0
 
0
 if (get_site_preference('enablesitedownmessage') == "1" || $config['debug'] == true)
0
 {
...
92
93
94
 
 
95
96
97
 
98
99
100
101
102
103
104
 
 
105
106
107
...
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
 
128
129
130
...
92
93
94
95
96
97
98
 
99
100
101
102
103
104
 
 
105
106
107
108
109
...
115
116
117
 
 
 
 
 
 
 
 
 
 
 
 
118
119
120
121
0
@@ -92,16 +92,18 @@ class CmsPageInfo extends CmsObject
0
     
0
     $gCms = cmsms();
0
     $smarty = cms_smarty();
0
+
0
+ $id = CmsRequest::get_id_from_request();
0
 
0
     #If this is a case where a module doesn't want a template to be shown, just disable caching
0
- if (isset($smarty->id) && $smarty->id != '' && isset($_REQUEST[$smarty->id.'showtemplate']) && $_REQUEST[$smarty->id.'showtemplate'] == 'false')
0
+ if (isset($id) && $id != '' && isset($_REQUEST[$id.'showtemplate']) && ($_REQUEST[$id.'showtemplate'] == 'false' || $_REQUEST[$id.'showtemplate'] == false))
0
     {
0
       $html = $smarty->fetch('template:notemplate') . "\n";
0
     }
0
     else
0
     {
0
- $smarty->caching = false;
0
- $smarty->compile_check = true;
0
+ //$smarty->caching = false;
0
+ //$smarty->compile_check = true;
0
       ($smarty->is_cached('template:'.$this->template_id)?$cached="":$cached="not ");
0
       // Added HTTP_HOST here to work with multisites - SK
0
       $html = $smarty->fetch('template:'.$this->template_id.$_SERVER['HTTP_HOST']) . "\n";
0
@@ -113,18 +115,7 @@ class CmsPageInfo extends CmsObject
0
 
0
     if (!$cached)
0
     {
0
- #Perform the content postrendernoncached callback
0
- reset($gCms->modules);
0
- while (list($key) = each($gCms->modules))
0
- {
0
- $value =& $gCms->modules[$key];
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- {
0
- $gCms->modules[$key]['object']->ContentPostRenderNonCached($html);
0
- }
0
- }
0
- //CmsEvents::send_event('Core', 'ContentPostRenderNonCached', array(&$html));
0
+ CmsEvents::send_event('Core', 'ContentPostRenderNonCached', array(&$html));
0
     }
0
 
0
     CmsEvents::send_event('Core', 'ContentPostRender', array('content' => &$html));
...
44
45
46
47
48
49
50
...
44
45
46
 
47
48
49
0
@@ -44,7 +44,6 @@ function smarty_cms_help_function_header() {
0
     <li><em>(optional)</em>name - Instead of getting all stylesheets for the given page, it will only get one spefically named one, whether it's attached to the current template or not.</li>
0
     <li><em>(optional)</em>media - If name is defined, this allows you set a different media type for that stylesheet.</li>
0
     <li><em>(optional)</em>showbase (true/false) - If set to false, the base tag will not be sent to the browser. Defaults to true.</li>
0
- <li><em>(optional)</em>assign - Assign the output to a smarty variable named in assign instead of outputting it directly.</li>
0
   </ul>
0
   <?php
0
 }
...
154
155
156
157
158
159
160
161
162
163
164
 
165
166
167
...
154
155
156
 
 
 
 
 
 
 
 
157
158
159
160
0
@@ -154,14 +154,7 @@ function cms_header_filter_plugin_function($params, &$smarty)
0
   
0
   CmsEventOperations::send_event('Core', 'HeaderTagRender', array('content' => &$result));
0
   
0
- if (array_key_exists('assign', $params))
0
- {
0
- $smarty->assign($params['assign'], $result);
0
- }
0
- else
0
- {
0
- return $result;
0
- }
0
+ return $result;
0
 }
0
 
0
 # vim:ts=4 sw=4 noet

Comments

    No one has commented yet.