Changeset 26

Show
Ignore:
Timestamp:
04/19/07 10:40:20 (2 years ago)
Author:
root
Message:

Improve perl code (LINworks GmbH)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/op_server.pl

    r25 r26  
    644644 
    645645    if ( $tipo eq "buttons" ) { 
    646         if ( !inArray( $filename, @btninclude ) ) { 
     646        if ( ! grep {$filename eq $_} @btninclude ) { 
    647647            push( @btninclude, $filename ); 
    648648        } 
     
    653653    } 
    654654    if ( $tipo eq "style" ) { 
    655         if ( !inArray( $filename, @styleinclude ) ) { 
     655        if ( ! grep {$filename eq $_} @styleinclude ) { 
    656656            push( @styleinclude, $filename ); 
    657657        } 
     
    90039003} 
    90049004 
    9005 sub inArray { 
    9006     my $val = shift; 
    9007     for my $elem (@_) { 
    9008         if ( $val eq $elem ) { 
    9009             return 1; 
    9010         } 
    9011     } 
    9012     return 0; 
    9013 } 
    9014  
    90159005sub encode_base64 { 
    90169006    my $res = "";