File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
administrator/components/com_templates/src/Model Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,7 @@ public function getCoreFile($file, $client_id)
489489 $ componentPath = Path::clean ($ client ->path . '/components/ ' );
490490 $ modulePath = Path::clean ($ client ->path . '/modules/ ' );
491491 $ layoutPath = Path::clean (JPATH_ROOT . '/layouts/ ' );
492+ $ pluginPath = Path::clean (JPATH_ROOT . '/plugins/ ' );
492493
493494 // For modules
494495 if (stristr ($ type , 'mod_ ' ) !== false ) {
@@ -500,6 +501,18 @@ public function getCoreFile($file, $client_id)
500501 return $ coreFile ;
501502 }
502503
504+ // For plugins
505+ if (stristr ($ type , 'plg_ ' ) !== false ) {
506+ $ pluginFolder = explode ('_ ' , $ explodeArray ['2 ' ]);
507+ $ folder = $ pluginFolder ['1 ' ];
508+ $ subFolder = $ pluginFolder ['2 ' ];
509+ $ htmlPath = Path::clean ($ pluginPath . $ folder . '/ ' . $ subFolder . '/tmpl/ ' );
510+ $ fileName = $ this ->getSafeName ($ fileName );
511+ $ coreFile = Path::find ($ htmlPath , $ fileName );
512+
513+ return $ coreFile ;
514+ }
515+
503516 if (stristr ($ type , 'com_ ' ) !== false ) {
504517 // For components
505518 $ folder = $ explodeArray ['2 ' ];
You can’t perform that action at this time.
0 commit comments