Im sharing the replace of double slashes and the path to convert, maybe 
exist
a better way to achieve that.


    function __imConvert(&$model, $input, $params = array(), $output = 
null, $return = false) {
        if (isset($params['return'])) {
            $return = $params['return'];
            unset($params['return']);
        }
        
        /* enhancement */
        $input = str_replace("//", "/", "$input");
        
        if (!$output) {
            $output = $input;
        }
            
        /* enhancement */
        $output = str_replace("//", "/", "$output");
        
        if ($this->__current != $output) {
            $this->__current = $output;
            if (file_exists($output) && $output != $input) {
                unlink($output);
            }
            $input = $this->absolutePath($model);
        }
        $dir = dirname($output);
        if (!file_exists($dir)) {
            new Folder($dir, true);
        }
        $params = $this->__imParseParams($params);
        
         /* enhancement */
        $command = "/usr/local/bin/convert $input $params $output";

        if ($return) {
            return $command;
        }        
        
        $return = exec($command, $exitCode);
        //return $return;
        return true;
    }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to