Changeset 1022 for devel/units/profile
- Timestamp:
- 03/12/07 12:10:28 (2 years ago)
- Files:
-
- devel/units/profile/function_display_name.php (modified) (2 diffs)
- devel/units/profile/function_rss_publish.php (modified) (1 diff)
- devel/units/profile/function_search.php (modified) (1 diff)
- devel/units/profile/function_search_ecl.php (modified) (1 diff)
- devel/units/profile/function_search_rss.php (modified) (1 diff)
- devel/units/profile/profile_user_info.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/units/profile/function_display_name.php
r557 r1022 1 1 <?php 2 2 3 // TODO: This should almost certainly be a function rather than a run() command 4 5 if (!defined('profileinit')) { 6 run("profile:init"); 7 } 8 9 global $profile_id; 10 11 $profile_id = (int) $profile_id; 12 13 global $name_cache; 3 // TODO: remove all references to this that aren't a direct reference to the function 14 4 15 5 if (empty($parameter)) { 6 global $profile_id; 7 $profile_id = (int) $profile_id; 16 8 $user_id = $profile_id; 17 9 } else { … … 19 11 } 20 12 21 if (!isset($name_cache[$user_id]) || (time() - $name_cache[$user_id]->created > 60)) { 22 23 $name_cache[$user_id]->created = time(); 24 $name_cache[$user_id]->data = htmlspecialchars(user_info('name',$user_id), ENT_COMPAT, 'utf-8'); 25 26 } 27 $run_result = $name_cache[$user_id]->data; 13 $run_result = user_name($user_id); 28 14 29 15 ?> devel/units/profile/function_rss_publish.php
r659 r1022 36 36 37 37 $info = get_record('users','ident',$userid); 38 $name = stripslashes( $info->name);38 $name = stripslashes(user_name($info->ident)); 39 39 //$username = $info->username; 40 40 $mainurl = url . $username . "/"; devel/units/profile/function_search.php
r876 r1022 54 54 foreach($result as $key => $info) { 55 55 $friends_username = $info->username; 56 // $friends_name = htmlspecialchars(stripslashes($info->name), ENT_COMPAT, 'utf-8');57 56 $friends_name = run("profile:display:name",$info->ident); 58 57 $info->icon = run("icons:get",$info->ident); 58 $friends_icon = user_icon_html($info->ident,$w); 59 59 $body .= <<< END 60 60 <td align="center"> 61 61 <p> 62 62 <a href="{$CFG->wwwroot}{$friends_username}/"> 63 <img src="{$CFG->wwwroot}_icon/user/{$info->icon}/w/{$w}" alt="{$friends_name}" border="0" /></a><br />63 {$friends_icon}</a><br /> 64 64 <span class="userdetails"> 65 65 <a href="{$CFG->wwwroot}{$friends_username}/">{$friends_name}</a> devel/units/profile/function_search_ecl.php
r876 r1022 24 24 foreach($result as $key => $info) { 25 25 26 $icon = u rl . "_icon/user/".$info->icon;26 $icon = user_icon_html($info->ident,100,true); 27 27 28 28 $sub_result .= "\t\t\t<item>\n"; 29 $sub_result .= "\t\t\t\t<name><![CDATA[" . htmlspecialchars(stripslashes( $info->name), ENT_COMPAT, 'utf-8') . "]]></name>\n";29 $sub_result .= "\t\t\t\t<name><![CDATA[" . htmlspecialchars(stripslashes(user_name($info->ident)), ENT_COMPAT, 'utf-8') . "]]></name>\n"; 30 30 $sub_result .= "\t\t\t\t<link>" . url . htmlspecialchars($info->username, ENT_COMPAT, 'utf-8') . "</link>\n"; 31 31 $sub_result .= "\t\t\t\t<link>$icon</link>\n"; devel/units/profile/function_search_rss.php
r876 r1022 22 22 foreach($result as $key => $info) { 23 23 $run_result .= "\t<item>\n"; 24 $run_result .= "\t\t<title><![CDATA['" . htmlspecialchars($parameter[0], ENT_COMPAT, 'utf-8') . "' = " . htmlspecialchars($parameter[1], ENT_COMPAT, 'utf-8') . " :: " . htmlspecialchars(stripslashes( $info->name), ENT_COMPAT, 'utf-8') . "]]></title>\n";24 $run_result .= "\t\t<title><![CDATA['" . htmlspecialchars($parameter[0], ENT_COMPAT, 'utf-8') . "' = " . htmlspecialchars($parameter[1], ENT_COMPAT, 'utf-8') . " :: " . htmlspecialchars(stripslashes(user_name($info->ident)), ENT_COMPAT, 'utf-8') . "]]></title>\n"; 25 25 $run_result .= "\t\t<link>" . url . htmlspecialchars($info->username, ENT_COMPAT, 'utf-8') . "</link>\n"; 26 26 $run_result .= "\t</item>\n"; devel/units/profile/profile_user_info.php
r690 r1022 19 19 $info->icon = run("icons:get", $page_owner); 20 20 21 $icon = '<img alt="" src="'.url. '_icon/user/'.$info->icon.'/h/67/w/67" border="0" />'; // height is the important one here.22 $name = stripslashes( $info->name);21 $icon = user_icon_html($info->ident,67); 22 $name = stripslashes(user_name($info->ident)); 23 23 //$name = run("profile:display:name"); 24 24 $url = url . $info->username . "/";
