Changeset 826 for temp


Ignore:
Timestamp:
2006/12/13 10:33:19 (19 years ago)
Author:
uehara
Message:
 
Location:
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/class
Files:
2 edited

Legend:

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

    r812 r826  
    126126 
    127127    // public static 
    128     function &getAllCommentByOptionId($option_id) 
     128    function &getAllCommentByOptionId($option_id, $limit_start, $limit_end) 
    129129    { 
    130130        $db =& Database::getInstance(); 
    131131        $ret = array(); 
    132         $sql = "SELECT u.uid, u.uname, l.rating_id, l.comment FROM ".$db->prefix("xoopspoll_log")." l LEFT JOIN ". $db->prefix("users") ." u  ON l.user_id = u.uid WHERE l.option_id=".intval($option_id)." ORDER BY time DESC"; 
     132        $sql = "SELECT u.uid, u.uname, l.rating_id, l.comment FROM ".$db->prefix("xoopspoll_log")." l LEFT JOIN ". $db->prefix("users") ." u  ON l.user_id = u.uid WHERE l.option_id=".intval($option_id)." ORDER BY time DESC  LIMIT $limit_start, $limit_end"; 
    133133        $result = $db->query($sql); 
    134134        while ( $myrow = $db->fetchArray($result) ) { 
  • temp/test-xoops.ec-cube.net/html/modules/xoopspoll/class/xoopspollrenderer.php

    r817 r826  
    173173    } 
    174174 
    175     function assignComment(&$tpl, $option_id) 
     175    function assignComment(&$tpl, $option_id, $limit_start, $limit_end) 
    176176    { 
    177         $arrComment =& XoopsPollOption::getAllCommentByOptionId($option_id); 
     177        $arrComment =& XoopsPollOption::getAllCommentByOptionId($option_id, $limit_start, $limit_end); 
     178        $count = $arrComment['count']; 
     179        array_pop($arrComment); 
    178180        $tpl->assign('arrComment', $arrComment); 
     181         
     182        return $count; 
    179183    } 
    180184 
Note: See TracChangeset for help on using the changeset viewer.