Merge branch 'develop-olympus' of git://github.com/phpbb/phpbb3 into develop-olympus

* 'develop-olympus' of git://github.com/phpbb/phpbb3:
  [ticket/9978] Added semicolons to JavaScript in overall_header.
  [ticket/8571] Show age as 0 in birthday list when birthday is in the future.
  [ticket/8571] Show 'Age: 0' on viewprofile when birthday is in the future.
  [ticket/8571] Also display age on memberlist/viewprofile when age is 0.
This commit is contained in:
Andreas Fischer 2011-08-21 14:11:06 +02:00
commit 15d0fe7d9f
5 changed files with 7 additions and 7 deletions

View file

@ -99,7 +99,7 @@ if ($config['load_birthdays'] && $config['allow_birthdays'])
if ($age = (int) substr($row['user_birthday'], -4))
{
$birthday_list .= ' (' . ($now['year'] - $age) . ')';
$birthday_list .= ' (' . max(0, $now['year'] - $age) . ')';
}
}
$db->sql_freeresult($result);

View file

@ -1697,7 +1697,7 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f
$diff = ($diff < 0) ? 1 : 0;
}
$age = (int) ($now['year'] - $bday_year - $diff);
$age = max(0, (int) ($now['year'] - $bday_year - $diff));
}
}

View file

@ -28,7 +28,7 @@
<!-- ENDIF -->
<!-- IF S_USER_INACTIVE --><dt>{L_USER_IS_INACTIVE}:</dt> <dd>{USER_INACTIVE_REASON}</dd><!-- ENDIF -->
<!-- IF LOCATION --><dt>{L_LOCATION}:</dt> <dd>{LOCATION}</dd><!-- ENDIF -->
<!-- IF AGE --><dt>{L_AGE}:</dt> <dd>{AGE}</dd><!-- ENDIF -->
<!-- IF AGE !== '' --><dt>{L_AGE}:</dt> <dd>{AGE}</dd><!-- ENDIF -->
<!-- IF OCCUPATION --><dt>{L_OCCUPATION}:</dt> <dd>{OCCUPATION}</dd><!-- ENDIF -->
<!-- IF INTERESTS --><dt>{L_INTERESTS}:</dt> <dd>{INTERESTS}</dd><!-- ENDIF -->
<!-- IF S_GROUP_OPTIONS --><dt>{L_USERGROUPS}:</dt> <dd><select name="g">{S_GROUP_OPTIONS}</select> <input type="submit" name="submit" value="{L_GO}" class="button2" /></dd><!-- ENDIF -->

View file

@ -68,7 +68,7 @@
{
eval(onload_functions[i]);
}
}
};
window.onunload = function()
{
@ -76,7 +76,7 @@
{
eval(onunload_functions[i]);
}
}
};
// ]]>
</script>

View file

@ -148,10 +148,10 @@
<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_LOCATION}: </td>
<td><!-- IF LOCATION --><b class="genmed">{LOCATION}</b><!-- ENDIF --></td>
</tr>
<!-- IF AGE -->
<!-- IF AGE !== '' -->
<tr>
<td class="gen" align="{S_CONTENT_FLOW_END}" nowrap="nowrap">{L_AGE}: </td>
<td><b class="genmed"><!-- IF AGE -->{AGE}<!-- ELSE --> - <!-- ENDIF --></b></td>
<td><b class="genmed">{AGE}</b></td>
</tr>
<!-- ENDIF -->
<tr>