Monday, November 08, 2010 at 12:05 AM.

system.verbs.builtins.radio.thread.agents.updateThemes

<<Changes
	<<12/31/01; 12:44:11 AM by JES
		<<Created. Once an hour, read the directory.opml file that points at Theme files distributed by UserLand, and download new or changed Theme files to the Radio UserLand/Themes folder.
if not tcp.isOffline () {
	local (flupdate = false);
	local (day, month, year, hour, minute, second);
	date.get (clock.now (), @day, @month, @year, @hour, @minute, @second);
	if not defined (user.radio.stats.dateLastThemesUpdate) {
		user.radio.stats.dateLastThemesUpdate = date (0)};
	if (minute == user.radio.settings.minuteToDoNightlyTasks) {
		local (lastday, lastmonth, lastyear, lasthour, lastminute, lastsecond);
		date.get (user.radio.stats.dateLastThemesUpdate, @lastday, @lastmonth, @lastyear, @lasthour, @lastminute, @lastsecond);
		if (lastday != day) or (lastHour != hour) { //only do the updates once per hour
			flupdate = true}}
	else {
		if (number (clock.now ()) - 3600) > number (user.radio.stats.dateLastThemesUpdate) {
			flupdate = true}};
	if flupdate {
		user.radio.stats.dateLastThemesUpdate = clock.now ();
		if user.radio.prefs.flUpdateThemesHourly {
			radio.theme.updateThemes ()}}}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.