❓ ';
} else {
$StatusHead .= '❌ ';
}
}
$StatusHead .= '';
$phpMussel['AppendToString']($TestDetails, '
',
$StatusHead . $ThisStatus['context'] . ''
);
}
if ($TestsTotal === $TestsPassed) {
$TestClr = 'txtGn';
} else {
$TestClr = ($TestsPassed === '?' || $TestsPassed >= ($TestsTotal / 2)) ? 'txtOe' : 'txtRd';
}
$TestsTotal = sprintf(
'%2$s/%3$s ' .
'' .
'' .
'' .
'
%5$s',
$TestClr,
($TestsPassed === '?' ? '?' : $phpMussel['Number_L10N']($TestsPassed)),
$phpMussel['Number_L10N']($TestsTotal),
$Component['ID'],
$TestDetails
);
$phpMussel['AppendToString']($Component['StatusOptions'], '
',
'' . $phpMussel['lang']['label_tests'] . ' ' . $TestsTotal
);
}
};
/** Traversal detection. */
$phpMussel['Traverse'] = function ($Path) {
return !preg_match('~(?:[\./]{2}|[\x01-\x1f\[-^`?*$])~i', str_replace("\\", '/', $Path));
};
/** Sort function used by the front-end updates page. */
$phpMussel['UpdatesSortFunc'] = function ($A, $B) {
$CheckA = preg_match('/^l10n/i', $A);
$CheckB = preg_match('/^l10n/i', $B);
if (($CheckA && !$CheckB) || ($A === 'phpMussel' && $B !== 'phpMussel')) {
return -1;
}
if (($CheckB && !$CheckA) || ($B === 'phpMussel' && $A !== 'phpMussel')) {
return 1;
}
if ($A < $B) {
return -1;
}
if ($A > $B) {
return 1;
}
return 0;
};