Permalink
Browse files

Fix view changeset handling

  • Loading branch information...
1 parent c7af145 commit 31de856c80cc0d2a75c878983ab1dd46c86c0fbb @iarna iarna committed Mar 21, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 Modyllic/Diff.php
View
@@ -116,6 +116,7 @@ private function calculate_changeset() {
}
$fromview = $this->from->views[$name];
if ( ! $toview->equalTo($fromview) ) {
+ $toview->from = $fromview;
$this->changeset->update_view( $toview );
}
}
@@ -395,6 +396,27 @@ function update_table( $table ) {
}
/**
+ * @param Modyllic_View $view
+ */
+ function add_view( $view ) {
+ $this->add['views'][$view->name] = $view;
+ }
+
+ /**
+ * @param Modyllic_View_Changeset $view
+ */
+ function update_view( $view ) {
+ $this->update['views'][$view->name] = $view;
+ }
+
+ /**
+ * @param Modyllic_View $view
+ */
+ function remove_view( $view ) {
+ $this->remove['views'][$view->name] = $view;
+ }
+
+ /**
* Note that a routine was added
* @param Modyllic_Routine $routine
*/

0 comments on commit 31de856

Please sign in to comment.