Revision: 547
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=547&view=rev
Author: mennodekker
Date: 2012-03-12 14:29:58 +0000 (Mon, 12 Mar 2012)
Log Message:
-----------
Cleanup (addSyncronizeSurveyCommands was moved to the synchronizeSurveys)
Modified Paths:
--------------
trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php
Modified: trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2012-03-12 12:15:27 UTC (rev 546)
+++ trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2012-03-12 14:29:58 UTC (rev 547)
@@ -329,40 +329,6 @@
}
/**
- * Add the commands to update this source to a source synchornization batch
- *
- * @param Gems_Tracker_Batch_SynchronizeSourcesBatch $batch
- * @param int $userId Id of the user who takes the action (for logging)
- */
- public function addSynchronizeSurveyCommands(Gems_Tracker_Batch_SynchronizeSourcesBatch $batch, $userId)
- {
- // Surveys in LS
- $lsDb = $this->getSourceDatabase();
- $select = $lsDb->select();
- $select->from($this->_getSurveysTableName(), 'sid')
- ->order('sid');
- $lsSurveys = $lsDb->fetchCol($select);
- $lsSurveys = array_combine($lsSurveys, $lsSurveys);
-
- // Surveys in Gems
- $gemsSurveys = $this->_getGemsSurveysForSynchronisation();
-
- foreach ($gemsSurveys as $surveyId => $sourceSurveyId) {
- if (isset($lsSurveys[$sourceSurveyId])) {
- $batch->addSourceFunction('checkSurvey', $sourceSurveyId, $surveyId, $userId);
- } else {
- $batch->addSourceFunction('checkSurvey', null, $surveyId, $userId);
- }
- $batch->addToSurveyCounter();
- }
-
- foreach (array_diff($lsSurveys, $gemsSurveys) as $sourceSurveyId) {
- $batch->addSourceFunction('checkSurvey', $sourceSurveyId, null, $userId);
- $batch->addToSurveyCounter();
- }
- }
-
- /**
* Check if the tableprefix exists in the source database, and change the status of this
* adapter in the gems_sources table accordingly
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|