Changeset 2033571
- Timestamp:
- 02/18/2019 07:38:02 PM (7 years ago)
- Location:
- wp-download-codes/trunk
- Files:
-
- 7 edited
-
README.txt (modified) (2 diffs)
-
includes/admin/manage-releases.php (modified) (1 diff)
-
includes/download.php (modified) (1 diff)
-
includes/helpers/db.php (modified) (2 diffs)
-
includes/helpers/file.php (modified) (1 diff)
-
resources/js/wp-download-codes.js (modified) (1 diff)
-
wp-download-codes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-download-codes/trunk/README.txt
r2032823 r2033571 3 3 Donate link: http://wordpress.org/extend/plugins/wp-download-codes/ 4 4 Tags: download, download code, code generator 5 Requires at least: 2.5. 05 Requires at least: 2.5.3 6 6 Tested up to: 5.0.3 7 Stable tag: 2.5.3 7 Stable tag: 2.5.3.1 8 8 9 9 The plugin enables to generation and management of download codes for all types of files (zip, mp3, ...). … … 66 66 67 67 == Changelog == 68 69 = 2.5.3.1 = 70 * Made minor improvements for empty "Hosting Type" values 68 71 69 72 = 2.5.3 = -
wp-download-codes/trunk/includes/admin/manage-releases.php
r2032823 r2033571 210 210 echo '<td>' . $release-> ID . '</td>'; 211 211 echo '<td>' . dc_get_hosting_types()[$release->hosting_type] . '</td>'; 212 echo '<td>' . ( 'WP_DIRECT' == $release->hosting_type? $release->filename : $release->url ) . '</td>';212 echo '<td>' . ( dc_is_default_hosting_type( $release->hosting_type ) ? $release->filename : $release->url ) . '</td>'; 213 213 echo '<td>' . $release->codes . '</td><td>' . $release->downloads . '</td>'; 214 214 echo '<td>'; -
wp-download-codes/trunk/includes/download.php
r2032823 r2033571 37 37 // Start download if maximum of allowed downloads is not reached 38 38 if ( $downloads->downloads < $release->allowed_downloads ) { 39 if ( 'WP_DIRECT' == $release->hosting_type) {39 if ( dc_is_default_hosting_type( $release->hosting_type )) { 40 40 // Download file directly 41 41 -
wp-download-codes/trunk/includes/helpers/db.php
r2032823 r2033571 397 397 $errors[] = "The title must not be empty"; 398 398 } 399 if ( 'WP_DIRECT' == $hosting_type&& '' == $filename ) {399 if ( dc_is_default_hosting_type( $hosting_type ) && '' == $filename ) { 400 400 $errors[] = "Please choose a valid file for this release"; 401 401 } … … 441 441 $errors[] = "The title must not be empty"; 442 442 } 443 if ( 'WP_DIRECT' == $hosting_type&& '' == $filename ) {443 if ( dc_is_default_hosting_type( $hosting_type ) && '' == $filename ) { 444 444 $errors[] = "Please choose a valid file for this release"; 445 445 } -
wp-download-codes/trunk/includes/helpers/file.php
r2032823 r2033571 114 114 ); 115 115 } 116 117 /** 118 * Returns if hosting type is default (WP_DIRECT) 119 */ 120 function dc_is_default_hosting_type($hosting_type) 121 { 122 return ( '' == $hosting_type || 'WP_DIRECT' == $hosting_type ); 123 } 116 124 ?> -
wp-download-codes/trunk/resources/js/wp-download-codes.js
r2032823 r2033571 101 101 102 102 switch (hosting_type) { 103 case "WP_DIRECT":104 $("#manage-releases-hosting-type-wp-direct").show();105 $("#manage-releases-hosting-type-redirect-url-open").hide();106 break;107 108 103 case "REDIRECT_URL_OPEN": 109 104 $("#manage-releases-hosting-type-wp-direct").hide(); 110 105 $("#manage-releases-hosting-type-redirect-url-open").show(); 111 106 break; 112 107 113 108 default: 109 $("#manage-releases-hosting-type-wp-direct").show(); 110 $("#manage-releases-hosting-type-redirect-url-open").hide(); 114 111 break; 115 112 } -
wp-download-codes/trunk/wp-download-codes.php
r2032823 r2033571 6 6 Description: The plugin enables to generation and management of download codes for .zip files. It was written to enable the free download of records and CDs with dedicated codes printed on the cover of the releases or on separate download cards. 7 7 8 Version: 2.5.3 8 Version: 2.5.3.1 9 9 Author: misanthrop, spalmer 10 10 Author URI: http://www.misantropolis.de, http://quoperative.com
Note: See TracChangeset
for help on using the changeset viewer.