Hi,
I found three issues concerning first party plugin Filter By Author:
1) its function “constrain_by_author” which is called by the hook “edit_entries_search_where” does not use $EXT global, which it should in order to avoid incompatibility with other extensions which use the same hook (currently “Filter By Author” is incompatible with “Filter By Sticky” extension). That is, instead of
function constrain_by_author()
{
global $IN;
$member_id = $IN->GBL('author', 'GP');
if ($member_id != '' && is_numeric($member_id))
{
return " AND exp_members.member_id = '$member_id'";
}
}it should be something like this
function constrain_by_author()
{
global $EXT, $IN;
$where_clause = '';
if ($EXT->last_call !== FALSE)
{
$where_clause = $EXT->last_call;
}
$member_id = $IN->GBL('author', 'GP');
if ($member_id != '' && is_numeric($member_id))
{
$where_clause .= " AND exp_members.member_id = '$member_id' ";
}
return $where_clause;
}2) “Filter By Author” extension outputs javascript in which there is this code (line 81)
window.onload = function()
{
fbaLoad();
fbaAddEvents();
}Obviously, this should not be done because it can interfere with wndow.onload = somefunction in other add-on.
3) “Filter By Author” extension outputs javascript in which there is function “fbaAddEvents” which attaches function “doLinkChange” to all anchor elements in the document. This is very inefficient way of doing things because the function “doLinkChange” should be attached only to pagination links which are contained in the “div” element having “class” attribute “crumblinks”.