From: <var...@us...> - 2010-03-04 12:39:13
|
Revision: 7304 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7304&view=rev Author: vargenau Date: 2010-03-04 12:39:07 +0000 (Thu, 04 Mar 2010) Log Message: ----------- Check _HomePagehandle is set (avoid PHP5 warning) Modified Paths: -------------- trunk/lib/WikiUser/PearDb.php Modified: trunk/lib/WikiUser/PearDb.php =================================================================== --- trunk/lib/WikiUser/PearDb.php 2010-03-04 12:17:14 UTC (rev 7303) +++ trunk/lib/WikiUser/PearDb.php 2010-03-04 12:39:07 UTC (rev 7304) @@ -51,7 +51,7 @@ return $this->_prefs; } } - if (isset($this->_HomePagehandle)) { + if (isset($this->_HomePagehandle) && $this->_HomePagehandle) { if ($restored_from_page = $this->_prefs->retrieve ($this->_HomePagehandle->get('pref'))) { $updated = $this->_prefs->updatePrefs($restored_from_page); @@ -94,11 +94,11 @@ $dbh->quote($packed), $dbh->quote($this->_userid))); } //delete pageprefs: - if ($this->_HomePagehandle and $this->_HomePagehandle->get('pref')) + if (isset($this->_HomePagehandle) && $this->_HomePagehandle and $this->_HomePagehandle->get('pref')) $this->_HomePagehandle->set('pref', ''); } else { //store prefs in homepage, not in cookie - if ($this->_HomePagehandle and !$id_only) + if (isset($this->_HomePagehandle) && $this->_HomePagehandle and !$id_only) $this->_HomePagehandle->set('pref', $packed); } return $count; //count($this->_prefs->unpack($packed)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-09 17:24:40
|
Revision: 9291 http://sourceforge.net/p/phpwiki/code/9291 Author: vargenau Date: 2014-11-09 17:24:37 +0000 (Sun, 09 Nov 2014) Log Message: ----------- Add braces Modified Paths: -------------- trunk/lib/WikiUser/PearDb.php Modified: trunk/lib/WikiUser/PearDb.php =================================================================== --- trunk/lib/WikiUser/PearDb.php 2014-11-09 17:21:10 UTC (rev 9290) +++ trunk/lib/WikiUser/PearDb.php 2014-11-09 17:24:37 UTC (rev 9291) @@ -37,11 +37,13 @@ { //global $DBAuthParams; if (!$this->_prefs and is_a($this, "_PearDbPassUser")) { - if ($prefs) $this->_prefs = $prefs; + if ($prefs) { + $this->_prefs = $prefs; + } } - if (!isset($this->_prefs->_method)) + if (!isset($this->_prefs->_method)) { _PassUser::_PassUser($UserName); - elseif (!$this->isValidName($UserName)) { + } elseif (!$this->isValidName($UserName)) { trigger_error(_("Invalid username."), E_USER_WARNING); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2017-08-10 15:46:33
|
Revision: 10031 http://sourceforge.net/p/phpwiki/code/10031 Author: vargenau Date: 2017-08-10 15:46:30 +0000 (Thu, 10 Aug 2017) Log Message: ----------- Remove commented code Modified Paths: -------------- trunk/lib/WikiUser/PearDb.php Modified: trunk/lib/WikiUser/PearDb.php =================================================================== --- trunk/lib/WikiUser/PearDb.php 2017-08-10 15:44:36 UTC (rev 10030) +++ trunk/lib/WikiUser/PearDb.php 2017-08-10 15:46:30 UTC (rev 10031) @@ -98,11 +98,6 @@ // if the prefs are changed if ($count = _AnonUser::setPreferences($prefs, 1)) { - //global $request; - //$user = $request->_user; - //unset($user->_auth_dbi); - // this must be done in $request->_setUser, not here! - //$request->setSessionVar('wiki_user', $user); $this->getAuthDbh(); $packed = $this->_prefs->store(); if (!$id_only and isset($this->_prefs->_update)) { @@ -134,7 +129,7 @@ if (isset($this->_HomePagehandle) && $this->_HomePagehandle and !$id_only) $this->_HomePagehandle->set('pref', $packed); } - return $count; //count($this->_prefs->unpack($packed)); + return $count; } return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |