@@ -707,6 +707,7 @@ |
||
707 | 707 | /** |
708 | 708 | *This function will scan the Manifest for disabled actions specified in $GLOBALS['sugar_config']['moduleInstaller']['disableActions'] |
709 | 709 | *if $GLOBALS['sugar_config']['moduleInstaller']['disableRestrictedCopy'] is set to false or not set it will call on scanCopy to ensure that it is not overriding files |
710 | + * @param string $manifestPath |
|
710 | 711 | */ |
711 | 712 | public function scanManifest($manifestPath) |
712 | 713 | { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | * @param category_id this is passed via POST and is the category id of the release we wish to download |
146 | 146 | * @param package_id this is passed via POST and is the package id of the release we wish to download |
147 | 147 | * @param release_id this is passed via POST and is the release id of the release we wish to download |
148 | - * @return bool true is successful in downloading, false otherwise |
|
148 | + * @return boolean|null true is successful in downloading, false otherwise |
|
149 | 149 | */ |
150 | 150 | function download(){ |
151 | 151 | global $sugar_config; |
@@ -345,8 +345,8 @@ discard block |
||
345 | 345 | /** |
346 | 346 | * Remove metadata files such as foo-manifest |
347 | 347 | * Enter description here ... |
348 | - * @param unknown_type $file |
|
349 | - * @param unknown_type $meta |
|
348 | + * @param string $file |
|
349 | + * @param string $meta |
|
350 | 350 | */ |
351 | 351 | protected function rmMetaFile($file, $meta) |
352 | 352 | { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | /** |
135 | 135 | * Get a list of categories from the SugarDepot |
136 | - * @param category_id the category id of parent to obtain |
|
136 | + * @param category_id string category id of parent to obtain |
|
137 | 137 | * @param filter an array of filters to pass to limit the query |
138 | 138 | * @return array an array of categories for display on the client |
139 | 139 | */ |
@@ -150,6 +150,9 @@ discard block |
||
150 | 150 | return $nodes; |
151 | 151 | } |
152 | 152 | |
153 | + /** |
|
154 | + * @param string $category_id |
|
155 | + */ |
|
153 | 156 | function getPackages($category_id, $filter = array()){ |
154 | 157 | $nodes = array(); |
155 | 158 | $results = PackageManagerComm::getPackages($category_id, $filter); |
@@ -182,10 +185,10 @@ discard block |
||
182 | 185 | /** |
183 | 186 | * Retrieve the package as specified by the $id from the heartbeat server |
184 | 187 | * |
185 | - * @param category_id the category_id to which the release belongs |
|
186 | - * @param package_id the package_id to which the release belongs |
|
187 | - * @param release_id the release_id to download |
|
188 | - * @return filename - the path to which the zip file was saved |
|
188 | + * @param category_id string category_id to which the release belongs |
|
189 | + * @param package_id string package_id to which the release belongs |
|
190 | + * @param release_id string release_id to download |
|
191 | + * @return string|null - the path to which the zip file was saved |
|
189 | 192 | */ |
190 | 193 | public function download($category_id, $package_id, $release_id) |
191 | 194 | { |
@@ -207,8 +210,8 @@ discard block |
||
207 | 210 | * Given the Mambo username, password, and download key attempt to authenticate, if |
208 | 211 | * successful then store these credentials |
209 | 212 | * |
210 | - * @param username Mambo username |
|
211 | - * @param password Mambo password |
|
213 | + * @param username string username |
|
214 | + * @param password string password |
|
212 | 215 | * @param systemname the user's download key |
213 | 216 | * @return true if successful, false otherwise |
214 | 217 | */ |
@@ -261,8 +264,8 @@ discard block |
||
261 | 264 | /** |
262 | 265 | * Retrieve documentation for the given release or package |
263 | 266 | * |
264 | - * @param package_id the specified package to retrieve documentation |
|
265 | - * @param release_id the specified release to retrieve documentation |
|
267 | + * @param package_id string specified package to retrieve documentation |
|
268 | + * @param release_id string specified release to retrieve documentation |
|
266 | 269 | * |
267 | 270 | * @return documents |
268 | 271 | */ |
@@ -356,6 +359,9 @@ discard block |
||
356 | 359 | |
357 | 360 | private $cleanUpDirs = array(); |
358 | 361 | |
362 | + /** |
|
363 | + * @param false|string $dir |
|
364 | + */ |
|
359 | 365 | private function addToCleanup($dir) |
360 | 366 | { |
361 | 367 | if(empty($this->cleanUpDirs)) { |
@@ -380,6 +386,11 @@ discard block |
||
380 | 386 | return( "$my_zip_dir/$file_in_zip" ); |
381 | 387 | } |
382 | 388 | |
389 | + /** |
|
390 | + * @param string $zip_file |
|
391 | + * |
|
392 | + * @return string |
|
393 | + */ |
|
383 | 394 | function extractManifest( $zip_file,$base_tmp_upgrade_dir ) { |
384 | 395 | global $sugar_config; |
385 | 396 | $base_upgrade_dir = $this->upload_dir."/upgrades"; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * A generic function which given a category_id some filter will |
151 | 151 | * return an object which contains categories and packages |
152 | 152 | * |
153 | - * @param category_id the category_id to fetch |
|
153 | + * @param category_id string category_id to fetch |
|
154 | 154 | * @param filter a filter which will limit theh number of results returned |
155 | 155 | * @return categories_and_packages |
156 | 156 | * @see categories_and_packages |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | * Call the PackageManagerDownloader function which uses curl in order to download the specified file |
237 | 237 | * |
238 | 238 | * @param filename the file to download |
239 | - * @return path to downloaded file |
|
239 | + * @return string to downloaded file |
|
240 | 240 | */ |
241 | 241 | static public function performDownload($filename){ |
242 | 242 | PackageManagerComm::initialize(); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | /** |
268 | 268 | * Log that the user has clicked on a document |
269 | 269 | * |
270 | - * @param document_id the document the user has clicked on |
|
270 | + * @param document_id string document the user has clicked on |
|
271 | 271 | */ |
272 | 272 | function downloadedDocumentation($document_id){ |
273 | 273 | PackageManagerComm::initialize(); |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | /** |
294 | 294 | * Ping the server to determine if we have established proper communication |
295 | 295 | * |
296 | - * @return true if we can communicate with the server and false otherwise |
|
296 | + * @return boolean if we can communicate with the server and false otherwise |
|
297 | 297 | */ |
298 | 298 | function isAlive(){ |
299 | 299 | PackageManagerComm::initialize(false); |
@@ -302,6 +302,7 @@ discard block |
||
302 | 302 | * A Static method used to build the initial treeview when the page is first displayed |
303 | 303 | * |
304 | 304 | * @param String div_id - this div in which to display the tree |
305 | + * @param string $div_id |
|
305 | 306 | * @return Tree - the tree that is built |
306 | 307 | */ |
307 | 308 | static function buildTreeView($div_id, $isAlive = true){ |
@@ -332,6 +333,7 @@ discard block |
||
332 | 333 | * @param String type - module/patch.... |
333 | 334 | * @param String manifest - the path to the manifest file |
334 | 335 | * @param String modify_field - the field to update when the radio button is changed |
336 | + * @param string $form_action |
|
335 | 337 | * @return String - a form used to display the license |
336 | 338 | */ |
337 | 339 | function getLicenseDisplay($license_file, $form_action, $next_step, $zipFile, $type, $manifest, $modify_field){ |
@@ -49,7 +49,7 @@ |
||
49 | 49 | * @param save_dir (optional) if specified it will direct where to save the file once downloaded |
50 | 50 | * @param download_sever (optional) if specified it will direct the url for the download |
51 | 51 | * |
52 | - * @return the full path of the saved file |
|
52 | + * @return string full path of the saved file |
|
53 | 53 | */ |
54 | 54 | function download($session_id, $file_name, $save_dir = '', $download_server = ''){ |
55 | 55 | if(empty($save_dir)){ |
@@ -76,6 +76,9 @@ discard block |
||
76 | 76 | } |
77 | 77 | /* END - SECURITY GROUPS */ |
78 | 78 | |
79 | + /** |
|
80 | + * @param string $value |
|
81 | + */ |
|
79 | 82 | static function requireOwner($category, $value, $type='module'){ |
80 | 83 | global $current_user; |
81 | 84 | if(is_admin($current_user))return false; |
@@ -83,6 +86,10 @@ discard block |
||
83 | 86 | } |
84 | 87 | |
85 | 88 | /* BEGIN - SECURITY GROUPS */ |
89 | + |
|
90 | + /** |
|
91 | + * @param string $value |
|
92 | + */ |
|
86 | 93 | static function requireSecurityGroup($category, $value, $type='module'){ |
87 | 94 | global $current_user; |
88 | 95 | if(is_admin($current_user))return false; |
@@ -142,7 +149,7 @@ discard block |
||
142 | 149 | * Check to see if the module is available for this user. |
143 | 150 | * |
144 | 151 | * @param String $module_name |
145 | - * @return true if they are allowed. false otherwise. |
|
152 | + * @return boolean if they are allowed. false otherwise. |
|
146 | 153 | */ |
147 | 154 | static function checkModuleAllowed($module_name, $actions) |
148 | 155 | { |
@@ -158,7 +158,7 @@ |
||
158 | 158 | * returns the label associated with an access level |
159 | 159 | * these label definitions exist in the definitions in modules/ACLActions/actiondefs.php |
160 | 160 | * @param INT $access - the access level you want the color for |
161 | - * @return the access level label or false if the level does not exist |
|
161 | + * @return string|false access level label or false if the level does not exist |
|
162 | 162 | */ |
163 | 163 | protected static function AccessLabel($access){ |
164 | 164 | global $ACLActionAccessLevels; |
@@ -68,7 +68,7 @@ |
||
68 | 68 | * |
69 | 69 | * Sets the relationship between a role and an action and sets the access level of that relationship |
70 | 70 | * |
71 | - * @param GUID $role_id - the role id |
|
71 | + * @param string $role_id - the role id |
|
72 | 72 | * @param GUID $action_id - the ACL Action id |
73 | 73 | * @param int $access - the access level ACL_ALLOW_ALL ACL_ALLOW_NONE ACL_ALLOW_OWNER... |
74 | 74 | */ |