Changeset 312
- Timestamp:
- 05/08/06 08:41:06 (3 years ago)
- Files:
-
- devel/profile/profile.class.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/profile/profile.class.php
r302 r312 43 43 $url = url; 44 44 45 $run_result = ''; 46 45 47 if (run("permissions:check", "profile")) { 46 48 … … 80 82 81 83 global $data; 84 85 $run_result = ''; 82 86 83 87 $body = "<p>\n" . gettext(" This screen allows you to edit your profile. Blank fields will not show up on your profile screen in any view; you can change the access level for each piece of information in order to prevent it from falling into the wrong hands. For example, we strongly recommend you keep your address to yourself or a few trusted parties.") . "</p>\n"; … … 143 147 144 148 global $data; 149 $run_result = ''; 145 150 // Initial profile data 146 151 … … 255 260 // the field parameter seems to be an array of unknown structure... 256 261 function editfield_display ($field) { 257 $flabel = $field[0]; 258 $fname = $field[1]; 259 $ftype = $field[2]; 260 $fblurb = $field[3]; 262 263 // copy array element with default to '' 264 $flabel = !empty($field[0]) ? $field[0] : ''; 265 $fname = !empty($field[1]) ? $field[1] : ''; 266 $ftype = !empty($field[2]) ? $field[2] : ''; 267 $fblurb = !empty($field[3]) ? $field[3] : ''; 261 268 262 269 global $page_owner; 263 270 global $data; 271 272 $run_result = ''; 264 273 265 274 if (empty($flabel) && empty($fname)) { … … 306 315 307 316 global $data; 317 318 $run_result = ''; 308 319 309 320 if (sizeof($field) >= 2) { … … 346 357 $url = url; 347 358 $handle = 0; 359 $run_result = ''; 360 348 361 foreach($data['profile:details'] as $profiletype) { 349 362 if ($profiletype[1] == $tagtype && $profiletype[2] == "keywords") { … … 420 433 } 421 434 } 422 return $run_result;435 return true; 423 436 } 424 437 … … 432 445 } 433 446 } 434 return $run_result;447 return true; 435 448 } 436 449 … … 440 453 441 454 $handle = 0; 455 $run_result = ''; 456 442 457 foreach($data['profile:details'] as $profiletype) { 443 458 if ($profiletype[1] == $tagtype && $profiletype[2] == "keywords") { … … 482 497 483 498 $handle = 0; 499 $run_result = ''; 500 484 501 foreach($data['profile:details'] as $profiletype) { 485 502 if ($profiletype[1] == $tagtype && $profiletype[2] == "keywords") { … … 607 624 608 625 } 609 return $run_result;626 return true; 610 627 } 611 628 … … 613 630 614 631 global $data; 632 $run_result = ''; 615 633 616 634 // Cycle through all defined profile detail fields and display them … … 631 649 632 650 global $data; 651 $run_result = ''; 633 652 // If $data['foaf:profile'] is set and has elements in it ... 634 653 … … 716 735 717 736 global $data; 737 $run_results = ''; 718 738 // If $data['vcard:profile:adr'] is set and has elements in it ... 719 739 … … 810 830 // Update profile_data table, setting access to $access 811 831 // where the owner is the current user and access = 'group$group_id' 812 set_field('profile_data','access',$access,'access','group'.$group_id,'owner',$USER->ident);813 814 } 815 return $run_result;832 return set_field('profile_data','access',$access,'access','group'.$group_id,'owner',$USER->ident); 833 834 } 835 return true; 816 836 } 817 837 … … 880 900 881 901 // If this is someone else's portfolio, display the user's icon 882 $run_result .= "<div class=\"box_user\">";902 $run_result = "<div class=\"box_user\">"; 883 903 884 904 $info = get_record('users','ident',$page_owner);
