Update of /cvsroot/xoops/xoops2/class
In directory sc8-pr-cvs1:/tmp/cvs-serv17192/class
Modified Files:
xoopsblock.php xoopscomments.php
Log Message:
added assignvar() and assignVars() to XoopsObject and its child classes
Index: xoopsblock.php
===================================================================
RCS file: /cvsroot/xoops/xoops2/class/xoopsblock.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** xoopsblock.php 5 Jan 2003 13:55:47 -0000 1.2
--- xoopsblock.php 5 Jan 2003 18:25:18 -0000 1.3
***************
*** 65,69 ****
if ( !empty($id) ) {
if ( is_array($id) ) {
! $this->setVars($id, false);
} else {
$this->load(intval($id));
--- 65,69 ----
if ( !empty($id) ) {
if ( is_array($id) ) {
! $this->assignVars($id);
} else {
$this->load(intval($id));
***************
*** 76,80 ****
$sql = 'SELECT * FROM '.$this->db->prefix('newblocks').' WHERE bid = '.$id;
$arr = $this->db->fetchArray($this->db->query($sql));
! $this->setVars($arr, false);
}
--- 76,80 ----
$sql = 'SELECT * FROM '.$this->db->prefix('newblocks').' WHERE bid = '.$id;
$arr = $this->db->fetchArray($this->db->query($sql));
! $this->assignVars($arr);
}
Index: xoopscomments.php
===================================================================
RCS file: /cvsroot/xoops/xoops2/class/xoopscomments.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** xoopscomments.php 5 Jan 2003 13:55:47 -0000 1.2
--- xoopscomments.php 5 Jan 2003 18:25:18 -0000 1.3
***************
*** 61,65 ****
if ( !empty($id) ) {
if ( is_array($id) ) {
! $this->setVars($id, false);
} else {
$this->load(intval($id));
--- 61,65 ----
if ( !empty($id) ) {
if ( is_array($id) ) {
! $this->assignVars($id);
} else {
$this->load(intval($id));
***************
*** 72,76 ****
$sql = "SELECT * FROM ".$this->ctable." WHERE comment_id=".$id."";
$arr = $this->db->fetchArray($this->db->query($sql));
! $this->setVars($arr, false);
}
--- 72,76 ----
$sql = "SELECT * FROM ".$this->ctable." WHERE comment_id=".$id."";
$arr = $this->db->fetchArray($this->db->query($sql));
! $this->assignVars($arr);
}
|