Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

How to Apply Patch to EzMwLuceneIndexer.php

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


rossxunix at yahoo

Nov 3, 2009, 11:21 AM

Post #1 of 3 (141 views)
Permalink
How to Apply Patch to EzMwLuceneIndexer.php

Hi there,
There is a patch under:
http://www.mediawiki.org/wiki/Extension_talk:EzMwLucene#Special:Upload_broken_on_new_install
which would fix the "Special:Upload broken on new install" problem.
 
Sorry for my stupid question, but how to apply the patch?
Should I need to copy it to the end of EzMwLuceneIndexer.php file?
 
Thanks in advance.
Ross


__________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now
http://ca.toolbar.yahoo.com.
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Brian.Mingus at Colorado

Nov 3, 2009, 12:44 PM

Post #2 of 3 (130 views)
Permalink
Re: How to Apply Patch to EzMwLuceneIndexer.php [In reply to]

On Tue, Nov 3, 2009 at 12:21 PM, Ross Xu <rossxunix[at]yahoo.ca> wrote:

> Hi there,
> There is a patch under:
>
> http://www.mediawiki.org/wiki/Extension_talk:EzMwLucene#Special:Upload_broken_on_new_install
> which would fix the "Special:Upload broken on new install" problem.
>
> Sorry for my stupid question, but how to apply the patch?
> Should I need to copy it to the end of EzMwLuceneIndexer.php file?
>
> Thanks in advance.
> Ross


Those are my bugs/fixes on the talk page.

You could have (and should, now) learn what patches are by using Google.
This patch is very easy to understand. One line has been modified and
replaced by another.

--- EzMwLuceneIndexer.php.old 2009-05-08 16:26:28.000000000 -0500
+++ EzMwLuceneIndexer.php 2009-05-08 16:26:00.000000000 -0500
@@ -38,7 +38,7 @@
$xml .=
"<content><![CDATA[{$revision->getRawText()}]]></content>";

/* If the article is in the Image namespace, add the file url */
if ($article->getTitle()->getNamespace()==6) {
- $file = wfFindFile($article->getTitle());

+ $file = wfFindFile($article->getTitle(),false,0,true);
$xml .=
"<attachment><![CDATA[{$file->getFullUrl()}]]></attachment>";
}

$xml .= '</article>';



Cheers,
Brian
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


rossxunix at yahoo

Nov 4, 2009, 7:49 AM

Post #3 of 3 (120 views)
Permalink
Re: How to Apply Patch to EzMwLuceneIndexer.php [In reply to]

Thank you Brian!
Now, I know what you mean, and it works.
 
I took it too serious for "apply patch". It thought I had to run some Unix commands as below to install the patch ;-)
$ patchadd patch_file.php, or
$ patch EzMwLuceneIndexer.php < patch_file.php
 
Thank again,
Ross

--- On Wed, 11/4/09, Brian J Mingus <Brian.Mingus[at]Colorado.EDU> wrote:


From: Brian J Mingus <Brian.Mingus[at]Colorado.EDU>
Subject: Re: [Mediawiki-l] How to Apply Patch to EzMwLuceneIndexer.php
To: "MediaWiki announcements and site admin list" <mediawiki-l[at]lists.wikimedia.org>
Received: Wednesday, November 4, 2009, 4:44 AM


On Tue, Nov 3, 2009 at 12:21 PM, Ross Xu <rossxunix[at]yahoo.ca> wrote:

> Hi there,
> There is a patch under:
>
> http://www.mediawiki.org/wiki/Extension_talk:EzMwLucene#Special:Upload_broken_on_new_install
> which would fix the "Special:Upload broken on new install" problem.
>
> Sorry for my stupid question, but how to apply the patch?
> Should I need to copy it to the end of EzMwLuceneIndexer.php file?
>
> Thanks in advance.
> Ross


Those are my bugs/fixes on the talk page.

You could have (and should, now) learn what patches are by using Google.
This patch is very easy to understand. One line has been modified and
replaced by another.

--- EzMwLuceneIndexer.php.old   2009-05-08 16:26:28.000000000 -0500
+++ EzMwLuceneIndexer.php       2009-05-08 16:26:00.000000000 -0500
@@ -38,7 +38,7 @@
               $xml .=
"<content><![CDATA[{$revision->getRawText()}]]></content>";

               /* If the article is in the Image namespace, add the file url */
               if ($article->getTitle()->getNamespace()==6) {
-                       $file =  wfFindFile($article->getTitle());

+                       $file = wfFindFile($article->getTitle(),false,0,true);
                       $xml .=
"<attachment><![CDATA[{$file->getFullUrl()}]]></attachment>";
               }

               $xml .= '</article>';



Cheers,
Brian
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l



__________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!

http://www.flickr.com/gift/
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.