diff --git a/source/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php b/source/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php
new file mode 100644
index 0000000..54fcb91
--- /dev/null
+++ b/source/administrator/components/com_jedchecker/libraries/rules/xmlinfo.php
@@ -0,0 +1,93 @@
+basedir, '.xml$', true, true);
+
+ // Iterate through all the xml files
+ foreach ($files as $file)
+ {
+ // Try to find the license
+ $this->find($file);
+ }
+ }
+
+
+ /**
+ * Reads a file and searches for the license
+ *
+ * @param string $file The path to the file
+ * @return boolean True if the license was found, otherwise False.
+ */
+ protected function find($file)
+ {
+ $xml = JFactory::getXML($file);
+
+ // Failed to parse the xml file.
+ // Assume that this is not a extension manifest
+ if (!$xml) return true;
+
+ // Check if this is an extension manifest
+ // 1.5 uses 'install', 1.6 uses 'extension'
+ if ($xml->getName() != 'install' && $xml->getName() != 'extension')
+ {
+ return true;
+ }
+
+ $info[] = JText::sprintf('COM_JEDCHECKER_INFO_XML_NAME_XML',(string)$xml->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('
',$info));
+
+
+ // All checks passed. Return true
+ return true;
+ }
+}
diff --git a/source/administrator/components/com_jedchecker/models/report.php b/source/administrator/components/com_jedchecker/models/report.php
index ccd9dbd..5ff8231 100644
--- a/source/administrator/components/com_jedchecker/models/report.php
+++ b/source/administrator/components/com_jedchecker/models/report.php
@@ -32,13 +32,13 @@ class JEDcheckerReport extends JObject
protected $basedir;
- /**
- * Constructor. Initialises variables.
- *
- * @param mixed $properties See JObject::__construct
- *
- * @return void
- */
+ /**
+ * Constructor. Initialises variables.
+ *
+ * @param mixed $properties See JObject::__construct
+ *
+ * @return \JEDcheckerReport
+ */
public function __construct($properties = null)
{
// Construct JObject
@@ -60,11 +60,13 @@ class JEDcheckerReport extends JObject
$this->data['errors'] = array();
$this->data['compat'] = array();
+ $this->data['info'] = array();
$this->data['count'] = new stdClass();
$this->data['count']->total = 0;
$this->data['count']->errors = 0;
$this->data['count']->compat = 0;
+ $this->data['count']->info = 0;
}
@@ -74,7 +76,7 @@ class JEDcheckerReport extends JObject
* @param string $location The location of the error. Can be a path to a file or dir.
* @param string $text An optional description of the error.
* @param integer $line If $location is a file, you may specify the line where the
- * error occured.
+ * error occurred.
*
* @return void
*/
@@ -88,6 +90,26 @@ class JEDcheckerReport extends JObject
$this->addItem($item, 'errors');
}
+ /**
+ * Adds an error to the report.
+ *
+ * @param string $location The location of the error. Can be a path to a file or dir.
+ * @param string $text An optional description of the error.
+ * @param integer $line If $location is a file, you may specify the line where the
+ * error occurred.
+ *
+ * @return void
+ */
+ public function addInfo($location, $text = NULL, $line = 0)
+ {
+ $item = new stdClass();
+ $item->location = $location;
+ $item->line = $line;
+ $item->text = (empty($text) ? '' : JText::_($text));
+
+ $this->addItem($item, 'info');
+ }
+
/**
* Adds a compatibility issue to the report.
@@ -95,7 +117,7 @@ class JEDcheckerReport extends JObject
* @param string $location The location of the issue. Can be a path to a file or dir.
* @param string $text An optional description of the issue
* @param integer $line If $location is a file, you may specify the line where the
- * issue occured.
+ * issue occurred.
*
* @return void
*/
@@ -128,6 +150,7 @@ class JEDcheckerReport extends JObject
else {
$error_count = $this->data['count']->errors;
$compat_count = $this->data['count']->compat;
+ $info_count = $this->data['count']->info;
// Go through the error list
if($error_count > 0) {
@@ -188,6 +211,37 @@ class JEDcheckerReport extends JObject
$html[] = '';
}
+
+ // Go through the compat list
+ if($info_count > 0) {
+ $html[] = ''.$info_count. ' '.JText::_('COM_JEDCHECKER_INFO').'';
+ $html[] = '