Indeed, I kinda forgot to go through most of the other apps (already did CasUser, commited and pushed earlier today).
Sorry for the confusion.

Hans

On 20/05/2011 15:53, Nathalie Blocry wrote:
Hi,
the settings stuff was refactored recently (there were some mails sent
to the dev list).
the portfolio application was already refactored by Hans, so the call
with __NAMESPACE__ is the correct one.

Op 05/20/2011 03:45 PM, Stijn Van Hoecke schreef:
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


_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev

--

*Hans De Bisschop*
Hoofddeskundige ICTO | Lead Developer Chamilo 2.0
Software Coordinator Chamilo Association
Erasmushogeschool Brussel
Nijverheidskaai 170 | B-1070 Brussel
T 02 559 02 54 | i 254
hans.de.bissc...@ehb.be <mailto:hans.de.bissc...@ehb.be> | www.erasmushogeschool.be <http://www.erasmushogeschool.be/>

Kom eens langs: www.erasmushogeschool.be/infodagen <http://www.erasmushogeschool.be/infodagen> of lees onze elektronische nieuwsbrief: ehbrief.ehb.be <http://ehbrief.ehb.be/>
P Before printing, think about the environment

_______________________________________________
Dev mailing list
Dev@lists.chamilo.org
http://lists.chamilo.org/listinfo/dev

Reply via email to