diff --git src/bp-core/admin/bp-core-admin-tools.php src/bp-core/admin/bp-core-admin-tools.php
index 0d49c0d6f..3daeca67e 100644
|
|
function bp_core_admin_tools() { |
26 | 26 | <p><?php esc_html_e( 'Occasionally these relationships become out of sync, most often after an import, update, or migration.', 'buddypress' ); ?></p> |
27 | 27 | <p><?php esc_html_e( 'Use the tools below to manually recalculate these relationships.', 'buddypress' ); ?> |
28 | 28 | </p> |
29 | | <p class="attention"><?php esc_html_e( 'Some of these tools create substantial database overhead. Avoid running more than one repair job at a time.', 'buddypress' ); ?></p> |
30 | 29 | |
31 | | <h2><?php esc_html_e( 'Activate checkboxe(s) to select the operation(s) to perform', 'buddypress' ); ?></h2> |
| 30 | <h2><?php esc_html_e( 'Select the operation to perform', 'buddypress' ); ?></h2> |
32 | 31 | |
33 | 32 | <form class="settings" method="post" action=""> |
34 | 33 | |
… |
… |
function bp_core_admin_tools() { |
38 | 37 | <?php foreach ( bp_admin_repair_list() as $item ) : ?> |
39 | 38 | <p> |
40 | 39 | <label for="<?php echo esc_attr( str_replace( '_', '-', $item[0] ) ); ?>"> |
41 | | <input type="checkbox" class="checkbox" name="<?php echo esc_attr( $item[0] ) . '" id="' . esc_attr( str_replace( '_', '-', $item[0] ) ); ?>" value="1" /> <?php echo esc_html( $item[1] ); ?> |
| 40 | <input type="radio" class="radio" name="bp-tools-run[]" id="<?php echo esc_attr( str_replace( '_', '-', $item[0] ) ); ?>" value="<?php echo esc_attr( $item[0] ); ?>" /> <?php echo esc_html( $item[1] ); ?> |
42 | 41 | </label> |
43 | 42 | </p> |
44 | 43 | <?php endforeach; ?> |
… |
… |
function bp_admin_repair_handler() { |
79 | 78 | $messages = array(); |
80 | 79 | |
81 | 80 | foreach ( (array) bp_admin_repair_list() as $item ) { |
82 | | if ( isset( $item[2] ) && isset( $_POST[$item[0]] ) && 1 === absint( $_POST[$item[0]] ) && is_callable( $item[2] ) ) { |
| 81 | if ( isset( $item[2] ) && isset( $_POST['bp-tools-run'] ) && in_array( $item[0], (array) $_POST['bp-tools-run'], true ) && is_callable( $item[2] ) ) { |
83 | 82 | $messages[] = call_user_func( $item[2] ); |
84 | 83 | } |
85 | 84 | } |