Permalink
Browse files

Get indexation fix from develop branch

  • Loading branch information...
1 parent 82ad2a9 commit 4256e95dce01e6c96232a3f8f39b045a3838a812 @cdujeu cdujeu committed Jun 10, 2016
Showing with 5 additions and 2 deletions.
  1. +5 −2 core/src/plugins/meta.syncable/class.ChangesTracker.php
@@ -569,8 +569,11 @@ public function updateNodesIndex($oldNode = null, $newNode = null, $copy = false
$this->logDebug('UPDATE FOLDER PATH', $newNode->getUrl());
dibi::query("UPDATE [ajxp_index] SET [node_path]=REPLACE( REPLACE(CONCAT('$$$',[node_path]), CONCAT('$$$', %s), CONCAT('$$$', %s)) , '$$$', '') ",
TextEncoder::toUTF8($oldNode->getPath()),
- TextEncoder::toUTF8($newNode->getPath())
- , "WHERE [node_path] LIKE %like~ AND [repository_identifier] = %s", TextEncoder::toUTF8($oldNode->getPath()), $repoId);
+ TextEncoder::toUTF8($newNode->getPath()),
+ "WHERE ([node_path] = %s OR [node_path] LIKE %like~) AND [repository_identifier] = %s",
+ TextEncoder::toUTF8($oldNode->getPath()),
+ rtrim(TextEncoder::toUTF8($oldNode->getPath()), '/') . '/',
+ $repoId);
try{
$rowCount = dibi::getAffectedRows();
if($rowCount === 0){

0 comments on commit 4256e95

Please sign in to comment.