Changeset 1395
- Timestamp:
- 03/05/07 22:48:05 (2 years ago)
- Files:
-
- feedmelinks/modules/utils.inc.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/modules/utils.inc.php
r1394 r1395 987 987 988 988 function apply_tag_by_ID( $link_ID, $tag_ID ) { 989 log_mesg_to( "apply_tag_by_ID( $link_ID, $tag_ID )", "global" );990 989 run_query( getQuery( "add_new_category_xref", $link_ID, $tag_ID )); 990 } 991 992 function remove_tag_by_ID( $link_ID, $tag_ID ) { 993 log_mesg_to( "get_private_tag_ID( $link_ID, $tag_ID )", "global" ); 994 run_query( getQuery( "delete_category_xref", $link_ID, $tag_ID )); 991 995 } 992 996 … … 1366 1370 $new = $old == 1 ? "NULL" : 1; 1367 1371 $new_label = $new == 1 ? "private" : "public"; 1368 if( $new == "NULL" ) 1372 if( $new == "NULL" ) { 1369 1373 run_heuristics( "publicize_link", $arg_user, array( "link" => $arg_link_id )); 1370 else 1374 remove_tag_by_ID( $arg_link_id, get_private_tag_ID( get_user())); 1375 } else 1371 1376 apply_tag_by_ID( $arg_link_id, get_private_tag_ID( get_user())); 1372 1377 … … 2499 2504 2500 2505 } else if( $argWhichQuery == "edit_link_privacy" ) { 2501 if( $args[1] != 1 ) 2506 if( $args[1] != 1 ) { 2502 2507 run_heuristics( "publicize_link", $args[3], array( "link" => $link )); 2503 else 2508 remove_tag_by_ID( $args[2], get_private_tag_ID($args[3])); 2509 } else 2504 2510 apply_tag_by_ID( $args[2], get_private_tag_ID($args[3])); 2505 2511 return " … … 2517 2523 return " 2518 2524 INSERT INTO links_tags_xref VALUES( " . $args[1] . ", " . $args[2] . " ) "; 2525 2526 } else if( $argWhichQuery == "delete_category_xref" ) { 2527 return " 2528 DELETE FROM links_tags_xref where linkID=" . $args[1] . " AND tagID=" . $args[2]; 2519 2529 2520 2530 } else if( $argWhichQuery == "add_link" ) { … … 3715 3725 3716 3726 function setPublic( $argId ) { 3727 remove_tag_by_ID( $argId, get_private_tag_ID( get_user())); 3717 3728 togglePrivate( $argId, "NULL" ); 3718 3729 }