X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=index.php;h=ad309f03ad493cd2387485e16bb62dc3d015a851;hb=a2100946c7b4574a8048823a6b58051a826c5fe7;hp=36c59f153fab4ef6b3c69b13768817ba5109417b;hpb=a5a2984d01d1a3596ff904b212f20999d5d6dbc4;p=mirrors%2FSokoMan.git diff --git a/index.php b/index.php index 36c59f1..ad309f0 100755 --- a/index.php +++ b/index.php @@ -780,7 +780,7 @@ class Sklad_DB extends PDO { function columns_get_selectbox($columns, $class=false, $suffix_id='_id', $suffix_name='_name') { $selectbox=array( //TODO: Hardcoded... - 'model_countable' => array(0 => 'no', 1 => 'yes'), + 'model_countable' => array(1 => 'yes'), 'model_eshop_hide' => array(0 => 'no', 1 => 'yes'), 'vendor_id' => array('COMPULSORY' => 'select...') ); @@ -1052,7 +1052,8 @@ class Sklad_UI { } function check_locks() { - $result = $this->db->safe_query_fetch("SELECT * FROM `lock`;"); + $user = $this->db->quote($this->db->auth->get_user_id()); + $result = $this->db->safe_query_fetch("SELECT * FROM `lock` WHERE `lock_author` != $user;"); if(!empty($result)) { echo T('There are locks:').' '.$this->html->render_item_table($result, 'lock'); $this->post_redirect_get('', 'There are locks!', true);