Changeset 4085


Ignore:
Timestamp:
10/22/09 17:50:22 (10 years ago)
Author:
ronosman
Message:

bug 1200 fixed : pLoader must forbid empty category names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/pLoader/trunk/src/Uploader/GUI/wxFrameAUI.pm

    r4081 r4085  
    16011601    $self->progressdlg->Show(1); 
    16021602    Wx::Yield(); 
     1603 
    16031604     
    16041605    my $files = [ 
     
    16441645    my( $self, $event ) = @_; 
    16451646 
    1646  
     1647    my $label = $event->GetLabel; 
     1648     
     1649    $label =~ s/^\s+$//; 
     1650 
     1651    if(defined($label) and !( "" eq $label )){ 
     1652        $self->_SetLabel($event) 
     1653    } 
     1654    else{ 
     1655        $event->Veto; 
     1656    } 
     1657} 
     1658 
     1659sub _SetLabel { 
     1660    my( $self, $event ) = @_; 
     1661         
    16471662    my $category = $self->tree->GetPlData($event->GetItem); 
    16481663    my $category_id; 
     
    16501665    $category_id = $category->{id} if 'HASH' eq ref($category) ; 
    16511666    my $comment; 
    1652     my ( $success, $status_msg, $content ) = $self->pwg->SetInfoCategories( $event->GetLabel, $comment, $category_id); 
     1667    my ( $success, $status_msg, $content ) = $self->pwg->SetInfoCategories(  
     1668        $event->GetLabel,  
     1669        $comment,  
     1670        $category_id 
     1671    ); 
    16531672 
    16541673    my $ok = 1; 
Note: See TracChangeset for help on using the changeset viewer.