1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-04 23:44:25 +03:00
ifhub.club/application/classes/blocks/BlockWall.class.php

42 lines
1.1 KiB
PHP
Raw Normal View History

2014-07-07 13:50:14 +03:00
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
*
*
* @package blocks
* @since 2.0
*/
class BlockWall extends Block {
/**
* Запуск обработки
*/
public function Exec() {
$wall = $this->Wall_GetWall( array( 'wall_user_id' => (int) $this->GetParam('user_id'), 'pid' => null ), array( 'id' => 'desc' ), 1, Config::Get( 'module.wall.per_page' ) );
$posts = $wall['collection'];
$this->Viewer_Assign('posts', $posts);
$this->Viewer_Assign('count', $wall['count']);
$this->Viewer_Assign('classes', $this->GetParam('classes'));
if ( count($posts) ) {
$this->Viewer_Assign('lastId', end($posts)->getId());
}
$this->SetTemplate('components/wall/wall.tpl');
}
}