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

system.verbs.builtins.radio.backup.init

<<Changes
	<<1/23/03; 5:40:12 PM by JES
		<<Init the system.temp.radio.backup table.
	<<11/12/02; 5:50:24 PM by DW
		<<Created.
if not defined (user.radio.backup) {
	new (tabletype, @user.radio.backup)};
bundle { //prefs
	if not defined (user.radio.backup.prefs) {
		new (tabletype, @user.radio.backup.prefs)};
	if not defined (user.radio.backup.prefs.flEnabled) {
		local (adrblog = radio.weblog.init ());
		local (flEnabled = (sizeOf (adrblog^.posts) == 0) );
		user.radio.backup.prefs.flEnabled = flEnabled};
	if not defined (user.radio.backup.prefs.folder) {
		user.radio.backup.prefs.folder = user.radio.prefs.wwwfolder + "backups" + file.getpathchar ()};
	if not defined (user.radio.backup.prefs.hourToBackUp) {
		user.radio.backup.prefs.hourToBackUp = 0};
	if not defined (user.radio.backup.prefs.minuteToBackUp) {
		user.radio.backup.prefs.minuteToBackUp = random (0, 59)};
	if not defined (user.radio.backup.prefs.flUpstreamBackupFiles) {
		user.radio.backup.prefs.flUpstreamBackupFiles = false;
		radio.backup.enableUpstreaming (user.radio.backup.prefs.flUpstreamBackupFiles)}}; //writes an upstream spec to disk with type of "none"
bundle { //stats
	if not defined (user.radio.backup.stats) {
		new (tabletype, @user.radio.backup.stats)};
	if not defined (user.radio.backup.stats.whenLastBackup) {
		user.radio.backup.stats.whenLastBackup = date (0)}};
bundle { //temp
	if not defined (system.temp.radio.backup) {
		new (tableType, @system.temp.radio.backup)};
	if not defined (system.temp.radio.backup.threadId) {
		system.temp.radio.backup.threadId = 0};
	if (system.temp.radio.backup.threadId == 0) or (not thread.exists (system.temp.radio.backup.threadId)) {
		system.temp.radio.backup.flInProgress = false;
		system.temp.radio.backup.statusHtml = ""}
	else {
		system.temp.radio.backup.flInProgress = true};
	if not defined (system.temp.radio.backup.lastError) {
		system.temp.radio.backup.lastError = ""};
	if not defined (system.temp.radio.backup.statusMessage) {
		system.temp.radio.backup.statusMessage = "Idle."};
	if not defined (system.temp.radio.backup.statusHtml) {
		system.temp.radio.backup.statusHtml = ""};
	if not defined (system.temp.radio.backup.lastOperation) {
		system.temp.radio.backup.lastOperation = ""}}



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.