mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2025-02-05 11:18:24 +00:00
Merge PR #85 into development
This commit is contained in:
commit
8b5bcebf1b
@ -112,7 +112,7 @@ class JedcheckerControllerPolice extends JControllerLegacy
|
||||
|
||||
if (JFile::exists($local))
|
||||
{
|
||||
$content = JFile::read($local);
|
||||
$content = file_get_contents($local);
|
||||
|
||||
if (!empty($content))
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ class JedcheckerRulesXMLinfo extends JEDcheckerRule
|
||||
*/
|
||||
protected function find($file, $isTopLevel)
|
||||
{
|
||||
$xml = JFactory::getXml($file);
|
||||
$xml = simplexml_load_file($file);
|
||||
|
||||
// Failed to parse the xml file.
|
||||
// Assume that this is not a extension manifest
|
||||
|
@ -72,7 +72,7 @@ class JedcheckerRulesXMLlicense extends JEDcheckerRule
|
||||
*/
|
||||
protected function find($file)
|
||||
{
|
||||
$xml = JFactory::getXml($file);
|
||||
$xml = simplexml_load_file($file);
|
||||
|
||||
// Failed to parse the xml file.
|
||||
// Assume that this is not a extension manifest
|
||||
|
@ -79,7 +79,7 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
|
||||
foreach ($files as $file)
|
||||
{
|
||||
$xml = JFactory::getXml($file);
|
||||
$xml = simplexml_load_file($file);
|
||||
|
||||
// Check if this is an XML and an extension manifest
|
||||
if ($xml && ($xml->getName() == 'install' || $xml->getName() == 'extension'))
|
||||
@ -116,7 +116,7 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
|
||||
foreach ($files as $file)
|
||||
{
|
||||
$xml = JFactory::getXml($file);
|
||||
$xml = simplexml_load_file($file);
|
||||
|
||||
// Check if this is an XML and an extension manifest
|
||||
if ($xml && ($xml->getName() == 'install' || $xml->getName() == 'extension'))
|
||||
@ -174,7 +174,7 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
*/
|
||||
protected function find($file)
|
||||
{
|
||||
$xml = JFactory::getXml($file);
|
||||
$xml = simplexml_load_file($file);
|
||||
|
||||
// Failed to parse the xml file.
|
||||
// Assume that this is not a extension manifest
|
||||
|
@ -34,7 +34,8 @@ class Com_JedcheckerInstallerScript
|
||||
{
|
||||
$this->loadLanguage();
|
||||
|
||||
Jerror::raiseWarning(null, JText::sprintf('COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE', PHP_VERSION, '5.3.10'));
|
||||
$msg = JText::sprintf('COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE', PHP_VERSION, '5.3.10');
|
||||
echo "<p>$msg</p>";
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -11,28 +11,38 @@
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::_('behavior.framework', true);
|
||||
JHtml::stylesheet('media/com_jedchecker/css/style.min.css');
|
||||
?>
|
||||
|
||||
<script>
|
||||
function add_validation() {
|
||||
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
||||
var forms = document.getElementsByClassName('needs-validation');
|
||||
// Loop over them and prevent submission
|
||||
var validation = Array.prototype.filter.call(forms, function(form) {
|
||||
form.addEventListener('submit', function(event) {
|
||||
if (form.checkValidity() === false) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
form.classList.add('was-validated');
|
||||
}, false);
|
||||
});
|
||||
if (version_compare(JVERSION, '3.3.0', '>='))
|
||||
{
|
||||
JHtml::_('behavior.core');
|
||||
}
|
||||
else
|
||||
{
|
||||
JHtml::_('behavior.framework', true);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
// Load jQuery
|
||||
JHtml::_('jquery.framework');
|
||||
|
||||
JHtml::stylesheet('media/com_jedchecker/css/style.min.css');
|
||||
|
||||
$document = JFactory::getDocument();
|
||||
|
||||
$options = json_encode($this->jsOptions);
|
||||
$document->addScriptDeclaration(<<<END
|
||||
function add_validation() {
|
||||
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
||||
var forms = document.getElementsByClassName('needs-validation');
|
||||
// Loop over them and prevent submission
|
||||
var validation = Array.prototype.filter.call(forms, function(form) {
|
||||
form.addEventListener('submit', function(event) {
|
||||
if (form.checkValidity() === false) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
form.classList.add('was-validated');
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
function check(url,rule) {
|
||||
jQuery.ajax({
|
||||
@ -45,7 +55,7 @@ function add_validation() {
|
||||
}
|
||||
|
||||
Joomla.submitbutton = function (task) {
|
||||
var options = <?php echo json_encode($this->jsOptions); ?>;
|
||||
var options = $options;
|
||||
|
||||
if (task == 'check') {
|
||||
jQuery("#police-check-result").empty();
|
||||
@ -60,9 +70,10 @@ function add_validation() {
|
||||
Joomla.submitform(task);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
if ( version_compare(JVERSION, '3.20', 'lt') ) {
|
||||
END
|
||||
);
|
||||
|
||||
if ( version_compare(JVERSION, '3.20', '<') || version_compare(JVERSION, '4.0', '>=') ) {
|
||||
?>
|
||||
<!-- Styling of Bootstrap 4 core CSS-->
|
||||
<link href="<?php echo JURI::root(); ?>media/com_jedchecker/css/j3-style.min.css" rel="stylesheet">
|
||||
@ -114,7 +125,7 @@ function add_validation() {
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><?php echo JText::_('COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT'); ?></h5>
|
||||
<p class="card-text">
|
||||
<a href="https://github.com/joomla-extensions/jedchecker/graphs/contributors" target="_blank" class="btn">
|
||||
<a href="https://github.com/joomla-extensions/jedchecker/graphs/contributors" target="_blank" class="btn btn-light">
|
||||
<?php echo JText::_('COM_JEDCHECKER_CONTRIBUTORS'); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user