Skip to content

Commit c3096ee

Browse files
committed
v2.3.0-beta1
1 parent 1f4d20b commit c3096ee

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pThumb 2.2.1-pl
1+
pThumb 2.2.2-pl2
22
==========
33

44
A fork of phpThumbOf 1.4.0. pThumb is a lightweight, efficient, and actively maintained replacement for phpThumbOf. It offers most of the functionality of its predecessor while adding new features, fixing bugs, and offering some potentially dramatic speed improvements on sites which use phpThumbOf heavily.
@@ -81,7 +81,7 @@ Note: Switching cache systems won't migrate your cached images from one cache to
8181

8282
### No Amazon S3
8383

84-
Version 2.0 drops support for AWS. I don't use or know much about it and rather than release completely untested and possibly broken code, I took it out. If you'd like it added back and are interested in helping, please get in touch.
84+
Version 2.2 doesn’t support S3, but 2.3 will. If you’d like to test it, download the transport package, read the [instructions](https://github.com/oo12/phpThumbOf/wiki/Amazon-S3), and be sure to report any bugs or other thoughts [here](https://github.com/oo12/phpThumbOf/issues/3).
8585

8686

8787
Changes from phpThumbOf 1.4.0

_build/config/phpthumbof.config.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
'packageName' => 'pThumb', /* No spaces, no dashes */
1616
'packageNameLower' => 'phpthumbof',
1717
'packageDescription' => 'A better phpThumbOf',
18-
'version' => '2.2.2',
19-
'release' => 'pl2',
18+
'version' => '2.3.0',
19+
'release' => 'beta1',
2020
'author' => 'Jason Grant',
2121
'email' => '',
2222
'authorUrl' => 'https://github.com/oo12',

core/components/phpthumbof/docs/changelog.txt

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
pThumb
22
======
33

4+
2.3.0-beta1 [22.12.2013]
5+
------------------------
6+
7+
- [#3] Add Amazon S3 support
8+
- Improve naming for remote files
9+
10+
411
2.2.2-pl2 [06.12.2013]
512
---------------------
613

core/components/phpthumbof/model/phpthumbof.class.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,15 @@ public function createThumbnail($src, $options) {
281281
return $cacheUrl;
282282
}
283283

284-
if ($this->config['use_ptcache'] && !is_writable($cacheFilenamePath)) {
284+
if ($this->config['use_ptcache'] && !is_writable($cacheFilenamePath)) { // make sure pThumb cache location exists
285285
if ( !$this->modx->cacheManager->writeTree($cacheFilenamePath) ) {
286286
$this->modx->log(modX::LOG_LEVEL_ERROR, "[pThumb] Cache path not writable: $cacheFilenamePath");
287287
return $src;
288288
}
289289
}
290290

291-
if ($this->config['useResizer']) {
291+
/* Generate Thumbnail */
292+
if ($this->config['useResizer']) { // use Resizer
292293
static $resizer_obj = array();
293294
if (!class_exists('Resizer')) { // set up Resizer. We'll reuse this object for any subsequent images on the page
294295
if (!$this->modx->loadClass('Resizer', MODX_CORE_PATH . 'components/resizer/model/', true, true)) {
@@ -304,7 +305,7 @@ public function createThumbnail($src, $options) {
304305
$this->phpThumb = $resizer_obj[0];
305306
$writeSuccess = $this->phpThumb->processImage($this->input, $cacheKey, $ptOptions);
306307
}
307-
else { //use phpThumb
308+
else { // use phpThumb
308309
if (!class_exists('phpthumb', FALSE)) {
309310
if (!$this->modx->loadClass('phpthumb', MODX_CORE_PATH . 'model/phpthumb/', true, true)) {
310311
$this->debugmsg('Could not load phpthumb class.');
@@ -338,7 +339,6 @@ public function createThumbnail($src, $options) {
338339
return $src;
339340
}
340341
$writeSuccess = $this->phpThumb->RenderToFile($cacheKey);
341-
$this->phpThumb = null;
342342
}
343343

344344
if ($writeSuccess) { // write it to the cache file

pthumb-2.3.0-beta1.transport.zip

138 KB
Binary file not shown.

0 commit comments

Comments
 (0)