public function BookmarksViewAction() { $v_request = Project::getRequest(); $data = array(); $this->_get_catalogs($data, $v_categoryID); //$this->_BaseSiteData($data); $data['action'] = 'BookmarksView'; $v_id = (int) $v_request->getKeyByNumber(0); if ($v_id > 0) { $v_bookmarks_model = new BookmarksModel(); $v_bookmarks_model->load($v_id); $v_bookmarks_model->views++; $v_bookmarks_model->save(); $data['bookmark_row'] = $v_bookmarks_model->loadBookmarkRow($v_id); $v_tab_name = $data['bookmark_row']['title']; $v_encoding = mb_detect_encoding($v_tab_name); if (mb_strlen($v_tab_name, $v_encoding) > 50) { $v_tab_name = mb_substr($v_tab_name, 0, 50, $v_encoding) . '...'; } $data['tab_bookmarks_view'] = $v_tab_name; // --- $controller = new BaseCommentController(); $data['comment_list'] = $controller->CommentList($v_id, $v_request->getKeyByNumber(1), 0, 'Bookmarks', 'BookmarksView', 'bookmarks', array($v_id)); $data['add_comment_url'] = $v_request->createUrl('Bookmarks', 'BookmarksCommentAdd'); $data['add_comment_element_id'] = $v_id; $data['add_comment_id'] = 0; // --- $this->_view->assign('tab_list', TabController::getBookmarksTabs(false, false, false, false, false, false, true, $v_tab_name)); // Show tabs $this->_view->Bookmarks_View($data); $this->_view->parse(); } else { Project::getResponse()->redirect($v_request->createUrl('Bookmarks', 'BookmarksList')); } }