Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates Unicode data files in a background task #7581

Merged
6 changes: 6 additions & 0 deletions Sources/ScheduledTasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,12 @@ function scheduled_weekly_maintenance()
array('$sourcedir/tasks/UpdateTldRegex.php', 'Update_TLD_Regex', '', 0), array()
);

// Ensure Unicode data files are up to date
$smcFunc['db_insert']('insert', '{db_prefix}background_tasks',
array('task_file' => 'string-255', 'task_class' => 'string-255', 'task_data' => 'string', 'claimed_time' => 'int'),
array('$sourcedir/tasks/UpdateUnicode.php', 'Update_Unicode', '', 0), array()
);

// Run Cache housekeeping
if (!empty($cache_enable) && !empty($cacheAPI))
$cacheAPI->housekeeping();
Expand Down
4 changes: 3 additions & 1 deletion Sources/Subs-Charset.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
if (!defined('SMF'))
die('No direct access...');

require_once($sourcedir . '/Unicode/Metadata.php');
// If this file is missing, we're using an old version of Unicode.
if (!@include_once($sourcedir . '/Unicode/Metadata.php'))
define('SMF_UNICODE_VERSION', '14.0.0.0');

/**
* Converts the given UTF-8 string into lowercase.
Expand Down
Loading
Loading