FeaturesForm.php 2.0 KB

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