diff --git a/module/common/view/header.html.php b/module/common/view/header.html.php index 8c363207c5..3f4b45231b 100755 --- a/module/common/view/header.html.php +++ b/module/common/view/header.html.php @@ -4,6 +4,13 @@ include 'header.lite.html.php'; include 'chosen.html.php'; //include 'validation.html.php'; ?> +app->getModuleRoot() . '/common/ext/view/'; +$extHookRule = $extPath . 'header.*.hook.php'; +$extHookFiles = glob($extHookRule); +if($extHookFiles) foreach($extHookFiles as $extHookFile) include $extHookFile; +?> app->loadConfig('sso');?> getLibById($libID); $lib = fixer::input('post')->join('groups', ',')->join('users', ',')->get(); - if($lib->acl == 'private') $lib->users = $this->app->user->account; + if($lib->acl == 'private') + { + $libCreatedBy = $this->dao->select('*')->from(TABLE_ACTION)->where('objectType')->eq('doclib')->andWhere('objectID')->eq($libID)->andWhere('action')->eq('created')->fetch('actor'); + $lib->users = $libCreatedBy ? $libCreatedBy : $this->app->user->account; + } $this->dao->update(TABLE_DOCLIB)->data($lib)->autoCheck() ->batchCheck('name', 'notempty') ->where('id')->eq($libID) diff --git a/module/doc/view/alllibs.html.php b/module/doc/view/alllibs.html.php index 1e6bdc9911..d493b3fde3 100644 --- a/module/doc/view/alllibs.html.php +++ b/module/doc/view/alllibs.html.php @@ -52,10 +52,12 @@ -