Changeset 209
- Timestamp:
- 05/26/07 20:03:46 (1 year ago)
- Files:
-
- trunk/api/inc/imagetoolkit.imagemagick.php (modified) (3 diffs)
- trunk/api/ui/CommonView.php (modified) (1 diff)
- trunk/api/ui/public/Commentaire.php (modified) (1 diff)
- trunk/api/ui/public/Display.php (modified) (1 diff)
- trunk/api/ui/public/FileDownload.php (modified) (2 diffs)
- trunk/api/ui/public/Gallery.php (modified) (2 diffs)
- trunk/api/ui/public/Index.php (modified) (1 diff)
- trunk/api/ui/public/InfosMeta.php (modified) (1 diff)
- trunk/api/ui/public/Private.php (modified) (1 diff)
- trunk/api/ui/public/Selection.php (modified) (2 diffs)
- trunk/api/ui/public/SlideShow.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/api/inc/imagetoolkit.imagemagick.php
r208 r209 24 24 escapeshellarg($this->image), 25 25 escapeshellarg($img_dest)); 26 if (!system($cmd)) { 26 27 $res = array(); 28 exec($cmd, $res, $returnCode); 29 if ($returnCode != 0) { 27 30 throw new Pluf_HTTP_ImageException(); 28 31 } … … 34 37 escapeshellarg($img_dest), 35 38 escapeshellarg($img_dest)); 36 //exec($cmd); 37 if (!system($cmd)) { 39 40 $res = array(); 41 exec($cmd, $res, $returnCode); 42 if ($returnCode != 0) { 38 43 throw new Pluf_HTTP_ImageException(); 39 44 } … … 47 52 escapeshellarg($this->image), 48 53 escapeshellarg($img_dest)); 49 //exec($cmd); 50 if (!system($cmd)) { 54 $res = array(); 55 exec($cmd, $res, $returnCode); 56 if ($returnCode != 0) { 51 57 throw new Pluf_HTTP_ImageException(); 52 58 } trunk/api/ui/CommonView.php
r207 r209 25 25 } 26 26 } 27 28 /** 29 * Enter description here... 30 * 31 * @param string $dir 32 */ 33 public function checkDir($dir) { 34 $dir = files::addTailSlash($dir); 35 if (!is_dir(luxBum::getFsPath($dir))) { 36 throw new Pluf_HTTP_FileSystemException(sprintf(__('The gallery %s doesn\'t exists.'), $dir)); 37 } 38 } 39 40 /** 41 * Enter description here... 42 * 43 * @param string $file 44 */ 45 public function checkFile($dir, $file) { 46 $dir = files::addTailSlash($dir); 47 $this->checkDir($dir); 48 if (!file_exists(luxBum::getFilePath($dir, $file))) { 49 throw new Pluf_HTTP_FileSystemException(sprintf(__('The file %s doesn\'t exists.'), $dir . $file)); 50 } 51 } 27 52 } 28 53 trunk/api/ui/public/Commentaire.php
r207 r209 26 26 // Check if the gallery is private 27 27 $this->checkPrivate($dir); 28 29 verif::photo($dir, $photo); 30 $img = new luxBumImage ($dir, $photo);28 $this->checkFile($dir); 29 30 $img = new luxBumImage ($dir, $photo); 31 31 $img->metaInit (); 32 32 trunk/api/ui/public/Display.php
r207 r209 17 17 18 18 // Check if the gallery is private 19 $this->checkFile($dir, $file); 19 20 $this->checkPrivate($dir); 20 21 21 verif::photo($dir, $file); 22 22 23 23 $gallery = new luxBumGallery($dir); 24 24 $imgIndex = $gallery->getImageIndex($file); trunk/api/ui/public/FileDownload.php
r208 r209 27 27 28 28 // Check if the gallery is private 29 $this->checkFile($dir, $photo); 29 30 $this->checkPrivate($dir); 30 31 31 32 verif::isImage($dir, $photo);33 32 34 33 $luxAff = new luxBumImage($dir, $photo); … … 85 84 86 85 // Check if the gallery is private 86 $this->checkFile($dir, $file); 87 87 $this->checkPrivate($dir); 88 88 trunk/api/ui/public/Gallery.php
r207 r209 29 29 } 30 30 31 31 32 // Check if the gallery is private 33 $this->checkFile($dir, $defaultImage); 32 34 $this->checkPrivate($dir); 33 35 … … 75 77 public function selection($request, $match) { 76 78 if (count($match) == 3) { 77 $dir = $match[1];79 //$dir = $match[1]; 78 80 $defaultImage = $match[2]; 79 81 } trunk/api/ui/public/Index.php
r207 r209 29 29 } 30 30 31 31 32 // Check if the gallery is private 32 if (PrivateManager::isLockedStatic($dir)) { 33 return PrivateView::action($match); 34 } 33 $this->checkDir($dir); 34 $this->checkPrivate($dir); 35 35 36 36 $galleries = new luxBumIndex ($dir); trunk/api/ui/public/InfosMeta.php
r207 r209 26 26 27 27 // Check if the gallery is private 28 $this->checkFile($dir, $photo); 28 29 $this->checkPrivate($dir); 29 30 trunk/api/ui/public/Private.php
r207 r209 23 23 24 24 $dir = files::removeTailSlash($match[1]); 25 26 $this->checkDir($dir); 25 27 26 28 trunk/api/ui/public/Selection.php
r207 r209 25 25 26 26 // Check if the gallery is private 27 $this->checkFile($dir, $file); 27 28 $this->checkPrivate($dir); 28 29 … … 45 46 46 47 // Check if the gallery is private 48 $this->checkFile($dir, $file); 47 49 $this->checkPrivate($dir); 48 50 trunk/api/ui/public/SlideShow.php
r207 r209 24 24 25 25 // Check if the gallery is private 26 $this->checkDir($dir); 26 27 $this->checkPrivate($dir); 27 28
