$prj wasn't defined, so use the project reference that the page has instead (fixes issue 808)

This commit is contained in:
Thomas Keller
2012-07-20 15:03:57 +02:00
parent 22c1f92b2b
commit d90c1a2c23
2 changed files with 4 additions and 1 deletions

View File

@@ -167,7 +167,7 @@ class IDF_Wiki_PageRevision extends Pluf_Model
if (count($matches) > 1 && count($matches[1]) > 0) {
foreach ($matches[1] as $resourceName) {
$sql = new Pluf_SQL('project=%s AND title=%s',
array($prj->id, $resourceName));
array($page->get_project()->id, $resourceName));
$resources = Pluf::factory('IDF_Wiki_Resource')->getList(array('filter'=>$sql->gen()));
if ($resources->count() == 0)
continue;