From: Verdon V. <ve...@ve...> - 2006-12-04 22:13:43
|
Hi Matt, I had to uninstall / reinstall my mod in progress, but yes, that did the trick. Thanks :) verdon On 4-Dec-06, at 12:46 PM, Matthew McNaney wrote: > That's a bug. You should be able to store null values. > > Please try the following cvs commit: > http://tinyurl.com/y9pabx > > I will update core if all is well. > > Thanks, > Matt > > On Sun, 2006-12-03 at 22:06 -0500, Verdon Vaillancourt wrote: >> Hi :) >> >> I am working on my first mod for phpws 1.x. My module has some >> settings that are text strings. I don't seem to be able to set these >> to NULL or empty strings. For example, by default, these settings >> should return NULL. What they are returning is 0. Maybe I'm >> misunderstanding, but I don't think 0 is the same as NULL in this >> instance. >> >> I have tried in my inc/settings.php setting them as >> >> $settings['custom_1_label'] = NULL; >> >> and as >> >> $settings['custom_1_label'] = ''; >> >> In either case, when I bring these values up in a settings edit form >> in this manner, >> >> $form->addText('custom_1_label', PHPWS_Settings::get('ssclassifieds', >> 'custom_1_label')); >> $form->setSize('custom_1_label', 40, 255); >> $form->setLabel('custom_1_label', _('Custom field 1 label')); >> >> The form will have a 0 in the field. If I remove the zero, and save >> the settings, and then bring up the edit screen again, the 0 is back. >> >> Is this normal behaviour? If it is, I can likely work with it, but it >> would be more familiar to me if the setting contained NULL or an >> empty string. >> >> Thanks for any input into this and very best regards, >> verdon vaillancourt > > -- > Matthew McNaney > Electronic Student Services > Appalachian State University > http://phpwebsite.appstate.edu > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |