projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release plat/al core v1.1.5
[platal.git]
/
plugins
/
modifier.sex.php
diff --git
a/plugins/modifier.sex.php
b/plugins/modifier.sex.php
index
4686ec2
..
dbc52d4
100644
(file)
--- a/
plugins/modifier.sex.php
+++ b/
plugins/modifier.sex.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-20
09
Polytechnique.org *
+ * Copyright (C) 2003-20
11
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-23,6
+23,8
@@
function smarty_modifier_sex($male, $female, $sex = null)
{
if (is_null($sex)) {
$sex = S::user()->isFemale();
{
if (is_null($sex)) {
$sex = S::user()->isFemale();
+ } else if ($sex instanceof PlUser || $sex instanceof Profile) {
+ $sex = $sex->isFemale();
}
return $sex ? $female : $male;
}
}
return $sex ? $female : $male;
}