Signed-off-by: Victor Berger <victor.berger@m4x.org>
}
}
+ /* Hobbies
+ */
+ public function getHobbies() {
+ if ($this->visibility->isVisible(Visibility::EXPORT_PRIVATE)) {
+ return XDB::fetchAllAssoc('type', 'SELECT type, GROUP_CONCAT(text)
+ FROM profile_hobby
+ WHERE pid = {?}
+ GROUP BY type', $this->id());
+ } else {
+ return XDB::fetchAllAssoc('type', 'SELECT type, GROUP_CONCAT(text)
+ FROM profile_hobby
+ WHERE pub = \'public\' AND pid = {?}
+ GROUP BY type', $this->id());
+ }
+ }
+
/* Medals
*/
private $medals = null;
{/foreach}
{/if}
+ {assign var=hobbies value=$profile->getHobbies()}
+ {if count($hobbies) > 0}
+ <h2>Hobbies...</h2>
+ {foreach from=$hobbies key=type item=text}
+ <div><em class="intitule">{$type} : </em>{$text}</div>
+ {/foreach}
+ {/if}
+
{if $profile->freetext}
<h2>Commentaires :</h2>
<span>{$profile->freetext|miniwiki|smarty:nodefaults}</span>