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

Diff of /contributions/modules/votingapi/votingapi.module

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

revision 1.46.2.23.2.3, Mon Jul 20 22:24:45 2009 UTC revision 1.46.2.23.2.4, Tue Jul 21 03:54:12 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: votingapi.module,v 1.46.2.23.2.2 2009/07/20 16:16:35 eaton Exp $  // $Id: votingapi.module,v 1.46.2.23.2.3 2009/07/20 22:24:45 eaton Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 514  function _votingapi_get_standard_results Line 514  function _votingapi_get_standard_results
514   * Retrieve the value of the first vote matching the criteria passed in.   * Retrieve the value of the first vote matching the criteria passed in.
515   */   */
516  function votingapi_select_single_vote_value($criteria = array()) {  function votingapi_select_single_vote_value($criteria = array()) {
517    if ($votes = votingapi_select_votes($criteria)) {    foreach (votingapi_select_votes($criteria) as $vote) {
518      return $votes[0]['value'];      return $vote['value'];
519    }    }
520  }  }
521    
# Line 523  function votingapi_select_single_vote_va Line 523  function votingapi_select_single_vote_va
523   * Retrieve the value of the first result matching the criteria passed in.   * Retrieve the value of the first result matching the criteria passed in.
524   */   */
525  function votingapi_select_single_result_value($criteria = array()) {  function votingapi_select_single_result_value($criteria = array()) {
526    if ($results = votingapi_select_results($criteria)) {    foreach (votingapi_select_results($criteria) as $result) {
527      return $results[0]['value'];      return $result['value'];
528    }    }
529  }  }
530    

Legend:
Removed from v.1.46.2.23.2.3  
changed lines
  Added in v.1.46.2.23.2.4

  ViewVC Help
Powered by ViewVC 1.1.2