Changeset 4842 for trunk/bp-messages/bp-messages-screens.php
- Timestamp:
- 07/24/2011 10:51:38 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-messages/bp-messages-screens.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-screens.php
r4825 r4842 12 12 global $bp; 13 13 14 if ( !empty( $bp->action_variables) ) {14 if ( bp_action_variables() ) { 15 15 bp_do_404(); 16 16 return; … … 24 24 global $bp; 25 25 26 if ( !empty( $bp->action_variables) ) {26 if ( bp_action_variables() ) { 27 27 bp_do_404(); 28 28 return; … … 36 36 global $bp; 37 37 38 if ( !empty( $bp->action_variables) ) {38 if ( bp_action_variables() ) { 39 39 bp_do_404(); 40 40 return; … … 86 86 87 87 function messages_screen_notices() { 88 global $ bp, $notice_id;88 global $notice_id; 89 89 90 90 if ( !is_super_admin() ) 91 91 return false; 92 92 93 $notice_id = isset( $bp->action_variables[1] ) ? $bp->action_variables[1] : 0;94 93 $notice_id = (int)bp_action_variable( 1 ); 94 95 95 if ( !empty( $notice_id ) && is_numeric( $notice_id ) ) { 96 96 $notice = new BP_Messages_Notice( $notice_id ); 97 97 98 if ( 'deactivate' == $bp->action_variables[0]) {98 if ( bp_is_action_variable( 'deactivate', 0 ) ) { 99 99 if ( !$notice->deactivate() ) { 100 100 bp_core_add_message( __('There was a problem deactivating that notice.', 'buddypress'), 'error' ); … … 102 102 bp_core_add_message( __('Notice deactivated.', 'buddypress') ); 103 103 } 104 } else if ( 'activate' == $bp->action_variables[0]) {104 } else if ( bp_is_action_variable( 'activate', 0 ) ) { 105 105 if ( !$notice->activate() ) { 106 106 bp_core_add_message( __('There was a problem activating that notice.', 'buddypress'), 'error' ); … … 108 108 bp_core_add_message( __('Notice activated.', 'buddypress') ); 109 109 } 110 } else if ( 'delete' == $bp->action_variables[0]) {110 } else if ( bp_is_action_variable( 'delete' ) ) { 111 111 if ( !$notice->delete() ) { 112 112 bp_core_add_message( __('There was a problem deleting that notice.', 'buddypress'), 'buddypress' ); … … 115 115 } 116 116 } 117 bp_core_redirect( $bp->loggedin_user->domain . $bp->messages->slug. '/notices' );117 bp_core_redirect( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices' ); 118 118 } 119 119 120 if ( !empty( $bp->action_variables) ) {120 if ( bp_action_variables() ) { 121 121 bp_do_404(); 122 122 return; … … 131 131 global $bp; 132 132 133 if ( !empty( $bp->action_variables) ) {133 if ( bp_action_variables() ) { 134 134 bp_do_404(); 135 135 return;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)