Update of /cvsroot/phpslash/phpslash-ft/class
In directory usw-pr-cvs1:/tmp/cvs-serv26573/phpslash-ft/class
Modified Files:
slashAuthCR.class Author.class
Log Message:
existing user login
Index: slashAuthCR.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/slashAuthCR.class,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** slashAuthCR.class 23 May 2002 20:38:44 -0000 1.12
--- slashAuthCR.class 24 May 2002 15:25:16 -0000 1.13
***************
*** 208,212 ****
}
// may need to get legacy records
! // $this->auth["perm"] = $this->db->Record["perms"];
$this->auth["perm"] = $this->get_userperms( $uid);
--- 208,212 ----
}
// may need to get legacy records
! $this->auth["perm"] = $this->db->Record["perms"];
$this->auth["perm"] = $this->get_userperms( $uid);
Index: Author.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Author.class 23 May 2002 20:38:44 -0000 1.21
--- Author.class 24 May 2002 15:25:16 -0000 1.22
***************
*** 437,441 ****
$author_id = $this->db->Record['author_id'];
// $author_perms = $this->db->Record['perms'];
! $this->author_templ->set_block("newauthor","perm_row","perm_rows");
$this->author_templ->set_block("newauthor","permhave_row","permhave_rows");
--- 437,442 ----
$author_id = $this->db->Record['author_id'];
// $author_perms = $this->db->Record['perms'];
! $tauthor_perms = explode(',',$this->db->Record['perms'] );
! $this->author_templ->set_block("newauthor","perm_row","perm_rows");
$this->author_templ->set_block("newauthor","permhave_row","permhave_rows");
***************
*** 465,475 ****
// debug("q", $q);
$this->db->query($q);
! // $i = 0;
!
while ($this->db->next_record()) {
$author_perms[$this->db->Record['group_name']] = $this->db->Record['group_id'];
! // $i++;
}
while(list($k, $v) = each($allperms_ary)) {
if(is_array($v)) {
--- 466,487 ----
// debug("q", $q);
$this->db->query($q);
!
! $i = 0;
while ($this->db->next_record()) {
$author_perms[$this->db->Record['group_name']] = $this->db->Record['group_id'];
! $i++;
}
+ // read in legacy records
+
+ if($i == 0) {
+ //debug("this->db->Record[perms]", $this->db->Record['perms']);
+ //$tauthor_perms = explode(',',$this->db->Record['perms'] );
+ debug ("tauthor_perms", $tauthor_perms);
+ while(list($k, $v) = each($tauthor_perms)) {
+ $author_perms[$v] = true;
+ }
+ }
+ debug ("author_perms", $author_perms);
while(list($k, $v) = each($allperms_ary)) {
if(is_array($v)) {
|