Question about module id

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
yewang

Question about module id

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Question about module id

Post 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.
Post Reply

Return to “Developers Discussion”