From: Stéphane Jacob Date: Mon, 10 Jan 2011 09:46:00 +0000 (+0100) Subject: Adapts default picture to main education - picture by Kithyane (Closes #1270). X-Git-Tag: xorg/1.0.2~33 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=fa671a304ea3cb2a63c688c0ae0539b33bdc679a;p=platal.git Adapts default picture to main education - picture by Kithyane (Closes #1270). Signed-off-by: Stéphane Jacob --- diff --git a/ChangeLog b/ChangeLog index 1eeb79f..46886f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ Bug/Wish: - #1318: Fixes PHP errors in PayPal payments -JAC * Profile: + - #1270: Adapts default picture to main education -JAC - #1340: Allows secretaries and admin to fully edit profiles' name -JAC - #1354: Do not notify death to a deceased user -JAC - #1356: Indicates delivery issues on addresses -JAC diff --git a/classes/profile.php b/classes/profile.php index df2771e..3ca5679 100644 --- a/classes/profile.php +++ b/classes/profile.php @@ -527,8 +527,10 @@ class Profile } return $this->photo; } else if ($fallback) { - return PlImage::fromFile(dirname(__FILE__).'/../htdocs/images/none.png', - 'image/png'); + if ($this->mainEducation() == 'X') { + return PlImage::fromFile(dirname(__FILE__) . '/../htdocs/images/none_x.png', 'image/png'); + } + return PlImage::fromFile(dirname(__FILE__) . '/../htdocs/images/none_md.png', 'image/png'); } return null; } diff --git a/htdocs/images/none_md.png b/htdocs/images/none_md.png new file mode 100644 index 0000000..a44f9f5 Binary files /dev/null and b/htdocs/images/none_md.png differ diff --git a/htdocs/images/none.png b/htdocs/images/none_x.png similarity index 100% rename from htdocs/images/none.png rename to htdocs/images/none_x.png