From b39f2e65166eb3d1b6ce180c85b9b809dd689839 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 22 Feb 2009 22:35:32 +0100 Subject: [PATCH] Accept User and Profile object as condition. Signed-off-by: Florent Bruneau --- classes/plset.php | 2 +- plugins/modifier.sex.php | 2 ++ templates/plview.multipage.tpl | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/plset.php b/classes/plset.php index 88ced82..4b08d99 100644 --- a/classes/plset.php +++ b/classes/plset.php @@ -28,7 +28,7 @@ class PlSet private $joins = null; private $where = null; - private $count = null; + protected $count = null; private $mods = array(); private $modParams = array(); diff --git a/plugins/modifier.sex.php b/plugins/modifier.sex.php index 4686ec2..ea8f583 100644 --- a/plugins/modifier.sex.php +++ b/plugins/modifier.sex.php @@ -23,6 +23,8 @@ function smarty_modifier_sex($male, $female, $sex = null) { if (is_null($sex)) { $sex = S::user()->isFemale(); + } else if ($sex instanceof PlUser || $sex instanceof Profile) { + $sex = $sex->isFemale(); } return $sex ? $female : $male; } diff --git a/templates/plview.multipage.tpl b/templates/plview.multipage.tpl index e1b38cf..d2e1428 100644 --- a/templates/plview.multipage.tpl +++ b/templates/plview.multipage.tpl @@ -68,7 +68,6 @@ {/if} {/capture} - {$smarty.capture.order|smarty:nodefaults} {$smarty.capture.pages|smarty:nodefaults} -- 2.1.4