diff --git a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest.php b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest.php
index c0559ba..db2f211 100644
--- a/administrator/components/com_jedchecker/libraries/rules/xmlmanifest.php
+++ b/administrator/components/com_jedchecker/libraries/rules/xmlmanifest.php
@@ -58,6 +58,13 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
*/
protected $warnings;
+ /**
+ * List of infos.
+ *
+ * @var string[]
+ */
+ protected $infos;
+
/**
* Rules for XML nodes
* ? - single, optional
@@ -153,6 +160,7 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
$this->errors = array();
$this->warnings = array();
+ $this->infos = array();
// Validate manifest
$this->validateXml($xml, 'extension');
@@ -167,6 +175,11 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
$this->report->addWarning($file, implode('
', $this->warnings));
}
+ if (count($this->infos))
+ {
+ $this->report->addInfo($file, implode('
', $this->infos));
+ }
+
// All checks passed. Return true
return true;
}
@@ -186,12 +199,12 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
{
foreach ($node->attributes() as $attr)
{
- $attrName = (string)$attr->getName();
+ $attrName = (string) $attr->getName();
if (!in_array($attrName, $DTDattributes, true))
{
// The node has unknown attribute
- $this->warnings[] = JText::sprintf('COM_JEDCHECKER_MANIFEST_UNKNOWN_ATTRIBUTE', $name, $attrName);
+ $this->infos[] = JText::sprintf('COM_JEDCHECKER_MANIFEST_UNKNOWN_ATTRIBUTE', $name, $attrName);
}
}
}
@@ -202,7 +215,7 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
// No children
if ($node->count() > 0)
{
- $this->warnings[] = JText::sprintf('COM_JEDCHECKER_MANIFEST_UNKNOWN_CHILDREN', $name);
+ $this->infos[] = JText::sprintf('COM_JEDCHECKER_MANIFEST_UNKNOWN_CHILDREN', $name);
}
}
elseif (!isset($this->DTDNodeRules[$name]['*']))
@@ -248,13 +261,14 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
{
$childNames[$child->getName()] = 1;
}
+
$childNames = array_keys($childNames);
foreach ($childNames as $child)
{
if (!isset($DTDchildren[$child]))
{
- $this->warnings[] = JText::sprintf('COM_JEDCHECKER_MANIFEST_UNKNOWN_CHILD', $name, $child);
+ $this->infos[] = JText::sprintf('COM_JEDCHECKER_MANIFEST_UNKNOWN_CHILD', $name, $child);
}
else
{
@@ -287,6 +301,7 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
}
/**
+ * Extra check for menu nodes
* @param SimpleXMLElement $node XML node
*
* @return void