diff --git a/include/simpleplugin/class_simplePlugin.inc b/include/simpleplugin/class_simplePlugin.inc index d2fa4935d132aa5f94c74c6cb895dda753b37c2b..4503340a2dc2cc3c8ece2deb59f12af20b488e76 100644 --- a/include/simpleplugin/class_simplePlugin.inc +++ b/include/simpleplugin/class_simplePlugin.inc @@ -724,7 +724,7 @@ class simplePlugin extends plugin function check () { @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $this->dn, 'check'); - $message = parent::check(); + $message = array(); foreach ($this->attributesInfo as $sectionInfo) { foreach ($sectionInfo['attrs'] as $attr) { @@ -739,6 +739,20 @@ class simplePlugin extends plugin } } + $this->callHook('CHECK', array('nbCheckErrors' => count($message)), $returnOutput); + if (!empty($returnOutput)) { + $message[] = join("\n", $returnOutput); + } + + /* Check entryCSN */ + if (!empty($this->entryCSN)) { + $current_csn = getEntryCSN($this->dn); + if (($current_csn != $this->entryCSN) && !empty($current_csn)) { + $this->entryCSN = $current_csn; + $message[] = _('The object has changed since opened in FusionDirectory. All changes that may be done by others will get lost if you save this entry!'); + } + } + return $message; }