Changeset 1030 for devel/profile/profile.class.php
- Timestamp:
- 03/20/07 14:58:20 (2 years ago)
- Files:
-
- devel/profile/profile.class.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/profile/profile.class.php
r1022 r1030 285 285 function field_display ($field, $allvalues) { 286 286 287 global $data , $messages;287 global $data; 288 288 289 289 $run_result = ''; … … 296 296 $fblurb = !empty($field[3]) ? $field[3] : ''; 297 297 $fusertype = !empty($field[4]) ? $field[4] : ''; 298 $finvisible = false;299 $frequired = false;300 298 // Otherwise map things the new way! 301 299 } else { … … 312 310 313 311 // $value = get_record('profile_data','name',$field[1],'owner',$this->id); 314 315 foreach($allvalues as $curvalue) { 316 if ($curvalue->name == stripslashes($fname)) { 317 $value = $curvalue; 318 break; // found it, done! 312 if (is_array($allvalues) && !empty($allvalues)) { 313 foreach($allvalues as $curvalue) { 314 if ($curvalue->name == stripslashes($fname)) { 315 $value = $curvalue; 316 break; // found it, done! 317 } 319 318 } 320 319 } … … 382 381 } 383 382 $friends_username = $info->username; 384 $friends_name = htmlspecialchars(stripslashes( user_name($info->ident)), ENT_COMPAT, 'utf-8');383 $friends_name = htmlspecialchars(stripslashes($info->name), ENT_COMPAT, 'utf-8'); 385 384 $friends_menu = run("users:infobox:menu",array($info->ident)); 386 $friends_icon = user_icon_html($info->ident,$width);387 385 $body .= <<< END 388 386 <td align="center"> 389 387 <p> 390 388 <a href="{$CFG->wwwroot}{$friends_username}/"> 391 {$friends_icon}</a><br />389 <img src="{$CFG->wwwroot}_icon/user/{$info->icon}/w/{$width}" alt="{$friends_name}" border="0" /></a><br /> 392 390 <span class="userdetails"> 393 391 {$friends_name} … … 461 459 WHERE '.$searchline)) { 462 460 foreach($result as $key => $info) { 463 $icon = u ser_icon_html($info->ident,100,true);461 $icon = url . '_icon/user/'.$post->icon; 464 462 $sub_result .= "\t\t\t<item>\n"; 465 $sub_result .= "\t\t\t\t<name><![CDATA[" . htmlspecialchars(stripslashes( user_info($info->ident)), ENT_COMPAT, 'utf-8') . "]]></name>\n";463 $sub_result .= "\t\t\t\t<name><![CDATA[" . htmlspecialchars(stripslashes($info->name), ENT_COMPAT, 'utf-8') . "]]></name>\n"; 466 464 $sub_result .= "\t\t\t\t<link>" . url . htmlspecialchars($info->username, ENT_COMPAT, 'utf-8') . "</link>\n"; 467 465 $sub_result .= "\t\t\t\t<link>$icon</link>\n"; … … 504 502 foreach($result as $key => $info) { 505 503 $run_result .= "\t<item>\n"; 506 $run_result .= "\t\t<title><![CDATA['" . htmlspecialchars($tagtype, ENT_COMPAT, 'utf-8') . "' = " . htmlspecialchars($tagvalue, ENT_COMPAT, 'utf-8') . " :: " . htmlspecialchars(stripslashes( user_info($info->ident)), ENT_COMPAT, 'utf-8') . "]]></title>\n";504 $run_result .= "\t\t<title><![CDATA['" . htmlspecialchars($tagtype, ENT_COMPAT, 'utf-8') . "' = " . htmlspecialchars($tagvalue, ENT_COMPAT, 'utf-8') . " :: " . htmlspecialchars(stripslashes($info->name), ENT_COMPAT, 'utf-8') . "]]></title>\n"; 507 505 $run_result .= "\t\t<link>" . url . htmlspecialchars($info->username, ENT_COMPAT, 'utf-8') . "</link>\n"; 508 506 $run_result .= "\t</item>\n"; … … 920 918 } 921 919 922 $icon = user_icon_html($info->ident,67);923 $name = stripslashes( user_name($info->ident));920 $icon = '<img alt="" src="' . url . '_icon/user/' . $info->icon . '/w/67" />'; 921 $name = stripslashes($info->name); 924 922 $url = url . $info->username . "/"; 925 923
