X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Feducation.func.inc.php;h=16cca5764cc6aa74f2f611071c54f11d028e72c0;hb=61d1fd8b2ce54b76b7df7a8fa637ffd4932f2403;hp=dd635915e99c7667de775a5d0f70858c20ed318d;hpb=5660032ac785d410f90e3f5b0d6948dc90b0cfea;p=platal.git diff --git a/include/education.func.inc.php b/include/education.func.inc.php index dd63591..16cca57 100644 --- a/include/education.func.inc.php +++ b/include/education.func.inc.php @@ -1,6 +1,6 @@ register_function('education_degree_name', 'education_degree_name'); -/** formatte une formation pour l'affichage - */ -function education_fmt($name, $url, $degree, $grad_year, $field, $program, $sexe, $long) -{ - $field = strtolower($field); - $txt = ""; - - if ($grad_year || $field || $program) { - $txt .= ""; - } - } - - if (($degree != "Lic.") || ($long)) { - if (($degree != "Ing.") && ($degree != "Dipl.")) { - $txt .= $degree; - } - if ($name) { - $txt .= ' '; - } - if ($url != ' ') { - $txt .= "$name"; - } else { - $txt .= $name; - } - } - $txt .= ""; - - return $txt; -} - -function _education_fmt($params, &$smarty) -{ - $params = new PlDict($params); - $edu = $params->v('edu'); - if (!$params->has('sex')) { - $profile = $params->v('profile'); - $sex = $profile->isFemale(); - } else { - $sex = $params->b('sex'); - } - return education_fmt($edu['school_short'], $edu['school_url'], $edu['degree_short'], $edu['grad_year'], - $edu['field'], $edu['program'], $sex, $params->b('long')); -} -Platal::page()->register_function('education_fmt', '_education_fmt'); - // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>