[development] converting a module from Drupal 5 to Drupal 6

Steven Jones darthsteven at gmail.com
Wed Jan 21 09:25:19 UTC 2009


This is clearly in either a form _submit or _validate handler, so
you'll want to read, and understand:

http://drupal.org/node/144132#buttons


Regards
Steven Jones
ComputerMinds ltd - Perfect Drupal Websites

Phone : 0121 288 0434
Mobile : 07951 270 026
http://www.computerminds.co.uk



2009/1/21 Stewart Robinson <stewsnooze at gmail.com>:
> Hi,
>
> Op means different things in different places, or at least its values do.
>
> What function does your copied code come from and do you know the value of op?
>
> Stew
>
> On 1/21/09, Sheryl (Permutations Software) <sheryl at permutations.com> wrote:
>> I'm converting a module from Drupal 5 to Drupal 6, and I'm having a very
>> hard time understanding the change in the use of 'op'. I can't figure out
>> how I need to change my code. There are these lines.
>>
>>   if (!empty($form_values['op'])) {
>>     _phpfreechat_clear_cache();
>>     _phpfreechat_clear_cookies();
>>   }
>>   if (!_phpfreechat_check_install()) {
>>     form_set_error('op', _phpfreechat_not_found());
>>   }
>>   if (!_phpfreechat_check_files()) {
>>     form_set_error('op', t('Unable to create data folders for
>> phpfreechat.'));
>>   }
>>
>> I took this module over from someone else, so I don't fully understand the
>> use of 'op' here to begin with. Not understanding what it's doing makes it
>> very hard to rewrite. I've spent the last two hours on the Drupal site
>> trying to figure it out and I'm boggled. All I can tell is that 'op' was the
>> default name of buttons in Drupal 5, but I still can't figure out what's
>> being tested in these "if" statements or how I need to rewrite them for
>> Drupal 6. Any guidance you can give me would be greatly appreciated!
>>
>> - Sheryl
>>
>>
>>
>
> --
> Sent from my mobile device
>


More information about the development mailing list