From e2d3c948002076e73772c707b00c6c7aa6745029 Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Sat, 26 Jan 2013 00:29:04 -0500 Subject: Catalog::_check_ticker() -> UI::check_ticker() --- lib/class/catalog.class.php | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'lib/class/catalog.class.php') diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 02aa9135..39ce9451 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -50,7 +50,6 @@ class Catalog extends database_object { private static $artists = array(); private static $tags = array(); private static $_art_albums = array(); - private static $_ticker; /** * Constructor @@ -73,19 +72,6 @@ class Catalog extends database_object { } //constructor - /** - * _check_ticker - * Stupid little cutesie thing - */ - private static function _check_ticker() { - if (!isset(self::$_ticker) || (time() > self::$_ticker + 1)) { - self::$_ticker = time(); - return true; - } - - return false; - } - /** * _create_filecache * This poplates an array (filecache) on this object from the database @@ -594,7 +580,7 @@ class Catalog extends database_object { $this->count++; $file = str_replace(array('(',')','\''),'',$full_file); - if(self::_check_ticker()) { + if(UI::check_ticker()) { update_text('add_count_' . $this->id, $this->count); update_text('add_dir_' . $this->id, scrub_out($file)); } // update our current state @@ -711,7 +697,7 @@ class Catalog extends database_object { /* Stupid little cutesie thing */ $search_count++; - if (self::_check_ticker()) { + if (UI::check_ticker()) { update_text('count_art_' . $this->id, $search_count); update_text('read_art_' . $this->id, scrub_out($album->name)); } //echos song count @@ -745,7 +731,7 @@ class Catalog extends database_object { /* Stupid little cutesie thing */ $thumb_count++; - if (self::_check_ticker()) { + if (UI::check_ticker()) { update_text('count_thumb_' . $this->id, $search_count); } //echos thumb count @@ -1359,7 +1345,7 @@ class Catalog extends database_object { while ($results = Dba::fetch_assoc($db_results)) { debug_event('clean', 'Starting work on ' . $results['file'] . '(' . $results['id'] . ')', 5, 'ampache-catalog'); $count++; - if (self::_check_ticker()) { + if (UI::check_ticker()) { $file = str_replace(array('(',')', '\''), '', $results['file']); update_text('clean_count_' . $this->id, $count); update_text('clean_dir_' . $this->id, scrub_out($file)); @@ -1470,7 +1456,7 @@ class Catalog extends database_object { while ($row = Dba::fetch_assoc($db_results)) { $count++; - if (self::_check_ticker()) { + if (UI::check_ticker()) { $file = str_replace(array('(',')','\''), '', $row['file']); update_text('verify_count_' . $this->id, $count); update_text('verify_dir_' . $this->id, scrub_out($file)); -- cgit