| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2003-04-20 21:18:26 +00:00
										 |  |  | /** | 
					
						
							| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  |  * Smarty plugin | 
					
						
							| 
									
										
										
										
											2003-04-20 21:18:26 +00:00
										 |  |  |  * @package Smarty | 
					
						
							|  |  |  |  * @subpackage plugins | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * Smarty {assign_debug_info} function plugin | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Type:     function<br> | 
					
						
							|  |  |  |  * Name:     assign_debug_info<br> | 
					
						
							|  |  |  |  * Purpose:  assign debug info to the template<br> | 
					
						
							| 
									
										
										
										
											2005-10-11 16:22:56 +00:00
										 |  |  |  * @author Monte Ohrt <monte at ohrt dot com> | 
					
						
							| 
									
										
										
										
											2003-04-20 21:18:26 +00:00
										 |  |  |  * @param array unused in this plugin, this plugin uses {@link Smarty::$_config}, | 
					
						
							|  |  |  |  *              {@link Smarty::$_tpl_vars} and {@link Smarty::$_smarty_debug_info} | 
					
						
							|  |  |  |  * @param Smarty | 
					
						
							| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2002-02-20 22:24:32 +00:00
										 |  |  | function smarty_function_assign_debug_info($params, &$smarty) | 
					
						
							| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2002-02-20 22:24:32 +00:00
										 |  |  |     $assigned_vars = $smarty->_tpl_vars; | 
					
						
							| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  |     ksort($assigned_vars); | 
					
						
							| 
									
										
										
										
											2002-06-24 20:22:15 +00:00
										 |  |  |     if (@is_array($smarty->_config[0])) { | 
					
						
							| 
									
										
										
										
											2002-02-20 22:24:32 +00:00
										 |  |  |         $config_vars = $smarty->_config[0]; | 
					
						
							| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  |         ksort($config_vars); | 
					
						
							| 
									
										
										
										
											2002-02-20 22:24:32 +00:00
										 |  |  |         $smarty->assign("_debug_config_keys", array_keys($config_vars)); | 
					
						
							|  |  |  |         $smarty->assign("_debug_config_vals", array_values($config_vars)); | 
					
						
							| 
									
										
										
										
											2004-04-07 19:58:54 +00:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  |      | 
					
						
							| 
									
										
										
										
											2002-02-20 22:24:32 +00:00
										 |  |  |     $included_templates = $smarty->_smarty_debug_info; | 
					
						
							| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  |      | 
					
						
							| 
									
										
										
										
											2002-02-20 22:24:32 +00:00
										 |  |  |     $smarty->assign("_debug_keys", array_keys($assigned_vars)); | 
					
						
							|  |  |  |     $smarty->assign("_debug_vals", array_values($assigned_vars)); | 
					
						
							| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  |      | 
					
						
							| 
									
										
										
										
											2002-02-20 22:24:32 +00:00
										 |  |  |     $smarty->assign("_debug_tpls", $included_templates); | 
					
						
							| 
									
										
										
										
											2002-01-31 20:49:40 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* vim: set expandtab: */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ?>
 |