Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Fixed bug with lookups on journal entries with ? in the title.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchisari authored and The Appleseed Project committed Jan 10, 2011
1 parent 321f188 commit 952de50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/journal/models/journal.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public function Load ( $pUserId, $pEntry ) {

$url = str_replace ( '-', ' ', $pEntry );

$criteria = array ( 'Owner_FK' => $pUserId, array ( 'Identifier' => $pEntry, '||Title' => $url ) );
// NOTE: Does a fuzzier search due to parsed out characters such as '?'
// TODO: Find a way to not parse out those characters.
$criteria = array ( 'Owner_FK' => $pUserId, array ( 'Identifier' => $pEntry, '||Title' => '~~' . '%' . $url . '%' ) );

$this->Retrieve ( $criteria, 'Created DESC' );

Expand Down

0 comments on commit 952de50

Please sign in to comment.