Changeset 678 for temp


Ignore:
Timestamp:
2006/12/11 14:03:52 (20 years ago)
Author:
uehara
Message:
 
Location:
temp/test-xoops.ec-cube.net/html/modules/xoopspoll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • temp/test-xoops.ec-cube.net/html/modules/xoopspoll/blocks/xoopspoll.php

    r405 r678  
    3737    $block['lang_results'] = _PL_RESULTS; 
    3838    for ($i = 0; $i < $count; $i++) { 
    39         $options_arr =& XoopsPollOption::getAllByPollId($polls[$i]->getVar('poll_id')); 
     39        $options_arr =& XoopsPollOption::getAllByPollId($polls[$i]->getVar('poll_id'), 3); 
    4040        $option_type = 'radio'; 
    4141        $option_name = 'option_id'; 
  • temp/test-xoops.ec-cube.net/html/modules/xoopspoll/class/xoopspolloption.php

    r677 r678  
    106106 
    107107    // public static 
    108     function &getAllByPollId($poll_id) 
     108    function &getAllByPollId($poll_id, $limit = 10) 
    109109    { 
    110110        $db =& Database::getInstance(); 
    111111        $ret = array(); 
    112         $sql = "SELECT * FROM ".$db->prefix("xoopspoll_option")." WHERE poll_id=".intval($poll_id)." ORDER BY option_count DESC LIMIT 0, 10"; 
     112        $sql = "SELECT * FROM ".$db->prefix("xoopspoll_option")." WHERE poll_id=".intval($poll_id)." ORDER BY option_count DESC LIMIT 0, $limit"; 
    113113        $result = $db->query($sql); 
    114114        while ( $myrow = $db->fetchArray($result) ) { 
Note: See TracChangeset for help on using the changeset viewer.