File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -774,10 +774,15 @@ protected function _fetchTemplate($params = [])
774774 $ lang = CmsFactory::getLanguage ();
775775
776776 // 1.5 or core then 1.6
777- $ lang ->load ('tpl_ ' . $ template , JPATH_BASE )
778- || ($ inherits !== '' && $ lang ->load ('tpl_ ' . $ inherits , JPATH_BASE ))
779- || $ lang ->load ('tpl_ ' . $ template , $ directory . '/ ' . $ template )
780- || ($ inherits !== '' && $ lang ->load ('tpl_ ' . $ inherits , $ directory . '/ ' . $ inherits ));
777+ if (!$ inherits ) {
778+ $ lang ->load ('tpl_ ' . $ template , JPATH_BASE )
779+ || $ lang ->load ('tpl_ ' . $ template , $ directory . '/ ' . $ template );
780+ } else {
781+ $ lang ->load ('tpl_ ' . $ template , JPATH_BASE )
782+ || $ lang ->load ('tpl_ ' . $ template , $ directory . '/ ' . $ template );
783+ $ lang ->load ('tpl_ ' . $ inherits , $ directory . '/ ' . $ inherits )
784+ || $ lang ->load ('tpl_ ' . $ inherits , JPATH_BASE );
785+ }
781786
782787 // Assign the variables
783788 $ this ->baseurl = Uri::base (true );
Original file line number Diff line number Diff line change @@ -376,9 +376,15 @@ public function loadTemplate($tpl = null)
376376 $ lang = Factory::getApplication ()->getLanguage ();
377377 }
378378
379- $ lang ->load ('tpl_ ' . $ template ->template , JPATH_BASE )
380- || $ lang ->load ('tpl_ ' . $ template ->parent , JPATH_THEMES . '/ ' . $ template ->parent )
381- || $ lang ->load ('tpl_ ' . $ template ->template , JPATH_THEMES . '/ ' . $ template ->template );
379+ if (!$ template ->parent ) {
380+ $ lang ->load ('tpl_ ' . $ template ->template , JPATH_BASE )
381+ || $ lang ->load ('tpl_ ' . $ template ->template , JPATH_THEMES . '/ ' . $ template ->template );
382+ } else {
383+ $ lang ->load ('tpl_ ' . $ template ->template , JPATH_BASE )
384+ || $ lang ->load ('tpl_ ' . $ template ->template , JPATH_THEMES . '/ ' . $ template ->template );
385+ $ lang ->load ('tpl_ ' . $ template ->parent , JPATH_THEMES . '/ ' . $ template ->parent )
386+ || $ lang ->load ('tpl_ ' . $ template ->parent , JPATH_BASE );
387+ }
382388
383389 // Change the template folder if alternative layout is in different template
384390 if (isset ($ layoutTemplate ) && $ layoutTemplate !== '_ ' && $ layoutTemplate != $ template ->template ) {
You can’t perform that action at this time.
0 commit comments