[Phpslash-commit] CVS: phpslash-ft/class Author.class,1.30,1.31 slashAuthCR.class,1.28,1.29
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2002-10-28 22:30:22
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv13467/phpslash-ft/class Modified Files: Author.class slashAuthCR.class Log Message: remember user options Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Author.class 28 Oct 2002 21:41:14 -0000 1.30 --- Author.class 28 Oct 2002 22:30:19 -0000 1.31 *************** *** 285,289 **** function saveProfile($ary) { ! global $auth; if ($ary['author_name'] == "") { --- 285,289 ---- function saveProfile($ary) { ! global $auth, $HTTP_COOKIE_VARS; if ($ary['author_name'] == "") { *************** *** 317,321 **** } ! $serial_opts=addslashes(serialize($author_options_ary)); --- 317,332 ---- } ! if(!empty($ary['loggedoutprefs'])) { ! debug("yes", $ary['loggedoutprefs']); ! $preferences['skin'] = $ary['skin']; ! $cookie_ary['preferences'] = $preferences; ! setcookie( 'user_info', base64_encode(serialize($cookie_ary)), time()+31536000,$this->psl['rooturl'] , "" , ""); ! ! } elseif(!empty($HTTP_COOKIE_VARS['user_info']['preferences'])) { ! setcookie( 'user_info', '', time()-31536000, $this->psl['rooturl'], "", ""); ! $HTTP_COOKIE_VARS['user_info'] = ''; ! ! } ! $serial_opts=addslashes(serialize($author_options_ary)); Index: slashAuthCR.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashAuthCR.class,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** slashAuthCR.class 28 Oct 2002 21:41:14 -0000 1.28 --- slashAuthCR.class 28 Oct 2002 22:30:19 -0000 1.29 *************** *** 124,127 **** --- 124,130 ---- if ($this->db->num_rows() == 0) { + if(!empty($cookie_ary['preferences'])) { + $this->auth['preferences'] = $cookie_ary['preferences']; + } return false; } *************** *** 140,144 **** $this->auth["perm"] = $this->get_userperms($uid); return $uid; ! } else { // preauth failed // debug("preauth", "failed"); --- 143,147 ---- $this->auth["perm"] = $this->get_userperms($uid); return $uid; ! } else { // preauth failed // debug("preauth", "failed"); |