Corrected the assembly of the page title, resolves #26654 version2-dev
authorfrancois <francois@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 4 Apr 2012 07:00:50 +0000 (07:00 +0000)
committerfrancois <francois@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 4 Apr 2012 07:00:50 +0000 (07:00 +0000)
Added the ChangeLog file

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/rsgoogleanalytics/branches/version2-dev@60348 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog [new file with mode: 0644]
class.tx_rsgoogleanalytics.php

diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..b2258ef
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,7 @@
+2012-04-04 Francois Suter  <typo3@cobweb.ch>\r
+\r
+       * Corrected the assembly of the page title, resolves #26654\r
+\r
+2008-02-22 Steffen Ritter  <info@steffen-ritter.net>\r
+\r
+       * Initial release\r
index ace246a..b9b1d34 100644 (file)
@@ -86,16 +86,17 @@ class tx_rsgoogleanalytics implements t3lib_singleton {
                }
                        // detect how the pageTitle should be rendered
                if ($this->modConfig['registerTitle'] == 'title') {
-                       $pageName = '\'' . $GLOBALS['TSFE']->page['title'] . '\'';
+                       $pageName = str_replace(array(CR, LF), '', trim($GLOBALS['TSFE']->page['title']));
                } elseif ($this->modConfig['registerTitle'] == 'rootline') {
                        $rootline = $GLOBALS['TSFE']->sys_page->getRootLine($GLOBALS['TSFE']->page['uid']);
-                       $pageName = '\'';
-                       for ($i = 0; $i < count($rootline); $i++) {
+                       $pageName = '';
+                       $rootlineLength = count($rootline);
+                       for ($i = 0; $i < $rootlineLength; $i++) {
                                if ($rootline[$i]['is_siteroot'] == 0) {
-                                       $pageName .= '/' . addslashes($rootline[$i]['title']);
+                                       $title = str_replace(array(CR, LF), '', $rootline[$i]['title']);
+                                       $pageName .= '/' . addslashes(trim($title));
                                }
                        }
-                       $pageName .= '\'';
                } else {
                        $pageName = NULL;
                }