[첫화면으로]UseModWiki소스수정/마우스더블클릭

마지막으로 [b]

수정 권한이 없는 페이지에서는 더블 클릭을 작동하지 않게 함

sub GetHtmlHeader {
    ...
    ### 뒤에 if 문이 추가된 형태
            $bodyExtra .= qq(ondblclick="location.href='$ScriptName?action=edit&id=$id'") if (&UserCanEdit($id,0));
    ###
    ...
}

"if &UserCanEdit($id,0)", can be supressed. Optionally, "Sub DoEdit" is still secure with $canEdit.

Yes, but in the following two candidates:
1) double click -> nothing happens
2) double click -> edit screen -> show "you don't have permission..."
I thought 1) is better than 2).

Anyway, this code is meaningless now. because currently wiki shows "page source (not editable)" if user doesn't have permission. So double click always works now.
-- Raymundo 2012-7-19 4:09 pm
이름:  
Homepage:
내용:
 

위키위키분류

마지막 편집일: 2012-7-19 4:09 pm (변경사항 [d])
1093 hits | Permalink | 변경내역 보기 [h] | 페이지 소스 보기