MDL-11082 Improved groups upgrade performance 1.8x -> 1.9; thanks Eloy for telling...
[moodle-pu.git] / mod / wiki / confirmlock.php
blobce8f924aada7605c1acb7f5f47f315ab68dfb180
1 <?php
2 /**
3 * This script is called through AJAX. It confirms that a user is still
4 * trying to edit a page that they have locked (they haven't closed
5 * their browser window or something).
7 * @copyright &copy; 2006 The Open University
8 * @author s.marshall@open.ac.uk
9 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
10 * @package wiki
11 *//** */
13 require_once("../../config.php");
15 header('Content-Type: text/plain');
17 if(empty($_POST['lockid'])) {
18 print 'noid';
19 exit;
22 $lockid=(int)$_POST['lockid'];
23 if($lock=get_record('wiki_locks','id',$lockid)) {
24 $lock->lockedseen=time();
25 update_record('wiki_locks',$lock);
26 print 'ok';
27 } else {
28 print 'cancel'; // Tells user their lock has been cancelled.