Hi all! I was just looking into the global weblcms publishing setting that allows the quickpublishmode (or both mode) setting, and I noticed that there was something wrong with the call to get this (returned null). It seems that the platform_setting class expects the application identifier to be "application\weblcms", and only "weblcms" is passed => the setting is not found, returns null and is skipped.
I did a quick search for "PlatformSetting :: get(" on the optional apps and when I took a closer look on how the other apps got their settings, I noticed that almost every single app uses a different approach, possibly ending up with settings that are not fetched. * Weblcms currently uses "PlatformSetting :: get('display_publication_screen', WeblcmsManager :: APPLICATION_NAME);" ... which obviously is wrong because this returns null; * CAS uses "PlatformSetting :: get('table', Application :: determine_namespace(CasUserManager :: APPLICATION_NAME));" ... which could work, and probably is the right way to do this; * SearchPortal uses "PlatformSetting :: get('all_objects_searchable', RepositoryManager :: APPLICATION_NAME);" ... which, like the weblcms, will result in null being fetched; * Portfolio uses "PlatformSetting :: get('first_page', __NAMESPACE__)" ... which could also work, but is this the way to to it on the platform? * And in Wiki I found "PlatformSetting :: get('enable_introduction', 'weblcms')" ... the hard coded variant (although commented out, so could be an old implementation before constants were introduced). It seems to me that this is a global problem of getting settings the right way, could somebody which loads of experience comment on this problem to state "THE" way to do it, and possibly the other developers should check their code on these issues to make sure the settings aren't skipped. Kind regards Stijn Van Hoecke Hogent _______________________________________________ Dev mailing list Dev@lists.chamilo.org http://lists.chamilo.org/listinfo/dev