| @@ 96-103 (lines=8) @@ | ||
| 93 | if ( filesize( $file ) >= 104857600 ) |
|
| 94 | $use_exec = true; |
|
| 95 | switch( $method ) { |
|
| 96 | case 'md5': |
|
| 97 | if ( $use_exec ) { |
|
| 98 | $checksum = $this->exec_checksum( $file, $method ); |
|
| 99 | if ( !empty( $checksum ) ) |
|
| 100 | return $checksum; |
|
| 101 | } |
|
| 102 | return md5_file( $file ); |
|
| 103 | break; |
|
| 104 | case 'sha1': |
|
| 105 | if ( $use_exec ) { |
|
| 106 | $checksum = $this->exec_checksum( $file, $method ); |
|
| @@ 104-111 (lines=8) @@ | ||
| 101 | } |
|
| 102 | return md5_file( $file ); |
|
| 103 | break; |
|
| 104 | case 'sha1': |
|
| 105 | if ( $use_exec ) { |
|
| 106 | $checksum = $this->exec_checksum( $file, $method ); |
|
| 107 | if ( !empty( $checksum ) ) |
|
| 108 | return $checksum; |
|
| 109 | } |
|
| 110 | return sha1_file( $file ); |
|
| 111 | break; |
|
| 112 | default: |
|
| 113 | return false; |
|
| 114 | break; |
|