Changeset 1728089
- Timestamp:
- 09/11/2017 01:39:59 PM (9 years ago)
- Location:
- fastdee/trunk
- Files:
-
- 2 edited
-
assets/js/update-page.js (modified) (1 diff)
-
includes/core/class-fd-update.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fastdee/trunk/assets/js/update-page.js
r1727829 r1728089 100 100 function startCounter() { 101 101 var startValue = jQuery('#status_ofertas').html(); 102 return setInterval(function () { 102 return setInterval(function () { // Todo fix contador passa da qtd certa qdo continua 103 103 var i = jQuery('#status_ofertas').html(); 104 104 if (++i < 500 + parseInt(startValue) && i < parseInt(jQuery('#total_offers').html())) { 105 105 jQuery('#status_ofertas').html(i) 106 106 } 107 }, 200)107 }, 300) 108 108 } 109 109 -
fastdee/trunk/includes/core/class-fd-update.php
r1728062 r1728089 30 30 31 31 /** Busca total de ofertas do fastdee no bd 32 * @param bool $afterVersion2_4 32 33 * @return string|int 33 34 */ 34 private function getTotalOffersImported() { 35 private function getTotalOffersImported( $afterVersion2_4 = false ) { 36 37 if ( $afterVersion2_4 ) { 38 $key = FdOfertas::_FD_OFFER_FASTDEE_ID; 39 } else { 40 $key = FdOfertas::_FD_OFFER_LOMADEE_ID; 41 } 35 42 36 43 $query = new WP_Query( … … 39 46 'meta_query' => array( 40 47 array( 41 'key' => FdOfertas::_FD_OFFER_LOMADEE_ID,48 'key' => $key, 42 49 'compare' => 'EXISTS' 43 50 ), … … 84 91 } 85 92 86 $totalOffers = $this->getTotalOffersImported( );93 $totalOffers = $this->getTotalOffersImported( true ); 87 94 88 95 if ( $offersUpdated >= $totalOffers ) {
Note: See TracChangeset
for help on using the changeset viewer.