@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * |
284 | 284 | * @param string the directory name to remove |
285 | 285 | * @param boolean whether to just empty the given directory, without deleting the given directory. |
286 | - * @return boolean True/False whether the directory was deleted. |
|
286 | + * @return boolean|null True/False whether the directory was deleted. |
|
287 | 287 | */ |
288 | 288 | |
289 | 289 | function copyRecursiveBetweenDirectories($from,$to){ |
@@ -1176,6 +1176,7 @@ discard block |
||
1176 | 1176 | |
1177 | 1177 | /** |
1178 | 1178 | * is a file that we blow away automagically |
1179 | + * @param string $file |
|
1179 | 1180 | */ |
1180 | 1181 | function isAutoOverwriteFile($file) { |
1181 | 1182 | $overwriteDirs = array( |
@@ -1811,6 +1812,9 @@ discard block |
||
1811 | 1812 | return $errors; |
1812 | 1813 | } |
1813 | 1814 | |
1815 | +/** |
|
1816 | + * @param string $file_path |
|
1817 | + */ |
|
1814 | 1818 | function fileCopy($file_path){ |
1815 | 1819 | if(file_exists(clean_path($_SESSION['unzip_dir'].'/'.$_SESSION['zip_from_dir'].'/'.$file_path))) { |
1816 | 1820 | $file = clean_path($_SESSION['unzip_dir'].'/'.$_SESSION['zip_from_dir'].'/'.$file_path); |
@@ -1930,6 +1934,9 @@ discard block |
||
1930 | 1934 | } |
1931 | 1935 | |
1932 | 1936 | if ( !function_exists('extractFile') ) { |
1937 | +/** |
|
1938 | + * @return string |
|
1939 | + */ |
|
1933 | 1940 | function extractFile($zip_file, $file_in_zip) { |
1934 | 1941 | global $base_tmp_upgrade_dir; |
1935 | 1942 | |
@@ -1947,6 +1954,9 @@ discard block |
||
1947 | 1954 | } |
1948 | 1955 | |
1949 | 1956 | if ( !function_exists('extractManifest') ) { |
1957 | +/** |
|
1958 | + * @return string |
|
1959 | + */ |
|
1950 | 1960 | function extractManifest($zip_file) { |
1951 | 1961 | logThis('extracting manifest.'); |
1952 | 1962 | return(extractFile($zip_file, "manifest.php")); |
@@ -2027,7 +2037,7 @@ discard block |
||
2027 | 2037 | /** |
2028 | 2038 | * Verifies a manifest from a patch or module to be compatible with the current Sugar version and flavor |
2029 | 2039 | * @param array manifest Standard manifest array |
2030 | - * @return string Error message, blank on success |
|
2040 | + * @return null|boolean Error message, blank on success |
|
2031 | 2041 | */ |
2032 | 2042 | function validate_manifest($manifest) { |
2033 | 2043 | logThis('validating manifest.php file'); |
@@ -2548,6 +2558,9 @@ discard block |
||
2548 | 2558 | } |
2549 | 2559 | } |
2550 | 2560 | |
2561 | +/** |
|
2562 | + * @param boolean $disable |
|
2563 | + */ |
|
2551 | 2564 | function handleExecuteSqlKeys($db, $tableName, $disable) |
2552 | 2565 | { |
2553 | 2566 | if(empty($tableName)) return true; |
@@ -2659,6 +2672,9 @@ discard block |
||
2659 | 2672 | } |
2660 | 2673 | |
2661 | 2674 | |
2675 | +/** |
|
2676 | + * @param string $query |
|
2677 | + */ |
|
2662 | 2678 | function getAlterTable($query){ |
2663 | 2679 | $query = strtolower($query); |
2664 | 2680 | if (preg_match('/^\s*alter\s+table\s+/', $query)) { |
@@ -2877,6 +2893,9 @@ discard block |
||
2877 | 2893 | return $currState; |
2878 | 2894 | } |
2879 | 2895 | |
2896 | +/** |
|
2897 | + * @param string $step |
|
2898 | + */ |
|
2880 | 2899 | function didThisStepRunBefore($step,$SubStep=''){ |
2881 | 2900 | if($step == null) return; |
2882 | 2901 | $upgrade_progress_dir = sugar_cached('upgrades/temp'); |
@@ -3249,7 +3268,7 @@ discard block |
||
3249 | 3268 | * to have the value of the $column_name parameter |
3250 | 3269 | * |
3251 | 3270 | * @param $bean SugarBean which we are adding team_set_id column to |
3252 | - * @param $column_name The name of the column containing the default team_set_id value |
|
3271 | + * @param string $column_name The name of the column containing the default team_set_id value |
|
3253 | 3272 | */ |
3254 | 3273 | function upgradeTeamColumn($bean, $column_name) { |
3255 | 3274 | //first let's check to ensure that the team_set_id field is defined, if not it could be the case that this is an older |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * Loads preference by category from database. Saving will be done in utils.php -> sugar_cleanup |
186 | 186 | * |
187 | 187 | * @param string $category name of the category to retreive, defaults to global scope |
188 | - * @return bool successful? |
|
188 | + * @return null|boolean successful? |
|
189 | 189 | */ |
190 | 190 | public function loadPreferences( |
191 | 191 | $category = 'global' |
@@ -291,7 +291,6 @@ discard block |
||
291 | 291 | * sugar_cleanup if a setPreference has been called during one round trip. |
292 | 292 | * |
293 | 293 | * @global user will use current_user if no user specificed in $user param |
294 | - * @param user $user User object to retrieve, otherwise user current_user |
|
295 | 294 | * @param bool $all save all of the preferences? (Dangerous) |
296 | 295 | * |
297 | 296 | */ |
@@ -387,6 +386,7 @@ discard block |
||
387 | 386 | /** |
388 | 387 | * Updates every user pref with a new key value supports 2 levels deep, use append to |
389 | 388 | * array if you want to append the value to an array |
389 | + * @param string $key |
|
390 | 390 | */ |
391 | 391 | public static function updateAllUserPrefs( |
392 | 392 | $key, |
@@ -187,7 +187,7 @@ |
||
187 | 187 | * This is called on every page hit. |
188 | 188 | * It returns true if the current session is authenticated or false otherwise |
189 | 189 | * |
190 | - * @return booelan |
|
190 | + * @return boolean |
|
191 | 191 | */ |
192 | 192 | public function sessionAuthenticate() |
193 | 193 | { |
@@ -103,7 +103,7 @@ |
||
103 | 103 | /** |
104 | 104 | * Sends the users password to the email address or sends |
105 | 105 | * |
106 | - * @param unknown_type $user_id |
|
106 | + * @param string $user_id |
|
107 | 107 | * @param unknown_type $password |
108 | 108 | */ |
109 | 109 | function sendEmailPassword($user_id, $password){ |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | |
240 | 240 | /** |
241 | 241 | * takes in a name and creates the appropriate search filter for that user name including any additional filters specified in the system settings page |
242 | - * @param $name |
|
242 | + * @param string $name |
|
243 | 243 | * @return String |
244 | 244 | */ |
245 | 245 | function getUserNameFilter($name){ |
@@ -339,6 +339,7 @@ discard block |
||
339 | 339 | /** |
340 | 340 | * @return string appropriate value for username when binding to directory server. |
341 | 341 | * @param string $user_name the value provided in login form |
342 | + * @param string $password |
|
342 | 343 | * @desc Take the login username and return either said username for AD or lookup |
343 | 344 | * distinguished name using anonymous credentials for OpenLDAP. |
344 | 345 | * Contributions by Erik Mitchell [email protected] |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * Generate the request. |
51 | 51 | * |
52 | 52 | * @return |
53 | - * A fully qualified URL that can be redirected to in order to process |
|
53 | + string A fully qualified URL that can be redirected to in order to process |
|
54 | 54 | * the authorization request. |
55 | 55 | */ |
56 | 56 | public function create() { |
@@ -76,6 +76,9 @@ discard block |
||
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | + /** |
|
80 | + * @param integer $length |
|
81 | + */ |
|
79 | 82 | private function generateUniqueID($length) { |
80 | 83 | $chars = "abcdef0123456789"; |
81 | 84 | $chars_len = strlen($chars); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * Determine if the document passes the security test. |
62 | 62 | * |
63 | 63 | * @return |
64 | - * TRUE if the document passes. This could throw a generic Exception |
|
64 | + boolean TRUE if the document passes. This could throw a generic Exception |
|
65 | 65 | * if the document or key cannot be found. |
66 | 66 | */ |
67 | 67 |
@@ -46,6 +46,9 @@ discard block |
||
46 | 46 | */ |
47 | 47 | |
48 | 48 | /* helper function */ |
49 | +/** |
|
50 | + * @param DOMNodeList $arAtts |
|
51 | + */ |
|
49 | 52 | function sortAndAddAttrs($element, $arAtts) { |
50 | 53 | $newAtts = array(); |
51 | 54 | foreach ($arAtts AS $attnode) { |
@@ -58,6 +61,10 @@ discard block |
||
58 | 61 | } |
59 | 62 | |
60 | 63 | /* helper function */ |
64 | +/** |
|
65 | + * @param DOMDocument $tree |
|
66 | + * @param boolean $withcomments |
|
67 | + */ |
|
61 | 68 | function canonical($tree, $element, $withcomments) { |
62 | 69 | if ($tree->nodeType != XML_DOCUMENT_NODE) { |
63 | 70 | $dom = $tree->ownerDocument; |
@@ -433,6 +440,9 @@ discard block |
||
433 | 440 | return openssl_verify ($data, $signature, $this->key, $algo); |
434 | 441 | } |
435 | 442 | |
443 | + /** |
|
444 | + * @return string |
|
445 | + */ |
|
436 | 446 | public function encryptData($data) { |
437 | 447 | switch ($this->cryptParams['library']) { |
438 | 448 | case 'mcrypt': |
@@ -444,6 +454,11 @@ discard block |
||
444 | 454 | } |
445 | 455 | } |
446 | 456 | |
457 | + /** |
|
458 | + * @param string $data |
|
459 | + * |
|
460 | + * @return string |
|
461 | + */ |
|
447 | 462 | public function decryptData($data) { |
448 | 463 | switch ($this->cryptParams['library']) { |
449 | 464 | case 'mcrypt': |
@@ -475,6 +490,9 @@ discard block |
||
475 | 490 | return $this->cryptParams['method']; |
476 | 491 | } |
477 | 492 | |
493 | + /** |
|
494 | + * @param integer $type |
|
495 | + */ |
|
478 | 496 | static function makeAsnSegment($type, $string) { |
479 | 497 | switch ($type){ |
480 | 498 | case 0x02: |
@@ -501,6 +519,11 @@ discard block |
||
501 | 519 | } |
502 | 520 | |
503 | 521 | /* Modulus and Exponent must already be base64 decoded */ |
522 | + |
|
523 | + /** |
|
524 | + * @param string $modulus |
|
525 | + * @param string $exponent |
|
526 | + */ |
|
504 | 527 | static function convertRSA($modulus, $exponent) { |
505 | 528 | /* make an ASN publicKeyInfo */ |
506 | 529 | $exponentEncoding = XMLSecurityKey::makeAsnSegment(0x02, $exponent); |
@@ -533,7 +556,7 @@ discard block |
||
533 | 556 | * Will return the X509 certificate in PEM-format if this key represents |
534 | 557 | * an X509 certificate. |
535 | 558 | * |
536 | - * @return The X509 certificate or NULL if this key doesn't represent an X509-certificate. |
|
559 | + * @return string|null X509 certificate or NULL if this key doesn't represent an X509-certificate. |
|
537 | 560 | */ |
538 | 561 | public function getX509Certificate() { |
539 | 562 | return $this->x509Certificate; |
@@ -596,6 +619,9 @@ discard block |
||
596 | 619 | return $guid; |
597 | 620 | } |
598 | 621 | |
622 | + /** |
|
623 | + * @param string $objDoc |
|
624 | + */ |
|
599 | 625 | public function locateSignature($objDoc) { |
600 | 626 | if ($objDoc instanceof DOMDocument) { |
601 | 627 | $doc = $objDoc; |
@@ -613,6 +639,9 @@ discard block |
||
613 | 639 | return NULL; |
614 | 640 | } |
615 | 641 | |
642 | + /** |
|
643 | + * @param string $name |
|
644 | + */ |
|
616 | 645 | public function createNewSignNode($name, $value=NULL) { |
617 | 646 | $doc = $this->sigNode->ownerDocument; |
618 | 647 | if (! is_null($value)) { |
@@ -1045,6 +1074,9 @@ discard block |
||
1045 | 1074 | return NULL; |
1046 | 1075 | } |
1047 | 1076 | |
1077 | + /** |
|
1078 | + * @param XMLSecurityKey $objKey |
|
1079 | + */ |
|
1048 | 1080 | public function verify($objKey) { |
1049 | 1081 | $doc = $this->sigNode->ownerDocument; |
1050 | 1082 | $xpath = new DOMXPath($doc); |
@@ -1057,6 +1089,9 @@ discard block |
||
1057 | 1089 | return $objKey->verifySignature($this->signedInfo, base64_decode($sigValue)); |
1058 | 1090 | } |
1059 | 1091 | |
1092 | + /** |
|
1093 | + * @return string |
|
1094 | + */ |
|
1060 | 1095 | public function signData($objKey, $data) { |
1061 | 1096 | return $objKey->signData($data); |
1062 | 1097 | } |
@@ -1152,6 +1187,9 @@ discard block |
||
1152 | 1187 | } |
1153 | 1188 | } |
1154 | 1189 | |
1190 | + /** |
|
1191 | + * @param DOMNode $parentRef |
|
1192 | + */ |
|
1155 | 1193 | static function staticAdd509Cert($parentRef, $cert, $isPEMFormat=TRUE, $isURL=False, $xpath=NULL) { |
1156 | 1194 | if ($isURL) { |
1157 | 1195 | $cert = file_get_contents($cert); |
@@ -338,7 +338,7 @@ |
||
338 | 338 | /** |
339 | 339 | * Fetches user by provided ID and field name |
340 | 340 | * |
341 | - * @param mixed $id |
|
341 | + * @param string $id |
|
342 | 342 | * @param string $field |
343 | 343 | * @return User |
344 | 344 | */ |