b4e7d294c06492062477d69668a24d9e888463c4
[Packages/TYPO3.CMS.git] / typo3 / sysext / lowlevel / Classes / View / DatabaseIntegrityView.php
1 <?php
2 namespace TYPO3\CMS\Lowlevel\View;
3
4 /**
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use TYPO3\CMS\Core\Utility\GeneralUtility;
18 use TYPO3\CMS\Backend\Utility\BackendUtility;
19
20 /**
21 * Script class for the DB int module
22 *
23 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
24 */
25 class DatabaseIntegrityView {
26
27 public $MCONF = array();
28
29 public $MOD_MENU = array();
30
31 public $MOD_SETTINGS = array();
32
33 /**
34 * Document template object
35 *
36 * @var \TYPO3\CMS\Backend\Template\DocumentTemplate
37 */
38 public $doc;
39
40 public $content;
41
42 public $menu;
43
44 protected $formName = 'queryform';
45
46 /**
47 * Constructor
48 */
49 public function __construct() {
50 $GLOBALS['LANG']->includeLLFile('EXT:lowlevel/dbint/locallang.xlf');
51 $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1);
52 }
53
54 /**
55 * Initialization
56 *
57 * @return void
58 */
59 public function init() {
60 global $LANG, $BACK_PATH;
61 $this->MCONF = $GLOBALS['MCONF'];
62 $this->menuConfig();
63 $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
64 $this->doc->backPath = $BACK_PATH;
65 $this->doc->setModuleTemplate('EXT:lowlevel/Resources/Private/Templates/dbint.html');
66 $this->doc->form = '<form action="" method="post" name="' . $this->formName . '">';
67 $this->doc->table_TABLE = '<table class="t3-table">
68 <colgroup><col width="24"><col><col width="150"></colgroup>';
69 $this->doc->tableLayout = array(
70 '0' => array(
71 'tr' => array('<thead><tr>', '</tr></thead>'),
72 'defCol' => array('<th>', '</th>')
73 ),
74 'defRow' => array(
75 'defCol' => array('<td>', '</td>')
76 )
77 );
78 }
79
80 /**
81 * Configure menu
82 *
83 * @return void
84 */
85 public function menuConfig() {
86 global $LANG;
87 // MENU-ITEMS:
88 // If array, then it's a selector box menu
89 // If empty string it's just a variable, that'll be saved.
90 // Values NOT in this array will not be saved in the settings-array for the module.
91 $this->MOD_MENU = array(
92 'function' => array(
93 0 => $GLOBALS['LANG']->getLL('menu', TRUE),
94 'records' => $GLOBALS['LANG']->getLL('recordStatistics', TRUE),
95 'relations' => $GLOBALS['LANG']->getLL('databaseRelations', TRUE),
96 'search' => $GLOBALS['LANG']->getLL('fullSearch', TRUE),
97 'refindex' => $GLOBALS['LANG']->getLL('manageRefIndex', TRUE)
98 ),
99 'search' => array(
100 'raw' => $GLOBALS['LANG']->getLL('rawSearch', TRUE),
101 'query' => $GLOBALS['LANG']->getLL('advancedQuery', TRUE)
102 ),
103 'search_query_smallparts' => '',
104 'search_result_labels' => '',
105 'labels_noprefix' => '',
106 'options_sortlabel' => '',
107 'show_deleted' => '',
108 'queryConfig' => '',
109 // Current query
110 'queryTable' => '',
111 // Current table
112 'queryFields' => '',
113 // Current tableFields
114 'queryLimit' => '',
115 // Current limit
116 'queryOrder' => '',
117 // Current Order field
118 'queryOrderDesc' => '',
119 // Current Order field descending flag
120 'queryOrder2' => '',
121 // Current Order2 field
122 'queryOrder2Desc' => '',
123 // Current Order2 field descending flag
124 'queryGroup' => '',
125 // Current Group field
126 'storeArray' => '',
127 // Used to store the available Query config memory banks
128 'storeQueryConfigs' => '',
129 // Used to store the available Query configs in memory
130 'search_query_makeQuery' => array(
131 'all' => $GLOBALS['LANG']->getLL('selectRecords', TRUE),
132 'count' => $GLOBALS['LANG']->getLL('countResults', TRUE),
133 'explain' => $GLOBALS['LANG']->getLL('explainQuery', TRUE),
134 'csv' => $GLOBALS['LANG']->getLL('csvExport', TRUE)
135 ),
136 'sword' => ''
137 );
138 // CLEAN SETTINGS
139 $OLD_MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, '', $this->MCONF['name'], 'ses');
140 $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name'], 'ses');
141 if (GeneralUtility::_GP('queryConfig')) {
142 $qA = GeneralUtility::_GP('queryConfig');
143 $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, array('queryConfig' => serialize($qA)), $this->MCONF['name'], 'ses');
144 }
145 $addConditionCheck = GeneralUtility::_GP('qG_ins');
146 foreach ($OLD_MOD_SETTINGS as $key => $val) {
147 if (substr($key, 0, 5) == 'query' && $this->MOD_SETTINGS[$key] != $val && $key != 'queryLimit' && $key != 'use_listview') {
148 $setLimitToStart = 1;
149 if ($key == 'queryTable' && !$addConditionCheck) {
150 $this->MOD_SETTINGS['queryConfig'] = '';
151 }
152 }
153 if ($key == 'queryTable' && $this->MOD_SETTINGS[$key] != $val) {
154 $this->MOD_SETTINGS['queryFields'] = '';
155 }
156 }
157 if ($setLimitToStart) {
158 $currentLimit = explode(',', $this->MOD_SETTINGS['queryLimit']);
159 if ($currentLimit[1]) {
160 $this->MOD_SETTINGS['queryLimit'] = '0,' . $currentLimit[1];
161 } else {
162 $this->MOD_SETTINGS['queryLimit'] = '0';
163 }
164 $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, $this->MOD_SETTINGS, $this->MCONF['name'], 'ses');
165 }
166 }
167
168 /**
169 * Main
170 *
171 * @return void
172 */
173 public function main() {
174 // Content creation
175 if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
176 $this->menu = BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
177 }
178 switch ($this->MOD_SETTINGS['function']) {
179 case 'search':
180 $this->func_search();
181 break;
182 case 'records':
183 $this->func_records();
184 break;
185 case 'relations':
186 $this->func_relations();
187 break;
188 case 'refindex':
189 $this->func_refindex();
190 break;
191 default:
192 $this->func_default();
193 }
194 // Setting up the buttons and markers for docheader
195 $docHeaderButtons = $this->getButtons();
196 $markers = array(
197 'CSH' => $docHeaderButtons['csh'],
198 'FUNC_MENU' => $this->getFuncMenu(),
199 'CONTENT' => $this->content
200 );
201 // Build the <body> for the module
202 $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
203 // Renders the module page
204 $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
205 }
206
207 /**
208 * Print content
209 *
210 * @return void
211 */
212 public function printContent() {
213 echo $this->content;
214 }
215
216 /**
217 * Create the panel of buttons for submitting the form or otherwise perform operations.
218 *
219 * @return array All available buttons as an assoc. array
220 */
221 protected function getButtons() {
222 $buttons = array(
223 'csh' => '',
224 'shortcut' => ''
225 );
226 // Shortcut
227 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
228 $buttons['shortcut'] = $this->doc->makeShortcutIcon('', 'function,search,search_query_makeQuery', $this->MCONF['name']);
229 }
230 return $buttons;
231 }
232
233 /**
234 * Create the function menu
235 *
236 * @return string HTML of the function menu
237 */
238 protected function getFuncMenu() {
239 if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
240 $funcMenu = BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
241 }
242 return $funcMenu;
243 }
244
245 /**
246 * Creates the overview menu.
247 *
248 * @return void
249 */
250 protected function func_default() {
251 $availableModFuncs = array('records', 'relations', 'search', 'refindex');
252 $content = '<dl class="t3-overview-list">';
253 foreach ($availableModFuncs as $modFunc) {
254 $functionUrl = BackendUtility::getModuleUrl('system_dbint') . '&SET[function]=' . $modFunc;
255 $title = $GLOBALS['LANG']->getLL($modFunc);
256 $description = $GLOBALS['LANG']->getLL($modFunc . '_description');
257 $icon = '<img src="' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'MOD:system_dbint/db.gif', '', 1) . '" width="16" height="16" title="' . $title . '" alt="' . $title . '" />';
258 $content .= '
259 <dt><a href="' . htmlspecialchars($functionUrl) . '">' . $icon . $title . '</a></dt>
260 <dd>' . $description . '</dd>
261 ';
262 }
263 $content .= '</dl>';
264 $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
265 $this->content .= $this->doc->section('', $content, FALSE, TRUE);
266 }
267
268 /****************************
269 *
270 * Functionality implementation
271 *
272 ****************************/
273 /**
274 * Check and update reference index!
275 *
276 * @return void
277 */
278 public function func_refindex() {
279 $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('manageRefIndex', TRUE));
280 if (GeneralUtility::_GP('_update') || GeneralUtility::_GP('_check')) {
281 $testOnly = GeneralUtility::_GP('_check') ? TRUE : FALSE;
282 // Call the functionality
283 $refIndexObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\ReferenceIndex');
284 list($headerContent, $bodyContent) = $refIndexObj->updateIndex($testOnly);
285 // Output content:
286 $this->content .= $this->doc->section('', str_replace(LF, '<br/>', $bodyContent), FALSE, TRUE);
287 }
288
289 // Output content:
290 $content = '<p class="lead">' . $GLOBALS['LANG']->getLL('referenceIndex_description') . '</p>';
291 $content .= '<input type="submit" name="_check" value="' . $GLOBALS['LANG']->getLL('referenceIndex_buttonCheck') . '" /> <input type="submit" name="_update" value="' . $GLOBALS['LANG']->getLL('referenceIndex_buttonUpdate') . '" /><br /><br />';
292 $this->content .= $this->doc->section('', $content, FALSE, TRUE);
293
294 // Command Line Interface
295 $content = '';
296 $content .= '<p>' . $GLOBALS['LANG']->getLL('checkScript') . '</p>';
297
298 $content .= '<h3>' . $GLOBALS['LANG']->getLL('checkScript_check_description') . '</h3>';
299 $content .= '<p><code>php ' . PATH_typo3 . 'cli_dispatch.phpsh lowlevel_refindex -c</code></p>';
300
301 $content .= '<h3>' . $GLOBALS['LANG']->getLL('checkScript_update_description') . '</h3>';
302 $content .= '<p><code>php ' . PATH_typo3 . 'cli_dispatch.phpsh lowlevel_refindex -e</code></p>';
303 $content .= '<div class="typo3-message message-information"><div class="message-body">' . $GLOBALS['LANG']->getLL('checkScript_information') . '</div></div>';
304
305 $content .= '<p>' . $GLOBALS['LANG']->getLL('checkScript_moreDetails') . '<br />';
306 $content .= '<a href="' . $GLOBALS['BACK_PATH'] . 'sysext/lowlevel/HOWTO_clean_up_TYPO3_installations.txt" target="_new">' . PATH_typo3 . 'sysext/lowlevel/HOWTO_clean_up_TYPO3_installations.txt</a></p>';
307 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('checkScript_headline'), $content, FALSE, TRUE);
308 }
309
310 /**
311 * Search (Full / Advanced)
312 *
313 * @return void
314 */
315 public function func_search() {
316 global $LANG;
317 $fullsearch = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryView');
318 $fullsearch->setFormName($this->formName);
319 $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('search'));
320 $this->content .= $this->doc->spacer(5);
321 $menu2 = '';
322 if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
323 $menu2 = BackendUtility::getFuncMenu(0, 'SET[search]', $this->MOD_SETTINGS['search'], $this->MOD_MENU['search']);
324 }
325 if ($this->MOD_SETTINGS['search'] == 'query' && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
326 $menu2 .= BackendUtility::getFuncMenu(0, 'SET[search_query_makeQuery]', $this->MOD_SETTINGS['search_query_makeQuery'], $this->MOD_MENU['search_query_makeQuery']) . '<br />';
327 }
328 if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopCheckboxes'] && $this->MOD_SETTINGS['search'] == 'query') {
329 $menu2 .= '<div class="checkbox"><label for="checkSearch_query_smallparts">' . BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[search_query_smallparts]', $this->MOD_SETTINGS['search_query_smallparts'], '', '', 'id="checkSearch_query_smallparts"') . $GLOBALS['LANG']->getLL('showSQL') . '</label></div>';
330 $menu2 .= '<div class="checkbox"><label for="checkSearch_result_labels">' . BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[search_result_labels]', $this->MOD_SETTINGS['search_result_labels'], '', '', 'id="checkSearch_result_labels"') . $GLOBALS['LANG']->getLL('useFormattedStrings') . '</label></div>';
331 $menu2 .= '<div class="checkbox"><label for="checkLabels_noprefix">' . BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[labels_noprefix]', $this->MOD_SETTINGS['labels_noprefix'], '', '', 'id="checkLabels_noprefix"') . $GLOBALS['LANG']->getLL('dontUseOrigValues') . '</label></div>';
332 $menu2 .= '<div class="checkbox"><label for="checkOptions_sortlabel">' . BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[options_sortlabel]', $this->MOD_SETTINGS['options_sortlabel'], '', '', 'id="checkOptions_sortlabel"') . $GLOBALS['LANG']->getLL('sortOptions') . '</label></div>';
333 $menu2 .= '<div class="checkbox"><label for="checkShow_deleted">' . BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[show_deleted]', $this->MOD_SETTINGS['show_deleted'], '', '', 'id="checkShow_deleted"') . $GLOBALS['LANG']->getLL('showDeleted') . '</label></div>';
334 }
335 $this->content .= $this->doc->section('', $menu2) . $this->doc->spacer(10);
336 switch ($this->MOD_SETTINGS['search']) {
337 case 'query':
338 $this->content .= $fullsearch->queryMaker();
339 break;
340 case 'raw':
341
342 default:
343 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('searchOptions'), $fullsearch->form(), FALSE, TRUE);
344 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('result'), $fullsearch->search(), FALSE, TRUE);
345 }
346 }
347
348 /**
349 * Records overview
350 *
351 * @return void
352 */
353 public function func_records() {
354 /** @var $admin \TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck */
355 $admin = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Integrity\\DatabaseIntegrityCheck');
356 $admin->genTree_makeHTML = 0;
357 $admin->backPath = $GLOBALS['BACK_PATH'];
358 $admin->genTree(0, '');
359 $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('records'));
360
361 // Pages stat
362 $codeArr = array();
363 $codeArr['tableheader'] = array('', '', $GLOBALS['LANG']->getLL('count'));
364 $i++;
365 $codeArr[$i][] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', array());
366 $codeArr[$i][] = $GLOBALS['LANG']->getLL('total_pages');
367 $codeArr[$i][] = count($admin->page_idArray);
368 $i++;
369 $codeArr[$i][] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', array('hidden' => 1));
370 $codeArr[$i][] = $GLOBALS['LANG']->getLL('hidden_pages');
371 $codeArr[$i][] = $admin->recStats['hidden'];
372 $i++;
373 $codeArr[$i][] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', array('deleted' => 1));
374 $codeArr[$i][] = $GLOBALS['LANG']->getLL('deleted_pages');
375 $codeArr[$i][] = count($admin->recStats['deleted']['pages']);
376 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('pages'), $this->doc->table($codeArr), TRUE, TRUE);
377
378 // Doktype
379 $codeArr = array();
380 $codeArr['tableheader'] = array('', $GLOBALS['LANG']->getLL('doktype_value'), $GLOBALS['LANG']->getLL('count'));
381 $doktype = $GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'];
382 if (is_array($doktype)) {
383 foreach ($doktype as $n => $setup) {
384 if ($setup[1] != '--div--') {
385 $codeArr[$n][] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', array('doktype' => $setup[1]));
386 $codeArr[$n][] = $GLOBALS['LANG']->sL($setup[0]) . ' (' . $setup[1] . ')';
387 $codeArr[$n][] = (int)$admin->recStats['doktype'][$setup[1]];
388 }
389 }
390 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('doktype'), $this->doc->table($codeArr), TRUE, TRUE);
391 }
392
393 // Tables and lost records
394 $id_list = '-1,0,' . implode(',', array_keys($admin->page_idArray));
395 $id_list = rtrim($id_list, ',');
396 $admin->lostRecords($id_list);
397 if ($admin->fixLostRecord(GeneralUtility::_GET('fixLostRecords_table'), GeneralUtility::_GET('fixLostRecords_uid'))) {
398 $admin = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Integrity\\DatabaseIntegrityCheck');
399 $admin->backPath = $BACK_PATH;
400 $admin->genTree(0, '');
401 $id_list = '-1,0,' . implode(',', array_keys($admin->page_idArray));
402 $id_list = rtrim($id_list, ',');
403 $admin->lostRecords($id_list);
404 }
405 $codeArr = array();
406 $codeArr['tableheader'] = array(
407 '',
408 $GLOBALS['LANG']->getLL('label'),
409 $GLOBALS['LANG']->getLL('tablename'),
410 $GLOBALS['LANG']->getLL('total_lost'),
411 ''
412 );
413 $countArr = $admin->countRecords($id_list);
414 if (is_array($GLOBALS['TCA'])) {
415 foreach ($GLOBALS['TCA'] as $t => $value) {
416 if ($GLOBALS['TCA'][$t]['ctrl']['hideTable']) {
417 continue;
418 }
419 $codeArr[$t][] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($t, array());
420 $codeArr[$t][] = $GLOBALS['LANG']->sL($GLOBALS['TCA'][$t]['ctrl']['title']);
421 $codeArr[$t][] = $t;
422 if ($t === 'pages' && $admin->lostPagesList !== '') {
423 $lostRecordCount = count(explode(',', $admin->lostPagesList));
424 } else {
425 $lostRecordCount = count($admin->lRecords[$t]);
426 }
427 if ($countArr['all'][$t]) {
428 $theNumberOfRe = (int)$countArr['non_deleted'][$t] . '/' . $lostRecordCount;
429 } else {
430 $theNumberOfRe = '';
431 }
432 $codeArr[$t][] = $theNumberOfRe;
433 $lr = '';
434 if (is_array($admin->lRecords[$t])) {
435 foreach ($admin->lRecords[$t] as $data) {
436 if (!GeneralUtility::inList($admin->lostPagesList, $data[pid])) {
437 $lr .= '<nobr><strong><a href="' . htmlspecialchars((BackendUtility::getModuleUrl('system_dbint') . '&SET[function]=records&fixLostRecords_table=' . $t . '&fixLostRecords_uid=' . $data['uid'])) . '"><img src="' . $BACK_PATH . 'gfx/required_h.gif" width="10" hspace="3" height="10" border="0" align="top" title="' . $GLOBALS['LANG']->getLL('fixLostRecord') . '"></a>uid:' . $data['uid'] . ', pid:' . $data['pid'] . ', ' . htmlspecialchars(GeneralUtility::fixed_lgd_cs(strip_tags($data['title']), 20)) . '</strong></nobr><br>';
438 } else {
439 $lr .= '<nobr><img src="' . $BACK_PATH . 'clear.gif" width="16" height="1" border="0"><font color="Gray">uid:' . $data['uid'] . ', pid:' . $data['pid'] . ', ' . htmlspecialchars(GeneralUtility::fixed_lgd_cs(strip_tags($data['title']), 20)) . '</font></nobr><br>';
440 }
441 }
442 }
443 $codeArr[$t][] = $lr;
444 }
445 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('tables'), $this->doc->table($codeArr), FALSE, TRUE);
446 }
447 }
448
449 /**
450 * Show list references
451 *
452 * @return void
453 */
454 public function func_relations() {
455 global $LANG, $BACK_PATH;
456 $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('relations'));
457 $admin = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Integrity\\DatabaseIntegrityCheck');
458 $admin->genTree_makeHTML = 0;
459 $admin->backPath = $BACK_PATH;
460 $fkey_arrays = $admin->getGroupFields('');
461 $admin->selectNonEmptyRecordsWithFkeys($fkey_arrays);
462 $fileTest = $admin->testFileRefs();
463
464 $code = '';
465 if (is_array($fileTest['noReferences'])) {
466 foreach ($fileTest['noReferences'] as $val) {
467 $code .= '<nobr>' . $val[0] . '/<strong>' . $val[1] . '</strong></nobr><br>';
468 }
469 } else {
470 $code = '<p>' . $GLOBALS['LANG']->getLL('no_files_found') . '</p>';
471 }
472 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('files_no_ref'), $code, TRUE, TRUE);
473
474 $code = '';
475 if (is_array($fileTest['moreReferences'])) {
476 foreach ($fileTest['moreReferences'] as $val) {
477 $code .= '<nobr>' . $val[0] . '/<strong>' . $val[1] . '</strong>: ' . $val[2] . ' ' . $GLOBALS['LANG']->getLL('references') . '</nobr><br>' . $val[3] . '<br><br>';
478 }
479 } else {
480 $code = '<p>' . $GLOBALS['LANG']->getLL('no_files_found') . '</p>';
481 }
482 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('files_many_ref'), $code, TRUE, TRUE);
483
484 $code = '';
485 if (is_array($fileTest['noFile'])) {
486 ksort($fileTest['noFile']);
487 foreach ($fileTest['noFile'] as $val) {
488 $code .= '<nobr>' . $val[0] . '/<strong>' . $val[1] . '</strong> ' . $GLOBALS['LANG']->getLL('isMissing') . ' </nobr><br>' . $GLOBALS['LANG']->getLL('referencedFrom') . $val[2] . '<br><br>';
489 }
490 } else {
491 $code = '<p>' . $GLOBALS['LANG']->getLL('no_files_found') . '</p>';
492 }
493
494 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('files_no_file'), $code, TRUE, TRUE);
495 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('select_db'), $admin->testDBRefs($admin->checkSelectDBRefs), TRUE, TRUE);
496 $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('group_db'), $admin->testDBRefs($admin->checkGroupDBRefs), TRUE, TRUE);
497 }
498
499 /**
500 * Searching for files with a specific pattern
501 *
502 * @deprecated since 6.2 will be removed two versions later
503 * @return void
504 */
505 public function func_filesearch() {
506 \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
507 }
508
509 /**
510 * Searching for filename pattern recursively in the specified dir.
511 *
512 * @param string $basedir Base directory
513 * @param string $pattern Match pattern
514 * @param array $matching_files Array of matching files, passed by reference
515 * @param int $depth Depth to recurse
516 * @deprecated since 6.2 will be removed two versions later
517 * @return array Array with various information about the search result
518 */
519 public function findFile($basedir, $pattern, &$matching_files, $depth) {
520 \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
521 }
522
523 }