Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions core/js/dist/login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/login.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions core/js/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/main.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions core/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Object.assign(window.OC, {
*/
currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false,
theme: window.oc_defaults || {},
coreApps:['', 'admin','log','core/search','settings','core','3rdparty'],
requestToken: oc_requesttoken,
menuSpeed: 50,

/**
* Check if a user file is allowed to be handled.
Expand Down
2 changes: 2 additions & 0 deletions core/src/OC/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* along with this program. If not see <http://www.gnu.org/licenses/>.
*/

export const coreApps = ['', 'admin','log','core/search','settings','core','3rdparty']
export const menuSpeed = 50
export const PERMISSION_NONE = 0
export const PERMISSION_CREATE = 4
export const PERMISSION_READ = 1
Expand Down
4 changes: 4 additions & 0 deletions core/src/OC/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import appswebroots from './appswebroots'
import Backbone from './backbone'
import Config from './config'
import {
coreApps,
menuSpeed,
PERMISSION_ALL,
PERMISSION_CREATE,
PERMISSION_DELETE,
Expand Down Expand Up @@ -64,6 +66,8 @@ export default {
/*
* Constants
*/
coreApps,
menuSpeed,
PERMISSION_ALL,
PERMISSION_CREATE,
PERMISSION_DELETE,
Expand Down
3 changes: 2 additions & 1 deletion core/src/OC/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import _ from 'underscore'

import OC from './index'
import {coreApps} from './constants'

/**
* Get an absolute url to a file in an app
Expand Down Expand Up @@ -105,7 +106,7 @@ export const generateUrl = (url, params, options) => {
* @return {string} Absolute URL for a file in an app
*/
export const filePath = (app, type, file) => {
const isCore = OC.coreApps.indexOf(app) !== -1
const isCore = coreApps.indexOf(app) !== -1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it beautiful?

let link = getRootPath()
if (file.substring(file.length - 3) === 'php' && !isCore) {
link += '/index.php/apps/' + app;
Expand Down