Thread: [Isocial-svn] SF.net SVN: isocial: [172] app/controllers/photoapp/album_controller.php
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <fsn...@us...> - 2008-05-07 05:36:04
|
Revision: 172 http://isocial.svn.sourceforge.net/isocial/?rev=172&view=rev Author: fsnobody Date: 2008-05-06 22:35:43 -0700 (Tue, 06 May 2008) Log Message: ----------- fixed bug in edit album Modified Paths: -------------- app/controllers/photoapp/album_controller.php Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-07 05:02:19 UTC (rev 171) +++ app/controllers/photoapp/album_controller.php 2008-05-07 05:35:43 UTC (rev 172) @@ -54,9 +54,10 @@ function edit () { if (!empty($this->params['album'])){ - $this->PhotoappAlbum->setAttributes($this->params['album']); - $this->PhotoappAlbum->owner = $this->current_user->getId(); - if ($this->Request->isPost() && $this->PhotoappAlbum->save()){ + $album = $this->PhotoappAlbum->findFirst(array('id' => $this->params['id'])); + $album->setAttributes($this->params['album']); + $album->owner = $this->current_user->getId(); + if ($this->Request->isPost() && $album->save()){ // success $this->redirectTo(array('action' => 'index')); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-15 17:15:41
|
Revision: 206 http://isocial.svn.sourceforge.net/isocial/?rev=206&view=rev Author: fsnobody Date: 2008-05-15 10:15:37 -0700 (Thu, 15 May 2008) Log Message: ----------- fix config hardcode Modified Paths: -------------- app/controllers/photoapp/album_controller.php Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-15 16:42:23 UTC (rev 205) +++ app/controllers/photoapp/album_controller.php 2008-05-15 17:15:37 UTC (rev 206) @@ -77,7 +77,10 @@ $photo->setAttributes($v); $photo->save(); } - $this->redirectTo(array('action' => 'index')); + //$this->redirectTo(array('action' => 'index')); + + + $this->redirectTo(array('action' => 'view', 'id' => $photo->album_id)); } else { if (!empty($this->params['id']) && $this->PhotoappAlbum->find($this->params['id'])) { // pre delete @@ -154,7 +157,7 @@ if ($_FILES['album']['error'][$field] == 0 ) { // copy file; save photo $photo_name = microtime(true) . ".jpeg"; - $user_path = PROJECT_DIR . "public/images/uploaded/" . $this->current_user->getId(); + $user_path = AK_PUBLIC_DIR. "/images/uploaded/" . $this->current_user->getId(); if(!file_exists($user_path)) { `mkdir $user_path`; `chmod 777 $user_path`; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-25 12:16:13
|
Revision: 222 http://isocial.svn.sourceforge.net/isocial/?rev=222&view=rev Author: fsnobody Date: 2008-05-25 05:16:21 -0700 (Sun, 25 May 2008) Log Message: ----------- after add album go to add photo action Modified Paths: -------------- app/controllers/photoapp/album_controller.php Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-25 11:58:30 UTC (rev 221) +++ app/controllers/photoapp/album_controller.php 2008-05-25 12:16:21 UTC (rev 222) @@ -139,7 +139,7 @@ $this->PhotoappAlbum->owner = $this->current_user->getId(); if ($this->Request->isPost() && $this->PhotoappAlbum->save()){ // success - $this->redirectTo(array('action' => 'index')); + $this->redirectTo(array('action' => 'add_photo', 'id' => $this->PhotoappAlbum->getId())); } else { $this->importErrors( $this->PhotoappAlbum->getErrors() ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fsn...@us...> - 2008-05-25 13:15:05
|
Revision: 223 http://isocial.svn.sourceforge.net/isocial/?rev=223&view=rev Author: fsnobody Date: 2008-05-25 06:15:10 -0700 (Sun, 25 May 2008) Log Message: ----------- paging for photos in album Modified Paths: -------------- app/controllers/photoapp/album_controller.php Modified: app/controllers/photoapp/album_controller.php =================================================================== --- app/controllers/photoapp/album_controller.php 2008-05-25 12:16:21 UTC (rev 222) +++ app/controllers/photoapp/album_controller.php 2008-05-25 13:15:10 UTC (rev 223) @@ -234,6 +234,10 @@ } + function defaultUrlOptions($options) { + return array('id' => $this->params['id']); + } + function debug($str) { echo "<pre>"; print_r($str); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |