[BUGFIX] Display correct lost records count in record statistics
authorSusanne Moog <typo3@susannemoog.de>
Sun, 10 Apr 2011 08:32:16 +0000 (10:32 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Sun, 8 May 2011 10:50:26 +0000 (12:50 +0200)
The module DB Check > Record statistics counts the deleted pages
instead of the lost pages and displays that number. As the links
for adopting orphaned records should correlate to the count of
lost records, we should display the correct number.

Change-Id: I3b0e1046b1f79c3849fb883f7805d4a2b683b4fa
Resolves: #25863
Releases: 4.6, 4.5, 4.4
Reviewed-on: http://review.typo3.org/1532
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/lowlevel/dbint/index.php

index de1475b..f6d7b06 100755 (executable)
@@ -525,8 +525,14 @@ class SC_mod_tools_dbint_index {
                                $codeArr[$t][]=$LANG->sL($TCA[$t]['ctrl']['title']);
                                $codeArr[$t][]=$t;
 
+                               if($t === 'pages' && $admin->lostPagesList !== '') {
+                                       $lostRecordCount = count(explode(',', $admin->lostPagesList));
+                               } else {
+                                       $lostRecordCount = count($admin->lRecords[$t]);
+                               }
+
                                if ($countArr['all'][$t])       {
-                                       $theNumberOfRe = intval($countArr['non_deleted'][$t]).'/'.(intval($countArr['all'][$t])-intval($countArr['non_deleted'][$t]));
+                                       $theNumberOfRe = intval($countArr['non_deleted'][$t]) . '/' . $lostRecordCount;
                                } else {
                                        $theNumberOfRe ='';
                                }
@@ -695,4 +701,4 @@ $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>