Changeset 12310
- Timestamp:
- Jul 19, 2009, 9:02:23 PM (14 years ago)
- Location:
- OpenPNE3/trunk/apps
- Files:
-
- 7 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/trunk/apps/mobile_frontend/modules/community/actions/actions.class.php
r12288 r12310 111 111 return sfView::SUCCESS; 112 112 } 113 114 /** 115 * Executes configImage action 116 * 117 * @param sfWebRequest $request a request object 118 */ 119 public function executeConfigImage(sfWebRequest $request) 120 { 121 $this->forward404Unless($this->id && $this->isEditCommunity); 122 $this->community = Doctrine::getTable('Community')->find($this->id); 123 } 124 125 /** 126 * Executes deleteImage action 127 * 128 * @param sfWebRequest $request a request object 129 */ 130 public function executeDeleteImage($request) 131 { 132 $this->forward404Unless($this->id && $this->isEditCommunity); 133 134 $this->community = Doctrine::getTable('Community')->find($this->id); 135 $this->forward404Unless($this->community->getImageFileName()); 136 137 $this->form = new sfForm(); 138 if ($request->isMethod(sfWebRequest::POST)) 139 { 140 $request->checkCSRFProtection(); 141 142 $this->community->getFile()->delete(); 143 $this->redirect('community/configImage?id='.$this->id); 144 } 145 } 113 146 } -
OpenPNE3/trunk/apps/mobile_frontend/modules/community/templates/homeSuccess.php
r12300 r12310 10 10 <?php echo image_tag_sf_image($community->getImageFileName(), array('size' => '120x120', 'format' => 'jpg')) ?> 11 11 <?php if ($isAdmin) : ?> 12 <br><?php echo link_to(__('Edit Photo'), 'community/ edit?id='.$community->getId()) ?>12 <br><?php echo link_to(__('Edit Photo'), 'community/configImage?id='.$community->getId()) ?> 13 13 <?php endif; ?> 14 14 </td> -
OpenPNE3/trunk/apps/mobile_mail_frontend/config/routing.yml
r11786 r12310 3 3 class: opMailRoute 4 4 param: { module: member, action: image } 5 6 community_add_image: 7 url: c.:id 8 class: opMailRoute 9 param: { module: community, action: image } 10 required: { id: \d+ } 5 11 6 12 # default rules
Note: See TracChangeset
for help on using the changeset viewer.