Plugin Directory

Changeset 688822


Ignore:
Timestamp:
03/29/2013 01:59:57 PM (13 years ago)
Author:
misanthrop
Message:

2.1.3: Improved query in dc_get_releases() for a quicker display of releases in "Manage Releases"

Location:
wp-download-codes/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-download-codes/trunk/README.txt

    r593149 r688822  
    55Requires at least: 2.5
    66Tested up to: 3.4
    7 Stable tag: 2.1.2
     7Stable tag: 2.1.3
    88
    99The 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.
     
    4848
    4949== Changelog ==
     50
     51= 2.1.3 =
     52* Improved query for a quicker display of releases in "Manage Releases"
    5053
    5154= 2.1.2 =
  • wp-download-codes/trunk/dc_functions.php

    r405656 r688822  
    271271    return $wpdb->get_results(
    272272        "SELECT     r.ID,
    273                     r.title,
    274                     r.artist,
    275                     r.filename,
    276                     COUNT(d.ID) AS downloads,
    277                     COUNT(DISTINCT c.ID) AS codes
    278         FROM        " . dc_tbl_releases() . " r
    279         LEFT JOIN   (" . dc_tbl_codes() . " c
    280         LEFT JOIN   ". dc_tbl_downloads() . " d
    281         ON          d.code = c.ID)
    282         ON          c.release = r.ID
    283         GROUP BY    r.ID,
    284                     r.filename,
    285                     r.title,
    286                     r.artist
     273        r.title,
     274        r.artist,
     275        r.filename,
     276        ccq.code_count AS codes,
     277        dcq.download_count AS downloads
     278        FROM    (" . dc_tbl_releases() . " r
     279                LEFT JOIN (SELECT `release`, COUNT(*) AS code_count
     280                    FROM " . dc_tbl_codes() . "
     281                    GROUP BY `release`) AS ccq
     282                ON ccq.release = r.ID)
     283                LEFT JOIN (SELECT `release`, COUNT(*) AS download_count
     284                    FROM ". dc_tbl_downloads() . " d
     285                    INNER JOIN " . dc_tbl_codes() . " c
     286                    ON d.code = c.id
     287                    GROUP BY `release`) AS dcq
     288                ON dcq.release = r.ID
    287289        ORDER BY    r.artist, r.title");
    288290}
  • wp-download-codes/trunk/wp-download-codes.php

    r593149 r688822  
    66Description: 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.
    77
    8 Version: 2.1.2
     8Version: 2.1.3
    99Author: misanthrop, spalmer
    1010Author URI: http://www.misantropolis.de, http://quoperative.com
    1111
    12     Copyright 2009-2012 Armin Fischer  (email : misantropolis@gmail.com)
     12    Copyright 2009-2013 Armin Fischer  (email : misantropolis@gmail.com)
    1313   
    1414    This program is free software; you can redistribute it and/or modify
Note: See TracChangeset for help on using the changeset viewer.