From: Florent Bruneau Date: Sun, 22 Feb 2009 21:35:32 +0000 (+0100) Subject: Accept User and Profile object as condition. X-Git-Tag: core/1.0.1~17 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=b39f2e65166eb3d1b6ce180c85b9b809dd689839;p=platal.git Accept User and Profile object as condition. Signed-off-by: Florent Bruneau --- 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}