Permalink
Browse files

Fixed deprecated issues for upcoming SilverStripe 3.1.0 release

- switched from GD to GBBackend class (backward compatible with SS 3.0.x)
  • Loading branch information...
1 parent 5e98a47 commit 2db80fd109545eb00ebf27da6f3fe956f658beae @cwsoft committed Mar 24, 2013
Showing with 10 additions and 3 deletions.
  1. +2 −1 composer.json
  2. +8 −2 cwsoft-shortcode/_config.php
View
@@ -9,7 +9,8 @@
{
"name": "cwsoft",
"email": "info@cwsoft.de",
- "homepage": "http://cwsoft.de"
+ "homepage": "http://cwsoft.de",
+ "role": "Developer"
}
],
"require": {
@@ -38,8 +38,14 @@
ShortcodeParser::get()->register('cwsRandomImage', array('cwsShortCodeRandomImage', 'cwsShortCodeRandomImageHandler'));
ShortcodeParser::get()->register('cwsRandomQuote', array('cwsShortCodeRandomQuote', 'cwsShortCodeRandomQuoteHandler'));
-// increase default image quality of thumbnails
-GD::set_default_quality(95);
+// increase quality of created thumbnails
+if (class_exists('GDBackend')) {
+ // SilverStripe >= 3.1.0
+ GDBackend::set_default_quality(95);
+} else {
+ // SilverStripe 3.0.x
+ GD::set_default_quality(95);
+}
// Note: If you see unparsed placeholders like "{#shortcode.dlg_description}" when using the TinyMCE cwsoft-shortcode plugin,
// you need to add a plugin language file for your locale to the folder "./plugins/shortcode/langs". Supported locales: EN, DE.

0 comments on commit 2db80fd

Please sign in to comment.