Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Mar 23, 2024
1 parent c9a168c commit 40966a6
Show file tree
Hide file tree
Showing 32 changed files with 19 additions and 1,218 deletions.
2 changes: 1 addition & 1 deletion application/library/sessionguard/sessionguard.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ func validateEnv(ctx echo.Context, ownerType string, ownerId uint64, lastIP stri
}
currentIP := ctx.RealIP()
if lastIP == currentIP {
log.Warnf(`[%s:%d]ip mismatched: %q != %q`, ownerType, ownerId, lastIP, currentIP)
return true
}
log.Debugf(`[%s:%d]ip mismatched: %q != %q`, ownerType, ownerId, lastIP, currentIP)
ipInfo, err := ip2region.IPInfo(currentIP)
if err != nil {
log.Errorf(`[%s:%d]failed to get IPInfo: %v`, ownerType, ownerId, err)
Expand Down
34 changes: 18 additions & 16 deletions public/assets/backend/js/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -950,23 +950,25 @@ App.editor.codemirror = function (elem,options,loadMode) {
}
if(loadMode) {
editor.setOption("mode", mime);
var loadHint='';
switch(loadMode){
case 'css':
case 'html':
case 'javascript':
case 'sql':
case 'xml':
loadHint=loadMode;
}
if(loadHint && (!CodeMirror.helpers.hasOwnProperty('hint') || !CodeMirror.helpers.hint.hasOwnProperty(loadHint))){
loadHint='#editor/markdown/lib/codemirror/addon/hint/'+loadHint+'-hint.js';
if(loadMode=='html'){
App.loader.includes('#editor/markdown/lib/codemirror/addon/hint/xml-hint.js', true, function(){
if(typeof(option.readOnly)=='undefined'||!option.readOnly){
var loadHint='';
switch(loadMode){
case 'css':
case 'html':
case 'javascript':
case 'sql':
case 'xml':
loadHint=loadMode;
}
if(loadHint && (!CodeMirror.helpers.hasOwnProperty('hint') || !CodeMirror.helpers.hint.hasOwnProperty(loadHint))){
loadHint='#editor/markdown/lib/codemirror/addon/hint/'+loadHint+'-hint.js';
if(loadMode=='html'){
App.loader.includes('#editor/markdown/lib/codemirror/addon/hint/xml-hint.js', true, function(){
App.loader.includes(loadHint, true);
});
}else{
App.loader.includes(loadHint, true);
});
}else{
App.loader.includes(loadHint, true);
}
}
}
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 40966a6

Please # to comment.