Changeset 5553
- Timestamp:
- 12/14/2011 08:16:29 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-admin.php
r5528 r5553 351 351 $redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to ); 352 352 353 // If an error occur ed, pass back the activity ID that failed353 // If an error occurred, pass back the activity ID that failed 354 354 if ( ! empty( $errors ) ) 355 355 $redirect_to = add_query_arg( 'error', implode ( ',', array_map( 'absint', $errors ) ), $redirect_to ); … … 479 479 do_action_ref_array( 'bp_activity_admin_edit_after', array( &$activity, $error ) ); 480 480 481 // If an error occur ed, pass back the activity ID that failed481 // If an error occurred, pass back the activity ID that failed 482 482 if ( $error ) 483 483 $redirect_to = add_query_arg( 'error', (int) $error, $redirect_to ); … … 771 771 $errors = array_map( 'absint', explode( ',', $errors ) ); 772 772 773 // Make sure we don't get any empty values in $errors 774 for ( $i = 0, $errors_count = count( $errors ); $i < $errors_count; $i++ ) { 775 if ( 0 === $errors[$i] ) 776 unset( $errors[$i] ); 777 } 778 779 // Reindex array 780 $errors = array_values( $errors ); 781 773 782 if ( $deleted > 0 ) 774 $messages[] = sprintf( _n( '%s activity was permanently deleted.', '%s activities werepermanently deleted.', $deleted, 'buddypress' ), number_format_i18n( $deleted ) );783 $messages[] = sprintf( _n( '%s activity has been permanently deleted.', '%s activity items have been permanently deleted.', $deleted, 'buddypress' ), number_format_i18n( $deleted ) ); 775 784 776 785 if ( ! empty( $errors ) ) { 777 786 if ( 1 == count( $errors ) ) { 778 $ error_msg = __( 'An error occurred when updating activity ID #%s.', 'buddypress');787 $messages[] = sprintf( __( 'An error occurred when trying to update activity ID #%s.', 'buddypress' ), number_format_i18n( $errors[0] ) ); 779 788 780 789 } else { 781 $error_msg = __( 'Errors occurred when updating activity IDs:', 'buddypress' );790 $error_msg = __( 'Errors occurred when trying to update these activity items:', 'buddypress' ); 782 791 $error_msg .= '<ul class="activity-errors">'; 783 792 … … 794 803 795 804 if ( $spammed > 0 ) 796 $messages[] = sprintf( _n( '%s activity has been marked as spam.', '%s activities have been marked as spam.', $spammed, 'buddypress' ), number_format_i18n( $spammed ) );805 $messages[] = sprintf( _n( '%s activity has been successfully spammed.', '%s activity items have been successfully spammed.', $spammed, 'buddypress' ), number_format_i18n( $spammed ) ); 797 806 798 807 if ( $unspammed > 0 ) 799 $messages[] = sprintf( _n( '%s activity has been restored from the spam.', '%s activities have been restored from the spam.', $unspammed, 'buddypress' ), number_format_i18n( $unspammed ) );808 $messages[] = sprintf( _n( '%s activity has been successfully unspammed.', '%s activity items have been successfully unspammed.', $unspammed, 'buddypress' ), number_format_i18n( $unspammed ) ); 800 809 801 810 if ( $updated > 0 ) … … 826 835 <?php // If the user has just made a change to an activity item, display the status messages ?> 827 836 <?php if ( !empty( $messages ) ) : ?> 828 <div id="moderated" class="<?php echo ( ! empty( $_REQUEST['error s'] ) ) ? 'error' : 'updated'; ?>"><p><?php echo implode( "<br/>\n", $messages ); ?></p></div>837 <div id="moderated" class="<?php echo ( ! empty( $_REQUEST['error'] ) ) ? 'error' : 'updated'; ?>"><p><?php echo implode( "<br/>\n", $messages ); ?></p></div> 829 838 <?php endif; ?> 830 839
Note: See TracChangeset
for help on using the changeset viewer.