Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Moves algorithm to top of file

AuthorDaveJarvis <email>
Date2023-11-11 13:58:01 GMT-0800
Commit8716c717c6187c3e6855b7910d4aace1ad75701d
Parent62dcdd5
Delta7 lines added, 7 lines removed
www/downloads/counter.php
ignore_user_abort( true );
+ $filename = get_sanitized_filename();
+ $unique_hit = download_token_expired( 24 * 60 * 60 );
+
+ if( !empty( $filename ) && download( $filename ) && $unique_hit ) {
+ increment_count( "$filename-count.txt" );
+ }
+
/**
* Answers whether the user's download token has expired.
? false
: transmit( $filename, $seek_start, $size );
- }
-
- $filename = get_sanitized_filename();
- $unique_hit = download_token_expired( 24 * 60 * 60 );
-
- if( !empty( $filename ) && download( $filename ) && $unique_hit ) {
- increment_count( "$filename-count.txt" );
}
?>