Oops! Indeed my bad. Apologies to everyone using this functionality. I guess
it's the same issue as the not like comparator not working a while back on
this list. This commit [0] should fix it. I have tested it locally, and
everything appears to work fine.

@Markus: That switch is pretty much duplicated in compileQueries and
compileAttributeWhere. The code is not completely identical, but I think
it'd be better to have a single method to handle the translation from php
constant to comparator string. This also makes errors like the one I made
more easy to spot.

[0] http://www.mediawiki.org/wiki/Special:Code/MediaWiki/67483

--
Jeroen De Dauw
* http://blog.bn2vs.com
* http://wiki.bn2vs.com
Don't panic. Don't be evil. 50 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69
66 65!
--


On 6 June 2010 22:30, Laurent Alquier <laur...@alquier.org> wrote:

> Thanks for looking into this so quickly (on a sunday even :) ).
>
> - Laurent
>
> On Jun 6, 2010, at 3:53 PM, Markus Krötzsch wrote:
>
> > I can confirm this bug. After doing some SVN log analysis, I believe that
> the
> > code that implements the LIKE feature has been deleted by accident when
> moving
> > some code to Semantic Maps.
> >
> > Jeroen, could you please have a look at the issue? The switch in
> > SMW_SQLStore2_Queries.php line 757 did formerly include a case for LIKE
> which
> > is now gone.
> >
> > As soon as this is fixed, we will backport the fix to SMW 1.5.1. Existing
> > installations will be able to restore the feature by copying the fixed
> file.
> >
> > As a quick fix, it should be possible to copy the file
> > SMW_SQLStore2_Queries.php from SMW 1.5.0 [1] into the according place of
> your
> > SMW installation. This may, however, create problems with queries related
> to
> > Semantic Maps. If any problems occur, the SMW 1.5.1 file can always be
> used
> > again [2].
> >
> > Regards,
> >
> > Markus
> >
> > [1]
> >
> http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMediaWiki/REL_1_5_0/includes/storage/SMW_SQLStore2_Queries.php
> > [2]
> >
> http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMediaWiki/REL_1_5_1/includes/storage/SMW_SQLStore2_Queries.php
> >
> > On Sonntag, 6. Juni 2010, Laurent Alquier wrote:
> >> Hi
> >>
> >> I upgraded my wiki to 1.5.1 this weekend and I noticed queries relying
> on
> >> the '~' LIKE operator are now returning empty results.
> >>
> >> For example, this query used to work :
> >>
> >> {{#ask:[[Category:Company]][[Has page name::~A*]]
> >>
> >> |?Category
> >> |format=template
> >> |template=Row A-Z Index
> >> |limit=500
> >> |order=asc}}
> >>
> >> 'Has page name' is a String property.
> >> Adding '~' to $smwgQComparators has no effect (it used to be declared
> there
> >> since it was not defined by default).
> >>
> >> Am I missing some new behavior ?
> >>
> >
> >
> > --
> > Markus Krötzsch  <mar...@semantic-mediawiki.org>
> > * Personal page: http://korrekt.org
> > * Semantic MediaWiki: http://semantic-mediawiki.org
> > * Semantic Web textbook: http://semantic-web-book.org
> > --
>
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to