Projekt

Allgemein

Profil

GX-Bug #53440 » GXModulesSmartyPluginsFix.patch

Till Tepelmann, 25.09.2017 19:06

Unterschiede anzeigen:

src/system/core/ContentView.inc.php (revision )
99 99
			{
100 100
				$pluginPaths = [];
101 101
				
102
				if(is_dir(DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/smarty'))
103
				{
104
					$pluginPaths[] = DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/smarty';
105
				}
106
				
107 102
				$gxModuleFiles = GXModulesCache::getFiles();
108 103
				
109 104
				foreach($gxModuleFiles as $file)
......
115 110
						$pluginPaths[] = substr($file, 0, $strpos + strlen('/SmartyPlugins'));
116 111
					}
117 112
				}
118
				
113

  
114
				if(is_dir(DIR_FS_CATALOG . 'GXMainComponents/SmartyPlugins'))
115
				{
116
					$pluginPaths[] = DIR_FS_CATALOG . 'GXMainComponents/SmartyPlugins';
117
				}
118

  
119
				if(is_dir(DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/smarty'))
120
				{
121
					$pluginPaths[] = DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/smarty';
122
				}
123
				
119 124
				$pluginPaths = array_unique($pluginPaths);
120 125
				
121 126
				$dataCache->set_data('smarty_plugin_paths_' . CURRENT_TEMPLATE, $pluginPaths, true);
......
433 438
			
434 439
			foreach($gxModulesFiles as $file)
435 440
			{
436
				if($t_full_template_path !== $file && stripos($file, $templatePath) !== false)
441
				if($t_full_template_path !== $file && stripos($file, $templatePath) !== false || stripos($file,$t_template_file) !== false)
437 442
				{
438 443
					$extenderTemplateFiles[] = $file;
439 444
				}
......
449 454
			
450 455
			if(count($extenderTemplateFiles))
451 456
			{
457
				if(file_exists($t_full_template_path))
458
				{
459

  
452
				array_unshift($extenderTemplateFiles, $t_full_template_path);
460
					array_unshift($extenderTemplateFiles, $t_full_template_path);
461
				}
462

  
453 463
				$t_html_output = $this->v_coo_smarty->fetch('extends:' . implode('|', $extenderTemplateFiles),
454 464
				                                            $t_cache_id);
455 465
			}
    (1-1/1)