Loading feeds_log.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -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 feeds_log.module +12 −6 Original line number Diff line number Diff line Loading @@ -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){ Loading @@ -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(); } } Loading src/Controller/ItemLogListController.php +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
feeds_log.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -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
feeds_log.module +12 −6 Original line number Diff line number Diff line Loading @@ -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){ Loading @@ -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(); } } Loading
src/Controller/ItemLogListController.php +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading