Merge branch 'QA_4_7'

This commit is contained in:
Michal Čihař 2017-07-18 12:00:02 +02:00
commit d15da74eda
4 changed files with 18 additions and 2 deletions

View File

@ -37,6 +37,7 @@ phpMyAdmin - ChangeLog
- issue #13387 Fixed inline editing of hex values
- issue #13382 Fixed size of index edit dialog
- issue #13489 Fixed rendering SQL lint errors
- issue #13468 Avoid breakage if set_time_limit is disabled
4.7.2 (2017-06-29)
- issue #13314 Make theme selection keep current server

View File

@ -10,6 +10,7 @@ use PhpMyAdmin\Core;
use PhpMyAdmin\Encoding;
use PMA\libraries\plugins\ExportPlugin;
use PhpMyAdmin\Url;
use PhpMyAdmin\Util;
use PhpMyAdmin\Sanitize;
/**
@ -295,7 +296,7 @@ if (!empty($_REQUEST['aliases'])) {
/**
* Increase time limit for script execution and initializes some variables
*/
@set_time_limit($cfg['ExecTimeLimit']);
Util::setTimeLimit();
if (! empty($cfg['MemoryLimit'])) {
@ini_set('memory_limit', $cfg['MemoryLimit']);
}

View File

@ -14,6 +14,7 @@ use PMA\libraries\plugins\ImportPlugin;
use PhpMyAdmin\Response;
use PhpMyAdmin\Sql;
use PhpMyAdmin\Url;
use PhpMyAdmin\Util;
/* Enable LOAD DATA LOCAL INFILE for LDI plugin */
if (isset($_POST['format']) && $_POST['format'] == 'ldi') {
@ -291,7 +292,7 @@ if (strlen($db) > 0) {
$GLOBALS['dbi']->selectDb($db);
}
@set_time_limit($cfg['ExecTimeLimit']);
Util::setTimeLimit();
if (! empty($cfg['MemoryLimit'])) {
@ini_set('memory_limit', $cfg['MemoryLimit']);
}

View File

@ -4890,4 +4890,17 @@ class Util
}
return date($format);
}
/**
* Wrapper around php's set_time_limit
*
* @return void
*/
public static function setTimeLimit()
{
// The function can be disabled in php.ini
if (function_exists('set_time_limit')) {
@set_time_limit($GLOBALS['cfg']['ExecTimeLimit']);
}
}
}