Fixed bug #12487: Inform if page use content_from_pid
authorSteffen Kamper <info@sk-typo3.de>
Sun, 8 Nov 2009 16:32:17 +0000 (16:32 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sun, 8 Nov 2009 16:32:17 +0000 (16:32 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6380 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/layout/locallang.xml

index fbd059d..70536de 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-11-08  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #12487: Inform if page use content_from_pid
        * Fixed bug #12247: absRefPrefix is prefixed with external js files
 
 2009-11-08  Oliver Hader  <oliver@typo3.org>
index d824115..b47bf77 100755 (executable)
@@ -522,6 +522,20 @@ class SC_db_layout {
                                $body = $this->renderListContent();     // All other listings
                        }
 
+
+                       if ($this->pageinfo['content_from_pid']) {
+                               $contentPage = t3lib_BEfunc::getRecord('pages', intval($this->pageinfo['content_from_pid']));
+                               $linkToPid = $this->local_linkThisScript(array('id' => $this->pageinfo['content_from_pid']));
+                               $link = '<a href="' . $linkToPid . '">' . htmlspecialchars($contentPage['title']) . ' (PID ' . intval($this->pageinfo['content_from_pid']) . ')</a>';
+                               $flashMessage = t3lib_div::makeInstance(
+                                       't3lib_FlashMessage',
+                                       '',
+                                       sprintf($GLOBALS['LANG']->getLL('content_from_pid_title'), $link),
+                                       t3lib_FlashMessage::INFO
+                               );
+                               $body = $flashMessage->render() . $body;
+                       }
+
                                // Setting up the buttons and markers for docheader
                        $docHeaderButtons = $this->getButtons($this->MOD_SETTINGS['function']==0 ? 'quickEdit' : '');
                        $markers = array(
index 46f2b08..07632e0 100755 (executable)
@@ -81,6 +81,7 @@
                        <label index="pI_hitsPeriod">Hits Period</label>
                        <label index="pI_hits24hours">Last 24 hours</label>
                        <label index="pI_hits10days">Last 10 days</label>
+                       <label index="content_from_pid_title">Page uses content from this page: %s</label>
                </languageKey>
        </data>
 </T3locallang>
\ No newline at end of file