Update of /cvsroot/openbash-org/openbash-org/modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31936
Modified Files:
Quote.php
Log Message:
Puestos algunos valores por defecto en la los límites de los SELECT de la base de datos en los parámetros
que se pasan a las funciones. Quizá habría que poner esto en la configuración. De momento he puesto 50.
Index: Quote.php
===================================================================
RCS file: /cvsroot/openbash-org/openbash-org/modules/Quote.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Quote.php 25 May 2005 07:22:41 -0000 1.22
--- Quote.php 28 Aug 2005 20:01:35 -0000 1.23
***************
*** 80,84 ****
}
! function get_quotes_by_id($order, $start, $end)
{
$sql = "SELECT id FROM quote WHERE deleted=0 AND pending=0 ORDER BY id $order LIMIT $start,$end";
--- 80,84 ----
}
! function get_quotes_by_id($order, $start = 0, $end = 50)
{
$sql = "SELECT id FROM quote WHERE deleted=0 AND pending=0 ORDER BY id $order LIMIT $start,$end";
***************
*** 98,105 ****
}
! function get_quotes_by_pending($start, $end)
{
- if (empty($start)) $start = 0;
- if (empty($end)) $end = 50;
$sql = "SELECT id FROM quote WHERE deleted=0 AND pending=1 ORDER BY id LIMIT $start,$end";
$ids = $this->bd->Execute($sql);
--- 98,103 ----
}
! function get_quotes_by_pending($start = 0, $end = 50)
{
$sql = "SELECT id FROM quote WHERE deleted=0 AND pending=1 ORDER BY id LIMIT $start,$end";
$ids = $this->bd->Execute($sql);
***************
*** 118,122 ****
}
! function get_quotes_by_top($top)
{
$sql = "SELECT id FROM quote WHERE deleted=0 AND pending=0 ORDER BY points DESC LIMIT $top";
--- 116,120 ----
}
! function get_quotes_by_top($top = 50)
{
$sql = "SELECT id FROM quote WHERE deleted=0 AND pending=0 ORDER BY points DESC LIMIT $top";
|