MCPcopy Create free account
hub / github.com/error311/FileRise / fr_read_admin_config_raw

Function fr_read_admin_config_raw

config/config.php:670–686  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

668}
669
670function fr_read_admin_config_raw(): array
671{
672 try {
673 $configFile = USERS_DIR . 'adminConfig.json';
674 if (!is_file($configFile)) return [];
675 $encryptedContent = @file_get_contents($configFile);
676 if (!is_string($encryptedContent) || $encryptedContent === '') return [];
677 $key = isset($GLOBALS['encryptionKey']) ? (string)$GLOBALS['encryptionKey'] : '';
678 if ($key === '') return [];
679 $dec = decryptData($encryptedContent, $key);
680 if ($dec === false) return [];
681 $cfg = json_decode($dec, true);
682 return is_array($cfg) ? $cfg : [];
683 } catch (Throwable $e) {
684 return [];
685 }
686}
687
688$envPublished = getenv('FR_PUBLISHED_URL');
689$published = '';

Callers 1

config.phpFile · 0.85

Calls 1

decryptDataFunction · 0.85

Tested by

no test coverage detected