Fixed: https://github.com/arslancb/clipbucket/issues/71 and https://github.com/arslancb/clipbucket/issues/73
This commit is contained in:
parent
a7ff74ecd2
commit
2dcc39d163
4 changed files with 33 additions and 17 deletions
|
@ -71,6 +71,13 @@ $page = mysql_clean($_GET['page']);
|
||||||
$get_limit = create_query_limit($page,COLLPP);
|
$get_limit = create_query_limit($page,COLLPP);
|
||||||
$clist = $cond;
|
$clist = $cond;
|
||||||
$clist['limit'] = $get_limit;
|
$clist['limit'] = $get_limit;
|
||||||
|
if (!isSectionEnabled('photos') && isSectionEnabled('videos')) {
|
||||||
|
$clist['type'] = 'videos';
|
||||||
|
} elseif (isSectionEnabled('photos') && !isSectionEnabled('videos')) {
|
||||||
|
$clist['type'] = 'photos';
|
||||||
|
} elseif (!isSectionEnabled('photos') && !isSectionEnabled('videos')) {
|
||||||
|
$clist['type'] = 'none';
|
||||||
|
}
|
||||||
$collections = $cbcollection->get_collections($clist);
|
$collections = $cbcollection->get_collections($clist);
|
||||||
|
|
||||||
Assign('collections', $collections);
|
Assign('collections', $collections);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{ANCHOR place="display_head_sec"}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div id="fb-root"></div>
|
<div id="fb-root"></div>
|
||||||
<script>(function(d, s, id) {
|
<script>(function(d, s, id) {
|
||||||
|
|
|
@ -41,8 +41,12 @@ if($cbcollection->is_viewable($c))
|
||||||
case "photo":
|
case "photo":
|
||||||
case "p":
|
case "p":
|
||||||
{
|
{
|
||||||
$items = $cbphoto->collection->get_collection_items_with_details($c,$order,$get_limit);
|
if (isSectionEnabled('photos')) {
|
||||||
$count = $cbphoto->collection->get_collection_items_with_details($c,NULL,NULL,TRUE);
|
$items = $cbphoto->collection->get_collection_items_with_details($c,$order,$get_limit);
|
||||||
|
$count = $cbphoto->collection->get_collection_items_with_details($c,NULL,NULL,TRUE);
|
||||||
|
} else {
|
||||||
|
$Cbucket->show_page = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,26 +79,30 @@ if($cbcollection->is_viewable($cid))
|
||||||
case "p":
|
case "p":
|
||||||
{
|
{
|
||||||
global $cbphoto;
|
global $cbphoto;
|
||||||
$photo = $cbphoto->get_photo($item);
|
if (isSectionEnabled('photos')) {
|
||||||
if($photo)
|
$photo = $cbphoto->get_photo($item);
|
||||||
{
|
if($photo)
|
||||||
$info = $cbphoto->collection->get_collection_item_fields($cid,$photo['photo_id'],'ci_id');
|
|
||||||
if($info)
|
|
||||||
{
|
{
|
||||||
$photo = array_merge($photo,$info[0]);
|
$info = $cbphoto->collection->get_collection_item_fields($cid,$photo['photo_id'],'ci_id');
|
||||||
increment_views($photo['photo_id'],'photo');
|
if($info)
|
||||||
|
{
|
||||||
|
$photo = array_merge($photo,$info[0]);
|
||||||
|
increment_views($photo['photo_id'],'photo');
|
||||||
|
|
||||||
assign('object',$photo);
|
assign('object',$photo);
|
||||||
assign('user',$userquery->get_user_details($photo['userid']));
|
assign('user',$userquery->get_user_details($photo['userid']));
|
||||||
assign('c',$collect);
|
assign('c',$collect);
|
||||||
|
|
||||||
subtitle($photo['photo_title'].' « '.$collect['collection_name']);
|
subtitle($photo['photo_title'].' « '.$collect['collection_name']);
|
||||||
|
} else {
|
||||||
|
e(lang("item_not_exist"));
|
||||||
|
$Cbucket->show_page = false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
e(lang("item_not_exist"));
|
e(lang("item_not_exist"));
|
||||||
$Cbucket->show_page = false;
|
$Cbucket->show_page = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
e(lang("item_not_exist"));
|
|
||||||
$Cbucket->show_page = false;
|
$Cbucket->show_page = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue