[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.522, Mon Sep 18 02:19:34 2006 UTC revision 1.523, Mon Sep 18 21:12:21 2006 UTC
# Line 436  Line 436 
436  sub is_locked_fid {  sub is_locked_fid {
437      my($self,$fid) = @_;      my($self,$fid) = @_;
438    
439        if (! $self->table_exists('fid_locks')) { return 0 }
440      my $rdbH = $self->db_handle;      my $rdbH = $self->db_handle;
441      my $relational_db_response = $rdbH->SQL("SELECT fid FROM fid_locks WHERE fid = \'$fid\' ");      my $relational_db_response = $rdbH->SQL("SELECT fid FROM fid_locks WHERE fid = \'$fid\' ");
442      return (@$relational_db_response > 0) ? 1 : 0;      return (@$relational_db_response > 0) ? 1 : 0;
# Line 452  Line 453 
453  sub lock_fid {  sub lock_fid {
454      my($self,$user,$fid) = @_;      my($self,$user,$fid) = @_;
455    
456        if (! $self->table_exists('fid_locks'))       { return 0 }
457      if ((! $user) || ($fid !~ /^fig\|\d+\.\d+/))  { return 0 }      if ((! $user) || ($fid !~ /^fig\|\d+\.\d+/))  { return 0 }
458    
459      my $func = $self->function_of($fid);      my $func = $self->function_of($fid);
# Line 486  Line 488 
488  sub unlock_fid {  sub unlock_fid {
489      my($self,$user,$fid) = @_;      my($self,$user,$fid) = @_;
490    
491        if (! $self->table_exists('fid_locks'))       { return 0 }
492      if ((! $user) || ($fid !~ /^fig\|\d+\.\d+/))  { return 0 }      if ((! $user) || ($fid !~ /^fig\|\d+\.\d+/))  { return 0 }
493    
494      $self->add_annotation($fid,$user,"unlocked assignments");      $self->add_annotation($fid,$user,"unlocked assignments");

Legend:
Removed from v.1.522  
changed lines
  Added in v.1.523

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3