<commit_before><?php

	include("include/init.php");

	loadlib("flickr_users");
	loadlib("flickr_photos");
	loadlib("flickr_urls");
	loadlib("flickr_dates");

	loadlib("flickr_geo_permissions");

	#

	$flickr_user = flickr_users_get_by_url();
	$owner = users_get_by_id($flickr_user['user_id']);

	$is_own = ($owner['id'] == $GLOBALS['cfg']['user']['id']) ? 1 : 0;
	$GLOBALS['smarty']->assign("is_own", $is_own);

	#

	$more = array(
		'page' => get_int32("page"),
		'viewer_id' => $GLOBALS['cfg']['user']['id'],
	);

	$photos = flickr_photos_for_user($owner, $more);

	$count = count($photos['rows']);

	for ($i=0; $i < $count; $i++){
		$ph = $photos['rows'][$i];
		$ph['can_view_geo'] = ($ph['hasgeo'] && flickr_geo_permissions_can_view_photo($ph, $GLOBALS['cfg']['user']['id'])) ? 1 : 0;
		$photos['rows'][$i] = $ph;
	}

	$GLOBALS['smarty']->assign_by_ref("owner", $owner);
	$GLOBALS['smarty']->assign_by_ref("photos", $photos['rows']);

	$pagination_url = flickr_urls_photos_user($owner);
	$GLOBALS['smarty']->assign("pagination_url", $pagination_url);

	$GLOBALS['smarty']->display("page_flickr_photos_user.txt");
	exit();
?>
<commit_msg>use _photos_utils_assign_has_geo work for flickr_photos_user<commit_after><?php

	include("include/init.php");

	loadlib("flickr_users");
	loadlib("flickr_photos");
	loadlib("flickr_photos_utils");
	loadlib("flickr_urls");
	loadlib("flickr_dates");

	#

	$flickr_user = flickr_users_get_by_url();
	$owner = users_get_by_id($flickr_user['user_id']);

	$is_own = ($owner['id'] == $GLOBALS['cfg']['user']['id']) ? 1 : 0;
	$GLOBALS['smarty']->assign("is_own", $is_own);

	#

	$more = array(
		'page' => get_int32("page"),
		'viewer_id' => $GLOBALS['cfg']['user']['id'],
	);

	$rsp = flickr_photos_for_user($owner, $more);
	$photos = $rsp['rows'];

	flickr_photos_utils_assign_can_view_geo($photos, $GLOBALS['cfg']['user']['id']);

	$GLOBALS['smarty']->assign_by_ref("owner", $owner);
	$GLOBALS['smarty']->assign_by_ref("photos", $photos);

	$pagination_url = flickr_urls_photos_user($owner);
	$GLOBALS['smarty']->assign("pagination_url", $pagination_url);

	$GLOBALS['smarty']->display("page_flickr_photos_user.txt");
	exit();
?>

{'fraction_non_alphanumeric': 0.23673281033687124, 'fraction_numerical': 0.005076142131979695, 'mean_word_length': 7.921810699588478, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6689046', 'n_tokens_mistral': 933, 'n_tokens_neox': 860, 'n_words': 99}