2005-11-08 Sebastian Kurfuerst <sebastian@garbage-group.de>
authorSebastian Kurfürst <sebastian.kurfuerst@typo3.org>
Tue, 8 Nov 2005 19:52:17 +0000 (19:52 +0000)
committerSebastian Kurfürst <sebastian.kurfuerst@typo3.org>
Tue, 8 Nov 2005 19:52:17 +0000 (19:52 +0000)
* Fixed bug #586: User Admin can't create new user
* Fixed bug #1293: TCAdefaults.pages.doktype is not recognized by the wizard "Create new pages"
* Fixed bug #1407: clearCache doesn't work when deleting records
* Fixed bug #1570: on timeout in BE, popup appears all the time when clicking no
* Fixed bug #1571: make new content element wizard easier to use

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@845 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php
typo3/alt_main.php
typo3/sysext/beuser/mod/index.php
typo3/sysext/cms/layout/db_new_content_el.php
typo3/sysext/wizard_crpages/class.tx_wizardcrpages_webfunc_2.php

index d506d33..8d7e833 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-11-08     Sebastian Kurfuerst     <sebastian@garbage-group.de>
+
+       * Fixed bug #586: User Admin can't create new user
+       * Fixed bug #1293: TCAdefaults.pages.doktype is not recognized by the wizard "Create new pages"
+       * Fixed bug #1407: clearCache doesn't work when deleting records
+       * Fixed bug #1570: on timeout in BE, popup appears all the time when clicking no
+       * Fixed bug #1571: make new content element wizard easier to use
+
 2005-11-09     Ingmar Schlecht <ingmar@typo3.org>
 
        * Made TCEForms put <label> tags around icons for moving/deleting repetitive Flexform items
index 33990e2..adf831f 100755 (executable)
@@ -2988,6 +2988,8 @@ class t3lib_TCEmain       {
                $uid = intval($uid);
                if ($TCA[$table] && $uid)       {
                        if ($noRecordCheck || $this->doesRecordExist($table,$uid,'delete'))     {
+                               $this->clear_cache($table,$uid);        // clear cache before deleting the record, else the correct page cannot be identified by clear_cache
+
                                $deleteRow = $TCA[$table]['ctrl']['delete'];
                                if ($deleteRow && !$forceHardDelete)    {
                                        $updateFields = array(
@@ -3025,7 +3027,6 @@ class t3lib_TCEmain       {
                                        $this->log($table,$uid,3,0,100,$GLOBALS['TYPO3_DB']->sql_error());
                                }
 
-                               $this->clear_cache($table,$uid);        // clear cache
                        } else $this->log($table,$uid,3,0,1,'Attempt to delete record without delete-permissions');
                }
        }
index 24905fb..e0b1e39 100755 (executable)
@@ -173,6 +173,7 @@ class SC_alt_main {
                this.openRefreshWindow = busy_OpenRefreshWindow;
                this.busyloadTime=0;
                this.openRefreshW=0;
+               this.reloginCancelled=0;
        }
        function busy_loginRefreshed()  {       //
                var date = new Date();
@@ -182,7 +183,7 @@ class SC_alt_main {
        function busy_checkLoginTimeout()       {       //
                var date = new Date();
                var theTime = Math.floor(date.getTime()/1000);
-               if (theTime > this.busyloadTime+'.intval($BE_USER->auth_timeout_field).'-10)    {
+               if (theTime > this.busyloadTime+'.intval($BE_USER->auth_timeout_field).'-30)    {
                        return true;
                }
        }
@@ -192,10 +193,11 @@ class SC_alt_main {
                this.openRefreshW=1;
        }
        function busy_checkLoginTimeout_timer() {       //
-
-               if (busy.checkLoginTimeout())   {
-                       if (!busy.openRefreshW && confirm('.$GLOBALS['LANG']->JScharCode($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.refresh_login')).'))   {
+               if (busy.checkLoginTimeout() && !busy.reloginCancelled && !busy.openRefreshW)   {
+                       if (confirm('.$GLOBALS['LANG']->JScharCode($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.refresh_login')).')) {
                                busy.openRefreshWindow();
+                       } else  {
+                               busy.reloginCancelled = 1;
                        }
                }
                window.setTimeout("busy_checkLoginTimeout_timer();",2*1000);    // Each 2nd second is enough for checking. The popup will be triggered 10 seconds before the login expires (see above, busy_checkLoginTimeout())
index 78f5869..593e1a4 100755 (executable)
@@ -1035,7 +1035,7 @@ class SC_mod_tools_be_user_index {
                        function jumpToUrl(URL) {       //
                                document.location = URL;
                        }
-               ');
+               ' . $this->doc->redirectUrls());
        }
 
        /**
@@ -1247,7 +1247,13 @@ class SC_mod_tools_be_user_index {
                                // Header:
                        $allCells = array();
                        reset($options);
-                       $allCells['USERS'] = '<b>Usernames:</b>';
+                       
+                       $link_createNewUser='<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[be_users][0]=new',$this->doc->backPath,-1)).'">'.
+                               '<img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/new_el.gif','width="11" height="12"').' title="'.$GLOBALS['LANG']->getLL('new',1).'" alt="" />'.
+                               '</a>';
+                       
+                       $allCells['USERS'] = '<table border="0" cellspacing="0" cellpadding="0" width="100%"><td><b>Usernames:</b></td><td width="12">'.$link_createNewUser.'</td></tr></table>';
+
                        while(list($kk,$vv)=each($options))     {
                                if ($compareFlags[$kk]) {
                                        $allCells[$kk] = '<b>'.$vv.':</b>';
index 03ff924..4581789 100644 (file)
@@ -561,6 +561,7 @@ Contact me: | tv=check | 1
                        // Load full table definition:
                t3lib_div::loadTCA('tt_content');
 
+               $headersUsed = Array();
                        // Traverse wizard items:
                foreach($wizardItems as $key => $cfg)   {
 
@@ -593,11 +594,20 @@ Contact me: | tv=check | 1
                                                } else {
                                                                // Add the parameter:
                                                        $wizardItems[$key]['params'].= '&defVals[tt_content]['.$fN.']='.rawurlencode($fV);
+                                                       $tmp = explode('_', $key);
+                                                       $headersUsed[$tmp[0]] = $tmp[0];
                                                }
                                        }
                                }
                        }
                }
+                       // remove headers without elements
+               foreach ($wizardItems as $key => $cfg)  {
+                       $tmp = explode('_',$key);
+                       if (count($tmp) == 2 && !$tmp[1] && !in_array($tmp[0], $headersUsed))   {
+                               unset($wizardItems[$key]);
+                       }
+               }
        }
 }
 
index 842b0d8..ff4204b 100755 (executable)
@@ -125,6 +125,13 @@ class tx_wizardcrpages_webfunc_2 extends t3lib_extobjbase {
                                        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
                                        $tce->stripslashes_values=0;
                                        $tce->reverseOrder=1;
+
+                                               // set default TCA values specific for the user
+                                       $TCAdefaultOverride = $GLOBALS['BE_USER']->getTSConfigProp('TCAdefaults');
+                                       if (is_array($TCAdefaultOverride))      {
+                                               $tce->setDefaultsFromUserTS($TCAdefaultOverride);
+                                       }
+
                                        $tce->start($data,array());
                                        $tce->process_datamap();
                                        t3lib_BEfunc::getSetUpdateSignal('updatePageTree');