Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -91,15 +91,30 @@ class _browse extends \IPS\Dispatcher\Controller
|
||||
$count = \IPS\blog\Entry::getItemsWithPermission( $where, 'entry_date desc', NULL, 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, 0, NULL, TRUE, FALSE, FALSE, TRUE );
|
||||
$entries = \IPS\blog\Entry::getItemsWithPermission( $where, 'entry_date desc', array( ( $perpage * ( $page - 1 ) ), $perpage ), 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, 0, NULL, TRUE );
|
||||
|
||||
/* Validate Pagination */
|
||||
$totalPages = ceil( $count / $perpage );
|
||||
$redirect = false;
|
||||
if ( $page > 1 )
|
||||
{
|
||||
if ( $totalPages and $page > $totalPages)
|
||||
{
|
||||
$redirect = true;
|
||||
}
|
||||
}
|
||||
|
||||
$queryString = 'app=blog&module=blogs&controller=browse';
|
||||
if( $category )
|
||||
{
|
||||
$queryString .= '&id=' . $category->_id;
|
||||
}
|
||||
$paginationUrl = \IPS\Http\Url::internal( $queryString, 'front', ( $category ) ? 'blog_category' : 'blogs' );
|
||||
if( $redirect )
|
||||
{
|
||||
\IPS\Output::i()->redirect( $paginationUrl->setPage('page', 1 ), NULL, 303 );
|
||||
}
|
||||
$pagination = array(
|
||||
'page' => $page,
|
||||
'pages' => ceil( $count / $perpage ),
|
||||
'pages' => $totalPages,
|
||||
'perpage' => $perpage,
|
||||
'url' => $paginationUrl
|
||||
);
|
||||
|
||||
@@ -432,7 +432,7 @@ class _entry extends \IPS\Content\Controller
|
||||
|
||||
if( isset( $values['moderation_alert_content']) AND $values['moderation_alert_content'] )
|
||||
{
|
||||
$item->sendModerationAlert($values, $item);
|
||||
$this->sendModerationAlert($values, $item);
|
||||
}
|
||||
|
||||
\IPS\Session::i()->modLog( 'modlog__action_move', array( $item::$title => TRUE, $item->url()->__toString() => FALSE, $item->mapped( 'title' ) ?: ( method_exists( $item, 'item' ) ? $item->item()->mapped( 'title' ) : NULL ) => FALSE ), $item );
|
||||
|
||||
Reference in new issue
Block a user