2012-02-23 01:16:33 +04:00
|
|
|
/**
|
2016-09-19 20:43:47 +03:00
|
|
|
* @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
|
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
2012-02-23 01:16:33 +04:00
|
|
|
*/
|
|
|
|
|
2014-06-24 01:56:10 +04:00
|
|
|
/**
|
|
|
|
* @namespace
|
2016-09-19 20:43:47 +03:00
|
|
|
* @deprecated Use OCP.AppConfig instead
|
2014-06-24 01:56:10 +04:00
|
|
|
*/
|
2012-02-23 01:16:33 +04:00
|
|
|
OC.AppConfig={
|
2016-09-19 20:43:47 +03:00
|
|
|
/**
|
|
|
|
* @deprecated Use OCP.AppConfig.getValue() instead
|
|
|
|
*/
|
2012-02-23 01:16:33 +04:00
|
|
|
getValue:function(app,key,defaultValue,callback){
|
2016-09-19 20:43:47 +03:00
|
|
|
OCP.AppConfig.getValue(app, key, defaultValue, {
|
|
|
|
success: callback
|
|
|
|
});
|
2012-02-23 01:16:33 +04:00
|
|
|
},
|
2016-09-19 20:43:47 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated Use OCP.AppConfig.setValue() instead
|
|
|
|
*/
|
2012-02-23 01:16:33 +04:00
|
|
|
setValue:function(app,key,value){
|
2016-09-19 20:43:47 +03:00
|
|
|
OCP.AppConfig.setValue(app, key, value);
|
2012-02-23 01:16:33 +04:00
|
|
|
},
|
2016-09-19 20:43:47 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated Use OCP.AppConfig.getApps() instead
|
|
|
|
*/
|
2012-02-23 01:16:33 +04:00
|
|
|
getApps:function(callback){
|
2016-09-19 20:43:47 +03:00
|
|
|
OCP.AppConfig.getApps({
|
|
|
|
success: callback
|
|
|
|
});
|
2012-02-23 01:16:33 +04:00
|
|
|
},
|
2016-09-19 20:43:47 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated Use OCP.AppConfig.getKeys() instead
|
|
|
|
*/
|
2012-02-23 01:16:33 +04:00
|
|
|
getKeys:function(app,callback){
|
2016-09-19 20:43:47 +03:00
|
|
|
OCP.AppConfig.getKeys(app, {
|
|
|
|
success: callback
|
|
|
|
});
|
2012-02-23 01:16:33 +04:00
|
|
|
},
|
2016-09-19 20:43:47 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated
|
|
|
|
*/
|
2012-02-23 01:16:33 +04:00
|
|
|
hasKey:function(app,key,callback){
|
2016-09-19 20:43:47 +03:00
|
|
|
console.error('OC.AppConfig.hasKey is not supported anymore. Use OCP.AppConfig.getValue instead.');
|
2012-02-23 01:16:33 +04:00
|
|
|
},
|
2016-09-19 20:43:47 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated Use OCP.AppConfig.deleteKey() instead
|
|
|
|
*/
|
2012-02-23 01:16:33 +04:00
|
|
|
deleteKey:function(app,key){
|
2016-09-19 20:43:47 +03:00
|
|
|
OCP.AppConfig.deleteKey(app, key);
|
2012-02-23 01:16:33 +04:00
|
|
|
},
|
2016-09-19 20:43:47 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @deprecated
|
|
|
|
*/
|
2012-02-23 01:16:33 +04:00
|
|
|
deleteApp:function(app){
|
2016-09-19 20:43:47 +03:00
|
|
|
console.error('OC.AppConfig.deleteApp is not supported anymore.');
|
2013-01-02 20:02:06 +04:00
|
|
|
}
|
2012-09-06 00:17:33 +04:00
|
|
|
};
|