Skip to content
This repository was archived by the owner on Sep 17, 2018. It is now read-only.

Commit d647097

Browse files
astridxlaoneo
authored andcommitted
Correcthtmlpath (#27)
* correction * change oldhtml to newhtml
1 parent c76acf8 commit d647097

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

administrator/components/com_templates/Model/TemplateModel.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,14 @@ public function getCoreFile($file, $client_id)
366366
$subFolder = $explodeArray['3'];
367367
$fileName = $this->getSafeName($fileName);
368368

369-
// The old scheme, if a view has a tmpl folder
370-
$oldHtmlPath = Path::clean($componentPath . $folder . '/views/' . $subFolder . '/tmpl/');
369+
// The new scheme, if a view has a tmpl folder
370+
$newHtmlPath = Path::clean($componentPath . $folder . '/tmpl/' . $subFolder . '/');
371371

372-
if (!$coreFile = Path::find($oldHtmlPath, $fileName))
372+
if (!$coreFile = Path::find($newHtmlPath, $fileName))
373373
{
374-
// The new scheme, the views are directly in the component/tmpl folder
375-
$newHtmlPath = Path::clean($componentPath . $folder . '/tmpl/' . $subFolder . '/');
376-
$coreFile = Path::find($newHtmlPath, $fileName);
374+
// The old scheme, the views are directly in the component/tmpl folder
375+
$oldHtmlPath = Path::clean($componentPath . $folder . '/views/' . $subFolder . '/tmpl/');
376+
$coreFile = Path::find($oldHtmlPath, $fileName);
377377

378378
return $coreFile;
379379
}

0 commit comments

Comments
 (0)