@@ -29,6 +29,9 @@ discard block |
||
29 | 29 | parent::__construct($da); |
30 | 30 | } |
31 | 31 | |
32 | + /** |
|
33 | + * @param integer $itemId |
|
34 | + */ |
|
32 | 35 | function searchLockForItem($itemId) { |
33 | 36 | $sql = 'SELECT *'. |
34 | 37 | ' FROM plugin_docman_item_lock'. |
@@ -84,6 +87,10 @@ discard block |
||
84 | 87 | return $this->retrieve($sql); |
85 | 88 | } |
86 | 89 | |
90 | + /** |
|
91 | + * @param integer $itemId |
|
92 | + * @param integer $userId |
|
93 | + */ |
|
87 | 94 | function addLock($itemId, $userId, $date) { |
88 | 95 | $sql = 'INSERT INTO plugin_docman_item_lock'. |
89 | 96 | ' (item_id, user_id, lock_date)'. |
@@ -95,6 +102,9 @@ discard block |
||
95 | 102 | return $this->update($sql); |
96 | 103 | } |
97 | 104 | |
105 | + /** |
|
106 | + * @param integer $itemId |
|
107 | + */ |
|
98 | 108 | function delLock($itemId) { |
99 | 109 | $sql = 'DELETE FROM plugin_docman_item_lock'. |
100 | 110 | ' WHERE item_id = '.$this->da->quoteSmart($itemId); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | /** |
86 | 86 | * Retrun true if given user locked given item |
87 | 87 | * |
88 | - * @param Intger $itemId Item to test |
|
88 | + * @param integer $itemId Item to test |
|
89 | 89 | * @param PFUser $user User to test |
90 | 90 | * |
91 | 91 | * @return Boolean |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | /** |
113 | 113 | * Return true if item is locked |
114 | 114 | * |
115 | - * @param Docman_Item $item Item to test |
|
115 | + * @param Docman_Item $itemId Item to test |
|
116 | 116 | * |
117 | 117 | * @return Boolean |
118 | 118 | */ |
@@ -252,6 +252,7 @@ |
||
252 | 252 | |
253 | 253 | /** |
254 | 254 | * Search if user accessed the given item after the given date. |
255 | + * @param integer $itemId |
|
255 | 256 | */ |
256 | 257 | function userAccessedSince($userId, $itemId, $date) { |
257 | 258 | return $this->dao->searchUserAccessSince($userId, $itemId, $date); |
@@ -118,7 +118,7 @@ |
||
118 | 118 | |
119 | 119 | /** |
120 | 120 | * create a row in the table plugin_docman_log |
121 | - * @return true or id(auto_increment) if there is no error |
|
121 | + * @return boolean or id(auto_increment) if there is no error |
|
122 | 122 | */ |
123 | 123 | function create($group_id, $item_id, $user_id, $type, $old_value = null, $new_value = null, $field = null) { |
124 | 124 | $sql = 'INSERT INTO plugin_docman_log (time, group_id, item_id, user_id, type'; |
@@ -78,6 +78,10 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | //{{{ Accessors |
81 | + |
|
82 | + /** |
|
83 | + * @param integer $v |
|
84 | + */ |
|
81 | 85 | function setId($v) { |
82 | 86 | $this->id = $v; |
83 | 87 | } |
@@ -106,6 +110,9 @@ discard block |
||
106 | 110 | return $this->type; |
107 | 111 | } |
108 | 112 | |
113 | + /** |
|
114 | + * @param string $v |
|
115 | + */ |
|
109 | 116 | function setLabel($v) { |
110 | 117 | $this->label = $v; |
111 | 118 | } |
@@ -155,6 +162,9 @@ discard block |
||
155 | 162 | return $this->special; |
156 | 163 | } |
157 | 164 | |
165 | + /** |
|
166 | + * @param integer $v |
|
167 | + */ |
|
158 | 168 | function setDefaultValue($v) { |
159 | 169 | $this->defaultValue = $v; |
160 | 170 | } |
@@ -218,6 +228,10 @@ discard block |
||
218 | 228 | |
219 | 229 | //{{{ Changable parameters |
220 | 230 | var $canChangeName; |
231 | + |
|
232 | + /** |
|
233 | + * @param boolean $v |
|
234 | + */ |
|
221 | 235 | function setCanChangeName($v) { |
222 | 236 | $this->canChangeName = $v; |
223 | 237 | } |
@@ -226,6 +240,10 @@ discard block |
||
226 | 240 | } |
227 | 241 | |
228 | 242 | var $canChangeType; |
243 | + |
|
244 | + /** |
|
245 | + * @param boolean $v |
|
246 | + */ |
|
229 | 247 | function setCanChangeType($v) { |
230 | 248 | $this->canChangeType = $v; |
231 | 249 | } |
@@ -234,6 +252,10 @@ discard block |
||
234 | 252 | } |
235 | 253 | |
236 | 254 | var $canChangeDescription; |
255 | + |
|
256 | + /** |
|
257 | + * @param boolean $v |
|
258 | + */ |
|
237 | 259 | function setCanChangeDescription($v) { |
238 | 260 | $this->canChangeDescription = $v; |
239 | 261 | } |
@@ -242,6 +264,10 @@ discard block |
||
242 | 264 | } |
243 | 265 | |
244 | 266 | var $canChangeIsEmptyAllowed; |
267 | + |
|
268 | + /** |
|
269 | + * @param boolean $v |
|
270 | + */ |
|
245 | 271 | function setCanChangeIsEmptyAllowed($v) { |
246 | 272 | $this->canChangeIsEmptyAllowed = $v; |
247 | 273 | } |
@@ -250,6 +276,10 @@ discard block |
||
250 | 276 | } |
251 | 277 | |
252 | 278 | var $canChangeIsMultipleValuesAllowed; |
279 | + |
|
280 | + /** |
|
281 | + * @param boolean $v |
|
282 | + */ |
|
253 | 283 | function setCanChangeIsMultipleValuesAllowed($v) { |
254 | 284 | $this->canChangeIsMultipleValuesAllowed = $v; |
255 | 285 | } |
@@ -258,6 +288,10 @@ discard block |
||
258 | 288 | } |
259 | 289 | |
260 | 290 | var $canChangeValue; |
291 | + |
|
292 | + /** |
|
293 | + * @param boolean $v |
|
294 | + */ |
|
261 | 295 | function setCanChangeValue($v) { |
262 | 296 | $this->canChangeValue = $v; |
263 | 297 | } |
@@ -376,6 +410,9 @@ discard block |
||
376 | 410 | return $i; |
377 | 411 | } |
378 | 412 | |
413 | + /** |
|
414 | + * @param integer $v |
|
415 | + */ |
|
379 | 416 | function setDefaultValue($v) { |
380 | 417 | if(is_a($v, 'Iterator')) { |
381 | 418 | $v->rewind(); |
@@ -27,6 +27,10 @@ discard block |
||
27 | 27 | var $srcGo; |
28 | 28 | var $dstGo; |
29 | 29 | |
30 | + /** |
|
31 | + * @param integer $srcGroupId |
|
32 | + * @param integer $dstGroupId |
|
33 | + */ |
|
30 | 34 | function Docman_MetadataComparator($srcGroupId, $dstGroupId, $themePath) { |
31 | 35 | $this->docmanIcons = new Docman_Icons($themePath.'/images/ic/'); |
32 | 36 | $pm = ProjectManager::instance(); |
@@ -37,6 +41,8 @@ discard block |
||
37 | 41 | /** |
38 | 42 | * For a five object iterator, return an array of object indexed by |
39 | 43 | * $func applied on object. |
44 | + * @param ArrayIterator $iter |
|
45 | + * @param string $func |
|
40 | 46 | */ |
41 | 47 | function getArrayFromIterator($iter, $func) { |
42 | 48 | $a = array(); |
@@ -42,6 +42,9 @@ discard block |
||
42 | 42 | return $this->retrieve($sql); |
43 | 43 | } |
44 | 44 | |
45 | + /** |
|
46 | + * @param boolean $onlyUsed |
|
47 | + */ |
|
45 | 48 | function searchByGroupId($id, $onlyUsed, $type = array()) { |
46 | 49 | $where_clause = ''; |
47 | 50 | if($onlyUsed) { |
@@ -143,6 +146,9 @@ discard block |
||
143 | 146 | |
144 | 147 | } |
145 | 148 | |
149 | + /** |
|
150 | + * @param string $sql |
|
151 | + */ |
|
146 | 152 | function _createAndReturnId($sql) { |
147 | 153 | $inserted = $this->update($sql); |
148 | 154 | if ($inserted) { |
@@ -98,6 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | /** |
100 | 100 | * Create a Metadata object based on DB a entry. |
101 | + * @param string $id |
|
101 | 102 | */ |
102 | 103 | function &getRealMetadata($id) { |
103 | 104 | $md = null; |
@@ -147,6 +148,7 @@ discard block |
||
147 | 148 | * Fetch and append HardCoded metadata variable parameters. |
148 | 149 | * |
149 | 150 | * Some HardCoded are customizable at project level. |
151 | + * @param Docman_Metadata|null $md |
|
150 | 152 | */ |
151 | 153 | function appendHardCodedMetadataParams(&$md) { |
152 | 154 | $sBo =& Docman_SettingsBo::instance($this->groupId); |
@@ -452,6 +454,9 @@ discard block |
||
452 | 454 | return false; |
453 | 455 | } |
454 | 456 | |
457 | + /** |
|
458 | + * @param Docman_Metadata $md |
|
459 | + */ |
|
455 | 460 | function create(&$md) { |
456 | 461 | $md->setGroupId($this->groupId); |
457 | 462 |
@@ -56,6 +56,9 @@ discard block |
||
56 | 56 | return $mdh; |
57 | 57 | } |
58 | 58 | |
59 | + /** |
|
60 | + * @param boolean $whitelist |
|
61 | + */ |
|
59 | 62 | function buildFieldArray($mdIter, $mdla, $whitelist, $formName, $themePath) { |
60 | 63 | $fields = array(); |
61 | 64 | $formParams = array('form_name' => $formName, |
@@ -212,7 +215,7 @@ discard block |
||
212 | 215 | /** |
213 | 216 | * Return field input validator. |
214 | 217 | * |
215 | - * @return string |
|
218 | + * @return Docman_ValidateMetadataIsNotEmpty|null |
|
216 | 219 | */ |
217 | 220 | function &getValidator() { |
218 | 221 | $validator = null; |