mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
Fix neutron's comment
This commit is contained in:
@@ -1482,4 +1482,22 @@ class databox extends base
|
||||
{
|
||||
self::$_xpath_thesaurus = self::$_dom_thesaurus = self::$_thesaurus = self::$_sxml_thesaurus = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Tells whether the registration is enable for provided databox or not.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isRegistrationEnabled()
|
||||
{
|
||||
if (false !== $xml = $this->get_sxml_structure()) {
|
||||
foreach ($xml->xpath('/record/caninscript') as $canRegister) {
|
||||
if (false !== (Boolean) (string) $canRegister) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user