Fix bugs #3212 & #1178: empty page is displayed when accessing Web>Versioning
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Wed, 28 Jun 2006 17:02:13 +0000 (17:02 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Wed, 28 Jun 2006 17:02:13 +0000 (17:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1554 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/version/class.tx_version_cm1.php
typo3/sysext/version/cm1/index.php
typo3/sysext/version/locallang.xml

index f140d34..ecc694a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Fix bug# 3397: FORM submit as image is not valid xhtml
        * Fixed restriction to languages in Frontend editing
+       * Fix bugs #3212 & #1178: empty page is displayed when accessing Web>Versioning
 
 2006-06-28 Bernhard Kraft  <kraftb@kraftb.at>
 
@@ -17,7 +18,7 @@
 
 2006-06-27 Karsten Dambekalns <karsten@typo3.org>
 
-        * typo3/init.php: Fixed bug #2871.
+       * typo3/init.php: Fixed bug #2871.
        * t3lib/class.t3lib_befunc.php: Fixed bug #3106, Documentation of function storeHash differs between class befunc and class page
        * class.em_xmlhandler.php: Small change to the inline code docs
        * class.tx_install.php: Code cleanup, removed some commented code and cleaned indentation
index 508cde1..a28dc31 100755 (executable)
@@ -64,9 +64,9 @@ class tx_version_cm1 {
         */
        function main(&$backRef,$menuItems,$table,$uid) {
                global $BE_USER,$TCA,$LANG;
-
+               
                $localItems = Array();
-               if (!$backRef->cmLevel) {
+               if (!$backRef->cmLevel && $uid>0)       {
 
                                // Returns directly, because the clicked item was not from the pages table
                        if (!$TCA[$table] || !$TCA[$table]['ctrl']['versioningWS'])     return $menuItems;
index 66c6429..a115fd5 100755 (executable)
@@ -285,6 +285,10 @@ class tx_version_cm1 extends t3lib_SCbase {
                        }
 
                        $this->content.=$this->doc->spacer(10);
+               } else {
+                               // If no access or id value, create empty document:
+                       $this->content.=$this->doc->startPage($LANG->getLL('title'));
+                       $this->content.=$this->doc->section($LANG->getLL('clickAPage_header'),$LANG->getLL('clickAPage_content'),0,1);
                }
        }
 
index 7077b8c..7a0f117 100755 (executable)
@@ -13,6 +13,8 @@
                        <label index="function1">Function #1</label>
                        <label index="function2">Function #2</label>
                        <label index="function3">Function #3</label>
+                       <label index="clickAPage_header">Web&gt;Versioning module</label>
+                       <label index="clickAPage_content">Please click a page in the pagetree frame to see the versioning module.</label>
                </languageKey>
        </data>
 </T3locallang>
\ No newline at end of file