@@ -73,6 +73,10 @@ discard block |
||
73 | 73 | //node.data object in javascript. |
74 | 74 | //users can add a collection of paramaters that will |
75 | 75 | //be passed to objects responding to tree events |
76 | + |
|
77 | + /** |
|
78 | + * @param string $name |
|
79 | + */ |
|
76 | 80 | function set_property($name, $value, $is_param=false) { |
77 | 81 | if(!empty($name) && ($value === 0 || !empty($value))) { |
78 | 82 | if ($is_param==false) { |
@@ -84,6 +88,10 @@ discard block |
||
84 | 88 | } |
85 | 89 | |
86 | 90 | //add a child node. |
91 | + |
|
92 | + /** |
|
93 | + * @param Node $node |
|
94 | + */ |
|
87 | 95 | function add_node($node) { |
88 | 96 | $this->nodes[$node->uid]=$node; |
89 | 97 | } |
@@ -56,6 +56,7 @@ discard block |
||
56 | 56 | * Calls a custom function (if it exists) based on the first parameter, |
57 | 57 | * and returns result of function call, or 'undefined' if the function doesn't exist |
58 | 58 | * @param string function name to call in custom install hooks |
59 | + * @param string $function_name |
|
59 | 60 | * @return mixed function call result, or 'undefined' |
60 | 61 | */ |
61 | 62 | function installerHook($function_name, $options = array()){ |
@@ -1267,6 +1268,9 @@ discard block |
||
1267 | 1268 | return $ret_val; |
1268 | 1269 | } |
1269 | 1270 | |
1271 | +/** |
|
1272 | + * @param string $start_file |
|
1273 | + */ |
|
1270 | 1274 | function recursive_make_writable($start_file) |
1271 | 1275 | { |
1272 | 1276 | $ret_val = make_writable($start_file); |
@@ -1366,6 +1370,9 @@ discard block |
||
1366 | 1370 | } |
1367 | 1371 | |
1368 | 1372 | |
1373 | +/** |
|
1374 | + * @param string $name |
|
1375 | + */ |
|
1369 | 1376 | function print_debug_array( $name, $debug_array ){ |
1370 | 1377 | ksort( $debug_array ); |
1371 | 1378 | |
@@ -1537,7 +1544,7 @@ discard block |
||
1537 | 1544 | * it will addd to the return array |
1538 | 1545 | * |
1539 | 1546 | * @param intput_array haystack to check |
1540 | - * @param needles list of needles to search for |
|
1547 | + * @param needles string[] of needles to search for |
|
1541 | 1548 | * @param output_array the array to add the keys to |
1542 | 1549 | */ |
1543 | 1550 | function copyFromArray($input_array, $needles, $output_array){ |
@@ -1555,7 +1562,7 @@ discard block |
||
1555 | 1562 | * puts it into the cache/upload dir to be handed off to langPackUnpack(); |
1556 | 1563 | * |
1557 | 1564 | * @param object file UploadFile object |
1558 | - * @return bool true if successful |
|
1565 | + * @return null|boolean true if successful |
|
1559 | 1566 | */ |
1560 | 1567 | function langPackFinalMove($file) { |
1561 | 1568 | global $sugar_config; |
@@ -1567,6 +1574,12 @@ discard block |
||
1567 | 1574 | return true; |
1568 | 1575 | } |
1569 | 1576 | |
1577 | +/** |
|
1578 | + * @param string $type |
|
1579 | + * @param string $manifest |
|
1580 | + * @param string $license_file |
|
1581 | + * @param string $clean_file |
|
1582 | + */ |
|
1570 | 1583 | function getLicenseDisplay($type, $manifest, $zipFile, $next_step, $license_file, $clean_file) { |
1571 | 1584 | return PackageManagerDisplay::getLicenseDisplay($license_file, 'install.php', $next_step, $zipFile, $type, $manifest, $clean_file); |
1572 | 1585 | } |
@@ -1578,6 +1591,8 @@ discard block |
||
1578 | 1591 | * @param string manifest path to manifest file |
1579 | 1592 | * @param string zipFile path to uploaded zip file |
1580 | 1593 | * @param int nextstep current step |
1594 | + * @param string $type |
|
1595 | + * @param string $manifest |
|
1581 | 1596 | * @return string ret <form> for this package |
1582 | 1597 | */ |
1583 | 1598 | function getPackButton($type, $manifest, $zipFile, $next_step, $uninstallable='Yes', $showButtons=true) { |
@@ -1749,6 +1764,9 @@ discard block |
||
1749 | 1764 | } |
1750 | 1765 | |
1751 | 1766 | if ( !function_exists('extractFile') ) { |
1767 | +/** |
|
1768 | + * @return string |
|
1769 | + */ |
|
1752 | 1770 | function extractFile( $zip_file, $file_in_zip, $base_tmp_upgrade_dir){ |
1753 | 1771 | $my_zip_dir = mk_temp_dir( $base_tmp_upgrade_dir ); |
1754 | 1772 | unzip_file( $zip_file, $file_in_zip, $my_zip_dir ); |
@@ -1757,6 +1775,9 @@ discard block |
||
1757 | 1775 | } |
1758 | 1776 | |
1759 | 1777 | if ( !function_exists('extractManifest') ) { |
1778 | +/** |
|
1779 | + * @return string |
|
1780 | + */ |
|
1760 | 1781 | function extractManifest( $zip_file,$base_tmp_upgrade_dir ) { |
1761 | 1782 | return( extractFile( $zip_file, "manifest.php",$base_tmp_upgrade_dir ) ); |
1762 | 1783 | } |
@@ -1997,6 +2018,10 @@ discard block |
||
1997 | 2018 | } |
1998 | 2019 | |
1999 | 2020 | |
2021 | +/** |
|
2022 | + * @param integer $quantity |
|
2023 | + * @param string $string |
|
2024 | + */ |
|
2000 | 2025 | function add_digits($quantity, &$string, $min = 0, $max = 9) { |
2001 | 2026 | for($i=0; $i < $quantity; $i++) { |
2002 | 2027 | $string .= mt_rand($min,$max); |
@@ -2014,6 +2039,11 @@ discard block |
||
2014 | 2039 | return $phone; |
2015 | 2040 | } |
2016 | 2041 | |
2042 | +/** |
|
2043 | + * @param integer $year |
|
2044 | + * @param integer $mnth |
|
2045 | + * @param integer $day |
|
2046 | + */ |
|
2017 | 2047 | function create_date($year=null,$mnth=null,$day=null) |
2018 | 2048 | { |
2019 | 2049 | global $timedate; |
@@ -2028,6 +2058,11 @@ discard block |
||
2028 | 2058 | return $timedate->nowDb(); |
2029 | 2059 | } |
2030 | 2060 | |
2061 | +/** |
|
2062 | + * @param integer $hr |
|
2063 | + * @param integer $min |
|
2064 | + * @param integer $sec |
|
2065 | + */ |
|
2031 | 2066 | function create_time($hr=null,$min=null,$sec=null) |
2032 | 2067 | { |
2033 | 2068 | global $timedate; |
@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | class InstallLayout |
86 | 86 | { |
87 | 87 | |
88 | + /** |
|
89 | + * @param string $name |
|
90 | + */ |
|
88 | 91 | public static function getSelect($name, $options, $default) { |
89 | 92 | $out = "<select name=\"$name\">"; |
90 | 93 | foreach($options as $key => $value) { |
@@ -117,7 +120,7 @@ discard block |
||
117 | 120 | |
118 | 121 | /** |
119 | 122 | * @param $title page title |
120 | - * @param $styles linked css files (string) |
|
123 | + * @param string $styles linked css files (string) |
|
121 | 124 | * @param $scripts linked javascript files (string) |
122 | 125 | * @return string Install page layout header |
123 | 126 | */ |
@@ -138,11 +141,11 @@ discard block |
||
138 | 141 | |
139 | 142 | |
140 | 143 | /** |
141 | - * @param $name form tag name |
|
142 | - * @param $id form tag id |
|
144 | + * @param string $name form tag name |
|
145 | + * @param string $id form tag id |
|
143 | 146 | * @param $errs form errors |
144 | 147 | * @param $title form header line |
145 | - * @param $items form items (string) |
|
148 | + * @param string $items form items (string) |
|
146 | 149 | * @param $controlls form controll buttons (string) |
147 | 150 | * @return string |
148 | 151 | */ |
@@ -178,8 +181,8 @@ discard block |
||
178 | 181 | |
179 | 182 | |
180 | 183 | /** |
181 | - * @param $header install page head |
|
182 | - * @param $form install page form step |
|
184 | + * @param string $header install page head |
|
185 | + * @param string $form install page form step |
|
183 | 186 | * @return string install page |
184 | 187 | */ |
185 | 188 | private function getOutput($header, $form, $sugar_md, $mod_strings) |
@@ -1088,6 +1091,9 @@ discard block |
||
1088 | 1091 | return $out; |
1089 | 1092 | } |
1090 | 1093 | |
1094 | + /** |
|
1095 | + * @param string $formId |
|
1096 | + */ |
|
1091 | 1097 | private function getFormControlls($mod_strings, $formId) { |
1092 | 1098 | $out =<<<EOQ |
1093 | 1099 | <div id="checkingDiv" style="display:none"> |
@@ -60,6 +60,9 @@ |
||
60 | 60 | return $str; |
61 | 61 | } |
62 | 62 | |
63 | +/** |
|
64 | + * @param HelpItem[] $help_items |
|
65 | + */ |
|
63 | 66 | function &format_help_items(&$help_items) |
64 | 67 | { |
65 | 68 | $str = '<table>'; |
@@ -180,6 +180,7 @@ |
||
180 | 180 | |
181 | 181 | /** |
182 | 182 | * |
183 | + * @param string $name |
|
183 | 184 | */ |
184 | 185 | function _quick_create($name) |
185 | 186 | { |
@@ -64,6 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Constructor for creating user demo data |
67 | + * @param integer $seed_user |
|
67 | 68 | */ |
68 | 69 | function UserDemoData($seed_user, $large_scale_test = false) |
69 | 70 | { |
@@ -163,6 +164,7 @@ discard block |
||
163 | 164 | |
164 | 165 | /** |
165 | 166 | * |
167 | + * @param string $name |
|
166 | 168 | */ |
167 | 169 | function _quick_create_user($name) |
168 | 170 | { |
@@ -13,8 +13,8 @@ |
||
13 | 13 | * line and mult-line comments. Pass 2 performs some sanitation on each of the lines |
14 | 14 | * and pass 3 works on stripping out unnecessary spaces. |
15 | 15 | * |
16 | - * @param string $js |
|
17 | - * @param string $currentOptions |
|
16 | + * @param string $text |
|
17 | + * @param string $compression |
|
18 | 18 | * @return void |
19 | 19 | */ |
20 | 20 | private function __construct($text, $compression) { |
@@ -361,6 +361,7 @@ discard block |
||
361 | 361 | * Pushes the index ahead to the next instance of the supplied string. If it is found the first character of the |
362 | 362 | * string is returned. |
363 | 363 | * |
364 | + * @param string $string |
|
364 | 365 | * @return string|false Returns the first character of the string if found, false otherwise. |
365 | 366 | */ |
366 | 367 | protected function getNext($string) |
@@ -449,6 +450,7 @@ discard block |
||
449 | 450 | /** |
450 | 451 | * Checks to see if a character is alphanumeric. |
451 | 452 | * |
453 | + * @param string|false $char |
|
452 | 454 | * @return bool |
453 | 455 | */ |
454 | 456 | static protected function isAlphaNumeric($char) |
@@ -81,6 +81,10 @@ discard block |
||
81 | 81 | * and places the concatenated file in root directory |
82 | 82 | * @from_path root directory where processing should take place |
83 | 83 | */ |
84 | + |
|
85 | + /** |
|
86 | + * @param string $from_path |
|
87 | + */ |
|
84 | 88 | function ConcatenateFiles($from_path){ |
85 | 89 | |
86 | 90 | // Minifying the group files takes a long time sometimes. |
@@ -205,6 +209,9 @@ discard block |
||
205 | 209 | |
206 | 210 | } |
207 | 211 | |
212 | + /** |
|
213 | + * @param string $bu_path |
|
214 | + */ |
|
208 | 215 | function create_backup_folder($bu_path){ |
209 | 216 | $bu_path = str_replace('\\', '/', $bu_path); |
210 | 217 | //get path after root |
@@ -244,6 +251,10 @@ discard block |
||
244 | 251 | * @from_path file name and path to be processed |
245 | 252 | * @to_path file name and path to be used to place newly compressed contents |
246 | 253 | */ |
254 | + |
|
255 | + /** |
|
256 | + * @param string $from_path |
|
257 | + */ |
|
247 | 258 | function CompressFiles($from_path,$to_path){ |
248 | 259 | if(!defined('JSMIN_AS_LIB')){ |
249 | 260 | define('JSMIN_AS_LIB', true); |