From: Daniel W <d...@ni...> - 2005-12-08 22:29:27
|
Paul Lesneiwski wrote: >>In short: >> >>In the compatiblity/function.php file: >> >>function compatibility_sqextractGlobalVar($name); >>calls >>function sqgetGlobalVar($name, $$name); >> >>However sqgetGlobalVar (in globals.php) can take a 3rd parameter >>(the search order defaulting to SQ_INORDER). >> >>So: >> >>I've installed the autorespond plugin that calls: >>compatibility_sqextractGlobalVar('key', $key, SQ_COOKIE); > > > So why is this a devel question? This should be on the plugins list, BTW. Sorry - I only meant this as an example of my usage. I thought the "compatibility plugin" was quite a unique case and I just read today a thread about it being 'corified' and maintained by the dev team so thought i'd post the comments relating to this plugin to the dev list. My apologies if this was incorrect judgement. > > Which plugin, please? This one?: > > http://www.squirrelmail.org/plugin_view.php?id=172 > > That one is outdated and I'm not sure that there is any functionality it > contains that vacation_local does not have: > > http://www.squirrelmail.org/plugin_view.php?id=51 > > (although if you want to try the latter, ask me for the newest code > offlist, I am attempting to get feedback for an eminent release) I know the plugin is old but it's always seemed to work so I kept it in place. I'll certainly have a look at your own plugin. > >>A few questions/observations: >> >>1. Why don't i get an "invalid number of a parameters" error? > PHP doesn't work that way ah yes - it appears that you can pass MORE than the expected parameters but not less. > > >>2. sqgetGlobalVar is never passed the SQ_COOKIE parameter and the key is >>never returned. > > > Yep. 2nd and 3rd parameters are ignored. The author didn't read the > compatibility plugin's docs I guess. The new compatibility plugin does > not require any specially named functions; it "just works". So the > author should just remove any calls to compatibility-specific things. > But I don't think that plugin is actively maintained. I think at the time this plugin was written the compatibility plugin was around v1.3 so may be it worked differently then. > >>3. How is a plugin supposed to extract data from a cookie if this >>function ignores the 3rd parameter? So from your above comment we can just use sqsetcookie and directly use sqgetGlobalVar($name, &$value, SQ_COOKIE) to extract? > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > -- > squirrelmail-devel mailing list > Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines > List Address: squ...@li... > List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.devel > List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=7139 > List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel > |