Skip to content

Commit

Permalink
Merge pull request #20 from zero-24/patch-6
Browse files Browse the repository at this point in the history
make travis happy for #10186
  • Loading branch information
brianteeman committed May 2, 2016
2 parents 29c4c52 + c85fc98 commit b4566f7
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions administrator/components/com_templates/models/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ public function getDirectoryTree($dir)
}
else
{
$ext = pathinfo($dir . $value, PATHINFO_EXTENSION);
$ext = pathinfo($dir . $value, PATHINFO_EXTENSION);
$allowedFormat = $this->checkFormat($ext);

if ($allowedFormat == true)
{
$relativePath = str_replace($this->element, '', $dir);
Expand Down Expand Up @@ -516,7 +517,7 @@ public function save($data)

return false;
}

// Get the extension of the changed file.
$explodeArray = explode('.', $fileName);
$ext = end($explodeArray);
Expand Down Expand Up @@ -853,14 +854,14 @@ public function createFile($name, $type, $location)
return false;
}
// Check if the format is allowed and will be showed in the backend
$check = $this->checkFormat($type);
// Add a message if we are not allowed to show this file in the backend.
if (!$check)
{
$app->enqueueMessage(JText::sprintf('COM_TEMPLATES_WARNING_FORMAT_WILL_NOT_BE_VISIBLE', $type), 'warning');
}
$check = $this->checkFormat($type);

// Add a message if we are not allowed to show this file in the backend.
if (!$check)
{
$app->enqueueMessage(JText::sprintf('COM_TEMPLATES_WARNING_FORMAT_WILL_NOT_BE_VISIBLE', $type), 'warning');
}

return true;
}
}
Expand Down Expand Up @@ -1388,6 +1389,7 @@ public function extractArchive($file)
}
}
}

/**
* Check if the extension is allowed and will be shown in the template manager
*
Expand Down

0 comments on commit b4566f7

Please sign in to comment.