fix dblayer error
This commit is contained in:
parent
8a3745b116
commit
b1f8cda044
1 changed files with 8 additions and 2 deletions
10
_public.php
10
_public.php
|
@ -94,14 +94,20 @@ class pubSaba
|
|||
$params['limit'] = [(($_page_number - 1) * $params['limit']), $params['limit']];
|
||||
|
||||
# get posts
|
||||
$posts = dcCore::app()->blog->getPosts($params);
|
||||
if ($posts->isEmpty()) { // hack: don't breack context
|
||||
$params = ['limit' => $params['limit']];
|
||||
$posts = dcCore::app()->blog->getPosts($params);
|
||||
}
|
||||
dcCore::app()->ctx->post_params = $params;
|
||||
dcCore::app()->ctx->posts = dcCore::app()->blog->getPosts($params);
|
||||
dcCore::app()->ctx->posts = $posts;
|
||||
|
||||
unset($params);
|
||||
}
|
||||
dcCore::app()->ctx->saba_options = $options;
|
||||
}
|
||||
|
||||
public static function getPostsParams($params)
|
||||
public static function getPostsParams(&$params)
|
||||
{
|
||||
if (!isset($params['sql'])) {
|
||||
$params['sql'] = '';
|
||||
|
|
Loading…
Reference in a new issue