$f = $this->getStoreName();
$dest = dirname($f);
if (!file_exists($dest)) {
-
+ // currently this is 0775 due to problems using shared hosing (FTP)
+ // it makes all the files unaccessable..
+ // you can normally solve this by giving the storedirectory better perms
+ // if needed on a dedicated server..
$oldumask = umask(0);
- mkdir($dest, 0770, true);
+ mkdir($dest, 0775, true);
umask($oldumask);
}
// echo '<PRE>';print_r($req);exit;
$ret= $this->toArray();
-
+ static $ff = false;
+ if (!$ff) {
+ $ff = HTML_FlexyFramework::get();
+ }
+
+ $ret['public_baseURL'] = isset($ff->Pman_Images['public_baseURL']) ?
+ $ff->Pman_Images['public_baseURL'] : $ff->baseURL;
+
if (!empty($req['query']['imagesize'])) {
$baseURL = isset($req['query']['imageBaseURL']) ? $req['query']['imageBaseURL'] : false;
$ff = HTML_FlexyFramework::get();
$baseURL = $baseURL ? $baseURL : $ff->baseURL ;
- if preg_match('#^http[s]*://#', $provider) {
+ if (preg_match('#^http[s]*://#', $provider)) {
$baseURL = '';
}
-
+
if ($size < 0) {
return $baseURL . $provider . "/{$this->id}/{$this->filename}";
}
$sy = $sz[1];
}
// create it?
-
-
+
return '<img src="' . $this->URL($size, $provider) . '" width="'. $sx . '" height="'. $sy . '">';
}
-
+
+ /**
+ * to Fileconvert object..
+ *
+ *
+ *
+ */
+ function toFileConvert()
+ {
+ require_once 'File/Convert.php';
+ $fc = new File_Convert($this->getStoreName(), $this->mimetype);
+ return $fc;
+
+ }
/**
*
*