Projet

Général

Profil

Révision a192dc0b

Ajouté par Assos Assos il y a environ 8 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/feeds/feeds.module
634 634
  }
635 635
  $last_title = NULL;
636 636
  $last_feeds = NULL;
637

  
638
  // Update "changed" value if there was mapped to that.
639
  if (isset($node->feeds_item->node_changed)) {
640
    $node->changed = $node->feeds_item->node_changed;
641
  }
637 642
}
638 643

  
639 644
/**
......
830 835
 * Implements hook_flush_caches().
831 836
 */
832 837
function feeds_flush_caches() {
833
  return array('cache_feeds_http');
838
  // The update to add the table needs to have run. Taken from
839
  // https://www.drupal.org/node/2511858
840
  include_once DRUPAL_ROOT . '/includes/install.inc';
841

  
842
  if (drupal_get_installed_schema_version('feeds') >= 7212) {
843
    return array('cache_feeds_http');
844
  }
845
  return array();
834 846
}
835 847

  
836 848
/**
......
864 876
        $feeds[$config->id] = feeds_importer($config->id);
865 877
      }
866 878
    }
879
    uasort($feeds, 'feeds_importer_name_sort');
867 880
  }
868 881
  return $feeds;
869 882
}
870 883

  
884
/**
885
 * Sorts importers by name.
886
 *
887
 * Callback for uasort().
888
 *
889
 * @param FeedsImporter $a
890
 *   The first FeedsImporter for comparison.
891
 * @param FeedsImporter $b
892
 *   The second FeedsImporter for comparison.
893
 *
894
 * @return int
895
 *   The comparison result for uasort().
896
 */
897
function feeds_importer_name_sort(FeedsImporter $a, FeedsImporter $b) {
898
  return strcasecmp($a->config['name'], $b->config['name']);
899
}
900

  
871 901
/**
872 902
 * Gets an array of enabled importer ids.
873 903
 *

Formats disponibles : Unified diff