@@ -145,19 +145,19 @@ discard block |
||
| 145 | 145 | var $categories; |
| 146 | 146 | |
| 147 | 147 | /** |
| 148 | - * Tracking changes |
|
| 149 | - * |
|
| 150 | - * @var Contacts\Tracking |
|
| 151 | - */ |
|
| 148 | + * Tracking changes |
|
| 149 | + * |
|
| 150 | + * @var Contacts\Tracking |
|
| 151 | + */ |
|
| 152 | 152 | protected $tracking; |
| 153 | 153 | |
| 154 | 154 | /** |
| 155 | - * Keep deleted addresses, or really delete them |
|
| 156 | - * Set in Admin -> Addressbook -> Site Configuration |
|
| 157 | - * ''=really delete, 'history'=keep, only admins delete, 'userpurge'=keep, users delete |
|
| 158 | - * |
|
| 159 | - * @var string |
|
| 160 | - */ |
|
| 155 | + * Keep deleted addresses, or really delete them |
|
| 156 | + * Set in Admin -> Addressbook -> Site Configuration |
|
| 157 | + * ''=really delete, 'history'=keep, only admins delete, 'userpurge'=keep, users delete |
|
| 158 | + * |
|
| 159 | + * @var string |
|
| 160 | + */ |
|
| 161 | 161 | protected $delete_history = ''; |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -786,13 +786,13 @@ discard block |
||
| 786 | 786 | } |
| 787 | 787 | |
| 788 | 788 | /** |
| 789 | - * deletes contact in db |
|
| 790 | - * |
|
| 791 | - * @param mixed &$contact contact array with key id or (array of) id(s) |
|
| 792 | - * @param boolean $deny_account_delete =true if true never allow to delete accounts |
|
| 793 | - * @param int $check_etag =null |
|
| 794 | - * @return boolean|int true on success or false on failiure, 0 if etag does not match |
|
| 795 | - */ |
|
| 789 | + * deletes contact in db |
|
| 790 | + * |
|
| 791 | + * @param mixed &$contact contact array with key id or (array of) id(s) |
|
| 792 | + * @param boolean $deny_account_delete =true if true never allow to delete accounts |
|
| 793 | + * @param int $check_etag =null |
|
| 794 | + * @return boolean|int true on success or false on failiure, 0 if etag does not match |
|
| 795 | + */ |
|
| 796 | 796 | function delete($contact,$deny_account_delete=true,$check_etag=null) |
| 797 | 797 | { |
| 798 | 798 | if (is_array($contact) && isset($contact['id'])) |
@@ -844,12 +844,12 @@ discard block |
||
| 844 | 844 | } |
| 845 | 845 | |
| 846 | 846 | /** |
| 847 | - * saves contact to db |
|
| 848 | - * |
|
| 849 | - * @param array &$contact contact array from etemplate::exec |
|
| 850 | - * @param boolean $ignore_acl =false should the acl be checked or not |
|
| 851 | - * @return int/string/boolean id on success, false on failure, the error-message is in $this->error |
|
| 852 | - */ |
|
| 847 | + * saves contact to db |
|
| 848 | + * |
|
| 849 | + * @param array &$contact contact array from etemplate::exec |
|
| 850 | + * @param boolean $ignore_acl =false should the acl be checked or not |
|
| 851 | + * @return int/string/boolean id on success, false on failure, the error-message is in $this->error |
|
| 852 | + */ |
|
| 853 | 853 | function save(&$contact,$ignore_acl=false) |
| 854 | 854 | { |
| 855 | 855 | // remember if we add or update a entry |
@@ -1069,12 +1069,12 @@ discard block |
||
| 1069 | 1069 | } |
| 1070 | 1070 | |
| 1071 | 1071 | /** |
| 1072 | - * reads contacts matched by key and puts all cols in the data array |
|
| 1073 | - * |
|
| 1074 | - * @param int|string $contact_id |
|
| 1075 | - * @param boolean $ignore_acl =false true: no acl check |
|
| 1076 | - * @return array|boolean array with contact data, null if not found or false on no view perms |
|
| 1077 | - */ |
|
| 1072 | + * reads contacts matched by key and puts all cols in the data array |
|
| 1073 | + * |
|
| 1074 | + * @param int|string $contact_id |
|
| 1075 | + * @param boolean $ignore_acl =false true: no acl check |
|
| 1076 | + * @return array|boolean array with contact data, null if not found or false on no view perms |
|
| 1077 | + */ |
|
| 1078 | 1078 | function read($contact_id, $ignore_acl=false) |
| 1079 | 1079 | { |
| 1080 | 1080 | // get so_sql_cf to read private customfields too, if we ignore acl |
@@ -255,20 +255,20 @@ |
||
| 255 | 255 | */ |
| 256 | 256 | static public function parse_digest($txt) |
| 257 | 257 | { |
| 258 | - // protect against missing data |
|
| 259 | - $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1); |
|
| 260 | - $data = array(); |
|
| 261 | - $keys = implode('|', array_keys($needed_parts)); |
|
| 258 | + // protect against missing data |
|
| 259 | + $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1); |
|
| 260 | + $data = array(); |
|
| 261 | + $keys = implode('|', array_keys($needed_parts)); |
|
| 262 | 262 | |
| 263 | 263 | $matches = null; |
| 264 | - preg_match_all('@(' . $keys . ')=(?:([\'"])([^\2]+?)\2|([^\s,]+))@', $txt, $matches, PREG_SET_ORDER); |
|
| 264 | + preg_match_all('@(' . $keys . ')=(?:([\'"])([^\2]+?)\2|([^\s,]+))@', $txt, $matches, PREG_SET_ORDER); |
|
| 265 | 265 | |
| 266 | - foreach ($matches as $m) |
|
| 267 | - { |
|
| 268 | - $data[$m[1]] = $m[3] ? $m[3] : $m[4]; |
|
| 269 | - unset($needed_parts[$m[1]]); |
|
| 270 | - } |
|
| 271 | - //error_log(__METHOD__."('$txt') returning ".array2string($needed_parts ? false : $data)); |
|
| 272 | - return $needed_parts ? false : $data; |
|
| 266 | + foreach ($matches as $m) |
|
| 267 | + { |
|
| 268 | + $data[$m[1]] = $m[3] ? $m[3] : $m[4]; |
|
| 269 | + unset($needed_parts[$m[1]]); |
|
| 270 | + } |
|
| 271 | + //error_log(__METHOD__."('$txt') returning ".array2string($needed_parts ? false : $data)); |
|
| 272 | + return $needed_parts ? false : $data; |
|
| 273 | 273 | } |
| 274 | 274 | } |
@@ -224,13 +224,13 @@ |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | /** |
| 227 | - * Ajax callback to receive an incoming file |
|
| 228 | - * |
|
| 229 | - * The incoming file is automatically placed into the appropriate VFS location. |
|
| 230 | - * If the entry is not yet created, the file information is stored into the widget's value. |
|
| 231 | - * When the form is submitted, the information for all files uploaded is available in the returned |
|
| 232 | - * $content array and the application should deal with the file. |
|
| 233 | - */ |
|
| 227 | + * Ajax callback to receive an incoming file |
|
| 228 | + * |
|
| 229 | + * The incoming file is automatically placed into the appropriate VFS location. |
|
| 230 | + * If the entry is not yet created, the file information is stored into the widget's value. |
|
| 231 | + * When the form is submitted, the information for all files uploaded is available in the returned |
|
| 232 | + * $content array and the application should deal with the file. |
|
| 233 | + */ |
|
| 234 | 234 | public static function store_file($path, $file) |
| 235 | 235 | { |
| 236 | 236 | $name = $_REQUEST['widget_id']; |
@@ -238,10 +238,10 @@ |
||
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | /** |
| 241 | - * Delete a directory RECURSIVELY |
|
| 242 | - * @param string $dir - directory path |
|
| 243 | - * @link http://php.net/manual/en/function.rmdir.php |
|
| 244 | - */ |
|
| 241 | + * Delete a directory RECURSIVELY |
|
| 242 | + * @param string $dir - directory path |
|
| 243 | + * @link http://php.net/manual/en/function.rmdir.php |
|
| 244 | + */ |
|
| 245 | 245 | private static function rrmdir($dir) |
| 246 | 246 | { |
| 247 | 247 | if (is_dir($dir)) |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * while it uses select-account for owner in historylog (containing all users). |
| 34 | 34 | * |
| 35 | 35 | * @param string $cname |
| 36 | - */ |
|
| 36 | + */ |
|
| 37 | 37 | public function beforeSendToClient($cname) |
| 38 | 38 | { |
| 39 | 39 | $form_name = self::form_name($cname, $this->id); |
@@ -903,12 +903,12 @@ |
||
| 903 | 903 | } |
| 904 | 904 | |
| 905 | 905 | /** |
| 906 | - * Check if we have not ignored validation errors |
|
| 907 | - * |
|
| 908 | - * @param string $ignore_validation ='' if not empty regular expression for validation-errors to ignore |
|
| 909 | - * @param string $cname =null name-prefix, which need to be ignored, default self::$name_vars |
|
| 910 | - * @return boolean true if there are not ignored validation errors, false otherwise |
|
| 911 | - */ |
|
| 906 | + * Check if we have not ignored validation errors |
|
| 907 | + * |
|
| 908 | + * @param string $ignore_validation ='' if not empty regular expression for validation-errors to ignore |
|
| 909 | + * @param string $cname =null name-prefix, which need to be ignored, default self::$name_vars |
|
| 910 | + * @return boolean true if there are not ignored validation errors, false otherwise |
|
| 911 | + */ |
|
| 912 | 912 | public static function validation_errors($ignore_validation='',$cname='') |
| 913 | 913 | { |
| 914 | 914 | // not yet used: if (is_null($cname)) $cname = self::$name_vars; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | { |
| 33 | 33 | $GLOBALS['egw_info']['flags']['currentapp'] = 'etemplate'; |
| 34 | 34 | $GLOBALS['egw_info']['flags']['app_header'] = 'et2 Widgets'; |
| 35 | - //'js_link_registry' => True, |
|
| 35 | + //'js_link_registry' => True, |
|
| 36 | 36 | |
| 37 | 37 | // Widget browser code |
| 38 | 38 | Api\Framework::includeJS('/api/js/etemplate/widget_browser.js'); |
@@ -962,7 +962,7 @@ |
||
| 962 | 962 | 'account_fullname' => 'cn', |
| 963 | 963 | ); |
| 964 | 964 | if (!isset($to_ldap[$which]) || $account_type === 'g') { |
| 965 | - return False; |
|
| 965 | + return False; |
|
| 966 | 966 | } |
| 967 | 967 | |
| 968 | 968 | $sri = ldap_search($this->ds, $this->user_context, '(&('.$to_ldap[$which].'=' . $name . ')(objectclass=posixaccount))', array('uidNumber')); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $j = 0; |
| 120 | 120 | // Add newline |
| 121 | 121 | if ($i !== $len-1){ |
| 122 | - echo "\n"; |
|
| 122 | + echo "\n"; |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -544,12 +544,12 @@ discard block |
||
| 544 | 544 | if(!empty($v[4])){ // + input text box |
| 545 | 545 | echo '<input type="radio" name="h', $k, '" value="', $j, '"', (((isset($_POST['h'. $k]) && $_POST['h'. $k] == $j) or (!isset($_POST['h'. $k]) && $j == $v[1])) ? ' checked="checked"' : ''), (isset($v['d']) ? ' disabled="disabled"' : ''), ' />'; |
| 546 | 546 | if(!is_array($v[4])){ |
| 547 | - echo $v[6], ': <input type="text" size="', $v[4], '" name="h', $k. $j, '" value="', htmlspecialchars(isset($_POST['h'. $k. $j][0]) ? $_POST['h'. $k. $j] : $v[5]), '"', (isset($v['d']) ? ' disabled="disabled"' : ''), ' />'; |
|
| 547 | + echo $v[6], ': <input type="text" size="', $v[4], '" name="h', $k. $j, '" value="', htmlspecialchars(isset($_POST['h'. $k. $j][0]) ? $_POST['h'. $k. $j] : $v[5]), '"', (isset($v['d']) ? ' disabled="disabled"' : ''), ' />'; |
|
| 548 | 548 | } |
| 549 | 549 | else{ |
| 550 | - foreach($v[4] as $z){ |
|
| 551 | - echo ' ', $z[3], ': <input type="text" size="', $z[0], '" name="h', $k. $j. $z[1], '" value="', htmlspecialchars(isset($_POST['h'. $k. $j. $z[1]][0]) ? $_POST['h'. $k. $j. $z[1]] : $z[2]), '"', (isset($v['d']) ? ' disabled="disabled"' : ''), ' />'; |
|
| 552 | - } |
|
| 550 | + foreach($v[4] as $z){ |
|
| 551 | + echo ' ', $z[3], ': <input type="text" size="', $z[0], '" name="h', $k. $j. $z[1], '" value="', htmlspecialchars(isset($_POST['h'. $k. $j. $z[1]][0]) ? $_POST['h'. $k. $j. $z[1]] : $z[2]), '"', (isset($v['d']) ? ' disabled="disabled"' : ''), ' />'; |
|
| 552 | + } |
|
| 553 | 553 | } |
| 554 | 554 | } |
| 555 | 555 | } |