friendica/friendica — pull request #514 by hmeine (2012-10-16 14:06:04+00:00)
Title: Cleanups in diabook theme code

I was looking at the diabook code w.r.t. the sidebar entries (and their toggling / configuration). With this PR, I propose to reduce a lot of duplicated code, and it already fixes at least the last problem I mentioned in http://bugs.friendica.com/view.php?id=501 , namely that the preselected "don't show" entries in the popup configuration were wrong (they only looked at pconfig, not at the site-wide config).

There is much more cleanup work todo, though:

* The defaults are still duplicated.
* It would make sense to use arrays and loops for the config keys, instead of iterating again and again.
* The popup config still does not work properly.
* The config reading / writing code is still not shared.