99
1010namespace OCA \ServerInfo ;
1111
12- use OCP \IConfig ;
12+ use OCP \AppFramework \ Services \ IAppConfig ;
1313use OCP \IURLGenerator ;
1414
15- /**
16- * Builds the one-time snapshot of static/slow-changing server data consumed by
17- * the admin settings page on load. Live metrics (cpu/memory/servertime/uptime/
18- * thermalzones) are delivered separately by {@see LiveData} via the polled
19- * /update endpoint.
20- */
2115class StaticData {
2216 public function __construct (
2317 private Os $ os ,
@@ -30,7 +24,7 @@ public function __construct(
3024 private SessionStatistics $ sessionStatistics ,
3125 private SystemStatistics $ systemStatistics ,
3226 private CronInfo $ cronInfo ,
33- private IConfig $ config ,
27+ private IAppConfig $ appConfig ,
3428 ) {
3529 }
3630
@@ -72,7 +66,7 @@ public function getData(): array {
7266 'freeSpace ' => $ this ->systemStatistics ->getFreeSpace (),
7367 'memTotal ' => $ memory ->getMemTotal (),
7468 'cron ' => $ this ->cronInfo ->getCronInfo (),
75- 'phpinfo ' => $ this ->config -> getAppValue ( ' serverinfo ' , ' phpinfo ' , ' no ' ) === ' yes ' ,
69+ 'phpinfo ' => $ this ->appConfig -> getAppValueBool ( ' phpinfo ' , false ) ,
7670 'phpinfoUrl ' => $ this ->urlGenerator ->linkToRoute ('serverinfo.page.phpinfo ' ),
7771 ];
7872 }
0 commit comments