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

Diff of /contributions/modules/metrics/metrics.module

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

revision 1.4, Mon Aug 20 18:52:19 2007 UTC revision 1.5, Mon Aug 20 18:58:56 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: metrics.module,v 1.3 2007/08/20 18:39:09 drewish Exp $  // $Id: metrics.module,v 1.4 2007/08/20 18:52:19 drewish Exp $
3    
4  /**  /**
5   * Implementation of hook_help().   * Implementation of hook_help().
# Line 326  function metrics_compute_property($prope Line 326  function metrics_compute_property($prope
326        }        }
327    
328        db_query("INSERT INTO {metrics_property_result} (property_id, nid, ranking_id, value, description, timestamp) VALUES (%d, %d, %d, %d, '%s', %d)", $property_id, $node->nid, $ranking_id, $total, $description, time());        db_query("INSERT INTO {metrics_property_result} (property_id, nid, ranking_id, value, description, timestamp) VALUES (%d, %d, %d, %d, '%s', %d)", $property_id, $node->nid, $ranking_id, $total, $description, time());
329        drupal_set_message(t("%property metrics was computed for %node (@score): @description", array('%property' => $property['name'], '%node' => $node->title, '@score' => $total, '@description' => $description)));  #      drupal_set_message(t("%property metrics was computed for %node (@score): @description", array('%property' => $property['name'], '%node' => $node->title, '@score' => $total, '@description' => $description)));
330        return $total;        return $total;
331      }      }
332    }    }
# Line 777  function metrics_metrics_form_submit($fo Line 777  function metrics_metrics_form_submit($fo
777      db_query("UPDATE {metrics_property_result} SET timestamp = 0 WHERE property_id = %d", $form_values['property_id']);      db_query("UPDATE {metrics_property_result} SET timestamp = 0 WHERE property_id = %d", $form_values['property_id']);
778      drupal_set_message(t('On the next cron run @count rows will need to be re-computed.', array('@count' => db_affected_rows())));      drupal_set_message(t('On the next cron run @count rows will need to be re-computed.', array('@count' => db_affected_rows())));
779    }    }
   
 //  return 'admin/content/metrics/'. $form_values['property_id'];  
780  }  }
781    
782    
# Line 885  function metrics_rankings_form_submit($f Line 883  function metrics_rankings_form_submit($f
883      db_query("UPDATE {metrics_property_result} SET timestamp = 0 WHERE property_id = %d", $form_values['property_id']);      db_query("UPDATE {metrics_property_result} SET timestamp = 0 WHERE property_id = %d", $form_values['property_id']);
884      drupal_set_message(t('On the next cron run @count rows will need to be re-computed.', array('@count' => db_affected_rows())));      drupal_set_message(t('On the next cron run @count rows will need to be re-computed.', array('@count' => db_affected_rows())));
885    }    }
   
 //  return 'admin/content/metrics/'. $form_values['property_id'];  
886  }  }
887    
888    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.2