diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 9cb7027d8..fa5c53a18 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -322,7 +322,7 @@ $(document).ready(function() { } } } - $arrs = $this->callHook('addDocumentAttributes', $folder); + $arrs = $this->callHook('addDocumentAttributes', null); if(is_array($arrs)) { foreach($arrs as $arr) { $this->formField($arr[0], $arr[1]); diff --git a/views/bootstrap/class.AddSubFolder.php b/views/bootstrap/class.AddSubFolder.php index e2778d2b9..eb097de90 100644 --- a/views/bootstrap/class.AddSubFolder.php +++ b/views/bootstrap/class.AddSubFolder.php @@ -109,6 +109,10 @@ $(document).ready( function() { $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_folder, SeedDMS_Core_AttributeDefinition::objtype_all)); if($attrdefs) { foreach($attrdefs as $attrdef) { + /* The second parameter is null, to make this function call equal + * to 'editFolderAttribute', which expects the folder as the second + * parameter. + */ $arr = $this->callHook('addFolderAttribute', null, $attrdef); if(is_array($arr)) { if($arr) { @@ -119,7 +123,11 @@ $(document).ready( function() { } } } - $arrs = $this->callHook('addFolderAttributes', $folder); + /* The second parameter is null, to make this function call equal + * to 'editFolderAttributes', which expects the folder as the second + * parameter. + */ + $arrs = $this->callHook('addFolderAttributes', null); if(is_array($arrs)) { foreach($arrs as $arr) { $this->formField($arr[0], $arr[1]);