44 protected function outputRecord($headers, $values, FormattingOptions $oOptions, $fieldNames = []) 45 { 46 $sRecord = ''; 47 if (!empty($oOptions->csvFieldSeparator)) { 48 $this->separator = $oOptions->csvFieldSeparator; 49 } 50 if (!$this->hasOutputHeader) { 51 if ($oOptions->output == 'display') { 52 header("Content-Disposition: attachment; filename=" . $this->csvFilename); 53 header("Content-type: text/comma-separated-values; charset=UTF-8"); 54 echo chr(239) . chr(187) . chr(191); 55 } else { 56 fwrite($this->file, chr(239) . chr(187) . chr(191)); // Write UTF-8 Byte Order Mark (BOM) 57 } 58 59 // If we don't want headers in our csv, for example in exports like r/spss etc. we suppress the header by setting this switch in the init 60 if ($this->doHeaders === true) { 61 $index = 0; 62 foreach ($headers as $header) { 63 $headers[$index] = $this->csvEscape($header); 64 $index++; 65 } 66 //Output the header...once and only once. 67 $sRecord .= implode($this->separator, $headers) . "\r\n"; 68 }
| #0 |
+
–
51 if ($oOptions->output == 'display') { 52 header("Content-Disposition: attachment; filename=" . $this->csvFilename); 53 header("Content-type: text/comma-separated-values; charset=UTF-8"); 54 echo chr(239) . chr(187) . chr(191); 55 } else { 56 fwrite($this->file, chr(239) . chr(187) . chr(191)); // Write UTF-8 Byte Order Mark (BOM) 57 } 58 59 // If we don't want headers in our csv, for example in exports like r/spss etc. we suppress the header by setting this switch in the init 60 if ($this->doHeaders === true) { 61 $index = 0; |
| #1 |
+
–
336 } 337 } 338 if ($oOptions->output == 'display') { 339 $this->outputRecord($headers, $elementArray, $oOptions, $fieldNames); 340 } else { 341 $sFile .= $this->outputRecord($headers, $elementArray, $oOptions, $fieldNames); 342 } 343 } 344 return $sFile; 345 } 346 |
| #2 |
+
–
114 $offset = $i * $maxRows; 115 $responsesQuery = $surveyDao->loadSurveyResults($survey, $oOptions->responseMinRecord, $oOptions->responseMaxRecord, $sFilter, $oOptions->responseCompletionState, $oOptions->selectedColumns, $oOptions->aResponses); 116 $responsesQuery->offset($offset); 117 $responsesQuery->limit($maxRows); 118 $survey->responses = $responsesQuery->query(); 119 $writer->write($survey, $sLanguageCode, $oOptions, true); 120 } 121 $result = $writer->close(); 122 123 // Close resultset if needed 124 if ($survey->responses instanceof CDbDataReader) { |
| #3 |
+
–
3771 $oFormattingOptions->headingFormat = $sHeadingType; 3772 $oFormattingOptions->answerFormat = $sResponseType; 3773 $oFormattingOptions->output = 'file'; 3774 3775 $oExport = new ExportSurveyResultsService(); 3776 $sTempFile = $oExport->exportResponses($iSurveyID, $sLanguageCode, $sDocumentType, $oFormattingOptions, ''); 3777 return new BigFile($sTempFile, true, 'base64'); 3778 } 3779 3780 /** 3781 * Export token response in a survey. |
| #4 |
+
–
32 'result' => null, 33 'error' => sprintf('unable to decode malformed json') 34 ); 35 } else { 36 try { 37 $result = @call_user_func_array(array($object, $request['method']), $request['params']); 38 if ($result !== false) { 39 $response = array( 40 'id' => $request['id'], 41 'result' => $result, 42 'error' => null |
| #5 |
+
–
58 Yii::app()->loadLibrary('LSjsonRPCServer'); 59 if (!isset($_SERVER['CONTENT_TYPE'])) { 60 $serverContentType = explode(';', (string) $_SERVER['HTTP_CONTENT_TYPE']); 61 $_SERVER['CONTENT_TYPE'] = reset($serverContentType); 62 } 63 LSjsonRPCServer::handle($oHandler); 64 } 65 foreach (App()->log->routes as $route) { 66 $route->enabled = $route->enabled && !($route instanceof CWebLogRoute); 67 } 68 Yii::app()->session->destroy(); |
| #6 |
unknown(0): RemoteControl->run()
|
| #7 |
+
–
109 elseif($param->isDefaultValueAvailable()) 110 $ps[]=$param->getDefaultValue(); 111 else 112 return false; 113 } 114 $method->invokeArgs($object,$ps); 115 return true; 116 } 117 } |
| #8 |
+
–
81 $oMethod = new ReflectionMethod($this, $sDefault); 82 } 83 84 // We're all good to go, let's execute it 85 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params 86 return parent::runWithParamsInternal($this, $oMethod, $params); 87 } 88 89 /** 90 * Some functions have different parameters, which are just an alias of the 91 * usual parameters we're getting in the url. This function just populates |
| #9 |
+
–
303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
| #10 |
+
–
281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
| #11 |
+
–
260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
| #12 |
+
–
198 $this->runModuleController($action); 199 // this will redirect the default action to the new controller previously "admin/index" or "admin" to "dashboard/view" 200 if (empty($action) || $action === 'index') { 201 $this->redirect($this->createUrl('dashboard/view')); 202 } 203 return parent::run($action); 204 } 205 206 /** 207 * Starting with LS4, 3rd party developer can extends any of the LimeSurve controllers. 208 * |
| #13 |
+
–
277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
| #14 |
+
–
136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
| #15 |
+
–
180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
| #16 |
+
–
156 require_once APPPATH . 'core/LSYii_Application' . EXT; 157 158 $config = require_once(APPPATH . 'config/internal' . EXT); 159 160 Yii::$enableIncludePath = false; 161 Yii::createApplication('LSYii_Application', $config)->run(); 162 163 /* End of file index.php */ 164 /* Location: ./index.php */ |