Skip to content

Commit

Permalink
#48 add service ExecutionTime
Browse files Browse the repository at this point in the history
  • Loading branch information
derpixler committed Apr 4, 2016
1 parent 36b6501 commit 22ed216
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inc/Page/SearchReplace.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ protected function get_submit_button_title() {
*/
protected function run_replace( $search, $replace, $tables, $dry_run ) {




echo '<div class="updated notice is-dismissible">';
if ( $dry_run ) {
echo '<p><strong>'
Expand Down
2 changes: 2 additions & 0 deletions inc/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public function run( $file ) {

if ( is_admin() ) {

new Service\ExecutionTime();

$dbm = new Database\Manager( $wpdb );
$replace = new Database\Replace( $dbm );
$dbe = new Database\Exporter( $replace, $dbm );
Expand Down
34 changes: 34 additions & 0 deletions inc/Service/ExecutionTime.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
namespace Inpsyde\SearchReplace\Service;

/**
* Class ExecutionTime - set the service time out up to 0
*
* @package Inpsyde\SearchReplace\Service
*/
class ExecutionTime{

/**
* @var max_execution_time
*/
private $met;

public function __construct(){

$this->met = ini_get('max_execution_time');

print_r( $max_execution_time );
echo "\n";

set_time_limit(0);

$max_execution_time = ini_get('max_execution_time');

print_r( $max_execution_time );
echo "\n";

die();

}

}
Binary file added latest.zip
Binary file not shown.

0 comments on commit 22ed216

Please sign in to comment.