Changeset 1403
- Timestamp:
- 03/08/07 21:01:46 (2 years ago)
- Files:
-
- feedmelinks/modules/utils.inc.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/modules/utils.inc.php
r1400 r1403 11 11 define( "IDLENESS", 1 ); 12 12 define( "SPAMMING", 2 ); 13 14 function has_me_as_a_peep( $them, $me ) { 15 $their_peeps = array_to_hash( get_xml_cachelist( get_contacts_file( $them ))); 16 if( $their_peeps[$me] ) 17 return true; 18 else 19 return false; 20 } 21 22 function get_full_peeps( $user ) { return get_full_peeps_driver( $user, 0 ); } 23 function get_full_peeps_reciprocal( $user ) { return get_full_peeps_driver( $user, 1 ); } 24 25 function get_full_peeps_driver( $user, $reciprocate ) { 26 if( ! $user ) 27 return; 28 $peeps = get_contacts( $user ); 29 if( $reciprocate ) 30 foreach( $peeps as $peep => $useless) 31 if( ! has_me_as_a_peep( $peep, $user )) 32 unset( $peeps[$peep] ); # remove people who don't have US as a peep: 33 34 $q = run_query( getQuery( "full_peeps", $peeps )); 35 return $q; 36 } 13 37 14 38 function get_imported_link_and_comment( $raw_name ) { … … 1541 1565 </td> 1542 1566 </tr> 1543 < %1567 <?php 1544 1568 return ob_get_clean(); 1545 1569 } … … 2349 2373 LEFT JOIN links_tags_xref ON links.ID = links_tags_xref.linkID WHERE links_tags_xref.linkID IS NULL "; 2350 2374 2375 } else if( $argWhichQuery == "full_peeps" ) { 2376 $peeps = $args[1]; 2377 $where_clause = ""; 2378 foreach( $peeps as $peep => $useless) { 2379 $peep = urlencode( $peep ); 2380 $where_clause .= " userid = '$peep' OR"; 2381 } 2382 $where_clause = preg_replace( "/OR$/", "", $where_clause ); 2383 return " 2384 SELECT userid, email, im FROM users WHERE $where_clause;"; 2385 2351 2386 } else if( $argWhichQuery == "top_linking_users" ) { 2352 2387 return "