diff --git a/kernel/classes/ezcontentobjecttreenode.php b/kernel/classes/ezcontentobjecttreenode.php index e65076c37ce..16e3fac676c 100644 --- a/kernel/classes/ezcontentobjecttreenode.php +++ b/kernel/classes/ezcontentobjecttreenode.php @@ -3593,6 +3593,22 @@ function updatePathIdentificationString( $pathIdentificationName ) $pathIdentificationString = $pathIdentificationName; if ( $this->attribute( 'path_identification_string' ) != $pathIdentificationString ) { + $db = eZDB::instance(); + $db->query( + "UPDATE ezcontentobject_tree " . + "SET path_identification_string = " . + $db->concatString( + array( + "'" . $db->escapeString( $pathIdentificationString ) . "'", + $db->subString( + "path_identification_string", + mb_strlen( $this->attribute( 'path_identification_string' ) ) + 1 + ) + ) + ) . " " . + "WHERE path_string LIKE '{$this->attribute( 'path_string' )}_%'" + ); + $this->setAttribute( 'path_identification_string', $pathIdentificationString ); $this->sync(); } @@ -4199,6 +4215,16 @@ function move( $newParentNodeID, $nodeID = 0 ) $moveQuery1 = "UPDATE ezcontentobject_tree SET + path_identification_string = " . + $db->concatString( + array( + "'" . $db->escapeString( $newParentNode->PathIdentificationString ) . "'", + $db->subString( + "path_identification_string", + mb_strlen( $node->PathIdentificationString ) + 1 + ) + ) + ) . ", path_string = $newPathString, depth = depth + $newParentDepth - $oldDepth + 1 WHERE