Commit 1af37237 authored by Georg Ringer's avatar Georg Ringer Committed by Christian Kuhn
Browse files

[TASK] Add sys_notes to info module again

Once sys_note records have been shown in the info module but
after changing the code, this didn't work anymore.

This patch adds a hook which is then used by sys_note

Change-Id: Ib73db81a508ec88b9502a41c1405e6a47c056c61
Resolves: #39234
Releases: 6.0
Reviewed-on: http://review.typo3.org/13813
Reviewed-by: Wouter Wolters
Reviewed-by: Felix Kopp
Tested-by: Felix Kopp
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent 24e9d42c
......@@ -109,17 +109,12 @@ class tx_cms_webinfo_page extends t3lib_extobjbase {
1
);
// SYS_NOTES:
if (t3lib_extMgm::isLoaded('sys_note')) {
$dblist->start($this->pObj->id, 'sys_note', 0);
$dblist->generateList();
if ($dblist->HTMLcode) {
$theOutput.=$this->pObj->doc->spacer(10);
$theOutput.=$this->pObj->doc->section($LANG->getLL('page_sysnote'),
$dblist->HTMLcode,
0,
1
);
// Additional footer content
$footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/web_info/class.tx_cms_webinfo.php']['drawFooterHook'];
if (is_array($footerContentHook)) {
foreach ($footerContentHook as $hook) {
$params = array();
$theOutput .= t3lib_div::callUserFunction($hook, $params, $this);
}
}
......
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012 Georg Ringer <typo3@ringerge.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Hook for the info module
*
* @package TYPO3
* @subpackage sys_note
* @author Georg Ringer <typo3@ringerge.org>
*/
class Tx_SysNote_Hooks_InfoModule {
/**
* Add sys_notes as additional content to the footer of the page module
*
* @param array $params
* @param SC_db_layout $parentObject
* @return string
*/
public function render(array $params = array(), tx_cms_webinfo_page $parentObject) {
$sysNote = t3lib_div::makeInstance('Tx_SysNote_SysNote');
$content = $sysNote->renderByPid($parentObject->pObj->id);
return $content;
}
}
?>
\ No newline at end of file
......@@ -7,8 +7,13 @@ if (!defined ('TYPO3_MODE')) {
// Hook into the list module
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['recordlist/mod1/index.php']['drawFooterHook'][$_EXTKEY] =
'EXT:' . $_EXTKEY . '/Classes/Hooks/RecordList.php:Tx_Sysnote_Hooks_RecordList->render';
// Hook into the page module
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawFooterHook'][$_EXTKEY] =
'EXT:' . $_EXTKEY . '/Classes/Hooks/Page.php:Tx_Sysnote_Hooks_Page->render';
// Hook into the info module
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/web_info/class.tx_cms_webinfo.php']['drawFooterHook'][$_EXTKEY] =
'EXT:' . $_EXTKEY . '/Classes/Hooks/InfoModule.php:Tx_Sysnote_Hooks_InfoModule->render';
?>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment