[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:49:10 +0000 (12:49 +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: Ie793aa337b56503f6f37ffd9cc6fbb8d052c1540
Resolves: #25863
Releases: 4.6, 4.5, 4.4
Reviewed-on: http://review.typo3.org/1531
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Stefan Neufeind
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Tested-by: Stefan Neufeind
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/lowlevel/dbint/index.php

index df72e5c..99e6c72 100755 (executable)
@@ -521,8 +521,14 @@ class SC_mod_tools_dbint_index {
                                $codeArr[$t][] = $GLOBALS['LANG']->sL($GLOBALS['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 ='';
                                }
@@ -691,4 +697,4 @@ $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>