Difference between revisions of "Issue:Createdby not working"

From FollowTheScore
Jump to: navigation, search
(Reply)
Line 26: Line 26:
  
 
Obviously this is a bug.
 
Obviously this is a bug.
The following query limits articles to A% and only searches the main namespace.
 
As you can see, many pages are being found which were not created by you ...
 
  
<pre><nowiki>
+
changing the "=" in source lines 2653 and 2657 to ".=" should solve the problem.
<DPL>
+
So these lines should read:
  debug=4
 
  titlematch=A%
 
  namespace=
 
  createdby=Markw21
 
  addauthor=true
 
</DPL>
 
</nowiki></pre>
 
  
We show the SQL statement - obviously it lacks a restriction regarding the author
+
        if ($bAddAuthor && $sSqlRevisionTable =='') {
<DPL>
+
            $sSqlRevisionTable = $sRevisionTable . ' AS rev, ';
  debug=4
+
    #2653 ----> $sSqlCond_page_rev .= ' AND '.$sPageTable.' .....
  titlematch=A%
+
        }
  namespace=
+
        if ($bAddLastEditor && $sSqlRevisionTable =='') {
  createdby=Markw21
+
            $sSqlRevisionTable = $sRevisionTable . ' AS rev, ';
  addauthor=true
+
    #2657 ----> $sSqlCond_page_rev .= ' AND '.$sPageTable.'.page_id= ....
</DPL>
+
        }
 +
 
 +
Can you please check this? [[User:Gero|Gero]] 23:29, 20 November 2008 (UTC)

Revision as of 01:29, 21 November 2008

I have just upgraded to DPL 1.7.4 running on

- Windows Server 2003 (in VM-ware, 2GB RAM) - Apache 2.2.4 - php 5.2.4 - Mediawiki 1.9.2 - MySQL 5.0.24a - mod_perl 2.0.3 - Perl 5.8.8 - APC 3.0.15-dev

But when I try and run

<DPL> createdby=Andygray addauthor=true </DPL>

I am getting all users content, i.e. it does not seem to work

What am I doing wrong or is this a bug?

Reply

Obviously this is a bug.

changing the "=" in source lines 2653 and 2657 to ".=" should solve the problem.
So these lines should read:
       if ($bAddAuthor && $sSqlRevisionTable ==) {
           $sSqlRevisionTable = $sRevisionTable . ' AS rev, ';
   #2653 ----> $sSqlCond_page_rev .= ' AND '.$sPageTable.' .....
       }
       if ($bAddLastEditor && $sSqlRevisionTable ==) {
           $sSqlRevisionTable = $sRevisionTable . ' AS rev, ';
   #2657 ----> $sSqlCond_page_rev .= ' AND '.$sPageTable.'.page_id= ....
       }

Can you please check this? Gero 23:29, 20 November 2008 (UTC)