mirror of
https://github.com/mosbth/cimage.git
synced 2025-07-25 10:41:35 +02:00
* Cache-directory can now be readonly and serve all cached files, still failing when need to save files. #5
This commit is contained in:
@@ -296,8 +296,10 @@ class CImage
|
||||
$this->saveFolder = $dir;
|
||||
$this->cacheFileName = $dir . '/' . $src;
|
||||
|
||||
/* Allow readonly cache
|
||||
is_writable($this->saveFolder)
|
||||
or $this->raiseError('Target directory is not writable.');
|
||||
*/
|
||||
|
||||
// Sanitize filename
|
||||
$this->cacheFileName = preg_replace('/^a-zA-Z0-9\.-_/', '', $this->cacheFileName);
|
||||
@@ -1462,6 +1464,9 @@ class CImage
|
||||
$this->setTarget($src, $base);
|
||||
}
|
||||
|
||||
is_writable($this->saveFolder)
|
||||
or $this->raiseError('Target directory is not writable.');
|
||||
|
||||
switch(strtolower($this->extension)) {
|
||||
|
||||
case 'jpeg':
|
||||
|
Reference in New Issue
Block a user