mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 04:56:06 +00:00
do not pass parent folder to hook add[Folder|Document]Attribute
This commit is contained in:
parent
bcf7d2f2d8
commit
619f90b4df
|
@ -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]);
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user