FeaturesForm.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /**
  3. * User preferences form
  4. */
  5. declare(strict_types=1);
  6. namespace PhpMyAdmin\Config\Forms\Setup;
  7. use function array_diff;
  8. class FeaturesForm extends \PhpMyAdmin\Config\Forms\User\FeaturesForm
  9. {
  10. /**
  11. * @return array
  12. */
  13. public static function getForms()
  14. {
  15. // phpcs:disable Squiz.Arrays.ArrayDeclaration.KeySpecified,Squiz.Arrays.ArrayDeclaration.NoKeySpecified
  16. $result = parent::getForms();
  17. /* Remove only_db/hide_db, we have proper Server form in setup */
  18. $result['Databases'] = array_diff(
  19. $result['Databases'],
  20. [
  21. 'Servers/1/only_db',
  22. 'Servers/1/hide_db',
  23. ]
  24. );
  25. /* Following are not available to user */
  26. $result['Import_export'] = [
  27. 'UploadDir',
  28. 'SaveDir',
  29. 'RecodingEngine' => ':group',
  30. 'IconvExtraParams',
  31. ':group:end',
  32. 'ZipDump',
  33. 'GZipDump',
  34. 'BZipDump',
  35. 'CompressOnFly',
  36. ];
  37. $result['Security'] = [
  38. 'blowfish_secret',
  39. 'CheckConfigurationPermissions',
  40. 'TrustedProxies',
  41. 'AllowUserDropDatabase',
  42. 'AllowArbitraryServer',
  43. 'ArbitraryServerRegexp',
  44. 'LoginCookieRecall',
  45. 'LoginCookieStore',
  46. 'LoginCookieDeleteAll',
  47. 'CaptchaLoginPublicKey',
  48. 'CaptchaLoginPrivateKey',
  49. 'CaptchaSiteVerifyURL',
  50. ];
  51. $result['Developer'] = [
  52. 'UserprefsDeveloperTab',
  53. 'DBG/sql',
  54. ];
  55. $result['Other_core_settings'] = [
  56. 'OBGzip',
  57. 'PersistentConnections',
  58. 'ExecTimeLimit',
  59. 'MemoryLimit',
  60. 'UseDbSearch',
  61. 'ProxyUrl',
  62. 'ProxyUser',
  63. 'ProxyPass',
  64. 'AllowThirdPartyFraming',
  65. 'ZeroConf',
  66. ];
  67. return $result;
  68. // phpcs:enable
  69. }
  70. }