X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=assistants%2Flock.inc.php;h=67951816505d2a5cf381d7965d902338824d59c7;hb=bcde38a30d241390aef0eec6fc726cc7937cd64e;hp=ccb9302214020fa406e777da7790f115544dcc39;hpb=180fef5ada8f8d3290e2f0f6ce51a2df44132aaa;p=mirrors%2FSokoMan.git diff --git a/assistants/lock.inc.php b/assistants/lock.inc.php index ccb9302..6795181 100644 --- a/assistants/lock.inc.php +++ b/assistants/lock.inc.php @@ -3,13 +3,14 @@ switch($SUBPATH[0]) { default: case 1: $result = $this->db->safe_query_fetch("SELECT * FROM `lock`;"); if(empty($result)) { - echo 'Not locked...'; + echo T('Not locked...'); echo $this->html->form("$URL/2", 'POST', array( array('reason','','textarea',false,'autofocus','reason:'), array('lock','lock','submit') )); + echo(T('By locking you will disable all other users from manipulating records.')); } else { - echo $this->html->render_item_table($result); + echo $this->html->render_item_table($result, 'lock'); echo $this->html->form("$URL/2", 'POST', array( array('unlock','unlock','submit') )); @@ -21,7 +22,8 @@ switch($SUBPATH[0]) { $user=$this->db->auth->get_user_id(); $username=$this->db->auth->get_username_by_id($user); $lock = $this->db->quote($username.': '.$_POST['reason']); - $this->db->safe_query("INSERT INTO `lock` (lock_name) VALUES ($lock);"); + $author = $this->db->quote($user); + $this->db->safe_query("INSERT INTO `lock` (lock_name,lock_author) VALUES ($lock,$author);"); $this->post_redirect_get("$URL_INTERNAL/1", T('Lock set')); } if(isset($_POST['unlock'])) {