Changeset 2023 for sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications-db.php
- Timestamp:
- 11/01/2015 06:33:25 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications-db.php
r2022 r2023 2 2 /** 3 3 * This class must execute queries valid for both MySQL and SQLite3. 4 * The DB driver must be wpdb or Trac_Notifications_SQLite_Driver. 5 * It must work without any other dependencies, such as WordPress. 4 6 */ 5 class Trac_Notifications_DB {7 class Trac_Notifications_DB implements Trac_Notifications_API { 6 8 function __construct( $db ) { 7 9 $this->db = $db; … … 60 62 } 61 63 62 function get_component_history( $component ) {63 $days_ago = ( time() - ( 86400 * Make_Core_Trac_Components::last_x_days ) ) * 1000000;64 function get_component_history( $component, $last_x_days = 7 ) { 65 $days_ago = ( time() - ( 86400 * $last_x_days ) ) * 1000000; 64 66 $closed_reopened = $this->db->get_results( $this->db->prepare( "SELECT newvalue, COUNT(DISTINCT ticket) as count 65 67 FROM ticket_change tc INNER JOIN ticket t ON tc.ticket = t.id
Note: See TracChangeset
for help on using the changeset viewer.