Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Joomla CMS [#27257] Fix a typo in the publish method of jtablenested.Originally identified i... #680

Merged
merged 4 commits into from Jan 2, 2012
@@ -872,7 +872,7 @@ public function store($updateNulls = false)
* not allow you to set a publishing state on a node with a checked out child.
*
* @param mixed $pks An optional array of primary key values to update. If not
- * set the instance property value is used.
+ * set the instance property value is used.
* @param integer $state The publishing state. eg. [0 = unpublished, 1 = published]
* @param integer $userId The user id of the user performing the operation.
*
@@ -974,7 +974,7 @@ public function publish($pks = null, $state = 1, $userId = 0)
// Update and cascade the publishing state.
$query = $this->_db->getQuery(true)->update($this->_db->quoteName($this->_tbl))->set('published = ' . (int) $state)
- ->where('(lft > ' . (int) $this->lft . ' AND rgt < ' . (int) $this->rgt . ')' . ' OR ' . $k . ' = ' . (int) $pk);
+ ->where('(lft > ' . (int) $node->lft . ' AND rgt < ' . (int) $node->rgt . ')' . ' OR ' . $k . ' = ' . (int) $pk);
$this->_db->setQuery($query);
// Check for a database error.