Changeset 33405
- Timestamp:
- 04/13/12 19:35:54 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfSyncContentPlugin/trunk/lib/task/synccontentTask.class.php
r33312 r33405 43 43 new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name', 'frontend'), 44 44 new sfCommandOption('file', null, sfCommandOption::PARAMETER_REQUIRED, 'Your XML file of page data', null), 45 new sfCommandOption('pages', null, sfCommandOption::PARAMETER_REQUIRED, 'Directory of page xml files', null) 45 new sfCommandOption('pages', null, sfCommandOption::PARAMETER_REQUIRED, 'Directory of page xml files', null), 46 new sfCommandOption('gzip', null, sfCommandOption::PARAMETER_NONE, 'Use gzip', null) 46 47 // add your own options here 47 48 )); … … 92 93 $envRemote = $matches[1]; 93 94 $site = $matches[2]; 94 95 96 $gzip = ""; 97 $gunzip = ""; 98 if ($this->setOptions['gzip']) 99 { 100 $gzip = " | gzip "; 101 $gunzip = " | gunzip "; 102 } 103 95 104 $found = false; 96 105 foreach ($settings as $section => $data) … … 126 135 if ($direction == 'to') 127 136 { 128 $cmd = "$binary project:mysql-dump --application=$application --env=$env | " . $this->_content_sync_build_remote_cmd($pathRemote, "./symfony project:mysql-load --application=$application --env=$envRemote");137 $cmd = "$binary project:mysql-dump --application=$application --env=$env " . $gzip . " | " . $this->_content_sync_build_remote_cmd($pathRemote, " " . $gunzip . "| ./symfony project:mysql-load --application=$application --env=$envRemote"); 129 138 $this->_content_sync_system($cmd); 130 139 } 131 140 else 132 141 { 133 $cmd = $this->_content_sync_build_remote_cmd($pathRemote, "./symfony project:mysql-dump --application=$application --env=$envRemote "). " | $binary project:mysql-load --application=$application --env=$env";142 $cmd = $this->_content_sync_build_remote_cmd($pathRemote, "./symfony project:mysql-dump --application=$application --env=$envRemote " . $gzip) . " " . $gunzip . " | $binary project:mysql-load --application=$application --env=$env"; 134 143 $this->_content_sync_system($cmd); 135 144 }