Ejemplo n.º 1
0
 /**
  * 空间背景设置
  * Enter description here ...
  */
 public function doEditBackgroundAction()
 {
     $repeat = $this->getInput('repeat', 'post');
     $fixed = $this->getInput('fixed', 'post');
     $align = $this->getInput('align', 'post');
     $background = $this->getInput('background', 'post');
     $upload = $this->_uploadImage();
     $image = isset($upload['path']) ? $upload['path'] : '';
     $this->spaceBo = new PwSpaceBo($this->loginUser->uid);
     if (!$image) {
         //list($image, $_repeat, $_fixed, $_align) = $this->spaceBo->space['back_image'];
         if (!$background) {
             $image = $repeat = $fixed = $align = '';
         } else {
             $image = $background;
         }
     }
     Wind::import('SRV:space.dm.PwSpaceDm');
     $dm = new PwSpaceDm($this->loginUser->uid);
     $dm->setBackImage($image, $repeat, $fixed, $align);
     $resource = $this->_getSpaceDs()->updateInfo($dm);
     if ($resource instanceof PwError) {
         $this->showError($resource->getError());
     }
     $this->showMessage("MEDAL:success");
 }