Changeset 2552
- Timestamp:
- 02/03/2010 12:12:19 AM (15 years ago)
- Location:
- trunk/bp-themes/bp-default
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/_inc/ajax.php
r2544 r2552 69 69 } 70 70 71 if ( (int)$_POST['group'] ) { 72 $activity_id = groups_post_update( array( 73 'content' => $_POST['content'], 74 'group_id' => $_POST['group'] 75 )); 76 } else { 71 if ( empty( $_POST['object'] ) ) { 77 72 $activity_id = bp_activity_post_update( array( 78 73 'content' => $_POST['content'] 79 74 )); 75 } elseif ( $_POST['object'] == 'groups' ) { 76 if ( !empty( $_POST['item_id'] ) ) { 77 $activity_id = groups_post_update( array( 78 'content' => $_POST['content'], 79 'group_id' => $_POST['item_id'] 80 )); 81 } 82 } else { 83 $activity_id = apply_filters( 'bp_activity_custom_update', $_POST['object'], $_POST['item_id'], $_POST['content'] ); 80 84 } 81 85 -
trunk/bp-themes/bp-default/_inc/global.js
r2546 r2552 55 55 button.attr('disabled','disabled'); 56 56 57 /* Default POST values */ 58 var object = ''; 59 var item_id = j("#whats-new-post-in").val(); 60 var content = j("textarea#whats-new").val(); 61 62 /* Set object for non-profile posts */ 63 if ( item_id > 0 ) { 64 object = j("#whats-new-post-object").val(); 65 } 66 57 67 j.post( ajaxurl, { 58 68 action: 'post_update', 59 69 'cookie': encodeURIComponent(document.cookie), 60 70 '_wpnonce_post_update': j("input#_wpnonce_post_update").val(), 61 'content': j("textarea#whats-new").val(), 62 'group': j("#whats-new-post-in").val() 71 'content': content, 72 'object': object, 73 'item_id': item_id 63 74 }, 64 75 function(response) -
trunk/bp-themes/bp-default/activity/post-form.php
r2474 r2552 46 46 </select> 47 47 </div> 48 <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" /> 48 49 <?php elseif ( bp_is_group_home() ) : ?> 50 <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" /> 49 51 <input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id() ?>" /> 50 52 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.