Doug Stewart avatar Doug Stewart committed 6abe3da

FINALLY fixed this bug. It was so stupid -- checking the wrong variables and saving the whole bloody mess to the DB.

I feel cleansed.

Comments (0)

Files changed (2)

 
 ### VERSION HISTORY ###
 
+* Version 1.3.9
+	* **Issues Fixed**
+		* Resolved options-saving bug that has been plaguing LBLG for ages, affecting primarily bbPress and BuddyPress
+* Version 1.3.8
+	* **Issues Fixed**
+		* BuddyPress JavaScript has been fixed for BP version >= 1.6
 * Version 1.3.7
 	* **Issues Fixed**
 		* Top-level drop-downs should now be styled correctly and consistently
 	* Initial release
 
 ### KNOWN ISSUES ###
+* Version 1.3.8
+	* <del>Options for bbPress or BuddyPress don't save after enabling plugins</del>
 * Version 1.3.7
 	* <del>Italics/emphasis elements not styled correctly</del>
 	* <del>AJAX requests for BuddyPress pages not working correctly</del>

includes/functions/options.php

 
 	// Check to see whether we've been installed previously
 	$lblg_stored_options = get_option( $lblg_shortname . '_theme_options' );
-	
+
 	// Pull the default options from the parent-options.php and, optionally, the
 	// child-options.php file, if we're running as a child theme.
 	$lblg_default_options = lblg_get_default_options();
 
 	if( ( false === $lblg_stored_options ) || ( '' == $lblg_stored_options ) ){
 		// We haven't been installed yet.
-		$lblg_options = lblg_get_options_from_defaults( $lblg_default_options );
-	} elseif( version_compare( $lblg_version, $lblg_stored_options['version'], '>' )) {
+		$lblg_options = $lblg_defaults;
+	} elseif( (version_compare( $lblg_version, $lblg_stored_options['version'], '!=' )) || (count($lblg_stored_options) != count($lblg_defaults))) {
+
 		// New version of the options have been detected. Let's reload.
-		$lblg_options = $lblg_stored_options + $lblg_default_options;
+		$lblg_options = $lblg_stored_options + $lblg_defaults;
 	} else {
 		// We've previously been installed and the version number
 		// hasn't changed. Assume no change and act accordingly.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.