/[drupal]/contributions/modules/aggregator2/aggregator2.module
ViewVC logotype

Diff of /contributions/modules/aggregator2/aggregator2.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.40, Wed Jul 19 17:49:03 2006 UTC revision 1.41, Thu Jul 20 10:39:53 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  /* $Id: aggregator2.module,v 1.39 2006/07/19 17:44:37 ahwayakchih Exp $ */  /* $Id: aggregator2.module,v 1.40 2006/07/19 17:49:03 ahwayakchih Exp $ */
3    
4  /**  /**
5   * @file   * @file
# Line 1873  function aggregator2_parse_items(&$xml_t Line 1873  function aggregator2_parse_items(&$xml_t
1873    // TODO: maybe select just those which will not be deleted? so update at the end of this funtion would have less nodes to update :)    // TODO: maybe select just those which will not be deleted? so update at the end of this funtion would have less nodes to update :)
1874    $promote_items = $feed->promoted_items;    $promote_items = $feed->promoted_items;
1875    $promoted = array();    $promoted = array();
1876    if ($promote_items != 1000000000) {    if ($promote_items != 1000000000 && $promote_items != 0) {
1877      $result = db_query('SELECT ai.nid AS nid FROM {node} n, {aggregator2_item} ai WHERE ai.fid = %d AND ai.nid = n.nid AND n.status = 1 ORDER BY n.created ASC', $feed->nid);      $result = db_query('SELECT ai.nid AS nid FROM {node} n, {aggregator2_item} ai WHERE ai.fid = %d AND ai.nid = n.nid AND n.status = 1 ORDER BY n.created ASC', $feed->nid);
1878      while ($temp = db_fetch_array($result)) {      while ($temp = db_fetch_array($result)) {
1879        $promoted[] = $temp['nid'];        $promoted[] = $temp['nid'];
# Line 2189  function aggregator2_parse_items(&$xml_t Line 2189  function aggregator2_parse_items(&$xml_t
2189    }    }
2190    
2191    // Now un-promote older items    // Now un-promote older items
2192    if ($promote_items != 1000000000) {    if ($promote_items != 1000000000 && $promote_items != 0) {
2193      $temp = array();      $temp = array();
2194      while (count($promoted) > $promote_items) {      while (count($promoted) > $promote_items) {
2195        $temp[] = array_shift($promoted);        $temp[] = array_shift($promoted);

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.2