@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Get a CSRF token for an optional $purpose, which can be validated |
29 | 29 | * |
30 | - * @param mixed $_purpose=true if given it need to be used in validate too! (It must NOT be NULL) |
|
30 | + * @param mixed $_purpose if given it need to be used in validate too! (It must NOT be NULL) |
|
31 | 31 | * @return string CSRF token |
32 | 32 | */ |
33 | 33 | public static function token($_purpose=true) |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | * Validate a CSRF token or teminate the request |
52 | 52 | * |
53 | 53 | * @param string $_token CSRF token generated with egw_csfr::token() |
54 | - * @param string $_purpose=true optional purpose string passed to token method |
|
55 | - * @param boolean $_delete_token=true true if token should be deleted after validation, it will validate no second time |
|
54 | + * @param string $_purpose optional purpose string passed to token method |
|
55 | + * @param boolean $_delete_token true if token should be deleted after validation, it will validate no second time |
|
56 | 56 | */ |
57 | 57 | public static function validate($_token, $_purpose=true, $_delete_token=true) |
58 | 58 | { |
@@ -159,7 +159,7 @@ |
||
159 | 159 | * @param string $app |
160 | 160 | * @param boolean $all_private_too =false should all the private fields be returned too, default no |
161 | 161 | * @param string $only_type2 =null if given only return fields of type2 == $only_type2 |
162 | - * @return boolen true: if there is a custom field useing html, false if not |
|
162 | + * @return boolean true: if there is a custom field useing html, false if not |
|
163 | 163 | */ |
164 | 164 | public static function use_html($app, $all_private_too=false, $only_type2=null) |
165 | 165 | { |
@@ -691,6 +691,9 @@ discard block |
||
691 | 691 | return (int)(($server_time - $this->gmtnow) / 3600); |
692 | 692 | } |
693 | 693 | |
694 | + /** |
|
695 | + * @param string $date_str |
|
696 | + */ |
|
694 | 697 | function convert_rfc_to_epoch($date_str) |
695 | 698 | { |
696 | 699 | $comma_pos = strpos($date_str,','); |
@@ -993,6 +996,9 @@ discard block |
||
993 | 996 | return $date; |
994 | 997 | } |
995 | 998 | |
999 | + /** |
|
1000 | + * @param integer $localtime |
|
1001 | + */ |
|
996 | 1002 | function gmtdate($localtime) |
997 | 1003 | { |
998 | 1004 | return $this->localdates($localtime - $this->tz_offset); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | } |
287 | 287 | |
288 | 288 | /** |
289 | - * @return int current connection id |
|
289 | + * @return ADOConnection current connection id |
|
290 | 290 | */ |
291 | 291 | function link_id() |
292 | 292 | { |
@@ -692,6 +692,7 @@ discard block |
||
692 | 692 | * Convert a unix timestamp to a rdms specific timestamp |
693 | 693 | * |
694 | 694 | * @param int unix timestamp |
695 | + * @param string $epoch |
|
695 | 696 | * @return string rdms specific timestamp |
696 | 697 | */ |
697 | 698 | function to_timestamp($epoch) |
@@ -945,7 +946,7 @@ discard block |
||
945 | 946 | /** |
946 | 947 | * Rollback the current transaction |
947 | 948 | * |
948 | - * @return bool True if sucessful, False if fails |
|
949 | + * @return false|null True if sucessful, False if fails |
|
949 | 950 | */ |
950 | 951 | function transaction_abort() |
951 | 952 | { |
@@ -991,7 +992,7 @@ discard block |
||
991 | 992 | * @deprecated not used anymore as it costs to much performance, use transactions if needed |
992 | 993 | * @param string $table name of table to lock |
993 | 994 | * @param string $mode type of lock required (optional), default write |
994 | - * @return bool True if sucessful, False if fails |
|
995 | + * @return boolean|null True if sucessful, False if fails |
|
995 | 996 | */ |
996 | 997 | function lock($table, $mode='write') |
997 | 998 | { |
@@ -1002,7 +1003,7 @@ discard block |
||
1002 | 1003 | * Unlock a table |
1003 | 1004 | * |
1004 | 1005 | * @deprecated not used anymore as it costs to much performance, use transactions if needed |
1005 | - * @return bool True if sucessful, False if fails |
|
1006 | + * @return boolean|null True if sucessful, False if fails |
|
1006 | 1007 | */ |
1007 | 1008 | function unlock() |
1008 | 1009 | {} |
@@ -1306,7 +1307,6 @@ discard block |
||
1306 | 1307 | * |
1307 | 1308 | * Example: $db->concat($db->quote('Hallo '),'username') would return |
1308 | 1309 | * for mysql "concat('Hallo ',username)" or "'Hallo ' || username" for postgres |
1309 | - * @param string $str1 already quoted stringliteral or column-name, variable number of arguments |
|
1310 | 1310 | * @return string to be used in a query |
1311 | 1311 | */ |
1312 | 1312 | function concat(/*$str1, ...*/) |
@@ -1326,7 +1326,7 @@ discard block |
||
1326 | 1326 | * @param string $expr column-name or expression optional prefixed with "DISTINCT" |
1327 | 1327 | * @param string $order_by ='' optional order |
1328 | 1328 | * @param string $separator =',' optional separator, default is comma |
1329 | - * @return string|boolean false if not supported by dbms |
|
1329 | + * @return false|string false if not supported by dbms |
|
1330 | 1330 | */ |
1331 | 1331 | function group_concat($expr, $order_by='', $separator=',') |
1332 | 1332 | { |
@@ -1658,7 +1658,7 @@ discard block |
||
1658 | 1658 | * array('visits=visits+1') gives just "visits=visits+1" (no quoting at all !!!) |
1659 | 1659 | * @param boolean|string $use_key If $use_key===True a "$key=" prefix each value (default), typically set to False |
1660 | 1660 | * or 'VALUES' for insert querys, on 'VALUES' "(key1,key2,...) VALUES (val1,val2,...)" is returned |
1661 | - * @param array|boolean $only if set to an array only colums which are set (as data !!!) are written |
|
1661 | + * @param boolean $only if set to an array only colums which are set (as data !!!) are written |
|
1662 | 1662 | * typicaly used to form a WHERE-clause from the primary keys. |
1663 | 1663 | * If set to True, only columns from the colum_definitons are written. |
1664 | 1664 | * @param array|boolean $column_definitions this can be set to the column-definitions-array |
@@ -2133,13 +2133,6 @@ discard block |
||
2133 | 2133 | * gives "(name='test\'ed' AND lang='en') OR 'owner' IN (0,4,5,6,10)" if name,lang are strings and owner is an integer |
2134 | 2134 | * |
2135 | 2135 | * @param string|array $table_def table-name or definition array |
2136 | - * @param mixed $args variable number of arguments of the following types: |
|
2137 | - * string: get's as is into the result |
|
2138 | - * array: column-name / value pairs: the value gets quoted according to the type of the column and prefixed |
|
2139 | - * with column-name=, multiple pairs are AND'ed together, see db::column_data_implode |
|
2140 | - * bool: If False or is_null($arg): the next 2 (!) arguments gets ignored |
|
2141 | - * |
|
2142 | - * Please note: As the function has a variable number of arguments, you CAN NOT add further parameters !!! |
|
2143 | 2136 | * |
2144 | 2137 | * @return string the expression generated from the arguments |
2145 | 2138 | */ |
@@ -2277,7 +2270,7 @@ discard block |
||
2277 | 2270 | * Strip eg. a prefix from the keys of an array |
2278 | 2271 | * |
2279 | 2272 | * @param array $arr |
2280 | - * @param string|array $strip |
|
2273 | + * @param string $strip |
|
2281 | 2274 | * @return array |
2282 | 2275 | */ |
2283 | 2276 | static function strip_array_keys($arr,$strip) |
@@ -2373,7 +2366,7 @@ discard block |
||
2373 | 2366 | * @param Traversable $rs |
2374 | 2367 | * @param callback $callback |
2375 | 2368 | * @param array $params =array() additional parameters, row is always first parameter |
2376 | - * @param $key_callback =null optional callback, if you want different keys |
|
2369 | + * @param Closure $key_callback =null optional callback, if you want different keys |
|
2377 | 2370 | */ |
2378 | 2371 | public function __construct(Traversable $rs, $callback, $params=array(), $key_callback=null) |
2379 | 2372 | { |
@@ -234,7 +234,7 @@ |
||
234 | 234 | * @param string $realm |
235 | 235 | * @param string $username |
236 | 236 | * @param string &$password=null password to use or if null, on return stored password |
237 | - * @return string|boolean false if $password not given and can NOT be read |
|
237 | + * @return false|string false if $password not given and can NOT be read |
|
238 | 238 | */ |
239 | 239 | static private function get_digest_A1($realm,$username,&$password=null) |
240 | 240 | { |
@@ -19,6 +19,9 @@ |
||
19 | 19 | */ |
20 | 20 | class Admin extends App |
21 | 21 | { |
22 | + /** |
|
23 | + * @param string $msg |
|
24 | + */ |
|
22 | 25 | function __construct($msg=null,$code=102) |
23 | 26 | { |
24 | 27 | if (is_null($msg)) $msg = 'admin'; |
@@ -187,7 +187,7 @@ |
||
187 | 187 | * @param string $action "add" or "delete" |
188 | 188 | * @param boolean|int|String $group ID of the group to create the favorite for, or 'all' for all users |
189 | 189 | * @param array $filters key => value pairs for the filter |
190 | - * @return boolean Success |
|
190 | + * @return boolean|null Success |
|
191 | 191 | */ |
192 | 192 | public static function set_favorite($app, $_name, $action, $group, $filters = array()) |
193 | 193 | { |
@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | define("FILTER_DISPLAY", -1); //The element filtered should not be returned to the caller of find, it should not be displayed |
19 | 19 | define("FILTER_ALL", -2); //The element didn't pass the filter |
20 | 20 | |
21 | +/** |
|
22 | + * @param boolean $isurl |
|
23 | + */ |
|
21 | 24 | function translate_path($path, $isurl) { |
22 | 25 | return $isurl ? $path : egw_vfs::PREFIX.parse_url($path, PHP_URL_PATH); |
23 | 26 | } |
@@ -39,6 +42,11 @@ discard block |
||
39 | 42 | public $isdot = false; |
40 | 43 | public $filterstate = FILTER_ALL; |
41 | 44 | |
45 | + /** |
|
46 | + * @param string $path |
|
47 | + * @param boolean $isurl |
|
48 | + * @param boolean $need_mime |
|
49 | + */ |
|
42 | 50 | public function __construct($path, $isurl, $need_mime) |
43 | 51 | { |
44 | 52 | //Copy the given parameters |
@@ -372,6 +380,13 @@ discard block |
||
372 | 380 | } |
373 | 381 | } |
374 | 382 | |
383 | + /** |
|
384 | + * @param RecursiveDirectoryIterator $iterator |
|
385 | + * @param boolean $follow |
|
386 | + * @param boolean $url |
|
387 | + * @param boolean $needmime |
|
388 | + * @param boolean $sort |
|
389 | + */ |
|
375 | 390 | public function __construct($iterator, &$filter, $follow, $url, $needmime, |
376 | 391 | $sort, $sortfunc) |
377 | 392 | { |
@@ -987,7 +987,7 @@ discard block |
||
987 | 987 | /** |
988 | 988 | * Returns html with user and time |
989 | 989 | * |
990 | - * @return void |
|
990 | + * @return string |
|
991 | 991 | */ |
992 | 992 | protected static function _user_time_info() |
993 | 993 | { |
@@ -1115,7 +1115,7 @@ discard block |
||
1115 | 1115 | * |
1116 | 1116 | * @param string $username =null username for regular basic auth |
1117 | 1117 | * @param string $password =null password --------- " ---------- |
1118 | - * @return resource|null context to use with file_get_context/fopen or null if no proxy configured |
|
1118 | + * @return resource context to use with file_get_context/fopen or null if no proxy configured |
|
1119 | 1119 | */ |
1120 | 1120 | public static function proxy_context($username=null, $password=null) |
1121 | 1121 | { |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | * Parse beginning of given CSS file for /*@import url("...") statements |
1461 | 1461 | * |
1462 | 1462 | * @param string $path EGroupware relative path eg. /phpgwapi/templates/default/some.css |
1463 | - * @return array parsed pathes (EGroupware relative) including $path itself |
|
1463 | + * @return string[] parsed pathes (EGroupware relative) including $path itself |
|
1464 | 1464 | */ |
1465 | 1465 | protected static function resolve_css_includes($path, &$pathes=array()) |
1466 | 1466 | { |
@@ -1577,7 +1577,6 @@ discard block |
||
1577 | 1577 | * |
1578 | 1578 | * Themes are css file in the template directory |
1579 | 1579 | * |
1580 | - * @param string $themes_dir ='css' |
|
1581 | 1580 | */ |
1582 | 1581 | function list_themes() |
1583 | 1582 | { |
@@ -1761,11 +1760,6 @@ discard block |
||
1761 | 1760 | /** |
1762 | 1761 | * Add menu items to the topmenu template class to be displayed |
1763 | 1762 | * |
1764 | - * @param array $app application data |
|
1765 | - * @param mixed $alt_label string with alternative menu item label default value = null |
|
1766 | - * @param string $urlextra string with alternate additional code inside <a>-tag |
|
1767 | - * @access protected |
|
1768 | - * @return void |
|
1769 | 1763 | */ |
1770 | 1764 | abstract function _add_topmenu_item(array $app_data,$alt_label=null); |
1771 | 1765 | |
@@ -1974,12 +1968,6 @@ discard block |
||
1974 | 1968 | * @param string $package package or complete path (relative to EGW_SERVER_ROOT) to be included |
1975 | 1969 | * @param string|array $file =null file to be included - no ".js" on the end or array with get params |
1976 | 1970 | * @param string $app ='phpgwapi' application directory to search - default = phpgwapi |
1977 | - * @param boolean $append =true should the file be added |
|
1978 | - * |
|
1979 | - * @discuss The browser specific option loads the file which is in the correct |
|
1980 | - * browser folder. Supported folder are those supported by class.browser.inc.php |
|
1981 | - * |
|
1982 | - * @returns bool was the file found? |
|
1983 | 1971 | */ |
1984 | 1972 | static function validate_file($package, $file=null, $app='phpgwapi') |
1985 | 1973 | { |
@@ -2090,7 +2078,7 @@ discard block |
||
2090 | 2078 | * Generate bundle url(s) for given js files |
2091 | 2079 | * |
2092 | 2080 | * @param array $js_includes |
2093 | - * @param int& $max_modified =null on return maximum modification time of bundle |
|
2081 | + * @param integer $max_modified =null on return maximum modification time of bundle |
|
2094 | 2082 | * @return array js-files (can be more then one, if one of given files can not be bundeled) |
2095 | 2083 | */ |
2096 | 2084 | protected static function bundle_urls(array $js_includes, &$max_modified=null) |
@@ -2382,7 +2370,7 @@ discard block |
||
2382 | 2370 | * @param string $action "add" or "delete" |
2383 | 2371 | * @param boolean|int|string $group ID of the group to create the favorite for, or 'all' for all users |
2384 | 2372 | * @param array $filters =array() key => value pairs for the filter |
2385 | - * @return boolean Success |
|
2373 | + * @return boolean|null Success |
|
2386 | 2374 | */ |
2387 | 2375 | public static function ajax_set_favorite($app, $name, $action, $group, $filters = array()) |
2388 | 2376 | { |