From: <gem...@li...> - 2013-04-15 13:23:51
|
Revision: 1232 http://sourceforge.net/p/gemstracker/code/1232 Author: mennodekker Date: 2013-04-15 13:23:48 +0000 (Mon, 15 Apr 2013) Log Message: ----------- Cosmetic changes to batch export (init is a step too, show progress after first step) Removed debug statement in LimeSurvey source Modified Paths: -------------- trunk/library/classes/Gems/Default/ExportAction.php trunk/library/classes/Gems/Export/Excel.php trunk/library/classes/Gems/Export/ExportBatchInterface.php trunk/library/classes/Gems/Export/Spss.php trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php Modified: trunk/library/classes/Gems/Default/ExportAction.php =================================================================== --- trunk/library/classes/Gems/Default/ExportAction.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Default/ExportAction.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -327,8 +327,7 @@ $filter = $this->_getFilter($data); $language = $this->locale->getLanguage(); - $exportClass = $this->export->getExport($data['type']); - $exportClass->handleExportBatch($batch, $filter, $language, $data); + $batch->addTask('Export_ExportCommand', $data['type'], 'handleExportBatch', $filter, $language, $data); $batch->autoStart = true; } Modified: trunk/library/classes/Gems/Export/Excel.php =================================================================== --- trunk/library/classes/Gems/Export/Excel.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Export/Excel.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -122,7 +122,8 @@ * @param string $language The language used / to use for the export * @param array $data The formdata */ - public function handleExportBatch($batch, $filter, $language, $data) { + public function handleExportBatch($filter, $language, $data) { + $batch = $this->_batch; $survey = $this->loader->getTracker()->getSurvey($data['sid']); $answerCount = $survey->getRawTokenAnswerRowsCount($filter); $answers = $survey->getRawTokenAnswerRows(array('limit'=>1,'offset'=>1) + $filter); // Limit to one response Modified: trunk/library/classes/Gems/Export/ExportBatchInterface.php =================================================================== --- trunk/library/classes/Gems/Export/ExportBatchInterface.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Export/ExportBatchInterface.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -57,12 +57,11 @@ * of headers to set for the download and 'file' that holds the path to the * file relative to GEMS_ROOT_DIR . '/var/tmp/' * - * @param Gems_Task_TaskRunnerBatch $batch The batch to start * @param array $filter The filter to use * @param string $language The language used / to use for the export * @param array $data The formdata */ - public function handleExportBatch($batch, $filter, $language, $data); + public function handleExportBatch($filter, $language, $data); /** * Set the batch to be used by this source Modified: trunk/library/classes/Gems/Export/Spss.php =================================================================== --- trunk/library/classes/Gems/Export/Spss.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Export/Spss.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -153,8 +153,9 @@ * @param string $language The language used / to use for the export * @param array $data The formdata */ - public function handleExportBatch($batch, $filter, $language, $data) + public function handleExportBatch($filter, $language, $data) { + $batch = $this->_batch; $survey = $this->loader->getTracker()->getSurvey($data['sid']); $answerCount = $survey->getRawTokenAnswerRowsCount($filter); $answers = $survey->getRawTokenAnswerRows(array('limit'=>1,'offset'=>1) + $filter); // Limit to one response Modified: trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php =================================================================== --- trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -883,7 +883,6 @@ $select = $this->getRawTokenAnswerRowsSelect($filter, $surveyId, $sourceSurveyId); $p = new Zend_Paginator_Adapter_DbSelect($select); - MUtil_Echo::track($p->getCountSelect()->__toString()); $count = $p->getCountSelect()->query()->fetchColumn(); return $count; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |