mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
- fix htmlspecialchars handling in search (search backends get specialchared input, and should return specialchared output), current backends strip entities anyway [includes Bug #8156]
- allow cancelling search index creation/removal - custom CSS class name input too short [Bug #8328] - give an error message if a password wasn't convertable (special characters in non-standard encoding) - moved still_on_time to functions.php, used by acp_search and converter, might be useful for MODs (or complex cron scripts) - do not allow empty passwords on login - add sids to local URLs in posts (this was a really terrible bug to fix ;-)) [Bug #7892] - ignore invalid HTTP_X_FORWARDED_FOR headers (just use REMOTE_ADDR if invalid) [Bug #8314] - changed forum listing code on search page and acp_attachments [Bug #6658] - search indexing uses still_on_time(), smaller batch size (1000) and meta_refresh() instead of redirect(), this should solve a few problems [Bugs #8034, #8270] - made password requirement language strings clearer - ALPHA is not meant to be alphanumric [Bug #7764] - display bug in firefox on linux making the pagination wrap on search results page (caused by ) git-svn-id: file:///svn/phpbb/trunk@7076 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -17,38 +17,6 @@ define('DEFAULT_AVATAR_Y', 80);
|
||||
|
||||
// Global functions - all functions can be used by convertors
|
||||
|
||||
/**
|
||||
* Determine whether we are approaching the maximum execution time
|
||||
*/
|
||||
function still_on_time()
|
||||
{
|
||||
static $max_execution_time, $start_time;
|
||||
|
||||
$time = explode(' ', microtime());
|
||||
$current_time = $time[0] + $time[1];
|
||||
|
||||
if (empty($max_execution_time))
|
||||
{
|
||||
$max_execution_time = (function_exists('ini_get')) ? (int) ini_get('max_execution_time') : (int) get_cfg_var('max_execution_time');
|
||||
|
||||
// If zero, then set to something higher to not let the user catch the ten seconds barrier.
|
||||
if ($max_execution_time === 0)
|
||||
{
|
||||
$max_execution_time = 65;
|
||||
}
|
||||
|
||||
$max_execution_time = min(max(10, ($max_execution_time - 15)), 50);
|
||||
|
||||
// For debugging purposes
|
||||
// $max_execution_time = 10;
|
||||
|
||||
global $starttime;
|
||||
$start_time = (empty($starttime)) ? $current_time : $starttime;
|
||||
}
|
||||
|
||||
return (ceil($current_time - $start_time) < $max_execution_time) ? true : false;
|
||||
}
|
||||
|
||||
// SIMPLE FUNCTIONS
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user