From: <gem...@li...> - 2011-11-29 16:27:03
|
Revision: 315 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=315&view=rev Author: matijsdejong Date: 2011-11-29 16:26:57 +0000 (Tue, 29 Nov 2011) Log Message: ----------- Reverted changed, they removed the error, but did not solve the problem. The problem on deleting staff is something low level in JoinModel and I'm thinking about how to solve it. Modified Paths: -------------- branches/1.5.0-pulse/library/classes/MUtil/Model/JoinModel.php branches/1.5.0-pulse/library/configs/db/patches.sql Modified: branches/1.5.0-pulse/library/classes/MUtil/Model/JoinModel.php =================================================================== --- branches/1.5.0-pulse/library/classes/MUtil/Model/JoinModel.php 2011-11-29 14:55:15 UTC (rev 314) +++ branches/1.5.0-pulse/library/classes/MUtil/Model/JoinModel.php 2011-11-29 16:26:57 UTC (rev 315) @@ -175,6 +175,7 @@ $filter = $this->_checkFilterUsed($filter); if ($this->_deleteValues) { + // MUtil_Model::$verbose = true; $changed = $this->save($this->_deleteValues + $filter, $filter, $saveTables); } else { $changed = 0; @@ -255,8 +256,7 @@ $oldChanged = $this->getChanged(); - // MUtil_Echo::r($newValues, __CLASS__ . '->' . __FUNCTION__); - // MUtil_Echo::r($saveTables, __CLASS__ . '->' . __FUNCTION__); + // MUtil_Echo::track($newValues, $filter, $saveTables, $this->_joinFields); $oldValues = $newValues; foreach ($saveTables as $table_name) { @@ -265,6 +265,7 @@ // Use is_string as $target and $target can be e.g. a Zend_Db_Expr() object if (! (is_string($target) && isset($newValues[$target]) && $newValues[$target])) { if (! (is_string($source) && isset($newValues[$source]) && $newValues[$source])) { + // MUtil_Echo::track('Missing: ' . $source . ' -> ' . $target); continue; } $newValues[$target] = $newValues[$source]; @@ -276,8 +277,8 @@ //$this->_saveTableData returns the new row values, including any automatic changes. $newValues = $this->_saveTableData($this->_tables[$table_name], $newValues, $filter) + $oldValues; + // MUtil_Echo::track($oldValues, $newValues); $oldValues = $newValues; - // MUtil_Echo::r($newValues, 'JoinModel, after: ' . $table_name); } // If anything has changed, it counts as only one item for the user. Modified: branches/1.5.0-pulse/library/configs/db/patches.sql =================================================================== --- branches/1.5.0-pulse/library/configs/db/patches.sql 2011-11-29 14:55:15 UTC (rev 314) +++ branches/1.5.0-pulse/library/configs/db/patches.sql 2011-11-29 16:26:57 UTC (rev 315) @@ -353,7 +353,3 @@ grc_changed, grc_changed_by, grc_created, grc_created_by) VALUES ('stop', 'Stop surveys', 0, 2, 0, 0, 0, 0, 1, CURRENT_TIMESTAMP, 1, CURRENT_TIMESTAMP, 1); - --- PATCH: Defaults for non-null columns -ALTER TABLE `gems__user_logins` CHANGE `gul_login` `gul_login` varchar(30) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default ''; -ALTER TABLE `gems__user_logins` CHANGE `gul_id_organization` `gul_id_organization` bigint not null default 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |