Permalink
Browse files

Update all portable where clauses to the new Kohana 2.4 format.

  • Loading branch information...
1 parent e0e882b commit e8fb773b68335e955602c0d912e13c0f5ba23d58 @bharat bharat committed Nov 27, 2009
@@ -49,9 +49,9 @@ static function feed($feed_id, $offset, $limit, $id) {
$feed->children = $item
->viewable()
- ->descendants($limit, $offset, array("type" => "photo"));
+ ->descendants($limit, $offset, array(array("type", "=", "photo")));
$feed->max_pages = ceil(
- $item->viewable()->descendants_count(array("type" => "photo")) / $limit);
+ $item->viewable()->descendants_count(array("type", "=", "photo")) / $limit);
$feed->title = html::purify($item->title);
$feed->description = nl2br(html::purify($item->description));
@@ -228,7 +228,7 @@ public function descendant_count_test() {
$parent->reload();
$this->assert_equal(3, $parent->descendants_count());
- $this->assert_equal(2, $parent->descendants_count(array("type" => "photo")));
- $this->assert_equal(1, $parent->descendants_count(array("type" => "album")));
+ $this->assert_equal(2, $parent->descendants_count(array(array("type", "=", "photo"))));
+ $this->assert_equal(1, $parent->descendants_count(array(array("type", "=", "album"))));
}
}
@@ -8,7 +8,7 @@
<?= html::clean($album->title) ?>
</span>
<ul>
- <? foreach ($album->children(null, 0, array("type" => "album")) as $child): ?>
+ <? foreach ($album->children(null, 0, array(array("type", "=", "album"))) as $child): ?>
<? if ($selected && $child->contains($selected)): ?>
<?= View::factory("organize_tree.html", array("selected" => $selected, "album" => $child)); ?>
<? else: ?>

0 comments on commit e8fb773

Please sign in to comment.