Page 1 of 1

Question about module id

Posted: Mon Nov 20, 2006 11:05 pm
by yewang
Hi,

I got handed over a semi-finished CMSMS module from some other developer who left the team.  The module works perfectly fine under CMSMS version 0.11 with ADODB DB Abstraction Layer. However, when we upgraded the CMSMS to version 0.13, the functionality was broken due to  the adoption of ADODB_LITE for DB Abstraction Layer. Some of the code needs to be rewritten due to the incompatibilities, I.E. AutoExcute(). That's all right and fixed. The one last piece left was something to do with the moduleinterface code located at

http://svn.cmsmadesimple.org/svn/cmsmad ... erface.php

LINE:27  $id = '';
LINE:29  $action = 'defaultadmin';
LINE:31  if (isset($_REQUEST['action'])) $action = $_REQUEST['action'];
LINE:97  $id = 'm1_';

Basically, the $id (module id I assume?) was inconsistently assigned at line 27 and line 97. When user clicks on a link on the module interface page or submit the form inside moduleinterface.php, action string cannot be properly retrived as you can see at line 31 that it only looks for the action variable without the proper prefix ('m1_') which then cause the module page malfunction without getting the proper action string. I am wondering if someone really knows the module code inside out can help out on this issue. It's been bugging me for about  a week and I really need this done. Any help would be highly appreciated!!

-Ye

Re: Question about module id

Posted: Tue Nov 21, 2006 5:48 pm
by Ted
Honestly, this is just old cruft.  All of the modules have gone away from using the action and id parameters to the mact parameter that combines then.  This stuff was originally left for backwards compatibility, but that's probably broken by this point.

Assuming you're using the module api functions to start your forms and create your links, this shouldn't cause an issue in your module, since they were all updated to spit out a mact variable as well.