| @@ 323-331 (lines=9) @@ | ||
| 320 | */ |
|
| 321 | public function __pause_db_update() { |
|
| 322 | // Bailout. |
|
| 323 | if ( |
|
| 324 | wp_doing_ajax() || |
|
| 325 | ! isset( $_GET['page'] ) || |
|
| 326 | 'give-updates' !== $_GET['page'] || |
|
| 327 | ! isset( $_GET['give-pause-db-upgrades'] ) || |
|
| 328 | self::$background_updater->is_paused_process() |
|
| 329 | ) { |
|
| 330 | return false; |
|
| 331 | } |
|
| 332 | ||
| 333 | $batch = self::$background_updater->get_all_batch(); |
|
| 334 | ||
| @@ 364-372 (lines=9) @@ | ||
| 361 | */ |
|
| 362 | public function __restart_db_update() { |
|
| 363 | // Bailout. |
|
| 364 | if ( |
|
| 365 | wp_doing_ajax() || |
|
| 366 | ! isset( $_GET['page'] ) || |
|
| 367 | 'give-updates' !== $_GET['page'] || |
|
| 368 | ! isset( $_GET['give-restart-db-upgrades'] ) || |
|
| 369 | ! self::$background_updater->is_paused_process() |
|
| 370 | ) { |
|
| 371 | return false; |
|
| 372 | } |
|
| 373 | ||
| 374 | $batch = get_option( 'give_paused_batches' ); |
|
| 375 | ||