diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-01-28 16:21:39 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-01-28 16:21:39 +0100 |
commit | 6035eb334bae7ec2081fe3328d4aa08e2d920593 (patch) | |
tree | b1544788c62ec0611372e18d4cee01b33b3cb87c /lib/exe/ajax.php | |
parent | a499671a776efa773c3ef1efe2521ee815fe76bc (diff) | |
download | rpg-6035eb334bae7ec2081fe3328d4aa08e2d920593.tar.gz rpg-6035eb334bae7ec2081fe3328d4aa08e2d920593.tar.bz2 |
Pagelocks are now refreshed in the background
An AJAX call is used to refresh the pagelock when keypresses in the textarea
are detected (With a minimum wait of one minute between calls).
darcs-hash:20060128152139-7ad00-66d64326bcf04c9b8d49285ac736137e9dd48249.gz
Diffstat (limited to 'lib/exe/ajax.php')
-rw-r--r-- | lib/exe/ajax.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 8c93bcdab..e52d5d378 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -60,5 +60,20 @@ function ajax_qsearch(){ print '</ul>'; } +/** + * Refresh a page lock + * + * Andreas Gohr <andi@splitbrain.org> + */ +function ajax_lock(){ + $id = cleanID($_POST['id']); + if(empty($id)) return; + + if(!checklock($id)){ + lock($id); + print 1; + } +} + //Setup VIM: ex: et ts=2 enc=utf-8 : ?> |