Update of /cvsroot/phpwebapp/web_app/database
In directory sc8-pr-cvs1:/tmp/cvs-serv29201/database
Modified Files:
class.PagedRS.php
Log Message:
Made PagedRS an editable RS (extending EditableRS).
Index: class.PagedRS.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/database/class.PagedRS.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** class.PagedRS.php 15 Sep 2003 09:37:53 -0000 1.8
--- class.PagedRS.php 24 Sep 2003 14:22:50 -0000 1.9
***************
*** 21,25 ****
! include_once DB_PATH."class.Recordset.php";
/**
--- 21,25 ----
! include_once DB_PATH."class.EditableRS.php";
/**
***************
*** 31,35 ****
* @package database
*/
! class PagedRS extends Recordset
{
/**
--- 31,35 ----
* @package database
*/
! class PagedRS extends EditableRS
{
/**
***************
*** 48,52 ****
function PagedRS($id, $query =UNDEFINED, $rp =UNDEFINED, $conn =UNDEFINED)
{
! $this->Recordset($id, $query, $conn);
$this->type = "PagedRS";
$this->recs_per_page = ($rp==UNDEFINED ? 0 : $rp);
--- 48,52 ----
function PagedRS($id, $query =UNDEFINED, $rp =UNDEFINED, $conn =UNDEFINED)
{
! $this->EditableRS($id, $query, $conn);
$this->type = "PagedRS";
$this->recs_per_page = ($rp==UNDEFINED ? 0 : $rp);
***************
*** 72,75 ****
--- 72,81 ----
function Open($cp =UNDEFINED, $conn =UNDEFINED)
{
+ if ($this->opened)
+ {
+ $this->MoveFirst();
+ return; //don't open it a second time
+ }
+
if ($cp==UNDEFINED)
{
***************
*** 101,104 ****
--- 107,111 ----
$this->count = count($result);
$this->pos = 0;
+ $this->opened = true;
}
|