mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2024-11-27 07:16:39 +00:00
2.1.0
This commit is contained in:
parent
ce7ea93df7
commit
b34cb440a4
@ -1,5 +1,13 @@
|
||||
<?php defined('_JEXEC') or die(); ?>
|
||||
|
||||
=====================================================================
|
||||
JED Checker 2.1.0 - Released 9-March-2019
|
||||
=====================================================================
|
||||
+ Compatibility with Joomla 4
|
||||
+ Rule INFO_XML
|
||||
+ Update Server Requirement
|
||||
~ Copyright updated to Joomla! / OSM
|
||||
|
||||
=====================================================================
|
||||
JED Checker 2.0 - Released 2-April-2017
|
||||
=====================================================================
|
||||
|
18
README.md
18
README.md
@ -1,5 +1,4 @@
|
||||
JED Checker
|
||||
==========
|
||||
# JED Checker
|
||||
|
||||
This extension is able to check your components, modules or plugins for common errors that will prevent you
|
||||
from publishing your extension on the JED (Joomla! Extensions Directory).
|
||||
@ -7,10 +6,12 @@ from publishing your extension on the JED (Joomla! Extensions Directory).
|
||||
If you are a developer and want to contribute to this extension you can fork this repo.
|
||||
|
||||
## Uploading your package
|
||||
|
||||
After installing this extension in your Joomla! backend, you can use it by uploading a Joomla! extension-package using
|
||||
the upload-button. Once uploaded, the contents of the package (your files) will be checked against JED-rules.
|
||||
|
||||
## Adding rules
|
||||
|
||||
If you want to write a rule have a look a the `administrator/components/com_jedchecker/library/rules` folder.
|
||||
|
||||
You just need to add a new file with your rule, for example `yourrule.php`.
|
||||
@ -23,25 +24,24 @@ If you are going to contribute your rule to the project, then make sure that it
|
||||
and that it passes the code sniffer: http://docs.joomla.org/Joomla_CodeSniffer
|
||||
|
||||
## Checking on existing files and folders
|
||||
|
||||
The extension also supports a scan of a pre-defined set of existing files and folders.
|
||||
For this to work, add a list of folders to a textfile `tmp/jed_checker/local.txt`.
|
||||
There should be a folder on each line.
|
||||
There should be a folder on each line.
|
||||
Once the file exists, a "Check" button becomes visible in the jedchecker-toolbar. Just hit it.
|
||||
|
||||
Example `tmp/jed_checker/local.txt` file:
|
||||
|
||||
components/com_weblinks
|
||||
administrator/components/com_weblinks
|
||||
components/com_jedchecker
|
||||
administrator/components/com_jedchecker
|
||||
plugins/system
|
||||
|
||||
|
||||
## COPYRIGHT AND DISCLAIMER
|
||||
Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
|
||||
|
||||
Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
This extension was previously maintained by Compojoom.
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 26.10.15
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2008 - 2015 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die ('Restricted access');
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 26.10.15
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2008 - 2015 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
@ -28,7 +27,7 @@ class JedcheckerControllerPolice extends JControllerLegacy
|
||||
*/
|
||||
public function check()
|
||||
{
|
||||
$rule = JRequest::getString('rule');
|
||||
$rule = JFactory::getApplication()->input->get('rule', null);
|
||||
|
||||
JLoader::discover('jedcheckerRules', JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules/');
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 26.10.15
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2008 - 2015 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
@ -13,6 +12,8 @@ jimport('joomla.filesystem');
|
||||
jimport('joomla.filesystem.folder');
|
||||
jimport('joomla.filesystem.archive');
|
||||
|
||||
use Joomla\Archive\Archive;
|
||||
|
||||
/**
|
||||
* Class JedcheckerControllerUploads
|
||||
*
|
||||
@ -20,6 +21,11 @@ jimport('joomla.filesystem.archive');
|
||||
*/
|
||||
class JedcheckerControllerUploads extends JControllerlegacy
|
||||
{
|
||||
|
||||
var $path = null;
|
||||
var $pathArchive = null;
|
||||
var $pathUnzipped = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
@ -41,14 +47,14 @@ class JedcheckerControllerUploads extends JControllerlegacy
|
||||
{
|
||||
$appl = JFactory::getApplication();
|
||||
$input = JFactory::getApplication()->input;
|
||||
|
||||
|
||||
// Check the sent token by the form
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Gets the uploaded file from the sent form
|
||||
$file = $input->files->get('extension', null, 'raw');
|
||||
|
||||
if ($file['tmp_name'])
|
||||
if ( $file['tmp_name'] )
|
||||
{
|
||||
$path = $this->pathArchive;
|
||||
|
||||
@ -83,14 +89,21 @@ class JedcheckerControllerUploads extends JControllerlegacy
|
||||
{
|
||||
// Error in upload - redirect back with an error notice
|
||||
JFactory::getApplication()->enqueueMessage(JText::_('COM_JEDCHECKER_ERROR_UNABLE_TO_UPLOAD_FILE'), 'error');
|
||||
$this->setRedirect('index.php?option=com_jedchecker&view=uploads');
|
||||
$appl->redirect('index.php?option=com_jedchecker&view=uploads');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$appl->redirect('index.php?option=com_jedchecker&view=uploads', JText::_('COM_JEDCHECKER_UPLOAD_WAS_SUCCESSFUL'));
|
||||
// Unzip uploaded files
|
||||
$unzip_result = $this->unzip();
|
||||
|
||||
$this->setRedirect( 'index.php?option=com_jedchecker&view=uploads' );
|
||||
|
||||
|
||||
return true;
|
||||
} else {
|
||||
|
||||
$this->setRedirect('index.php?option=com_jedchecker&view=uploads');
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -104,7 +117,7 @@ class JedcheckerControllerUploads extends JControllerlegacy
|
||||
public function unzip()
|
||||
{
|
||||
$appl = JFactory::getApplication();
|
||||
|
||||
|
||||
// Form check token
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
@ -125,22 +138,36 @@ class JedcheckerControllerUploads extends JControllerlegacy
|
||||
}
|
||||
|
||||
$file = JFolder::files($this->pathArchive);
|
||||
$result = JArchive::extract($this->pathArchive . '/' . $file[0], $this->pathUnzipped . '/' . $file[0]);
|
||||
|
||||
$origin = $this->pathArchive . DIRECTORY_SEPARATOR . $file[0];
|
||||
$destination = $this->pathUnzipped . DIRECTORY_SEPARATOR . $file[0];
|
||||
|
||||
try
|
||||
{
|
||||
$archive = new Archive;
|
||||
$result = $archive->extract($origin, $destination);
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
|
||||
if ($result)
|
||||
{
|
||||
// Scan unzipped folders if we find zip file -> unzip them as well
|
||||
$this->unzipAll($this->pathUnzipped . '/' . $file[0]);
|
||||
$message = 'COM_JEDCHECKER_UNZIP_SUCCESS';
|
||||
JFactory::getApplication()->enqueueMessage(JText::_($message));
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = 'COM_JEDCHECKER_UNZIP_FAILED';
|
||||
}
|
||||
|
||||
$appl->redirect('index.php?option=com_jedchecker&view=uploads', JText::_($message));
|
||||
//$appl->redirect('index.php?option=com_jedchecker&view=uploads', JText::_($message));
|
||||
$message = 'COM_JEDCHECKER_UNZIP_FAILED';
|
||||
|
||||
return $result;
|
||||
return $message;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -163,7 +190,15 @@ class JedcheckerControllerUploads extends JControllerlegacy
|
||||
if ($extension == 'zip')
|
||||
{
|
||||
$unzip = $file->getPath() . '/' . $file->getBasename('.' . $extension);
|
||||
$result = JArchive::extract($file->getPathname(), $unzip);
|
||||
try
|
||||
{
|
||||
$archive = new Archive;
|
||||
$result = $archive->extract($file->getPathname(), $unzip);
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
|
||||
// Delete the archive once we extract it
|
||||
if ($result)
|
||||
@ -181,4 +216,28 @@ class JedcheckerControllerUploads extends JControllerlegacy
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* clear tmp folders
|
||||
*
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
if ( file_exists($this->path) )
|
||||
{
|
||||
$result = JFolder::delete($this->path);
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
echo 'could not delete ' . $this->path;
|
||||
$message = 'COM_JEDCHECKER_DELETE_FAILED';
|
||||
}
|
||||
|
||||
$message = 'COM_JEDCHECKER_DELETE_SUCCESS';
|
||||
|
||||
//JFactory::getApplication()->redirect('index.php?option=com_jedchecker&view=uploads', JText::_($message));
|
||||
$this->setRedirect( 'index.php?option=com_jedchecker&view=uploads' );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel Dimitrov - compojoom.com
|
||||
* @date : 02.06.12
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
jimport('joomla.application.component.controllerlegacy');
|
||||
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_jedchecker'))
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_jedchecker'))
|
||||
{
|
||||
throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
}
|
||||
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension method="upgrade" type="component" version="2.5.0">
|
||||
<name>COM_@@COMPONENTNAMEUPPERCASE@@</name>
|
||||
<author>Compojoom.com</author>
|
||||
<creationDate>@@DATE@@</creationDate>
|
||||
<copyright>(C) 2012 compojoom.com</copyright>
|
||||
<authorEmail>daniel@compojoom.com</authorEmail>
|
||||
<authorUrl>www.compojoom.com</authorUrl>
|
||||
<version>@@VERSION@@</version>
|
||||
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
|
||||
<description><![CDATA[Jedchecker will check your extension files and will let you know in advance if there are any possible problems with your extension for submitting to the JED]]>
|
||||
</description>
|
||||
<scriptfile>script.php</scriptfile>
|
||||
<administration>
|
||||
<menu>COM_@@COMPONENTNAMEUPPERCASE@@</menu>
|
||||
<files folder="administrator/components/com_@@COMPONENTNAME@@">
|
||||
##ADMINCOMPONENTPACKAGEFILES##
|
||||
</files>
|
||||
</administration>
|
||||
<media destination="com_@@COMPONENTNAME@@" folder="media/com_@@COMPONENTNAME@@">
|
||||
##MEDIAPACKAGEFILES##
|
||||
</media>
|
||||
<updateservers>
|
||||
<server type="extension" priority="1" name="JEDChecker Updates"><![CDATA[https://compojoom.com/index.php?option=com_ars&view=update&task=stream&format=xml&id=12&dummy=extension.xml]]></server>
|
||||
</updateservers>
|
||||
</extension>
|
@ -13,7 +13,8 @@ COM_JEDCHECKER_STEP1="Upload din komponent /plugin /modul zip-fil ved hjælp af
|
||||
COM_JEDCHECKER_STEP2="Klik på Unzip"
|
||||
COM_JEDCHECKER_STEP3="Klik på Kontroller og gennemgå resultaterne"
|
||||
COM_JEDCHECKER_WALL_OF_HONOR="Wall of Honour"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="Folk, der har hjulpet med udviklingen af denne komponent. (I nogen bestemt rækkefølge!)"
|
||||
COM_JEDCHECKER_CONTRIBUTORS="Contributors"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="Folk, der har hjulpet med udviklingen af denne komponent."
|
||||
COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="Sådan fortolke resultaterne"
|
||||
COM_JEDCHECKER_RULE_PH2="PHP filer mangler JEXEC sikkerhed"
|
||||
COM_JEDCHECKER_RULE_PH2_DESC="Alle PHP-filer i din udvidelse skal have en defined('_JEXEC') or die(); erklæring i begyndelsen af hver fil. Dette sikrer, at filen ikke kan åbnes uden for installation Joomla og øger sikkerheden for dit websted."
|
||||
|
@ -10,17 +10,17 @@ COM_JEDCHECKER_CONGRATS="Congratulations! If you use this component then you've
|
||||
COM_JEDCHECKER_CODE_STANDARDS="However, this is not the only goal. We also aim to have code standards checks, such as those that the JPlatform has. This would ensure that Joomla extension developers are aware of the JPlatform coding standards and this could raise the quality bar in our Joomla community even higher. For this we will need you - have a look at the <a href='%s' target='_blank'>Github project page</a>. Fork the component, add your code checks and send us your pull requests!"
|
||||
COM_JEDCHECKER_HOW_TO_USE="How to check your extension using the JED Checker:"
|
||||
COM_JEDCHECKER_STEP1="Upload your component/plugin/module zip file by using the upload form below"
|
||||
COM_JEDCHECKER_STEP2="Click on Unzip"
|
||||
COM_JEDCHECKER_STEP3="Click on Check and review the results"
|
||||
COM_JEDCHECKER_STEP2="Click on Check and review the results"
|
||||
COM_JEDCHECKER_WALL_OF_HONOR="Wall of Honour"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="People that have helped with the development of this component. (in no particular order!)"
|
||||
COM_JEDCHECKER_CONTRIBUTORS="Contributors"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="People that have helped with the development of this component."
|
||||
COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="How to Interpret the Results"
|
||||
COM_JEDCHECKER_RULE_PH2="PHP Files missing JEXEC security"
|
||||
COM_JEDCHECKER_RULE_PH2_DESC="All the PHP files in your extension needs to have a defined('_JEXEC') or die(); statement in the beginning of each file. This ensures that the file cannot be opened outside of the joomla installation and increases the security of your site."
|
||||
COM_JEDCHECKER_RULE_PH3="License tag missing or incorrect in XML install file"
|
||||
COM_JEDCHECKER_RULE_PH3_DESC="An install file should include the license information in a license-tag. The license must be GPL or GPL compatible."
|
||||
COM_JEDCHECKER_EVERYTHING_SEEMS_TO_BE_FINE_WITH_THAT_RULE="Congratulations, everything seems to be fine with that rule!"
|
||||
COM_JEDCHECKER_DEVELOPED_BY="JED Checker is primary developed by <a href='%s'>compojoom.com</a>"
|
||||
COM_JEDCHECKER_DEVELOPED_BY="JED Checker is a JED proyect."
|
||||
COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE="JED Checker is incompatible with the PHP version that you run on this site: %s. You would need at least PHP Version %s. Aborting installation"
|
||||
COM_JEDCHECKER_ERROR_HTML_INDEX_NOT_FOUND="Missing index.html in this directory."
|
||||
COM_JEDCHECKER_ERROR_JEXEC_NOT_FOUND="The JEXEC security check was not found in this file."
|
||||
@ -40,7 +40,7 @@ COM_JEDCHECKER_LEAVE_A_REVIEW_JED="If you use this component, please post a rati
|
||||
COM_JEDCHECKER_INFO="Info"
|
||||
COM_JEDCHECKER_INFO_XML="Information about extension xml files"
|
||||
COM_JEDCHECKER_INFO_XML_DESC="The install name of your extension must match your listing name on JED. We scan the xml files and find the value of the name tag. Useful information for the "filename and install as" fields in the jed submission form"
|
||||
COM_JEDCHECKER_INFO_XML_NAME_XML="The name tag in this file is: %s"
|
||||
COM_JEDCHECKER_INFO_XML_NAME_XML="The name tag in this file is: <b>%s</b>"
|
||||
COM_JEDCHECKER_INFO_XML_VERSION_XML="Version tag has the value: %s"
|
||||
COM_JEDCHECKER_INFO_XML_CREATIONDATE_XML="The creationDate tag has the value: %s"
|
||||
COM_JEDCHECKER_RULE_PH1="PHP Headers missing GPL License Notice"
|
||||
@ -75,3 +75,6 @@ COM_JEDCHECKER_RULE_US1_DESC="The use of Update Servers is now required by JED."
|
||||
COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_NOT_FOUND="Update Server tag missing or incorrect in this XML file"
|
||||
COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_LINK_NOT_FOUND="Update Server link not found in this XML file"
|
||||
COM_JEDCHECKER_INFO_XML_UPDATE_SERVER_LINK="The Update Server link in this XML file is: %s"
|
||||
COM_JEDCHECKER_DELETE_FAILED="Can't delete temporary folder"
|
||||
COM_JEDCHECKER_DELETE_SUCCESS="Temporary folder deleted!"
|
||||
COM_JEDCHECKER_EMPTY_UPLOAD_FIELD="Please, select a zipped file to be uploaded"
|
@ -13,7 +13,8 @@ COM_JEDCHECKER_STEP1="Cargue su archivo zip componente / plugin / módulo usando
|
||||
COM_JEDCHECKER_STEP2="Haga clic en Unzip"
|
||||
COM_JEDCHECKER_STEP3="Haga clic en Verificar y revisar los resultados"
|
||||
COM_JEDCHECKER_WALL_OF_HONOR="Muro de Honor"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="Personas que han ayudado con el desarrollo de este componente (¡en ningún orden particular!)"
|
||||
COM_JEDCHECKER_CONTRIBUTORS="Contribuidores"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="Personas que han ayudado con el desarrollo de este componente."
|
||||
COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="Cómo interpretar los resultados"
|
||||
COM_JEDCHECKER_RULE_PH2="Archivos PHP que carecen de seguridad JEXEC"
|
||||
COM_JEDCHECKER_RULE_PH2_DESC="Todos los archivos PHP de su extensión necesitan tener una sentencia defined('_JEXEC') or die(); en el principio de cada archivo. Esto asegura que el archivo no se puede abrir fuera de la instalación joomla e incrementa la seguridad De su sitio. "
|
||||
|
@ -13,7 +13,8 @@ COM_JEDCHECKER_STEP1="Carica il tuo / / file zip modulo plug componente utilizza
|
||||
COM_JEDCHECKER_STEP2="Fare clic su Unzip"
|
||||
COM_JEDCHECKER_STEP3="Fare clic su Verifica e rivedere i risultati"
|
||||
COM_JEDCHECKER_WALL_OF_HONOR="Wall of Honour"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="Le persone che hanno contribuito allo sviluppo di questo componente. (In nessun ordine particolare!)"
|
||||
COM_JEDCHECKER_CONTRIBUTORS="Contributori"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="Le persone che hanno contribuito allo sviluppo di questo componente."
|
||||
COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="Come interpretare i risultati"
|
||||
COM_JEDCHECKER_RULE_PH2="PHP file di sicurezza mancante jexec"
|
||||
COM_JEDCHECKER_RULE_PH2_DESC="Tutti i file PHP in proprio interno ha bisogno di avere un defined('_JEXEC') or die(); Dichiarazione all'inizio di ogni file Questo assicura che il file non può essere aperto al di fuori dell'impianto di joomla e aumenta la sicurezza del tuo sito. "
|
||||
|
@ -9,7 +9,8 @@ COM_JEDCHECKER_STEP1="Envie seu arquivo zip component/plugin/module utilizando o
|
||||
COM_JEDCHECKER_STEP2="Clique em descompactar"
|
||||
COM_JEDCHECKER_STEP3="Clique em checar e veja os resultados"
|
||||
COM_JEDCHECKER_WALL_OF_HONOR="Parede de honra"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="Pessoas que contribuíram com o desenvolvimento deste componente"
|
||||
COM_JEDCHECKER_CONTRIBUTORS="Contribuintes"
|
||||
COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="Pessoas que contribuíram com o desenvolvimento deste componente."
|
||||
COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="Como interpretar os resultados?"
|
||||
COM_JEDCHECKER_RULE_SE1="Regra:SE1 - Extensão sem o arquivo index.html em todas as pastas"
|
||||
; COM_JEDCHECKER_RULE_SE1_DESC="If you want your extension to be listed on the JED, then you should make sure that all your extension folders contain an index.html file. - Developers don't like this rule at all - it fills your package with index.html files, which in terms slows down the installation process etc. But index.html files provide protection for badly configured hosts (one could argue if we need to try to do anything for those), but as long the joomla CMS comes with those files the JED is going to require that extensions also have those."
|
||||
|
@ -9,7 +9,8 @@ COM_JEDCHECKER_HOW_TO_USE="Como usar este componente?"
|
||||
COM_JEDCHECKER_STEP2="Clique em descompactar"
|
||||
COM_JEDCHECKER_STEP3="Clique para rever os resultados"
|
||||
COM_JEDCHECKER_WALL_OF_HONOR="Quadro de honra"
|
||||
; COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="People that have helped with the development of this component"
|
||||
COM_JEDCHECKER_CONTRIBUTORS="Contribuintes"
|
||||
; COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT="People that have helped with the development of this component."
|
||||
COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS="Como interpretar os resultados"
|
||||
COM_JEDCHECKER_RULE_SE1="Regra:SE1 - Necessário incluir um ficheiro index.html em todas as pastas da extensão"
|
||||
; COM_JEDCHECKER_RULE_SE1_DESC="If you want your extension to be listed on the JED, then you should make sure that all your extension folders contain an index.html file. - Developers don't like this rule at all - it fills your package with index.html files, which in terms slows down the installation process etc. But index.html files provide protection for badly configured hosts (one could argue if we need to try to do anything for those), but as long the joomla CMS comes with those files the JED is going to require that extensions also have those."
|
||||
|
@ -1,10 +1,6 @@
|
||||
; This is the configuration file of the encoding rule.
|
||||
;
|
||||
; @author Daniel Dimitrov
|
||||
; @date 07/06/2012
|
||||
; @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE
|
||||
|
||||
; @package Joomla.JEDChecker
|
||||
; @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
; The valid constants to search for
|
||||
encodings ="base64"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 04/08/2012
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
@ -1,10 +1,6 @@
|
||||
; This is the configuration file of the error reporting rule.
|
||||
;
|
||||
; @author Denis Dulici
|
||||
; @date 18/08/2013
|
||||
; @copyright Copyright (C) 2008 - 2013 mijosoft.com . All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE
|
||||
|
||||
; @package Joomla.JEDChecker
|
||||
; @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
; The valid constants to search for
|
||||
errorreportings="error_reporting(0)"
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Denis Dulici <denis@mijosoft.com>
|
||||
* @date 18.08.2013
|
||||
* @copyright Copyright (C) 2008 - 2013 mijosoft.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
@ -1,18 +1,16 @@
|
||||
; @package Joomla.JEDChecker
|
||||
; @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
; This is the configuration file of the noframework rule.
|
||||
;
|
||||
; @author Riccardo Zorn
|
||||
; @date 2014-02-22
|
||||
; @copyright Copyright (C) 2008 - 2014 fasterjoomla.com . All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE
|
||||
; @site fasterjoomla.com
|
||||
|
||||
; A different format for this rule's params. In order to provide accurate messages, we have four main keys
|
||||
; - error_groups
|
||||
; - warning_groups
|
||||
; - warning_groups
|
||||
; - notice_groups
|
||||
; - compatibility_groups
|
||||
; each MUST contain the names of the sub-keys that should trigger a warning or a notice.
|
||||
; In case an offending string is found in the file, a warning/notice will be raised with an error message named
|
||||
; In case an offending string is found in the file, a warning/notice will be raised with an error message named
|
||||
; COM_JEDCHECKER_ERROR_NOFRAMEWORK_ followed by the offending key in uppercase e.g. COM_JEDCHECKER_ERROR_NOFRAMEWORK_SUPERGLOBALS
|
||||
;
|
||||
; ref: docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_3.0_and_Joomla_Platform_12.1
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Riccardo Zorn <support@fasterjoomla.com>
|
||||
* @date 23.02.2014
|
||||
* @copyright Copyright (C) 2008 - 2014 fasterjoomla.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
@ -1,11 +1,10 @@
|
||||
; @package Joomla.JEDChecker
|
||||
; @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
; This is the configuration file of the GPL rule.
|
||||
; ADD all compatible licenses with GPL here
|
||||
;
|
||||
; @author eaxs
|
||||
; @date 07/06/2012
|
||||
; @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE
|
||||
|
||||
|
||||
; The valid constants to search for
|
||||
constants="BSD"
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author eaxs <support@projectfork.net>
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 07/06/2012
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
@ -1,10 +1,9 @@
|
||||
; @package Joomla.JEDChecker
|
||||
; @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
; This is the configuration file of the Jamss rule.
|
||||
;
|
||||
; @author Riccardo Zorn
|
||||
; @date 2014-02-22
|
||||
; @copyright Copyright (C) 2008 - 2014 fasterjoomla.com . All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE
|
||||
; @site fasterjoomla.com
|
||||
|
||||
; This rule runs the JAMSS checks: https://github.com/btoplak/Joomla-Anti-Malware-Scan-Script/blob/master/jamss.php
|
||||
; JAMSS description: This script should be used for searching the infected or malware/backdoor
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Bernard Toplak <bernard@orion-web.hr>
|
||||
* @author Riccardo Zorn <support@fasterjoomla.com>
|
||||
* @date 24.02.2014
|
||||
* @copyright Copyright (C) 2008 - 2014 fasterjoomla.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
@ -1,10 +1,9 @@
|
||||
; @package Joomla.JEDChecker
|
||||
; @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
; This is the configuration file of the JEXEC rule.
|
||||
;
|
||||
; @author eaxs
|
||||
; @date 07/06/2012
|
||||
; @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
; @license GNU General Public License version 2 or later; see LICENSE
|
||||
|
||||
|
||||
; The valid constants to search for
|
||||
constants ="_JEXEC, JPATH_PLATFORM, JPATH_BASE, AKEEBAENGINE, WF_EDITOR"
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author eaxs <support@projectfork.net>
|
||||
* @author Daniel Dimitrov <daniel@ompojoom.com>
|
||||
* @date 07/06/2012
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author eaxs <support@projectfork.net>
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 07/06/2012
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
@ -73,6 +72,23 @@ class JedcheckerRulesXMLinfo extends JEDcheckerRule
|
||||
{
|
||||
$xml = JFactory::getXml($file);
|
||||
|
||||
// Get all the info about the file
|
||||
$folder_info = pathinfo($file);
|
||||
|
||||
// Get the folder path
|
||||
$folder_path = $folder_info['dirname'];
|
||||
|
||||
// Get the folder name
|
||||
$folder_name = $folder_info['dirname'];
|
||||
$folder_name_exploded = explode(DIRECTORY_SEPARATOR,$folder_name);
|
||||
if ( is_array($folder_name_exploded) ) {
|
||||
$folder_name = end($folder_name_exploded);
|
||||
}
|
||||
|
||||
// Load the language of the extension (if any)
|
||||
$lang = JFactory::getLanguage();
|
||||
$lang->load($folder_name,$folder_path);
|
||||
|
||||
// Failed to parse the xml file.
|
||||
// Assume that this is not a extension manifest
|
||||
if (!$xml)
|
||||
@ -87,7 +103,10 @@ class JedcheckerRulesXMLinfo extends JEDcheckerRule
|
||||
return true;
|
||||
}
|
||||
|
||||
$info[] = JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_XML', (string) $xml->name);
|
||||
// Get the real extension's name now that the language has been loaded
|
||||
(string) $extension_name = $lang->_($xml->name);
|
||||
|
||||
$info[] = JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_XML', $extension_name);
|
||||
$info[] = JText::sprintf('COM_JEDCHECKER_INFO_XML_VERSION_XML', (string) $xml->version);
|
||||
$info[] = JText::sprintf('COM_JEDCHECKER_INFO_XML_CREATIONDATE_XML', (string) $xml->creationDate);
|
||||
$this->report->addInfo($file, implode('<br />', $info));
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author eaxs <support@projectfork.net>
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 07/06/2012
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author eaxs <support@projectfork.net>
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 07/06/2012
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
@ -51,7 +50,7 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
{
|
||||
// Find all XML files of the extension
|
||||
$files = JFolder::files($this->basedir, '.xml$', true, true);
|
||||
|
||||
|
||||
// Find XML package file
|
||||
$packageFile = $this->checkPackageXML($files);
|
||||
|
||||
@ -59,10 +58,10 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
{
|
||||
$XMLFiles = $this->findXMLPaths($files);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reads a file and searches for package xml file
|
||||
*
|
||||
@ -71,25 +70,25 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
* @return boolean True if the package xml file was found, otherwise False.
|
||||
*/
|
||||
protected function checkPackageXML($files)
|
||||
{
|
||||
{
|
||||
$packageCount = 0;
|
||||
|
||||
foreach ($files as $file)
|
||||
|
||||
foreach ($files as $file)
|
||||
{
|
||||
$xml = JFactory::getXml($file);
|
||||
|
||||
// Check if this is an XML and an extension manifest
|
||||
if ($xml && ($xml->getName() == 'install' || $xml->getName() == 'extension'))
|
||||
{
|
||||
{
|
||||
// Check if extension attribute 'type' is for a package
|
||||
if($xml->attributes()->type == 'package')
|
||||
{
|
||||
$packageCount++;
|
||||
$this->find($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// No XML file found for package
|
||||
if ($packageCount == 0)
|
||||
{
|
||||
@ -98,7 +97,7 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reads a file and searches for paths of xml files
|
||||
*
|
||||
@ -107,11 +106,11 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
* @return void
|
||||
*/
|
||||
protected function findXMLPaths($files)
|
||||
{
|
||||
{
|
||||
$XMLFiles = array();
|
||||
$componentPaths = array();
|
||||
|
||||
foreach ($files as $file)
|
||||
|
||||
foreach ($files as $file)
|
||||
{
|
||||
$xml = JFactory::getXml($file);
|
||||
|
||||
@ -125,25 +124,25 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
'directoryPath' => substr($file, 0, strrpos( $file, '/')),
|
||||
'directory' => trim(end($directories))
|
||||
);
|
||||
|
||||
|
||||
if ($xml->attributes()->type == 'component')
|
||||
{
|
||||
$componentPaths[] = substr($file, 0, strrpos( $file, '/'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ($XMLFiles as $XMLFile)
|
||||
{
|
||||
// Always check component XML files for update servers
|
||||
if ($XMLFile['type'] == 'component')
|
||||
{
|
||||
$this->find($XMLFile['filepath']);
|
||||
|
||||
|
||||
} else {
|
||||
// If not component, check if XML is nested inside component folder.
|
||||
$nested = false;
|
||||
|
||||
|
||||
foreach ($componentPaths as $component)
|
||||
{
|
||||
if (strpos($XMLFile['directoryPath'], $component) !== false)
|
||||
@ -151,13 +150,13 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
$nested = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!$nested){
|
||||
$this->find($XMLFile['filepath']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -172,7 +171,7 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
protected function find($file)
|
||||
{
|
||||
$xml = JFactory::getXml($file);
|
||||
|
||||
|
||||
// Failed to parse the xml file.
|
||||
// Assume that this is not a extension manifest
|
||||
if (!$xml)
|
||||
@ -194,16 +193,16 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Check if server tag(s) exist
|
||||
if (!isset($xml->updateservers->server))
|
||||
{
|
||||
$this->report->addError($file, JText::_('COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_NOT_FOUND'));
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Check if server tag(s) contain valid links
|
||||
foreach ($xml->updateservers->server as $server)
|
||||
{
|
||||
@ -212,7 +211,7 @@ class JedcheckerRulesXMLUpdateServer extends JEDcheckerRule
|
||||
$this->report->addError($file, JText::_('COM_JEDCHECKER_ERROR_XML_UPDATE_SERVER_LINK_NOT_FOUND'));
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
} else {
|
||||
$this->report->addInfo($file, JText::sprintf('COM_JEDCHECKER_INFO_XML_UPDATE_SERVER_LINK', (string) $server));
|
||||
}
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author eaxs <support@projectfork.net>
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 07/06/2012
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
@ -161,7 +160,7 @@ class JEDcheckerReport extends JObject
|
||||
public function getHTML()
|
||||
{
|
||||
$html = array();
|
||||
|
||||
|
||||
if ($this->data['count']->total == 0)
|
||||
{
|
||||
// No errors or compatibility issues found
|
||||
@ -180,7 +179,7 @@ class JEDcheckerReport extends JObject
|
||||
if ($error_count > 0)
|
||||
{
|
||||
$collapseID = uniqid('error_');
|
||||
|
||||
|
||||
$html[] = '<div class="alert alert-danger" data-toggle="collapse" data-target="#' . $collapseID . '"><strong>' . $error_count . ' ' . JText::_('COM_JEDCHECKER_ERRORS') . '</strong> - Click to View Details</div>';
|
||||
$html[] = '<div id="' . $collapseID . '" class="collapse"><ul class="alert alert-danger">';
|
||||
|
||||
@ -213,12 +212,12 @@ class JEDcheckerReport extends JObject
|
||||
// Go through the compat list
|
||||
if ($compat_count > 0)
|
||||
{
|
||||
|
||||
|
||||
$collapseID = uniqid('warning_');
|
||||
|
||||
|
||||
$html[] = '<div class="alert alert-warning" data-toggle="collapse" data-target="#' . $collapseID . '"><strong>' . $compat_count . ' ' . JText::_('COM_JEDCHECKER_COMPAT_ISSUES') . '</strong> - Click to View Details</div>';
|
||||
$html[] = '<div id="' . $collapseID . '" class="collapse"><ul class="alert alert-warning">';
|
||||
|
||||
|
||||
foreach ($this->data['compat'] AS $i => $item)
|
||||
{
|
||||
$num = $i + 1;
|
||||
@ -250,12 +249,12 @@ class JEDcheckerReport extends JObject
|
||||
// Go through the compat list
|
||||
if ($info_count > 0)
|
||||
{
|
||||
|
||||
|
||||
$collapseID = uniqid('info_');
|
||||
|
||||
|
||||
$html[] = '<div class="alert alert-info" data-toggle="collapse" data-target="#' . $collapseID . '"><strong>' . $info_count . ' ' . JText::_('COM_JEDCHECKER_INFO') . '</strong> - Click to View Details</div>';
|
||||
$html[] = '<div id="' . $collapseID . '" class="collapse"><ul class="alert alert-info">';
|
||||
|
||||
|
||||
foreach ($this->data['info'] AS $i => $item)
|
||||
{
|
||||
$num = $i + 1;
|
||||
@ -288,10 +287,10 @@ class JEDcheckerReport extends JObject
|
||||
if ($warning_count > 0)
|
||||
{
|
||||
$collapseID = uniqid('warning_');
|
||||
|
||||
|
||||
$html[] = '<div class="alert alert-warning" data-toggle="collapse" data-target="#' . $collapseID . '"><strong>' . $warning_count . ' ' . JText::_('COM_JEDCHECKER_WARNING') . '</strong> - Click to View Details</div>';
|
||||
$html[] = '<div id="' . $collapseID . '" class="collapse"><ul class="alert alert-warning">';
|
||||
|
||||
|
||||
foreach ($this->data['warning'] AS $i => $item)
|
||||
{
|
||||
$num = $i + 1;
|
||||
|
@ -1,14 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* @author eaxs <support@projectfork.net>
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 07/06/2012
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\Registry\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* class JEDcheckerRule
|
||||
@ -107,7 +108,10 @@ class JEDcheckerRule extends JObject
|
||||
$file_name = str_replace('jedcheckerrules', '', strtolower(get_class($this)));
|
||||
$params_file = JPATH_COMPONENT_ADMINISTRATOR . '/libraries/rules/' . $file_name . '.ini';
|
||||
|
||||
$params = Joomla\Registry\Registry::getInstance('jedchecker.rule.' . $file_name);
|
||||
$params = new Registry('jedchecker.rule.' . $file_name);
|
||||
//$params = $registry->getInstance('jedchecker.rule.' . $file_name);
|
||||
|
||||
//$params = Joomla\Registry\Registry::getInstance('jedchecker.rule.' . $file_name);
|
||||
|
||||
// Load the params from the ini file
|
||||
if (file_exists($params_file))
|
||||
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 02.06.12
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
@ -31,7 +30,7 @@ class Com_JedcheckerInstallerScript
|
||||
if (version_compare(PHP_VERSION, '5.3.10', '<'))
|
||||
{
|
||||
$this->loadLanguage();
|
||||
|
||||
|
||||
Jerror::raiseWarning(null, JText::sprintf('COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE', PHP_VERSION, '5.3.10'));
|
||||
|
||||
return false;
|
||||
|
@ -1,118 +1,184 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel Dimitrov - compojoom.com
|
||||
* @date: 02.06.12
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
JHtml::_('behavior.framework', true);
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::stylesheet('media/com_jedchecker/css/css.css');
|
||||
JHtml::script('media/com_jedchecker/js/police.js');
|
||||
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);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function check(url,rule) {
|
||||
jQuery.ajax({
|
||||
url: url + 'index.php?option=com_jedchecker&task=police.check&format=raw&rule='+rule,
|
||||
method: 'GET',
|
||||
success: function(result){
|
||||
jQuery('#police-check-result').append(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Joomla.submitbutton = function (task) {
|
||||
var options = <?php echo json_encode($this->jsOptions); ?>;
|
||||
if (task == 'police.check') {
|
||||
new police(options);
|
||||
return false;
|
||||
|
||||
if (task == 'check') {
|
||||
jQuery("#police-check-result").empty();
|
||||
|
||||
for (index = 0; index < options["rules"].length; ++index) {
|
||||
check(options["url"],options["rules"][index]);
|
||||
}
|
||||
|
||||
jQuery("#prison" ).show();
|
||||
|
||||
} else {
|
||||
Joomla.submitform(task);
|
||||
}
|
||||
Joomla.submitform(task);
|
||||
}
|
||||
</script>
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_jedchecker&view=uploads'); ?>"
|
||||
method="post" class="form form-validate" name="adminForm" id="adminForm" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<p>
|
||||
<?php echo JText::sprintf('COM_JEDCHECKER_CONGRATS', 'http://extensions.joomla.org/about-jed/terms-of-service#listings'); ?>
|
||||
</p>
|
||||
<?php
|
||||
if ( version_compare(JVERSION, '3.20', 'lt') ) {
|
||||
?>
|
||||
<!-- Styling of Bootstrap 4 core CSS-->
|
||||
<link href="<?php echo JURI::root(); ?>media/com_jedchecker/css/j3-style.min.css" rel="stylesheet">
|
||||
<?php } ?>
|
||||
|
||||
<p>
|
||||
<?php echo JText::sprintf('COM_JEDCHECKER_CODE_STANDARDS', 'http://developer.joomla.org/coding-standards.html', 'https://github.com/compojoom/jedchecker'); ?>
|
||||
</p>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-8">
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_jedchecker&view=uploads'); ?>"
|
||||
method="post" class="needs-validation" name="adminForm" id="adminForm" enctype="multipart/form-data">
|
||||
|
||||
<p>
|
||||
<?php echo JText::_('COM_JEDCHECKER_HOW_TO_USE'); ?>
|
||||
</p>
|
||||
<ol>
|
||||
<li> <?php echo JText::_('COM_JEDCHECKER_STEP1'); ?></li>
|
||||
<li> <?php echo JText::_('COM_JEDCHECKER_STEP2'); ?></li>
|
||||
<li> <?php echo JText::_('COM_JEDCHECKER_STEP3'); ?></li>
|
||||
</ol>
|
||||
<div class="card bg-light mb-3">
|
||||
<div class="card-body">
|
||||
<p class="card-text"><?php echo JText::sprintf('COM_JEDCHECKER_CONGRATS', 'http://extensions.joomla.org/about-jed/terms-of-service#listings'); ?></p>
|
||||
<p class="card-text"><?php echo JText::sprintf('COM_JEDCHECKER_CODE_STANDARDS', 'http://developer.joomla.org/coding-standards.html', 'https://github.com/compojoom/jedchecker'); ?></p>
|
||||
<p class="card-text"><?php echo JText::_('COM_JEDCHECKER_HOW_TO_USE'); ?></p>
|
||||
<p class="card-text">
|
||||
<ol>
|
||||
<li> <?php echo JText::_('COM_JEDCHECKER_STEP1'); ?></li>
|
||||
<li> <?php echo JText::_('COM_JEDCHECKER_STEP2'); ?></li>
|
||||
</ol>
|
||||
</p>
|
||||
<div class="form-row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="custom-file">
|
||||
<input type="file" class="custom-file-input" name="extension" id="extension" required>
|
||||
<label class="custom-file-label" for="extension"><?php echo JText::_('COM_JEDCHECKER_UPLOAD_FILE'); ?></label>
|
||||
<div class="invalid-feedback"><?php echo JText::_('COM_JEDCHECKER_EMPTY_UPLOAD_FIELD'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<button onclick="add_validation(); Joomla.submitbutton('uploads.upload')" class="btn btn-success">
|
||||
<span class="icon-upload "></span> <?php echo JText::_('JSUBMIT'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="file" name="extension" class="required"/>
|
||||
<button onclick="Joomla.submitbutton('uploads.upload')" class="btn btn-success">
|
||||
<span class="icon-upload "></span> <?php echo JText::_('JSUBMIT'); ?>
|
||||
</button>
|
||||
<input type="hidden" name="task" value=""/>
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<div class="well">
|
||||
<h2><?php echo JText::_('COM_JEDCHECKER_WALL_OF_HONOR'); ?></h2>
|
||||
|
||||
<p><?php echo JText::_('COM_JEDCHECKER_PEOPLE_THAT_HAVE_HELPED_WITH_THE_DEVELOPMENT'); ?></p>
|
||||
<ul>
|
||||
<li>Tobias Kuhn (<a href="http://projectfork.net" target="_blank">projectfork</a>)</li>
|
||||
<li>Jisse Reitsma (<a href="http://www.yireo.com/" target="_blank">yireo</a>)</li>
|
||||
<li>Denis Dulici (<a href="http://mijosoft.com/" target="_blank">mijosoft</a>)</li>
|
||||
<li>Peter van Westen (<a href="https://www.regularlabs.com" target="_blank">Regular Labs</a>)</li>
|
||||
<li>Alain Rivest (<a href="http://aldra.ca" target="_blank">Aldra.ca</a>)</li>
|
||||
<li>OpenTranslators (<a href="http://opentranslators.org" target="_blank">opentranslators.org</a>)</li>
|
||||
<li>Riccardo Zorn (<a href="http://fasterjoomla.com" target="_blank">fasterjoomla.com</a>)</li>
|
||||
<li>Bernard Toplak (<a href="http://www.orion-web.hr/en/" target="_blank">orion-web.hr</a>)</li>
|
||||
<li>Jaz Parkyn (<a href="https://volunteers.joomla.org/joomlers/337-jaz-parkyn" target="_blank">Joomla! Extensions Directory</a>)</li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="prison" style="display:none;">
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<div id="police-check-result" class="well"><h2 style="padding-left:10px;"><?php echo JText::_('COM_JEDCHECKER_RESULTS'); ?></h2></div>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<div class="well">
|
||||
<h2>
|
||||
<?php echo JText::_('COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS'); ?>
|
||||
</h2>
|
||||
<ul>
|
||||
<?php
|
||||
foreach ($this->jsOptions['rules'] AS $rule) {
|
||||
$class = 'jedcheckerRules' . ucfirst($rule);
|
||||
|
||||
if (!class_exists($class)) continue;
|
||||
$rule = new $class();
|
||||
?>
|
||||
<li>
|
||||
<p>
|
||||
<span class="rule">
|
||||
<?php echo JText::_('COM_JEDCHECKER_RULE') . ' ' . $rule->get('id') . ' - ' . JText::_($rule->get('title'));?>
|
||||
</span>
|
||||
</p>
|
||||
<p><?php echo JText::_($rule->get('description')); ?></p>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<div class="col-xs-6 col-md-4">
|
||||
|
||||
<div class="card text-white bg-info mb-3">
|
||||
<div class="card-header"><?php echo JText::_('COM_JEDCHECKER_WALL_OF_HONOR'); ?></div>
|
||||
<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">
|
||||
<?php echo JText::_('COM_JEDCHECKER_CONTRIBUTORS'); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clr clearfix"></div>
|
||||
<div class="copyright row-fluid">
|
||||
<?php echo JText::sprintf('COM_JEDCHECKER_LEAVE_A_REVIEW_JED', 'http://extensions.joomla.org/extensions/tools/development-tools/21336'); ?>
|
||||
<br/>
|
||||
<?php echo JText::sprintf('COM_JEDCHECKER_DEVELOPED_BY', 'https://compojoom.com'); ?> :)
|
||||
</div>
|
||||
|
||||
<div id="prison" style="display: none">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="card bg-light mb-3">
|
||||
<div class="card-header"><?php echo JText::_('COM_JEDCHECKER_RESULTS'); ?></div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
<div id="police-check-result"></div>
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<small class="text-muted">
|
||||
<?php echo JText::sprintf('COM_JEDCHECKER_LEAVE_A_REVIEW_JED', 'http://extensions.joomla.org/extensions/tools/development-tools/21336'); ?>
|
||||
<?php echo JText::sprintf('COM_JEDCHECKER_DEVELOPED_BY', 'https://github.com/joomla-extensions/jedchecker'); ?> :)
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card bg-light mb-3">
|
||||
<div class="card-header"><?php echo JText::_('COM_JEDCHECKER_HOW_TO_INTERPRET_RESULTS'); ?></div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">
|
||||
<div id="accordion">
|
||||
<?php
|
||||
foreach ($this->jsOptions['rules'] AS $rule) {
|
||||
$class = 'jedcheckerRules' . ucfirst($rule);
|
||||
|
||||
if (!class_exists($class)) continue;
|
||||
$rule = new $class();
|
||||
?>
|
||||
<div class="card">
|
||||
<?php
|
||||
echo '<div class="card-header" id="heading' . $rule->get('id') .'">';
|
||||
?>
|
||||
<h5 class="mb-0">
|
||||
<?php
|
||||
echo '<button class="btn btn-link" data-toggle="collapse" data-target="#collapse' . $rule->get('id') . '" aria-expanded="true" aria-controls="collapse' . $rule->get('id') . '">' . JText::_('COM_JEDCHECKER_RULE') . ' ' . $rule->get('id') . ' - ' . JText::_($rule->get('title'));
|
||||
?>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo '<div id="collapse' . $rule->get('id') . '" class="collapse" aria-labelledby="heading' . $rule->get('id') . '" data-parent="#accordion">';
|
||||
?>
|
||||
<div class="card-body">
|
||||
<?php echo JText::_($rule->get('description')); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 02.06.12
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
@ -27,6 +26,8 @@ class JedcheckerViewUploads extends JViewLegacy
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->path = JFactory::getConfig()->get('tmp_path') . '/jed_checker';
|
||||
|
||||
$this->setToolbar();
|
||||
$this->jsOptions['url'] = JUri::base();
|
||||
$this->jsOptions['rules'] = $this->getRules();
|
||||
@ -59,20 +60,19 @@ class JedcheckerViewUploads extends JViewLegacy
|
||||
*/
|
||||
public function setToolbar()
|
||||
{
|
||||
if ($this->filesExist('archives'))
|
||||
{
|
||||
JToolbarHelper::custom('uploads.unzip', 'folder', 'folder', 'unzip', false);
|
||||
}
|
||||
|
||||
if ($this->filesExist('unzipped'))
|
||||
{
|
||||
JToolbarHelper::custom('police.check', 'search', 'search', 'Check', false);
|
||||
JToolbarHelper::custom('check', 'search', 'search', 'Check', false);
|
||||
}
|
||||
|
||||
JToolbarHelper::title('JED checker');
|
||||
|
||||
if (JFactory::getUser()->authorise('core.admin', 'com_jedchecker'))
|
||||
{
|
||||
if ( file_exists($this->path) )
|
||||
{
|
||||
JToolbarHelper::custom('uploads.clear', 'delete', 'delete', 'Clear', false);
|
||||
}
|
||||
|
||||
if (JFactory::getUser()->authorise('core.admin', 'com_jedchecker'))
|
||||
{
|
||||
JToolbarHelper::preferences('com_jedchecker');
|
||||
}
|
||||
}
|
||||
|
@ -1,37 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension method="upgrade" type="component" version="2.5.0">
|
||||
<extension type="component" version="3.6" method="upgrade">
|
||||
<name>COM_JEDCHECKER</name>
|
||||
<author>Joomla! Extensions Directory</author>
|
||||
<creationDate>2017-02-14</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.</copyright>
|
||||
<creationDate>2019-03-09</creationDate>
|
||||
<copyright>Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.</copyright>
|
||||
<authorEmail>extensions@extensions.joomla.org</authorEmail>
|
||||
<authorUrl>https://github.com/joomla-extensions/jedchecker</authorUrl>
|
||||
<version>2.0</version>
|
||||
<version>2.1.0</version>
|
||||
<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
|
||||
<description><![CDATA[JED Checker will check your extension files and will let you know in advance if there are any possible problems with your extension for submitting to the JED]]>
|
||||
</description>
|
||||
<scriptfile>script.php</scriptfile>
|
||||
<scriptfile>script.php</scriptfile>
|
||||
<administration>
|
||||
<menu>COM_JEDCHECKER</menu>
|
||||
<files folder="administrator/components/com_jedchecker">
|
||||
<file>access.xml</file>
|
||||
<files folder="administrator/components/com_jedchecker">
|
||||
<file>access.xml</file>
|
||||
<file>config.xml</file>
|
||||
<file>controller.php</file>
|
||||
<folder>controllers</folder>
|
||||
<file>jedchecker.php</file>
|
||||
<file>jedchecker.xml</file>
|
||||
<folder>language</folder>
|
||||
<folder>libraries</folder>
|
||||
<folder>models</folder>
|
||||
<file>script.php</file>
|
||||
<folder>views</folder>
|
||||
</files>
|
||||
</administration>
|
||||
<media destination="com_jedchecker" folder="media/com_jedchecker">
|
||||
<folder>css</folder>
|
||||
<folder>js</folder>
|
||||
<folder>css</folder>
|
||||
</media>
|
||||
<updateservers>
|
||||
<server type="extension" priority="1" name="JEDChecker Updates"><![CDATA[https://compojoom.com/index.php?option=com_ars&view=update&task=stream&format=xml&id=12&dummy=extension.xml]]></server>
|
||||
<!-- Note: No spaces or linebreaks allowed between the server tags -->
|
||||
<server type="extension" name="Weblinks Update Site">https://raw.githubusercontent.com/joomla-extensions/jedchecker/master/manifest.xml</server>
|
||||
</updateservers>
|
||||
</extension>
|
||||
|
16
manifest.xml
Normal file
16
manifest.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<updates>
|
||||
<update>
|
||||
<name>JED Checker Extension</name>
|
||||
<description><![CDATA[JED Checker will check your extension files and will let you know in advance if there are any possible problems with your extension for submitting to the JED]]></description>
|
||||
<element>com_jedchecker</element>
|
||||
<type>component</type>
|
||||
<version>3.6.0</version>
|
||||
<client>site</client>
|
||||
<infourl title="JED Checker Extension">https://github.com/joomla-extensions/jedchecker/releases/tag/2.1.0</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://downloads.joomla.org/extensions/jedchecker/2.1.0/com-jedchecker-2.1.0.zip</downloadurl>
|
||||
</downloads>
|
||||
<targetplatform name="joomla" version="3.[6789]" />
|
||||
</update>
|
||||
</updates>
|
285
media/com_jedchecker/css/j3-style.css
Normal file
285
media/com_jedchecker/css/j3-style.css
Normal file
@ -0,0 +1,285 @@
|
||||
.col-md-8 {
|
||||
flex: 0 0 66.66667%;
|
||||
max-width: 66.66667%;
|
||||
}
|
||||
|
||||
.col-1,
|
||||
.col-2,
|
||||
.col-3,
|
||||
.col-4,
|
||||
.col-5,
|
||||
.col-6,
|
||||
.col-7,
|
||||
.col-8,
|
||||
.col-9,
|
||||
.col-10,
|
||||
.col-11,
|
||||
.col-12,
|
||||
.col,
|
||||
.col-auto,
|
||||
.col-sm-1,
|
||||
.col-sm-2,
|
||||
.col-sm-3,
|
||||
.col-sm-4,
|
||||
.col-sm-5,
|
||||
.col-sm-6,
|
||||
.col-sm-7,
|
||||
.col-sm-8,
|
||||
.col-sm-9,
|
||||
.col-sm-10,
|
||||
.col-sm-11,
|
||||
.col-sm-12,
|
||||
.col-sm,
|
||||
.col-sm-auto,
|
||||
.col-md-1,
|
||||
.col-md-2,
|
||||
.col-md-3,
|
||||
.col-md-4,
|
||||
.col-md-5,
|
||||
.col-md-6,
|
||||
.col-md-7,
|
||||
.col-md-8,
|
||||
.col-md-9,
|
||||
.col-md-10,
|
||||
.col-md-11,
|
||||
.col-md-12,
|
||||
.col-md,
|
||||
.col-md-auto,
|
||||
.col-lg-1,
|
||||
.col-lg-2,
|
||||
.col-lg-3,
|
||||
.col-lg-4,
|
||||
.col-lg-5,
|
||||
.col-lg-6,
|
||||
.col-lg-7,
|
||||
.col-lg-8,
|
||||
.col-lg-9,
|
||||
.col-lg-10,
|
||||
.col-lg-11,
|
||||
.col-lg-12,
|
||||
.col-lg,
|
||||
.col-lg-auto,
|
||||
.col-xl-1,
|
||||
.col-xl-2,
|
||||
.col-xl-3,
|
||||
.col-xl-4,
|
||||
.col-xl-5,
|
||||
.col-xl-6,
|
||||
.col-xl-7,
|
||||
.col-xl-8,
|
||||
.col-xl-9,
|
||||
.col-xl-10,
|
||||
.col-xl-11,
|
||||
.col-xl-12,
|
||||
.col-xl,
|
||||
.col-xl-auto {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 1px;
|
||||
padding-right: 7.5px;
|
||||
padding-left: 7.5px;
|
||||
}
|
||||
|
||||
.mb-3,
|
||||
.my-3 {
|
||||
margin-bottom: 1rem !important;
|
||||
}
|
||||
|
||||
.col-md-6 {
|
||||
flex: 0 0 50%;
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
.col-md-4 {
|
||||
flex: 0 0 33.33333%;
|
||||
max-width: 31.33333%;
|
||||
}
|
||||
|
||||
.bg-light {
|
||||
background-color: #f8f9fa !important;
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
word-wrap: break-word;
|
||||
background-color: transparent;
|
||||
background-clip: border-box;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: .25rem;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-right: -7.5px;
|
||||
margin-left: -7.5px;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
|
||||
flex: 1 1 auto;
|
||||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
padding: .75rem 1.25rem;
|
||||
background-color: transparent;
|
||||
border-top: 0 solid transparent;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.form-row {
|
||||
display: flex;
|
||||
margin-right: -5px;
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
.form-row>.col,
|
||||
.form-row>[class*="col-"] {
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.custom-file {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: calc(2.7rem + 2px);
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.custom-file-input {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: calc(2.7rem + 2px);
|
||||
margin: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.custom-file-label {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
padding: .6rem 1rem;
|
||||
line-height: 1.5;
|
||||
color: #495057;
|
||||
background-color: #fff;
|
||||
border: .25rem;
|
||||
}
|
||||
|
||||
.invalid-feedback {
|
||||
display: none;
|
||||
width: 100%;
|
||||
margin-top: .25rem;
|
||||
font-size: 80%;
|
||||
color: #c52827;
|
||||
}
|
||||
|
||||
.btn:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
color: #fff;
|
||||
background-color: #2f7d32;
|
||||
border-color: #2f7d32;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
padding: .6rem 1rem;
|
||||
line-height: 1.5;
|
||||
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||
}
|
||||
|
||||
.btn {
|
||||
white-space: normal !important;
|
||||
}
|
||||
|
||||
button,
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.text-white {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.bg-info {
|
||||
background-color: #17a2b8 !important;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
padding: .75rem 1.25rem;
|
||||
margin-bottom: 0;
|
||||
/*background-color: transparent;*/
|
||||
background-color: rgba(0, 0, 0, .03);
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.custom-file-label::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
display: block;
|
||||
padding: .6rem 1rem;
|
||||
line-height: 1.5;
|
||||
color: white;
|
||||
content: "Browse";
|
||||
background-color: #3073bb;
|
||||
border-left: 1px solid #ced4da;
|
||||
border-radius: 0 .25rem .25rem 0;
|
||||
}
|
1
media/com_jedchecker/css/j3-style.min.css
vendored
Normal file
1
media/com_jedchecker/css/j3-style.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
.col-md-8{flex:0 0 66.66667%;max-width:66.66667%}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;min-height:1px;padding-right:7.5px;padding-left:7.5px}.mb-3,.my-3{margin-bottom:1rem!important}.col-md-6{flex:0 0 50%;max-width:50%}.col-md-4{flex:0 0 33.33333%;max-width:31.33333%}.bg-light{background-color:#f8f9fa!important}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:transparent;background-clip:border-box;border:1px solid #ccc;border-radius:.25rem}.row{display:flex;flex-wrap:wrap;margin-right:-7.5px;margin-left:-7.5px}.card-body{box-shadow:0 1px 2px rgba(0,0,0,.25);flex:1 1 auto;padding:1.25rem}.card-footer{padding:.75rem 1.25rem;background-color:transparent;border-top:0 solid transparent}p{margin-top:0;margin-bottom:1rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}.form-row{display:flex;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.custom-file{position:relative;display:inline-block;width:100%;height:calc(2.7rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(2.7rem + 2px);margin:0;opacity:0}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;padding:.6rem 1rem;line-height:1.5;color:#495057;background-color:#fff;border:.25rem}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#c52827}.btn:not(:disabled):not(.disabled){cursor:pointer}.btn-success{color:#fff;background-color:#2f7d32;border-color:#2f7d32}.btn{font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:.6rem 1rem;line-height:1.5;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.btn{white-space:normal!important}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}button,select{text-transform:none}button,input{overflow:visible}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button{border-radius:0}.text-white{color:#fff!important}.bg-info{background-color:#17a2b8!important}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid #ccc}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;padding:.6rem 1rem;line-height:1.5;color:#fff;content:"Browse";background-color:#3073bb;border-left:1px solid #ced4da;border-radius:0 .25rem .25rem 0}
|
@ -1,12 +1,12 @@
|
||||
#adminForm {
|
||||
background: #FFF;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
#police-check-result {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#police-check-result > div {
|
||||
#police-check-result>div {
|
||||
border-top: 1px solid #ccc;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
@ -16,25 +16,27 @@
|
||||
}
|
||||
|
||||
.copyright {
|
||||
line-height: 160%;
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
line-height: 160%;
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rule {
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 110%;
|
||||
padding: 0 0 0 30px;
|
||||
white-space: nowrap;
|
||||
padding: 0 0 0 30px;
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
#police-check-result li {
|
||||
margin-bottom:0.7em;
|
||||
overflow:hidden;
|
||||
margin-bottom: 0.7em;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#police-check-result ul li pre {
|
||||
background: white none repeat scroll 0 0;
|
||||
border: 1px solid #ccc;
|
||||
@ -48,10 +50,15 @@ small {
|
||||
}
|
||||
|
||||
.jamss_tooltip {
|
||||
background-color:blue;
|
||||
color:white;
|
||||
border-radius:20px;
|
||||
background-color: blue;
|
||||
color: white;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.jamss_tooltip.code {
|
||||
background-color:#C03020;
|
||||
background-color: #C03020;
|
||||
}
|
||||
|
||||
.btn {
|
||||
white-space: normal !important;
|
||||
}
|
1
media/com_jedchecker/css/style.min.css
vendored
Normal file
1
media/com_jedchecker/css/style.min.css
vendored
Normal file
@ -0,0 +1 @@
|
||||
#adminForm{background:#fff}#police-check-result{padding:0}#police-check-result>div{border-top:1px solid #ccc;padding:5px 10px}#police-check-result .alert{margin:5px 0}.copyright{line-height:160%;margin:10px;text-align:center}.rule{font-weight:700}small{font-size:110%;padding:0 0 0 30px;white-space:nowrap}#police-check-result li{margin-bottom:.7em;overflow:hidden}#police-check-result ul li pre{background:#fff none repeat scroll 0 0;border:1px solid #ccc;display:block;margin:0;overflow:hidden;padding:2px 6px;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.jamss_tooltip{background-color:#00f;color:#fff;border-radius:20px}.jamss_tooltip.code{background-color:#c03020}.btn{white-space:normal!important}
|
@ -1,36 +1,35 @@
|
||||
/**
|
||||
* @author Daniel Dimitrov - compojoom.com
|
||||
* @date: 09.06.12
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
var police = new Class({
|
||||
Implements:[Options],
|
||||
options:{},
|
||||
initialize:function (options) {
|
||||
Implements: [Options],
|
||||
options: {},
|
||||
initialize: function (options) {
|
||||
var self = this;
|
||||
this.setOptions(options);
|
||||
|
||||
// Clear result from any previous check
|
||||
if(document.id('police-check-result').getChildren('div').length > 0) {
|
||||
if (document.id('police-check-result').getChildren('div').length > 0) {
|
||||
document.id('police-check-result').empty();
|
||||
}
|
||||
|
||||
|
||||
this.options.rules.each(function(rule){
|
||||
self.check(rule);
|
||||
|
||||
this.options.rules.each(function (rule) {
|
||||
self.check(rule);
|
||||
});
|
||||
new Fx.Scroll(window).toElement(document.id('police-check-result'));
|
||||
},
|
||||
|
||||
check: function(rule) {
|
||||
check: function (rule) {
|
||||
var self = this;
|
||||
new Request({
|
||||
url: self.options.url + '/index.php?option=com_jedchecker&task=police.check&format=raw&rule='+rule,
|
||||
url: self.options.url + '/index.php?option=com_jedchecker&task=police.check&format=raw&rule=' + rule,
|
||||
async: false,
|
||||
onComplete: function(result) {
|
||||
onComplete: function (result) {
|
||||
var div = new Element('div', {
|
||||
html: result
|
||||
});
|
||||
|
1
media/com_jedchecker/js/police.min.js
vendored
Normal file
1
media/com_jedchecker/js/police.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
var police=new Class({Implements:[Options],options:{},initialize:function(e){var t=this;this.setOptions(e),0<document.id("police-check-result").getChildren("div").length&&document.id("police-check-result").empty(),this.options.rules.each(function(e){t.check(e)}),new Fx.Scroll(window).toElement(document.id("police-check-result"))},check:function(e){new Request({url:this.options.url+"/index.php?option=com_jedchecker&task=police.check&format=raw&rule="+e,async:!1,onComplete:function(e){new Element("div",{html:e}).inject(document.id("police-check-result")),document.id("prison").setStyle("display","block")}}).send()}});
|
16
script.php
16
script.php
@ -1,10 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Daniel Dimitrov <daniel@compojoom.com>
|
||||
* @date 02.06.12
|
||||
* @package Joomla.JEDChecker
|
||||
*
|
||||
* @copyright Copyright (C) 2008 - 2012 compojoom.com . All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE
|
||||
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
@ -27,15 +26,6 @@ class Com_JedcheckerInstallerScript
|
||||
public function preflight($type, $parent)
|
||||
{
|
||||
$this->parent = $parent;
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.3.10', '<'))
|
||||
{
|
||||
$this->loadLanguage();
|
||||
|
||||
Jerror::raiseWarning(null, JText::sprintf('COM_JEDCHECKER_PHP_VERSION_INCOMPATIBLE', PHP_VERSION, '5.3.10'));
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user