Skip to content
Snippets Groups Projects
Commit bf7dedb9 authored by Jared Hancock's avatar Jared Hancock
Browse files

i18n: Fix slowness of DNS queries on system information

Also, add build version and path information for the PHAR files listed as
language packs.
parent ae803f79
No related branches found
No related tags found
No related merge requests found
......@@ -550,7 +550,10 @@ abstract class Plugin {
$P = new Phar($phar);
$sig = $P->getSignature();
$info = array();
if ($r = dns_get_record($sig['hash'].'.'.self::$verify_domain, DNS_TXT)) {
$ignored = null;
if ($r = dns_get_record($sig['hash'].'.'.self::$verify_domain.'.',
DNS_TXT, $ignored, $ignored, true)
) {
foreach ($r as $rec) {
foreach (explode(';', $rec['txt']) as $kv) {
list($k, $v) = explode('=', trim($kv));
......
......@@ -318,6 +318,8 @@ class i18n_Compiler extends Module {
if (!function_exists('openssl_get_privatekey'))
$this->fail('OpenSSL extension required for signing');
if (!$options['pkey'] || !file_exists($options['pkey']))
$this->fail('Signing private key (-P) required');
$private = openssl_get_privatekey(
file_get_contents($options['pkey']));
if (!$private)
......
......@@ -180,8 +180,12 @@ if (!$lv) { ?>
Plugin::showVerificationBadge($info['path']);
?>
</h3>
<div><?php echo __('Version'); ?>: <?php echo $manifest['Version']; ?>,
<?php echo __('Built'); ?>: <?php echo $manifest['Build-Date']; ?>
<div><?php echo sprintf('<code>%s</code> — %s', $info['code'],
str_replace(ROOT_DIR, '', $info['path'])); ?>
<br/> <?php echo __('Version'); ?>: <?php echo $manifest['Version'];
?>, <?php echo sprintf(__('for version %s'),
'v'.($manifest['Phrases-Version'] ?: '1.9')); ?>
<br/> <?php echo __('Built'); ?>: <?php echo $manifest['Build-Date']; ?>
</div>
<?php }
} ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment