Author: jablko
Date: 2008-11-27 15:04:58 -0800 (Thu, 27 Nov 2008)
New Revision: 1634

Added:
   trunk/qubit/plugins/sfThumbnailPlugin/
Removed:
   trunk/qubit/patches/sfImageMagickAdapter.patch
Modified:
   trunk/qubit/plugins/
   trunk/qubit/plugins/sfThumbnailPlugin/lib/sfImageMagickAdapter.class.php
Log:

Drop svn:externals for sfThumbnailPlugin. Copy sfThumbnailPlugin from vendor 
branch to create ancestral relationship for merge tracking. Apply and delete 
the sfThumbnailPlugin patch. Fixes issue #318


Deleted: trunk/qubit/patches/sfImageMagickAdapter.patch
===================================================================
--- trunk/qubit/patches/sfImageMagickAdapter.patch      2008-11-27 22:49:26 UTC 
(rev 1633)
+++ trunk/qubit/patches/sfImageMagickAdapter.patch      2008-11-27 23:04:58 UTC 
(rev 1634)
@@ -1,52 +0,0 @@
-Index: plugins/sfThumbnailPlugin/lib/sfImageMagickAdapter.class.php
-===================================================================
---- plugins/sfThumbnailPlugin/lib/sfImageMagickAdapter.class.php       
(revision 10558)
-+++ plugins/sfThumbnailPlugin/lib/sfImageMagickAdapter.class.php       
(working copy)
-@@ -176,7 +176,8 @@
-     $imgData = @getimagesize($image);
-     if (!$imgData)
-     {
--      exec($this->magickCommands['identify'].' '.escapeshellarg($image), 
$stdout, $retval);
-+      $extract = $this->getExtract();
-+      exec($this->magickCommands['identify'].' 
'.escapeshellarg($image).$extract, $stdout, $retval);
-       if ($retval === 1)
-       {
-         throw new Exception('Image could not be identified.');
-@@ -293,15 +294,7 @@
-     }
- 
-     // extract images such as pages from a pdf doc
--    $extract = '';
--    if (isset($this->options['extract']) && is_int($this->options['extract']))
--    {
--      if ($this->options['extract'] > 0)
--      {
--        $this->options['extract']--;
--      }
--      $extract = '['.escapeshellarg($this->options['extract']).'] ';
--    }
-+    $extract = $this->getExtract();
- 
-     $output = (is_null($thumbDest))?'-':$thumbDest;
-     $output = (($mime = array_search($targetMime, 
$this->mimeMap))?$mime.':':'').$output;
-@@ -328,5 +321,20 @@
-   {
-     return $this->sourceMime;
-   }
-+  
-+  private function getExtract()
-+  {
-+    $extract = '';
-+    if (isset($this->options['extract']) && is_int($this->options['extract']))
-+    {
-+      if ($this->options['extract'] > 0)
-+      {
-+        $this->options['extract']--;
-+      }
-+      $extract = '['.escapeshellarg($this->options['extract']).'] ';
-+    }
-+    
-+    return $extract;
-+  }
- 
- }


Property changes on: trunk/qubit/plugins
___________________________________________________________________
Modified: svn:externals
   - sfLucenePlugin -r 10243 
http://svn.symfony-project.com/plugins/sfLucenePlugin/trunk
sfSearchPlugin -r 10010 
http://svn.symfony-project.com/plugins/sfSearchPlugin/trunk
sfThumbnailPlugin http://svn.symfony-project.com/plugins/sfThumbnailPlugin
sfUJSPlugin http://svn.symfony-project.com/plugins/sfUJSPlugin

   + sfLucenePlugin -r 10243 
http://svn.symfony-project.com/plugins/sfLucenePlugin/trunk
sfSearchPlugin -r 10010 
http://svn.symfony-project.com/plugins/sfSearchPlugin/trunk
sfUJSPlugin http://svn.symfony-project.com/plugins/sfUJSPlugin



Property changes on: trunk/qubit/plugins/sfThumbnailPlugin
___________________________________________________________________
Added: svn:mergeinfo
   + 

Modified: 
trunk/qubit/plugins/sfThumbnailPlugin/lib/sfImageMagickAdapter.class.php
===================================================================
--- trunk/sfThumbnailPlugin/vendor/lib/sfImageMagickAdapter.class.php   
2008-11-27 22:49:26 UTC (rev 1633)
+++ trunk/qubit/plugins/sfThumbnailPlugin/lib/sfImageMagickAdapter.class.php    
2008-11-27 23:04:58 UTC (rev 1634)
@@ -181,7 +181,8 @@
     $imgData = @getimagesize($image);
     if (!$imgData)
     {
-      exec($this->magickCommands['identify'].' '.escapeshellarg($image), 
$stdout, $retval);
+      $extract = $this->getExtract();
+      exec($this->magickCommands['identify'].' 
'.escapeshellarg($image).$extract, $stdout, $retval);
       if ($retval === 1)
       {
         throw new Exception('Image could not be identified.');
@@ -342,15 +343,7 @@
     }
 
     // extract images such as pages from a pdf doc
-    $extract = '';
-    if (isset($this->options['extract']) && is_int($this->options['extract']))
-    {
-      if ($this->options['extract'] > 0)
-      {
-        $this->options['extract']--;
-      }
-      $extract = '['.escapeshellarg($this->options['extract']).'] ';
-    }
+    $extract = $this->getExtract();
 
     $output = (is_null($thumbDest))?'-':$thumbDest;
     $output = (($mime = array_search($targetMime, 
$this->mimeMap))?$mime.':':'').$output;
@@ -377,5 +370,19 @@
   {
     return $this->sourceMime;
   }
+  
+  private function getExtract()
+  {
+    $extract = '';
+    if (isset($this->options['extract']) && is_int($this->options['extract']))
+    {
+      if ($this->options['extract'] > 0)
+      {
+        $this->options['extract']--;
+      }
+      $extract = '['.escapeshellarg($this->options['extract']).'] ';
+    }
 
+    return $extract;
+  }
 }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to