/mnt/data/shnoulle/nginx/www/master/framework/utils/CFileHelper.php(282)
270 * PHP extension is available. This parameter has been available since version 1.1.3. 271 * @param boolean $checkExtension whether to check the file extension in case the MIME type cannot be determined 272 * based on finfo and mime_content_type. Defaults to true. This parameter has been available since version 1.1.4. 273 * @return string the MIME type. Null is returned if the MIME type cannot be determined. 274 */ 275 public static function getMimeType($file,$magicFile=null,$checkExtension=true) 276 { 277 if(function_exists('finfo_open')) 278 { 279 $options=defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME; 280 $info=$magicFile===null ? finfo_open($options) : finfo_open($options,$magicFile); 281 282 if($info && ($result=finfo_file($info,$file))!==false) 283 return $result; 284 } 285 286 if(function_exists('mime_content_type') && ($result=mime_content_type($file))!==false) 287 return $result; 288 289 return $checkExtension ? self::getMimeTypeByExtension($file) : null; 290 } 291 292 /** 293 * Determines the MIME type based on the extension name of the specified file. 294 * This method will use a local map between extension name and MIME type.
#0 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/utils/CFileHelper.php(282): finfo_file(resource, "/mnt/data/shnoulle/nginx/www/master/upload/themes/question/inlin...") 277 if(function_exists('finfo_open')) 278 { 279 $options=defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME; 280 $info=$magicFile===null ? finfo_open($options) : finfo_open($options,$magicFile); 281 282 if($info && ($result=finfo_file($info,$file))!==false) 283 return $result; 284 } 285 286 if(function_exists('mime_content_type') && ($result=mime_content_type($file))!==false) 287 return $result; |
#1 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/core/LSYii_ImageValidator.php(46): CFileHelper::getMimeType("/mnt/data/shnoulle/nginx/www/master/upload/themes/question/inlin...") 41 42 /** @var array<string, mixed> */ 43 $result =[]; 44 45 /** @var ?? */ 46 $checkImage = CFileHelper::getMimeType($path); 47 $result['debug'] = $checkImage; 48 49 // TODO: Why hard-coded? 50 /** @var string[] */ 51 $allowedImageFormats = array( |
#2 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/models/QuestionTemplate.php(428): LSYii_ImageValidator::validateImage("/mnt/data/shnoulle/nginx/www/master/upload/themes/question/inlin...") 423 $aQuestionTemplates[$file]['title'] = $templateName; 424 } 425 if (!empty($oConfig->files->preview->filename)){ 426 $fileName = json_decode(json_encode($oConfig->files->preview->filename), TRUE)[0]; 427 $previewPath = $sFullPathToQuestionTemplate."/assets/".$fileName; 428 $check = LSYii_ImageValidator::validateImage($previewPath); 429 if(is_file($previewPath) && $check['check']) { 430 $aQuestionTemplates[$file]['preview'] = App()->getAssetManager()->publish($previewPath); 431 } else { 432 /* Log it a theme.question.$oConfig->name as error, review ? */ 433 Yii::log("Unable to use $fileName for preview in $sFullPathToQuestionTemplate/assets/",'error','theme.question.'.$oConfig->metadata->name); |
#3 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/models/QuestionTemplate.php(386): QuestionTemplate::getQuestionTemplateUserList("L") 381 * @param string $type 382 * @return array 383 */ 384 static public function getQuestionTemplateList($type) 385 { 386 $aUserQuestionTemplates = self::getQuestionTemplateUserList($type); 387 $aCoreQuestionTemplates = self::getQuestionTemplateCoreList($type); 388 $aQuestionTemplates = array_merge($aUserQuestionTemplates, $aCoreQuestionTemplates); 389 return $aQuestionTemplates; 390 } 391 |
#4 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/controllers/admin/questions.php(1297): QuestionTemplate::getQuestionTemplateList("L") 1292 $aData['aQuestionTemplateAttributes'] = $questionTemplateAttributes['question_template']; 1293 } else { 1294 $aData['aQuestionTemplateAttributes']['value'] = 'core'; 1295 } 1296 1297 $aData['aQuestionTemplateList'] = \QuestionTemplate::getQuestionTemplateList($eqrow['type']); 1298 1299 if (!$adding) { 1300 $criteria = new CDbCriteria; 1301 $criteria->addColumnCondition(array('sid' => $surveyid, 'gid' => $gid, 'qid' => $qid)); 1302 $criteria->params[':lang'] = $baselang; |
#5 |
unknown(0): questions->index("editquestion", "165733", "1004", "17205")
|
#6 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(questions, array("editquestion", "165733", "1004", "17205")) 104 elseif($param->isDefaultValueAvailable()) 105 $ps[]=$param->getDefaultValue(); 106 else 107 return false; 108 } 109 $method->invokeArgs($object,$ps); 110 return true; 111 } 112 } |
#7 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/core/Survey_Common_Action.php(83): CAction->runWithParamsInternal(questions,
ReflectionMethod, array("surveyid" => "165733", "gid" => "1004",
"qid" => "17205", "sa" => "editquestion", ...)) 78 $oMethod = new ReflectionMethod($this, $sDefault); 79 } 80 81 // We're all good to go, let's execute it 82 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params 83 return parent::runWithParamsInternal($this, $oMethod, $params); 84 } 85 86 /** 87 * Some functions have different parameters, which are just an alias of the 88 * usual parameters we're getting in the url. This function just populates |
#8 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CController.php(308): Survey_Common_Action->runWithParams(array("surveyid" => "165733", "gid" => "1004", "qid" => "17205", "sa" => "editquestion", ...)) 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; |
#9 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CController.php(286): CController->runAction(questions) 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(); |
#10 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CController.php(265): CController->runActionWithFilters(questions, array()) 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); |
#11 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/controllers/AdminController.php(158): CController->run("questions") 153 $this->redirect(array('/admin/authentication/sa/login')); 154 } 155 } 156 } 157 158 return parent::run($action); 159 } 160 161 /** 162 * Routes all the actions to their respective places 163 * |
#12 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CWebApplication.php(282): AdminController->run("questions") 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))); |
#13 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/questions/sa/editquestion") 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. |
#14 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/base/CApplication.php(185): CWebApplication->processRequest() 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 /** |
#15 |
+
–
/mnt/data/shnoulle/nginx/www/master/index.php(194): CApplication->run() 189 require_once APPPATH . 'core/LSYii_Application' . EXT; 190 191 $config = require_once(APPPATH . 'config/internal' . EXT); 192 193 Yii::$enableIncludePath = false; 194 Yii::createApplication('LSYii_Application', $config)->run(); 195 196 /* End of file index.php */ 197 /* Location: ./index.php */ |