Move oc_debug to the bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
0877a2e627
commit
6095ef2235
|
@ -1,6 +1,4 @@
|
||||||
var oc_debug;
|
|
||||||
var oc_webroot;
|
var oc_webroot;
|
||||||
|
|
||||||
var oc_current_user = document.getElementsByTagName('head')[0].getAttribute('data-user');
|
var oc_current_user = document.getElementsByTagName('head')[0].getAttribute('data-user');
|
||||||
var oc_requesttoken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken');
|
var oc_requesttoken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken');
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||||
|
*
|
||||||
|
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||||
|
*
|
||||||
|
* @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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const base = window._oc_debug
|
||||||
|
|
||||||
|
export const debug = base
|
|
@ -42,6 +42,7 @@ import PasswordConfirmation from './password-confirmation'
|
||||||
import Plugins from './plugins'
|
import Plugins from './plugins'
|
||||||
import search from './search'
|
import search from './search'
|
||||||
import Util from './util'
|
import Util from './util'
|
||||||
|
import {debug} from './debug'
|
||||||
import {redirect, reload} from './navigation'
|
import {redirect, reload} from './navigation'
|
||||||
|
|
||||||
/** @namespace OC */
|
/** @namespace OC */
|
||||||
|
@ -61,6 +62,7 @@ export default {
|
||||||
Plugins,
|
Plugins,
|
||||||
search,
|
search,
|
||||||
Util,
|
Util,
|
||||||
|
debug,
|
||||||
generateUrl,
|
generateUrl,
|
||||||
filePath,
|
filePath,
|
||||||
redirect,
|
redirect,
|
||||||
|
|
|
@ -109,6 +109,7 @@ window['moment'] = moment
|
||||||
window['OC'] = OC
|
window['OC'] = OC
|
||||||
setDeprecatedProp('oc_config', OC.config, 'use OC.config instead')
|
setDeprecatedProp('oc_config', OC.config, 'use OC.config instead')
|
||||||
setDeprecatedProp('oc_isadmin', OC.isUserAdmin(), 'use OC.isUserAdmin() instead')
|
setDeprecatedProp('oc_isadmin', OC.isUserAdmin(), 'use OC.isUserAdmin() instead')
|
||||||
|
setDeprecatedProp('oc_debug', OC.debug, 'use OC.debug instead')
|
||||||
setDeprecatedProp('OCDialogs', OC.dialogs, 'use OC.dialogs instead')
|
setDeprecatedProp('OCDialogs', OC.dialogs, 'use OC.dialogs instead')
|
||||||
window['OCP'] = OCP
|
window['OCP'] = OCP
|
||||||
window['OCA'] = OCA
|
window['OCA'] = OCA
|
||||||
|
|
|
@ -166,7 +166,7 @@ class JSConfigHelper {
|
||||||
$capabilities = $this->capabilitiesManager->getCapabilities();
|
$capabilities = $this->capabilitiesManager->getCapabilities();
|
||||||
|
|
||||||
$array = [
|
$array = [
|
||||||
"oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false',
|
"_oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false',
|
||||||
"_oc_isadmin" => $this->groupManager->isAdmin($uid) ? 'true' : 'false',
|
"_oc_isadmin" => $this->groupManager->isAdmin($uid) ? 'true' : 'false',
|
||||||
"backendAllowsPasswordConfirmation" => $userBackendAllowsPasswordConfirmation ? 'true' : 'false',
|
"backendAllowsPasswordConfirmation" => $userBackendAllowsPasswordConfirmation ? 'true' : 'false',
|
||||||
"oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false',
|
"oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false',
|
||||||
|
|
Loading…
Reference in New Issue