Skip to content

Commit 7c4187d

Browse files
committed
Skip repeated file scan
1 parent 7582f54 commit 7c4187d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

upload/inc/plugins/isango.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,10 +716,12 @@ function isango_gateway_error(string $gateway)
716716
function isango_config(string $gateway = "", string $mode = "")
717717
{
718718
$path = MYBB_ROOT . 'inc/plugins/isango/%s.ini';
719-
$gateways = array();
719+
static $gateways = array();
720720

721-
foreach (glob(sprintf($path, '*')) as $gate) {
722-
$gateways[] = strtolower(basename($gate, '.ini'));
721+
if (empty($gateways)) {
722+
foreach (glob(sprintf($path, '*')) as $gate) {
723+
$gateways[] = strtolower(basename($gate, '.ini'));
724+
}
723725
}
724726

725727
if (empty($gateway)) {

0 commit comments

Comments
 (0)