[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-plugins
Subject:    Re: [SM-PLUGINS] avelsieve / squirrelmail 1.5.2 php error
From:       Paul Lesniewski <paul () squirrelmail ! org>
Date:       2009-02-05 18:11:51
Message-ID: 58191e420902051011t72a0e629qb0fd710743cb9a55 () mail ! gmail ! com
[Download RAW message or body]

Please do not top post.  Please read our mailing list posting
guidelines BEFORE you post to the list, noting our requested posting
style.

Also, PLEASE NOTE that if you downloaded this plugin any time starting
January 17, 2009, please IMMEDIATELY remove it from your system and
download the plugin again from the SquirrelMail website - it was
recently compromised by an attacker.  See the news item on the top of
the SquirrelMail home page.

> > > I am trying to use the avelsieve plugin with squirrelmail 1.5.2
> > > (opensuse/php5-5.2)
> > > With default plugin configuration i see well the filter menu in the
> > > options.
> > > When trying to use it i am getting a php error (and so a blanck web
> > > page):
> > > 
> > > PHP Fatal error:  Only variables can be passed by reference in
> > > /srv/www/htdocs/squirrelmail/plugins/avelsieve/include/html_rulestable.inc.php
> > > on line 158
> > 
> > Looks like the plugin has its own hook calls.  It would need to be
> > updated to pass arguments to hooks like the 1.5.2 core does.  Take a
> > look at a hook call in each and you can probably discern the needed
> > changes.
> 
> I notice the difference of  concat_hook_function between 1.4 and 1.5:
> 
> 1.4 :
> string   concat_hook_function  (string $name, [mixed $parm = NULL])
> 1.5:
> mixed   concat_hook_function  (string $name, mixed &$args, [boolean
> $force_array = FALSE])
> 
> So trying to modify the original
> $out .= concat_hook_function('avelsieve_rulestable_buttons', NULL);
> 
> to
> $parms = NULL;
> $out .= concat_hook_function('avelsieve_rulestable_buttons', &$parms);
> 
> Seems to work better. Do you think i am right ?

Yes, that looks about right, although I don't think you need the "&".
There should also be a global variable in 1.5.2 that you can use:

global $null;
$out .= concat_hook_function('avelsieve_rulestable_buttons', $null);


> Original function:
> function button_addnewrule() {
> global $spamrule_enable;
> $out = '<input name="addrule" value="' . _("Add a New
> Rule") . '" type="submit" />';
> if($spamrule_enable == true) {
> $out .= '<br/><input name="addspamrule" value="' .
> _("Add SPAM Rule") . '" type="submit" />';
> }
> $out .=
> concat_hook_function('avelsieve_rulestable_buttons',
> NULL);
> return $out;
> }
> 
> 
> 

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
-----
squirrelmail-plugins mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-plugins@lists.sourceforge.net
List archives: http://news.gmane.org/gmane.mail.squirrelmail.plugins
List info (subscribe/unsubscribe/change options): \
https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic