diff --git a/config/zentaopms.php b/config/zentaopms.php index bc2ecfea74..f2567d0504 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -140,6 +140,7 @@ $config->openMethods[] = 'my.preference'; $config->openMethods[] = 'my.changepassword'; $config->openMethods[] = 'my.profile'; $config->openMethods[] = 'my.settutorialconfig'; +$config->openMethods[] = 'doc.selectlibtype'; /* Define the tables. */ define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`'); diff --git a/module/common/model.php b/module/common/model.php index e4778ee2eb..a30d494697 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -374,7 +374,6 @@ class commonModel extends model $createMethod = 'create'; if($objectType == 'effort') $createMethod = 'batchCreate'; - if($objectType == 'doc') $createMethod = 'selectLibType'; if(strpos('bug|execution', $objectType) !== false) $needPrintDivider = true; if(common::hasPriv($objectType, $createMethod)) @@ -397,7 +396,11 @@ class commonModel extends model $params = ''; if(strpos('bug|testcase|story', $objectType) !== false) $params = "productID=$productID"; - if($objectType == 'doc') $params = "objectType=&objectID=0&libID=0"; + if($objectType == 'doc') + { + $params = "objectType=&objectID=0&libID=0"; + $createMethod = 'selectLibType'; + } $html .= '