[BUGFIX] Bring back recStatInfoHooks hook in Page Tree
authorGeorg Ringer <mail@ringerge.org>
Tue, 30 Aug 2011 12:03:14 +0000 (14:03 +0200)
committerXavier Perseguers <xavier@typo3.org>
Tue, 30 Aug 2011 12:09:18 +0000 (14:09 +0200)
There was a hook 'recStatInfoHooks' in class.webpagetree.php, which is
missing in the current implementation with ExtJS.

Change-Id: Ie334ba0289e7cc49a0cbcdeb4b2f8e16d9c141fb
Resolves: #27247
Releases: 4.5, 4.6
Reviewed-on: http://review.typo3.org/4677
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
t3lib/tree/pagetree/class.t3lib_tree_pagetree_commands.php

index b400767..5adff9c 100644 (file)
@@ -330,13 +330,22 @@ final class t3lib_tree_pagetree_Commands {
                        );
                }
 
+                       // Call stats information hook
+               $stat = '';
+               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'])) {
+                       $_params = array('pages', $record['uid']);
+                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['recStatInfoHooks'] as $_funcRef) {
+                               $stat .= t3lib_div::callUserFunction($_funcRef, $_params, $this);
+                       }
+               }
+
                $prefix .= htmlspecialchars($addIdAsPrefix ? '[' . $record['uid'] . '] ' : '');
                $subNode->setEditableText($text);
                $subNode->setText(
                        htmlspecialchars($visibleText),
                        $field,
                        $prefix,
-                       htmlspecialchars($suffix)
+                       htmlspecialchars($suffix) . $stat
                );
 
                $subNode->setQTip($qtip);