Changeset 412
- Timestamp:
- 05/19/07 21:59:09 (2 years ago)
- Files:
-
- bb-moderation-hold/trunk/moderation.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
bb-moderation-hold/trunk/moderation.php
r410 r412 1 1 <?php 2 2 /* 3 Plugin Name: Moderation Hold3 Plugin Name: BB Moderation Hold 4 4 Plugin URI: http://www.adityanaik.com 5 5 Description: Hold posts and topics for moderation 6 6 Author: Aditya Naik 7 7 Author URI: http://www.adityanaik.com/ 8 Version: 0. 28 Version: 0.1 9 9 */ 10 10 … … 13 13 * 14 14 * @author Aditya Naik <aditya@adityanaik.com> 15 * @version v 0.0 2Sun Apr 08 2007 02:12:09 GMT-0400 (Eastern Daylight Time)15 * @version v 0.01 Sun Apr 08 2007 02:12:09 GMT-0400 (Eastern Daylight Time) 16 16 */ 17 17 add_action( 'bb_admin_menu_generator', 'bb_moderation_hold_add_admin_page' ); … … 28 28 * 29 29 * @author Aditya Naik <aditya@adityanaik.com> 30 * @version v 0.0 2Sun Apr 08 2007 02:12:05 GMT-0400 (Eastern Daylight Time)30 * @version v 0.01 Sun Apr 08 2007 02:12:05 GMT-0400 (Eastern Daylight Time) 31 31 */ 32 32 function bb_moderation_hold_admin_page() { … … 208 208 * 209 209 * @author Aditya Naik <aditya@adityanaik.com> 210 * @version v 0.0 2Sun Apr 08 2007 02:11:58 GMT-0400 (Eastern Daylight Time)210 * @version v 0.01 Sun Apr 08 2007 02:11:58 GMT-0400 (Eastern Daylight Time) 211 211 */ 212 212 add_action( 'bb_admin-header.php','bb_moderation_hold_process_post'); … … 352 352 * 353 353 * @author Aditya Naik <aditya@adityanaik.com> 354 * @version v 0.0 2Tue Apr 10 2007 23:29:07 GMT-0400 (Eastern Daylight Time)354 * @version v 0.01 Tue Apr 10 2007 23:29:07 GMT-0400 (Eastern Daylight Time) 355 355 */ 356 356 function bb_moderation_hold_after_posting_do_the_magic($post_id){ … … 438 438 add_filter('post_delete_link','bb_moderation_fix_delete_link',10,3); 439 439 440 /** 441 * Add a delete/moderate link to posts 442 * 443 * @author Aditya Naik <aditya@adityanaik.com> 444 * @version v 0.01 Tue Apr 10 2007 23:30:05 GMT-0400 (Eastern Daylight Time) 445 */ 440 446 function bb_moderation_fix_delete_link($r, $post_status, $post_id){ 441 447 if (-1 == $post_status) … … 444 450 } 445 451 446 //add_action('bb_new_topic','bb_moderation_fix_topic_count');447 function bb_moderation_fix_topic_count($topic_id) {448 global $bbdb;449 $topic = $bbdb->get_results("SELECT * from $bbdb->topics where topic_id = $topic_id");450 $bbdb->query("UPDATE $bbdb->forums SET topics = topics - 1 WHERE forum_id = $topic->forum_id");451 $bb_cache->flush_many( 'forum', $forum_id );452 }453 454 452 ?>
