$DATE ){ //newer version available -> ask what to do $ACT = 'conflict'; }else{ //save it saveWikiText($ID,con($PRE,$TEXT,$SUF,1),$SUM); //use pretty mode for con //unlock it unlock($id); //show it header("Location: ".wl($ID)); exit(); } } //Editing: check if locked by anyone if not lock for my self if($ACT == 'edit' || $ACT == $lang['btn_preview']){ $lockedby = checklock($ID); if($lockedby){ $ACT = 'locked'; }else{ lock($ID); } }else{ //try to unlock unlock($ID); } //make infos about current page available $INFO = pageinfo(); //init session session_name("DokuWiki"); session_start(); //check which permission is needed if(in_array($ACT,array('preview','wordblock','conflict','lockedby'))){ if($INFO['exists']){ $permneed = AUTH_EDIT; }else{ $permneed = AUTH_CREATE; } }elseif(in_array($ACT,array('login','register','search','recent'))){ $permneed = AUTH_NONE; }else{ $permneed = AUTH_READ; } //start output if(substr($ACT,0,6) != 'export') html_header(); if(html_acl($permneed)){ if($ACT == 'edit'){ html_edit(); }elseif($ACT == $lang['btn_preview']){ html_edit($TEXT); html_show($TEXT); }elseif($ACT == 'wordblock'){ html_edit($TEXT,'wordblock'); }elseif($ACT == 'search' && !empty($QUERY)){ html_search(); }elseif($ACT == 'revisions'){ html_revisions(); }elseif($ACT == 'diff'){ html_diff(); }elseif($ACT == 'recent'){ html_recent(); }elseif($ACT == 'index'){ html_index($IDX); }elseif($ACT == 'backlink'){ html_backlinks(); }elseif($ACT == 'conflict'){ html_conflict(con($PRE,$TEXT,$SUF),$SUM); html_diff(con($PRE,$TEXT,$SUF),false); }elseif($ACT == 'locked'){ html_locked($lockedby); }elseif($ACT == 'export_html'){ html_head(); print "\n"; print parsedWiki($ID,$REV,false); print "\n\n"; }elseif($ACT == 'export_raw'){ header("Content-Type: text/plain"); print rawWiki($ID,$REV); }else{ $ACT='show'; html_show(); } } if(substr($ACT,0,6) != 'export') html_footer(); ?>