v3.0.5 code review: lots of small fixes and cleanup

- fixed nano selection in search form
- removed unused, duplicate thumb replacement pics
- freed mysql result in lib1 helppage-link generation
- fixed logpic-is-on-first-page calculation
- fixed and improved user option set handling
- readded map dragzoom
- improved log pic pages layout
- user pics page counter fix
This commit is contained in:
following
2013-03-15 12:23:21 +01:00
parent a1ea6b6aff
commit 1c40b83bd2
31 changed files with 66 additions and 223 deletions

View File

@ -104,7 +104,9 @@
{
// user has allowed picture stat and gallery view
$tpl->assign('allpics',$allpics);
if ($allpics)
if (!$allpics)
$tpl->assign('logpics', get_logpics(LOGPICS_FOR_USER_STAT, $userid));
else
{
$pictures = get_logpics(LOGPICS_FOR_USER_GALLERY, $userid, 0, $startat);
$more = (count($pictures) > MAX_PICTURES_PER_GALLERY_PAGE);
@ -116,7 +118,7 @@
$tpl->assign('paging', $paging);
if ($paging)
{
$pages = floor(get_logpics(LOGPICS_FOR_USER_STAT, $userid)/MAX_PICTURES_PER_GALLERY_PAGE) + 1;
$pages = floor((get_logpics(LOGPICS_FOR_USER_STAT, $userid) + MAX_PICTURES_PER_GALLERY_PAGE - 1)/MAX_PICTURES_PER_GALLERY_PAGE);
$page = floor($startat/MAX_PICTURES_PER_GALLERY_PAGE) + 1;
$pl = "";
@ -136,8 +138,6 @@
$tpl->name = 'viewprofile_pics';
// actually we dont need all the other stuff here ..
}
else
$tpl->assign('logpics', get_logpics(LOGPICS_FOR_USER_STAT, $userid));
}
$tpl->assign('showcountry', (strlen(trim($record['country'])) > 0));