Fixed bug #10234: when "create new record" in list module, page (after) is last entry
authorSteffen Kamper <info@sk-typo3.de>
Fri, 23 Jan 2009 18:56:55 +0000 (18:56 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 23 Jan 2009 18:56:55 +0000 (18:56 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4829 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/db_new.php

index 253c3ff..e0cff46 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-01-23  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #10234: when "create new record" in list module, page (after) is last entry
        * Fixed bug #10179: sys_action menu doesn't respect hidden and returns empty ul if there are no entries
 
 2009-01-23  Michael Stucki  <michael@typo3.org>
index c2482f2..c31b497 100755 (executable)
@@ -415,6 +415,35 @@ class SC_db_new {
                                </tr>
                        ';
                }
+               
+                       // New pages AFTER this pages
+               if ($this->newPagesAfter
+                       && $this->isTableAllowedForThisPage($this->pidInfo,'pages')
+                       && $BE_USER->check('tables_modify','pages')
+                       && $BE_USER->workspaceCreateNewRecord($this->pidInfo['uid'], 'pages')
+                       )       {
+
+                               // Create link to new page after
+                       $t = 'pages';
+                       $v = $TCA[$t];
+                       $rowContent = '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/join.gif','width="18" height="16"').' alt="" />'. 
+                               $this->linkWrap(
+                                       t3lib_iconWorks::getIconImage($t,array(),$BACK_PATH,'').
+                                               $LANG->sL($v['ctrl']['title'],1).' ('.$LANG->sL('LLL:EXT:lang/locallang_core.php:db_new.php.after',1).')',
+                                       'pages',
+                                       -$this->id
+                               );
+               // Half-line added:
+                       $rowContent.= '<br /><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/ol/halfline.gif','width="18" height="8"').' alt="" />';
+                       
+                               // Compile table row:
+                       $tRows[] = '
+                               <tr>
+                                       <td nowrap="nowrap">'.$rowContent.'</td>
+                                       <td>'.t3lib_BEfunc::cshItem($t,'',$GLOBALS['BACK_PATH'],'',$doNotShowFullDescr).'</td>
+                               </tr>
+                       ';
+               }
 
                        // New tables (but not pages) INSIDE this pages
                if ($this->newContentInto)      {
@@ -468,39 +497,15 @@ class SC_db_new {
                        }
                }
 
-                       // New pages AFTER this pages
-               if ($this->newPagesAfter
-                       && $this->isTableAllowedForThisPage($this->pidInfo,'pages')
-                       && $BE_USER->check('tables_modify','pages')
-                       && $BE_USER->workspaceCreateNewRecord($this->pidInfo['uid'], 'pages')
-                       )       {
-
-                               // Create link to new page after
-                       $t = 'pages';
-                       $v = $TCA[$t];
-                       $rowContent = $this->linkWrap(
-                                       t3lib_iconWorks::getIconImage($t,array(),$BACK_PATH,'').
-                                               $LANG->sL($v['ctrl']['title'],1).' ('.$LANG->sL('LLL:EXT:lang/locallang_core.php:db_new.php.after',1).')',
-                                       'pages',
-                                       -$this->id
-                               );
-
-                               // Compile table row:
-                       $tRows[] = '
-                               <tr>
-                                       <td nowrap="nowrap">'.$rowContent.'</td>
-                                       <td>'.t3lib_BEfunc::cshItem($t,'',$GLOBALS['BACK_PATH'],'',$doNotShowFullDescr).'</td>
-                               </tr>
-                       ';
-               } else {
-                               // Compile table row:
-                       $tRows[]='
-                               <tr>
-                                       <td><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/stopper.gif','width="18" height="16"').' alt="" /></td>
-                                       <td></td>
-                               </tr>
-                       ';
-               }
+               
+                       // Compile table row:
+               $tRows[]='
+                       <tr>
+                               <td><img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/ol/stopper.gif','width="18" height="16"').' alt="" /></td>
+                               <td></td>
+                       </tr>
+               ';
+               
 
                        // Make table:
                $this->code.='
@@ -613,4 +618,4 @@ $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>