Commit 52fb373b authored by Julian Pustkuchen's avatar Julian Pustkuchen
Browse files

Issue #3147460 by Project Update Bot, Anybody: Automated Drupal 9 compatibility fixes

parent 784c7a43
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
name: 'Feeds Log'
description: Feeds Unimpotred Reocrds Log.
type: module
core: 8.x
core_version_requirement: ^8 || ^9
package: Feeds
dependencies:
  - feeds
+12 −6
Original line number Diff line number Diff line
@@ -86,10 +86,12 @@ function feeds_log_unimported_record($entity, $feed){
    $arrFields = array(
      'fid' => (!empty($feed->id())) ? $feed->id() : '',
      'label' => (!empty($label)) ? trim($label) : '',
      'imported' => REQUEST_TIME,
      'imported' => \Drupal::time()->getRequestTime(),
      'message' => (!empty($msg)) ? trim($msg) : '',
    );
    db_insert('feeds_log')->fields($arrFields)->execute();
    // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
    // You will need to use `\Drupal\core\Database\Database::getConnection()` if you do not yet have access to the container here.
    \Drupal::database()->insert('feeds_log')->fields($arrFields)->execute();
}

function feeds_log_delete_multiple_log($feedsEntity){
@@ -98,13 +100,17 @@ function feeds_log_delete_multiple_log($feedsEntity){
    foreach($feedsEntity as $strVal){
        $arrFid[] = $strVal->fid->value;
    }
    db_delete('feeds_log')->condition('fid',$arrFid,'IN')->execute();
    // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
    // You will need to use `\Drupal\core\Database\Database::getConnection()` if you do not yet have access to the container here.
    \Drupal::database()->delete('feeds_log')->condition('fid',$arrFid,'IN')->execute();
  }
}

function feeds_log_delete_log($feedId){
  if(!empty($feedId)){
    db_delete('feeds_log')->condition('fid',$feedId)->execute();
    // TODO: Drupal Rector Notice: Please delete the following comment after you've made any necessary changes.
    // You will need to use `\Drupal\core\Database\Database::getConnection()` if you do not yet have access to the container here.
    \Drupal::database()->delete('feeds_log')->condition('fid',$feedId)->execute();
  }
}

+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ class ItemLogListController extends ControllerBase {
    $query->orderBy('fl.imported', 'DESC');
    $result = $query->execute()->fetchAll();
    foreach($result as $row => $value) {
      $ago = \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $value->imported);
      $ago = \Drupal::service('date.formatter')->formatInterval(\Drupal::time()->getRequestTime() - $value->imported);
      $row = [];
      // Entity link.
      $row[] = $this->t($value->label);