Commit b0b21e0f authored by Karl Denninger's avatar Karl Denninger

ZP-1284 Fix multiple variable issues with Changessink code. Released under...

ZP-1284 Fix multiple variable issues with Changessink code.  Released under the Affero GNU General Public License (AGPL) version 3.
parent d6bb4fac
...@@ -486,8 +486,8 @@ class BackendStickyNote extends BackendDiff { ...@@ -486,8 +486,8 @@ class BackendStickyNote extends BackendDiff {
*/ */
public function ChangesSinkInitialize($folderid) { public function ChangesSinkInitialize($folderid) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendStickyNote->ChangesSinkInitialize(): folderid '%s'", $folderid)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendStickyNote->ChangesSinkInitialize(): folderid '%s'", $folderid));
$this->changessinkinit = true; $this->_changessinkinit = true;
return $this->changessinkinit; return $this->_changessinkinit;
} }
/* /*
...@@ -506,10 +506,10 @@ class BackendStickyNote extends BackendDiff { ...@@ -506,10 +506,10 @@ class BackendStickyNote extends BackendDiff {
// Apparently this can get called before we've initialized, which in // Apparently this can get called before we've initialized, which in
// our case wouldn't matter, but for consistency return nothing if // our case wouldn't matter, but for consistency return nothing if
// that happens - or if it gets called before the database is connected. // that happens - or if it gets called before the database is connected.
if ((!$this->changessinkinit) || ($this->_dbconn == false)) { if ((!$this->_changessinkinit) || ($this->_dbconn == false)) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendStickyNote->ChangesSink - Not initialized ChangesSink, sleep and exit")); ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendStickyNote->ChangesSink - Not initialized ChangesSink, sleep and exit"));
sleep($timeout); sleep($timeout);
return $notifications; return $_notifications;
} }
$_param = array(); $_param = array();
array_push($_param, $_user, $_domain); array_push($_param, $_user, $_domain);
...@@ -523,7 +523,7 @@ class BackendStickyNote extends BackendDiff { ...@@ -523,7 +523,7 @@ class BackendStickyNote extends BackendDiff {
if ($_lastchange != $this->_sinkdata) { if ($_lastchange != $this->_sinkdata) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendStickyNote->ChangesSink(Change noted; tell the upper layers)")); ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendStickyNote->ChangesSink(Change noted; tell the upper layers)"));
array_push($_notifications, "N"); array_push($_notifications, "N");
$this->sinkdata = $_lastchange; $this->_sinkdata = $_lastchange;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment