@@ -25,11 +25,18 @@ discard block |
||
25 | 25 | class Docman_PermissionsManagerDao extends DataAccessObject { |
26 | 26 | |
27 | 27 | var $groupId; |
28 | + |
|
29 | + /** |
|
30 | + * @param integer $groupId |
|
31 | + */ |
|
28 | 32 | function __construct($da, $groupId) { |
29 | 33 | parent::__construct($da); |
30 | 34 | $this->groupId = $groupId; |
31 | 35 | } |
32 | 36 | |
37 | + /** |
|
38 | + * @param string[] $perms |
|
39 | + */ |
|
33 | 40 | function retreivePermissionsForItems($itemsIds, $perms, $ugroupIds) { |
34 | 41 | $sql = 'SELECT *'. |
35 | 42 | ' FROM permissions'. |
@@ -39,6 +46,9 @@ discard block |
||
39 | 46 | return $this->retrieve($sql); |
40 | 47 | } |
41 | 48 | |
49 | + /** |
|
50 | + * @param string $perm |
|
51 | + */ |
|
42 | 52 | function setDefaultPermissions($objectId, $perm, $force=false) { |
43 | 53 | require_once('www/project/admin/permissions.php'); |
44 | 54 | $res = permission_db_get_defaults($perm); |
@@ -47,6 +57,9 @@ discard block |
||
47 | 57 | } |
48 | 58 | } |
49 | 59 | |
60 | + /** |
|
61 | + * @param integer $group_id |
|
62 | + */ |
|
50 | 63 | function oneFolderIsWritable($group_id, $ugroupIds) { |
51 | 64 | $sql = sprintf('SELECT i.item_id'. |
52 | 65 | ' FROM plugin_docman_item as i, permissions as p'. |
@@ -107,6 +120,9 @@ discard block |
||
107 | 120 | } |
108 | 121 | } |
109 | 122 | |
123 | + /** |
|
124 | + * @param integer $project_id |
|
125 | + */ |
|
110 | 126 | public function isThereAnExplicitPermission($ugroup_id, $project_id) { |
111 | 127 | $ugroup_id = $this->da->escapeInt($ugroup_id); |
112 | 128 | $project_id = $this->da->escapeInt($project_id); |
@@ -123,6 +139,9 @@ discard block |
||
123 | 139 | return $this->retrieveFirstRow($sql); |
124 | 140 | } |
125 | 141 | |
142 | + /** |
|
143 | + * @param integer $project_id |
|
144 | + */ |
|
126 | 145 | public function doAllItemsHaveExplicitPermissions($project_id) { |
127 | 146 | $project_id = $this->da->escapeInt($project_id); |
128 | 147 |
@@ -76,6 +76,9 @@ |
||
76 | 76 | return $this->title; |
77 | 77 | } |
78 | 78 | |
79 | + /** |
|
80 | + * @param integer $g |
|
81 | + */ |
|
79 | 82 | function setGroupId($g) { |
80 | 83 | $this->groupId = $g; |
81 | 84 | } |
@@ -29,6 +29,9 @@ |
||
29 | 29 | $this->sort = null; |
30 | 30 | } |
31 | 31 | |
32 | + /** |
|
33 | + * @param integer $s |
|
34 | + */ |
|
32 | 35 | function setSort($s) { |
33 | 36 | $this->sort = $s; |
34 | 37 | } |
@@ -31,6 +31,9 @@ |
||
31 | 31 | $this->groupId = $groupId; |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $colLabel |
|
36 | + */ |
|
34 | 37 | function getColumnFromLabel($colLabel) { |
35 | 38 | $col = null; |
36 | 39 | $mdFactory = $this->_getMetadataFactory(); |
@@ -36,6 +36,8 @@ discard block |
||
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Create a report for table view based on URL |
39 | + * @param integer|null $reportId |
|
40 | + * @param boolean $feedback |
|
39 | 41 | */ |
40 | 42 | function &get($reportId, $request, $item, &$feedback) { |
41 | 43 | $report = null; |
@@ -263,6 +265,9 @@ discard block |
||
263 | 265 | return $rai; |
264 | 266 | } |
265 | 267 | |
268 | + /** |
|
269 | + * @param PFUser $user |
|
270 | + */ |
|
266 | 271 | function getPersonalReportsForUser($user) { |
267 | 272 | $ra = array(); |
268 | 273 | $dao =& $this->getDao(); |
@@ -336,6 +341,9 @@ discard block |
||
336 | 341 | return false; |
337 | 342 | } |
338 | 343 | |
344 | + /** |
|
345 | + * @param Docman_Report $report |
|
346 | + */ |
|
339 | 347 | function deleteReport($report) { |
340 | 348 | $dao =& $this->getDao(); |
341 | 349 | $filterFactory = new Docman_FilterFactory($this->groupId); |
@@ -49,6 +49,9 @@ |
||
49 | 49 | return $html; |
50 | 50 | } |
51 | 51 | |
52 | + /** |
|
53 | + * @param ArrayIterator $reportIter |
|
54 | + */ |
|
52 | 55 | function getSelectOptionFromReportIterator($reportIter, $current=null) { |
53 | 56 | $html = ''; |
54 | 57 | $reportIter->rewind(); |
@@ -108,6 +108,9 @@ discard block |
||
108 | 108 | return $dao->updateMetadataUsageForGroupId($this->groupId, $label, $useIt); |
109 | 109 | } |
110 | 110 | |
111 | + /** |
|
112 | + * @param integer $targetGroupId |
|
113 | + */ |
|
111 | 114 | function cloneMetadataSettings($targetGroupId) { |
112 | 115 | if($this->settingsExist()) { |
113 | 116 | $dao =& $this->getDao(); |
@@ -136,6 +139,8 @@ discard block |
||
136 | 139 | |
137 | 140 | /** |
138 | 141 | * @access: private |
142 | + * @param Docman_SettingsBo $srcBo |
|
143 | + * @param string $label |
|
139 | 144 | */ |
140 | 145 | function _importMetadataUsage($srcBo, $label) { |
141 | 146 | if($srcBo->getMetadataUsage($label) == true && |
@@ -31,6 +31,9 @@ |
||
31 | 31 | var $docCounter; |
32 | 32 | var $fldCounter; |
33 | 33 | |
34 | + /** |
|
35 | + * @param integer $groupId |
|
36 | + */ |
|
34 | 37 | function Docman_SubItemsWritableVisitor($groupId, $user) { |
35 | 38 | $this->dpm =& Docman_PermissionsManager::instance($groupId); |
36 | 39 | $this->user = $user; |
@@ -28,6 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Searches Docman_Token by Url |
31 | + * @param integer $user_id |
|
31 | 32 | * @return DataAccessResult |
32 | 33 | */ |
33 | 34 | function searchUrl($user_id, $token) { |
@@ -39,7 +40,9 @@ discard block |
||
39 | 40 | |
40 | 41 | /** |
41 | 42 | * create a row in the table plugin_docman_tokens |
42 | - * @return true or id(auto_increment) if there is no error |
|
43 | + * @param integer $user_id |
|
44 | + * @param string $token |
|
45 | + * @return boolean or id(auto_increment) if there is no error |
|
43 | 46 | */ |
44 | 47 | function create($user_id, $token, $url) { |
45 | 48 | $sql = sprintf("INSERT INTO plugin_docman_tokens (user_id, token, url, created_at) VALUES (%s, %s, %s, NOW())", |
@@ -53,6 +56,7 @@ discard block |
||
53 | 56 | |
54 | 57 | /** |
55 | 58 | * delete a row in the table plugin_docman_tokens |
59 | + * @param integer $user_id |
|
56 | 60 | */ |
57 | 61 | function delete($user_id, $token) { |
58 | 62 | $sql = sprintf("DELETE FROM plugin_docman_tokens WHERE (TO_DAYS(NOW()) - TO_DAYS(created_at)) > 1 OR (user_id = %s AND token = %s)", |