You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.js 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /**
  2. * @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
  3. *
  4. * @license GNU AGPL version 3 or any later version
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. /**
  21. * @namespace
  22. * @deprecated Use OCP.AppConfig instead
  23. */
  24. OC.AppConfig={
  25. /**
  26. * @deprecated Use OCP.AppConfig.getValue() instead
  27. */
  28. getValue:function(app,key,defaultValue,callback){
  29. OCP.AppConfig.getValue(app, key, defaultValue, {
  30. success: callback
  31. });
  32. },
  33. /**
  34. * @deprecated Use OCP.AppConfig.setValue() instead
  35. */
  36. setValue:function(app,key,value){
  37. OCP.AppConfig.setValue(app, key, value);
  38. },
  39. /**
  40. * @deprecated Use OCP.AppConfig.getApps() instead
  41. */
  42. getApps:function(callback){
  43. OCP.AppConfig.getApps({
  44. success: callback
  45. });
  46. },
  47. /**
  48. * @deprecated Use OCP.AppConfig.getKeys() instead
  49. */
  50. getKeys:function(app,callback){
  51. OCP.AppConfig.getKeys(app, {
  52. success: callback
  53. });
  54. },
  55. /**
  56. * @deprecated
  57. */
  58. hasKey:function(app,key,callback){
  59. console.error('OC.AppConfig.hasKey is not supported anymore. Use OCP.AppConfig.getValue instead.');
  60. },
  61. /**
  62. * @deprecated Use OCP.AppConfig.deleteKey() instead
  63. */
  64. deleteKey:function(app,key){
  65. OCP.AppConfig.deleteKey(app, key);
  66. },
  67. /**
  68. * @deprecated
  69. */
  70. deleteApp:function(app){
  71. console.error('OC.AppConfig.deleteApp is not supported anymore.');
  72. }
  73. };