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

scripting2Suite.editor.savePrefsInPage

on savePrefsInPage () {
	<<Changes
		<<7/2/10; 7:11:47 PM by DW
			<<Called from the prefs page form, if it's a post, we send back to the server the prefs that the user can edit from the form.
	local (pta = html.getpagetableaddress ());
	if pta^.method == "POST" {
		local (adrdata = scripting2suite.init (), t);
		new (tabletype, @t);
		t.ownerName = adrdata^.editor.serverPrefs.ownerName;
		t.ownerEmail = adrdata^.editor.serverPrefs.ownerEmail;
		t.weblogName = adrdata^.editor.serverPrefs.weblogName;
		t.tagline = adrdata^.editor.serverPrefs.tagline;
		t.timezone = adrdata^.editor.serverPrefs.timezone;
		t.timezoneName = adrdata^.editor.serverPrefs.timezoneName;
		t.flDisqusComments = adrdata^.editor.serverPrefs.flDisqusComments;
		t.disqusShortName = adrdata^.editor.serverPrefs.disqusShortName;
		<<scratchpad.prefstable = t; edit (@scratchpad.prefstable)
		scripting2Suite.editor.savePrefs (@t);
		adrdata^.editor.stats.flPasswordValid = true}; //7/8/10 by DW
	return ("")};
bundle { //test code
	local (pagetable);
	new (tabletype, @pagetable);
	pagetable.method = "POST";
	html.setpagetableaddress (@pagetable);
	saveprefsinpage ()}



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.