Changeset 4548 for trunk/bp-themes/bp-default/_inc/ajax.php
- Timestamp:
- 06/21/2011 07:22:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/_inc/ajax.php
r4524 r4548 241 241 } 242 242 243 if ( empty( $_POST['id'] ) || !is_numeric( $_POST['id'] ) ) 244 return false; 243 if ( empty( $_POST['id'] ) || !is_numeric( $_POST['id'] ) ) { 244 echo '-1'; 245 return false; 246 } 245 247 246 248 $activity = new BP_Activity_Activity( (int) $_POST['id'] ); 247 249 248 250 // Check access 249 if ( !bp_activity_user_can_delete() ) 250 return false; 251 if ( empty( $activity->user_id ) || !bp_activity_user_can_delete( $activity ) ) { 252 echo '-1'; 253 return false; 254 } 251 255 252 256 // Call the action before the delete so plugins can still fetch information about it … … 257 261 return false; 258 262 } 259 263 260 264 do_action( 'bp_activity_action_delete_activity', $activity->id, $activity->user_id ); 261 265
Note: See TracChangeset
for help on using the changeset viewer.