Skip to content

Commit 9baec87

Browse files
web: give page_head_select2() same options as page_head()
Also: make sure profile pictures exist; avoid broken images
1 parent 21b8be1 commit 9baec87

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

html/inc/profile.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function show_profile($user, $logged_in_user, $screen_mode = false) {
222222

223223
// If screening is enabled, only show picture in certain situations
224224
//
225-
$show_picture = $profile->has_picture;
225+
$show_picture = file_exists(profile_image_path($user->id));
226226
if (profile_screening()) {
227227
if (!$screen_mode && !$can_edit && $profile->verification!=1) {
228228
$show_picture = false;

html/inc/uotd.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (!defined('UOTD_THRESHOLD')) {
2626
}
2727

2828
function uotd_thumbnail($profile, $user) {
29-
if ($profile->has_picture) {
29+
if (file_exists(profile_thumb_path($user->id))) {
3030
return "<a href=\"".url_base()."view_profile.php?userid=$user->id\"><img border=0 vspace=4 hspace=8 align=left src=\"".profile_thumb_url($user->id)."\" alt=\"".tra("User profile")."\"></a>";
3131
} else {
3232
return "";

html/inc/util.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ $is_login_page = false;
240240
// then calls project_banner() (in html/project/project.inc)
241241
// to output whatever you want at the top of your web pages.
242242
//
243-
// Page_head() is overridable so that projects that want to integrate BOINC
244-
// with an existing web framework can more easily do so.
243+
// page_head() is overridable so that you can integrate BOINC
244+
// with an existing web framework.
245245
// To do so, define page_head() in html/project/project.inc
246246
//
247247
if (!function_exists("page_head")){
@@ -257,7 +257,7 @@ function page_head(
257257
// if set, include schedulers.txt.
258258
// also pass to project_banner() in case you want a different
259259
// header for your main page.
260-
$url_prefix="",
260+
$url_prefix='',
261261
// prepend this to links.
262262
// Use for web pages not in the top directory
263263
$head_extra=null

0 commit comments

Comments
 (0)