Browse Source

Fixed issue with double prefixed shadow tables

Jan Rio Krause 11 years ago
parent
commit
71d2e0eb1b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Model/Behavior/RevisionBehavior.php

+ 2 - 2
Model/Behavior/RevisionBehavior.php

@@ -971,10 +971,10 @@ class RevisionBehavior extends ModelBehavior {
 		}
 		$shadowModel = $this->settings[$Model->alias]['model'];
 		if ($shadowModel) {
-			$options = array('class' => $shadowModel, 'table' => $fullTableName, 'ds' => $dbConfig);
+			$options = array('class' => $shadowModel, 'table' => $shadowTable, 'ds' => $dbConfig);
 			$Model->ShadowModel = ClassRegistry::init($options);
 		} else {
-			$Model->ShadowModel = new Model(false, $fullTableName, $dbConfig);
+			$Model->ShadowModel = new Model(false, $shadowTable, $dbConfig);
 		}
 		if ($Model->tablePrefix) {
 			$Model->ShadowModel->tablePrefix = $Model->tablePrefix;