/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk

« back to all changes in this revision

Viewing changes to classes/cache/cachedb.php

  • Committer: Suren A. Chilingaryan
  • Date: 2019-02-21 18:04:53 UTC
  • Revision ID: csa@suren.me-20190221180453-vwvpf6b2528w7rct
Don't crash Admin/Cache on the faulty sources

Show diffs side-by-side

added added

removed removed

Lines of Context:
403
403
    $postfixes = array();
404
404
    
405
405
    while ($row = mysql_fetch_row($res)) {
406
 
        $info = $this->GetExtendedCacheInfo($row, $flags);
407
 
        array_push($list, $info);
 
406
        try {
 
407
            $info = $this->GetExtendedCacheInfo($row, $flags);
 
408
            array_push($list, $info);
408
409
 
409
 
        array_push($postfixes, $info['postfix']);
 
410
            array_push($postfixes, $info['postfix']);
 
411
        } catch (ADEIException $ae) {
 
412
            // DS: what to do? Do we need to pass the error or we relly or FIND_BROKEN?
 
413
        }
410
414
    }
411
415
 
412
416
    if ($flags&CACHE::FIND_BROKEN) {
422
426
            $incomplete = array_diff(array_unique($all_postfixes), $postfixes);
423
427
            
424
428
            foreach ($incomplete as $postfix) {
425
 
                $info = $this->GetExtendedCacheInfo($postfix, $flags);
 
429
                try {
 
430
                    $info = $this->GetExtendedCacheInfo($postfix, $flags);
 
431
                }  catch (ADEIException $ae) {
 
432
                    // DS: do we need another message about the problems?
 
433
                    $info = $this->ParsePostfix($postfix, "", true);
 
434
                }
426
435
                $info['incomplete'] = true;
427
436
                array_push($list, $info);
428
437
            }