X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Freminder%2Fprofile_update.inc.php;h=397b1a5aeb76d24aeaf692e2ad9a2b8566b71bce;hb=9c1b78c7ee1575436bbf277536c4ec0671ed8344;hp=c07e741b729fb43622d18322085f76acc8c4835f;hpb=4b0cb388b3b573048f35d1050c9c459c3090b16c;p=platal.git diff --git a/include/reminder/profile_update.inc.php b/include/reminder/profile_update.inc.php index c07e741..397b1a5 100644 --- a/include/reminder/profile_update.inc.php +++ b/include/reminder/profile_update.inc.php @@ -50,7 +50,7 @@ class ReminderProfileUpdate extends Reminder parent::Prepare($page); $res = XDB::query('SELECT date < DATE_SUB(NOW(), INTERVAL 365 DAY) AS is_profile_old, - date AS profile_date, LENGTH(p.attach) > 0 AS photo + date AS profile_date, LENGTH(p.attach) > 0 AS has_photo FROM auth_user_md5 AS u LEFT JOIN photo AS p ON (u.user_id = p.uid) WHERE user_id = {?}', @@ -59,16 +59,11 @@ class ReminderProfileUpdate extends Reminder $page->assign('profile_incitation', $is_profile_old); $page->assign('profile_last_update', $profile_date); - $page->assign('photo_incitation', $has_photo); + $page->assign('photo_incitation', !$has_photo); require_once 'geoloc.inc.php'; $res = localize_addresses($this->user->id()); $page->assign('geocoding_incitation', count($res)); - - $page->assign('incitations_count', - ($is_profile_old ? 1 : 0) + - ($has_photo ? 0 : 1) + - (count($res) > 0 ? 1 : 0)); } public function template()