Changeset 1289
- Timestamp:
- 01/04/07 09:32:30 (2 years ago)
- Files:
-
- feedmelinks/action.php (modified) (1 diff)
- feedmelinks/admin/delete-all-comments-from-spammer.php (added)
- feedmelinks/admin/index.php (modified) (1 diff)
- feedmelinks/modules/utils.inc.php (modified) (10 diffs)
- feedmelinks/testing/snuff_username.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
feedmelinks/action.php
r1278 r1289 14 14 } 15 15 16 if( $op == "delete_unused_tags" ) { 16 if( $op == "delete_all_comments_from_user" ) { 17 echo "NOT YET IMPLEMENTED -- email jm3@jm3.net and yell at him"; 18 } else { if( $op == "delete_unused_tags" ) { 17 19 18 20 if( $debug ) feedmelinks/admin/index.php
r1270 r1289 32 32 <b>TOOLS</b>:<br /> 33 33 <ul> 34 <li><a href="/admin/delete-all-comments-from-spammer">delete all comments from spammer</a></li> 34 35 <li><a href="/admin/todays-users">today's new users</a></li> 35 36 <li><a href="/admin/re-enable-user">re-enable user</a></li> feedmelinks/modules/utils.inc.php
r1288 r1289 122 122 shell_exec( "cp " . get_webserver_root() . "/admin/.htaccess $f/" ); 123 123 } 124 125 # change their username 126 $q = run_query( getQuery( "snuff_username", $user )); 124 127 125 128 # mark them as snuffed … … 591 594 $pi["r34l"] = true; 592 595 $pi["chrishaney"] = true; 593 $pi[" troubledyouth"] = true;596 $pi["fairybel"] = true; 594 597 595 598 #$pi["rrhobbs"] = true; … … 1773 1776 LEFT JOIN linksCategoriesXRef ON links.ID = linksCategoriesXRef.linkID WHERE linksCategoriesXRef.linkID IS NULL "; 1774 1777 1778 } else if( $argWhichQuery == "snuff_username" ) { 1779 return " 1780 UPDATE linksUsers SET userid = SNUFFED_" . urlencode( $args[1]) . " WHERE userid = '" . urlencode( $args[1]) . "';"; 1781 1775 1782 } else if( $argWhichQuery == "re-enable_user" ) { 1776 1783 return " … … 2473 2480 } 2474 2481 2475 function render_my_comments( $commented_links, $argUser ) { 2482 function render_my_comments( $commented_links, $argUser, $bulk = false ) { 2483 if( $bulk ) { 2484 echo "<form method='post'><p><a href=''>Select all link</a> (not yet implemented)</p>"; 2485 } 2476 2486 foreach( $commented_links as $comment_file ) { 2477 2487 # parse the link id out of the filename … … 2484 2494 $c = parse_comment( $comment ); 2485 2495 if( !$argUser || $c["user"] == $argUser ) { 2496 if( $bulk ) { 2497 ?> 2498 2499 <input type="checkbox" name="comment_<?= $link ?>_<?= $num ?>"/> 2500 2501 <?php 2502 } 2486 2503 echo formatTS( $c["date"] ) . " :\n"; 2487 2504 if( $c["user"] == $owner ) … … 2489 2506 else 2490 2507 echo getBareUserLink( $c["user"] ) . ": \n"; 2491 echo makeLinkOut( $link ) . " "; 2492 echo makePermaLink( $link ); 2508 ?> 2509 <a href="/<?= $link ?>"><?= getTitleForLink( $link ) ?></a> 2510 <a href="/t/<?= $link ?>"><img src="/img/new-window-but.gif" border="0" /></a> 2511 <?php 2512 #echo makeLinkOut( $link ) . " "; 2513 #echo makePermaLink( $link ); 2493 2514 echo "<br />\n"; 2494 2515 echo " <em>" . $c["comment"] . "</em>\n"; … … 2498 2519 $num++; 2499 2520 } 2521 } 2522 if( $bulk ) { 2523 echo "<p><input type='submit' value='Delete all selected'/> (not yet implemented)</p></form>"; 2500 2524 } 2501 2525 } … … 2881 2905 2882 2906 function addCommentToLink( $argId, $argComment, $commenter, $debug ) { 2907 if( snuffed( $commenter )) { 2908 fire( "snuffed user attempting to comment!" ); 2909 return; 2910 } 2883 2911 log_mesg_to( "attempted comment: $argId, $argComment, $commenter, debug: $debug" , "global" ); 2884 2912 … … 2962 2990 echo "(DEBUG: WROTE $bytes_written BYTES TO $linkfile)<br />"; 2963 2991 2964 # NOW WE SEND MAIL: 2965 2966 # for every commenter to this link, past and present... 2992 # NOW WE SEND MAIL; for every commenter to this link, past and present... 2967 2993 $recipients = getCommentersForLink( $link ); 2968 2969 # plus the link owner 2970 array_push( $recipients, $owner ); 2971 2972 # de-dupe it in case the owner commented in the past... 2994 array_push( $recipients, $owner ); # plus the link owner 2995 2996 # de-dupe it in case there were multiple comments byt the same user 2973 2997 $recipients = array_unique( $recipients ); 2974 2998 … … 3007 3031 to $pronoun link \"$linkName\" $proFolder. 3008 3032 3009 click to respond : " . getSiteURL() . "/$link3010 3033 click to respond or delete: " . getSiteURL() . "/$link 3034 3011 3035 rock on, 3012 3036