/storage/home/srv10930/ht-olimp43/protected/extensions/EPhpThumb/EPhpThumb.php(59)
47 /** 48 * Creates a new phpThumb object. 49 * @param string $filePath the image file path. 50 * @return PhpThumb object 51 */ 52 protected static function thumbFactory($filePath) 53 { 54 try{ 55 return PhpThumbFactory::create($filePath,self::$_phpThumbOptions); 56 } 57 catch (Exception $e) 58 { 59 throw new CException($e->getMessage(),$e->getCode()); 60 } 61 } 62 } 63 ?>
#0 |
+
–
/storage/home/srv10930/ht-olimp43/protected/extensions/EPhpThumb/EPhpThumb.php(44): EPhpThumb::thumbFactory("/storage/home/srv10930/ht-olimp43/uploads/photos/01.04.2013/5159...") 39 * @param string $filePath the image file path. 40 * @return PhpThumb object 41 */ 42 public function create($filePath) 43 { 44 return new EThumbnail(EPhpThumb::thumbFactory($filePath)); 45 } 46 47 /** 48 * Creates a new phpThumb object. 49 * @param string $filePath the image file path. |
#1 |
+
–
/storage/home/srv10930/ht-olimp43/protected/components/FileContents.php(6): EPhpThumb->create("/storage/home/srv10930/ht-olimp43/uploads/photos/01.04.2013/5159...") 01 <?php 02 03 class FileContents extends CApplicationComponent { 04 public function displayImage($itemPath, $itemName) { 05 header('Content-Disposition: attachment; filename=' . $itemName); 06 $thumb = Yii::app() -> phpThumb -> create($itemPath); 07 $thumb -> show(); 08 } 09 10 public function displayThumbnail($itemPath, $itemName) { 11 header('Content-Disposition: attachment; filename=' . $itemName); |
#2 |
+
–
/storage/home/srv10930/ht-olimp43/protected/controllers/FilesController.php(14): FileContents->displayImage("/storage/home/srv10930/ht-olimp43/uploads/photos/01.04.2013/5159...", "DSC_3168.jpg") 09 public function actionDisplayImage($model, $id) { 10 set_time_limit(0); 11 $model = strtoupper(substr($model, 0, 1)) . substr($model, 1); 12 $modelItem = CActiveRecord::model($model) -> findByPk($id); 13 if ($modelItem != NULL) 14 Yii::app() -> FileContents -> displayImage(Yii::getPathOfAlias('webroot') . '/uploads/' . strtolower(substr($model, 0, 1)) . substr($model, 1) . '/' . $modelItem -> image_path, $modelItem -> image_name); 15 else 16 throw new CHttpException(404, 'The specified page cannot be found.'); 17 } 18 19 public function actionDisplayThumbnail($model, $id) { |
#3 |
unknown(0): FilesController->actionDisplayImage("photos", "2")
|
#4 |
+
–
/storage/home/srv10930/ht-olimp43/php/yii/web/actions/CAction.php(107): ReflectionMethod->invokeArgs(FilesController, array("photos", "2")) 102 else if($param->isDefaultValueAvailable()) 103 $ps[]=$param->getDefaultValue(); 104 else 105 return false; 106 } 107 $method->invokeArgs($object,$ps); 108 return true; 109 } 110 } |
#5 |
+
–
/storage/home/srv10930/ht-olimp43/php/yii/web/actions/CInlineAction.php(48): CAction->runWithParamsInternal(FilesController, ReflectionMethod, array("model" => "photos", "id" => "2")) 43 { 44 $methodName='action'.$this->getId(); 45 $controller=$this->getController(); 46 $method=new ReflectionMethod($controller, $methodName); 47 if($method->getNumberOfParameters()>0) 48 return $this->runWithParamsInternal($controller, $method, $params); 49 else 50 return $controller->$methodName(); 51 } 52 53 } |
#6 |
+
–
/storage/home/srv10930/ht-olimp43/php/yii/web/CController.php(309): CInlineAction->runWithParams(array("model" => "photos", "id" => "2")) 304 { 305 $priorAction=$this->_action; 306 $this->_action=$action; 307 if($this->beforeAction($action)) 308 { 309 if($action->runWithParams($this->getActionParams())===false) 310 $this->invalidActionParams($action); 311 else 312 $this->afterAction($action); 313 } 314 $this->_action=$priorAction; |
#7 |
+
–
/storage/home/srv10930/ht-olimp43/php/yii/web/CController.php(287): CController->runAction(CInlineAction) 282 * @see runAction 283 */ 284 public function runActionWithFilters($action,$filters) 285 { 286 if(empty($filters)) 287 $this->runAction($action); 288 else 289 { 290 $priorAction=$this->_action; 291 $this->_action=$action; 292 CFilterChain::create($this,$action,$filters)->run(); |
#8 |
+
–
/storage/home/srv10930/ht-olimp43/php/yii/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array()) 261 { 262 if(($parent=$this->getModule())===null) 263 $parent=Yii::app(); 264 if($parent->beforeControllerAction($this,$action)) 265 { 266 $this->runActionWithFilters($action,$this->filters()); 267 $parent->afterControllerAction($this,$action); 268 } 269 } 270 else 271 $this->missingAction($actionID); |
#9 |
+
–
/storage/home/srv10930/ht-olimp43/php/yii/web/CWebApplication.php(283): CController->run("displayimage") 278 { 279 list($controller,$actionID)=$ca; 280 $oldController=$this->_controller; 281 $this->_controller=$controller; 282 $controller->init(); 283 $controller->run($actionID); 284 $this->_controller=$oldController; 285 } 286 else 287 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 288 array('{route}'=>$route===''?$this->defaultController:$route))); |
#10 |
+
–
/storage/home/srv10930/ht-olimp43/php/yii/web/CWebApplication.php(142): CWebApplication->runController("files/displayimage") 137 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 138 $_GET[$name]=$value; 139 } 140 else 141 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 142 $this->runController($route); 143 } 144 145 /** 146 * Registers the core application components. 147 * This method overrides the parent implementation by registering additional core components. |
#11 |
+
–
/storage/home/srv10930/ht-olimp43/php/yii/base/CApplication.php(162): CWebApplication->processRequest() 157 */ 158 public function run() 159 { 160 if($this->hasEventHandler('onBeginRequest')) 161 $this->onBeginRequest(new CEvent($this)); 162 $this->processRequest(); 163 if($this->hasEventHandler('onEndRequest')) 164 $this->onEndRequest(new CEvent($this)); 165 } 166 167 /** |
#12 |
+
–
/storage/home/srv10930/ht-olimp43/index.php(8): CApplication->run() 3 // change the following paths if necessary 4 $yii = dirname(__FILE__) . '/php/yii/yii.php'; 5 $config = dirname(__FILE__) . '/protected/config/main.php'; 6 7 require_once ($yii); 8 Yii::createWebApplication($config) -> run(); |