Skip to content

Commit

Permalink
Disable locking when locktime is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
danxuliu authored and splitbrain committed Feb 15, 2010
1 parent a1a5234 commit 544ed90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions inc/common.php
Expand Up @@ -732,6 +732,12 @@ function checklock($id){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function lock($id){
global $conf;

if($conf['locktime'] == 0){
return;
}

$lock = wikiLockFN($id);
if($_SERVER['REMOTE_USER']){
io_saveFile($lock,$_SERVER['REMOTE_USER']);
Expand Down
4 changes: 3 additions & 1 deletion lib/exe/js.php
Expand Up @@ -113,7 +113,9 @@ function js_out(){
js_runonstart("initSizeCtl('size__ctl','wiki__text')");
js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)");
js_runonstart("initChangeCheck('".js_escape($lang['notsavedyet'])."')");
js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].")");
if($conf['locktime'] != 0){
js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].")");
}
js_runonstart('scrollToMarker()');
js_runonstart('focusMarker()');

Expand Down

0 comments on commit 544ed90

Please sign in to comment.