Adapts default picture to main education - picture by Kithyane (Closes #1270).
authorStéphane Jacob <sj@m4x.org>
Mon, 10 Jan 2011 09:46:00 +0000 (10:46 +0100)
committerStéphane Jacob <sj@m4x.org>
Mon, 10 Jan 2011 14:33:00 +0000 (15:33 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
ChangeLog
classes/profile.php
htdocs/images/none_md.png [new file with mode: 0644]
htdocs/images/none_x.png [moved from htdocs/images/none.png with 100% similarity]

index 1eeb79f..46886f1 100644 (file)
--- 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
index df2771e..3ca5679 100644 (file)
@@ -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 (file)
index 0000000..a44f9f5
Binary files /dev/null and b/htdocs/images/none_md.png differ