summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/database/DB_query_builder.php2
-rw-r--r--system/language/english/imglib_lang.php1
-rw-r--r--system/libraries/Image_lib.php26
-rw-r--r--system/libraries/Profiler.php6
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/database/query_builder.rst2
-rw-r--r--user_guide_src/source/libraries/parser.rst2
7 files changed, 34 insertions, 6 deletions
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 78e8018c7..357a2e359 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -526,7 +526,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
public function join($table, $cond, $type = '', $escape = NULL)
{
$type = trim(strtoupper($type).' JOIN');
- preg_match('#^(NATURAL\s+)?((LEFT|RIGHT)\s+)?((INNER|OUTER)\s+)?JOIN$#', $type) OR $type = 'JOIN';
+ preg_match('#^(NATURAL\s+)?((LEFT|RIGHT|FULL)\s+)?((INNER|OUTER)\s+)?JOIN$#', $type) OR $type = 'JOIN';
// Extract any aliases that might exist. We use this information
// in the protect_identifiers to know whether to add a table prefix
diff --git a/system/language/english/imglib_lang.php b/system/language/english/imglib_lang.php
index c34b087c7..9a26b8a9b 100644
--- a/system/language/english/imglib_lang.php
+++ b/system/language/english/imglib_lang.php
@@ -44,6 +44,7 @@ $lang['imglib_unsupported_imagecreate'] = 'Your server does not support the GD f
$lang['imglib_gif_not_supported'] = 'GIF images are often not supported due to licensing restrictions. You may have to use JPG or PNG images instead.';
$lang['imglib_jpg_not_supported'] = 'JPG images are not supported.';
$lang['imglib_png_not_supported'] = 'PNG images are not supported.';
+$lang['imglib_webp_not_supported'] = 'WEBP images are not supported.';
$lang['imglib_jpg_or_png_required'] = 'The image resize protocol specified in your preferences only works with JPEG or PNG image types.';
$lang['imglib_copy_error'] = 'An error was encountered while attempting to replace the file. Please make sure your file directory is writable.';
$lang['imglib_rotate_unsupported'] = 'Image rotation does not appear to be supported by your server.';
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 9cd0d1dfa..0d9fa4420 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -946,6 +946,10 @@ class CI_Image_lib {
$cmd_in = 'pngtopnm';
$cmd_out = 'ppmtopng';
break;
+ case 18 :
+ $cmd_in = 'webptopnm';
+ $cmd_out = 'ppmtowebp';
+ break;
}
if ($action === 'crop')
@@ -1470,6 +1474,13 @@ class CI_Image_lib {
$this->set_error(array('imglib_unsupported_imagecreate', 'imglib_png_not_supported'));
return FALSE;
}
+ case 18:
+ if ( ! function_exists('imagecreatefromwebp'))
+ {
+ $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_webp_not_supported'));
+ return FALSE;
+ }
+ return imagecreatefromwebp($path);
return imagecreatefrompng($path);
default:
@@ -1532,6 +1543,19 @@ class CI_Image_lib {
return FALSE;
}
break;
+ case 18:
+ if ( ! function_exists('imagewebp'))
+ {
+ $this->set_error(array('imglib_unsupported_imagecreate', 'imglib_webp_not_supported'));
+ return FALSE;
+ }
+
+ if ( ! @imagewebp($resource, $this->full_dst_path))
+ {
+ $this->set_error('imglib_save_failed');
+ return FALSE;
+ }
+ break;
default:
$this->set_error(array('imglib_unsupported_imagecreate'));
return FALSE;
@@ -1573,6 +1597,8 @@ class CI_Image_lib {
break;
case 3 : imagepng($resource);
break;
+ case 18 : imagewebp($resource);
+ break;
default: echo 'Unable to display the image';
break;
}
diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php
index d7a171f26..e3c4bd10a 100644
--- a/system/libraries/Profiler.php
+++ b/system/libraries/Profiler.php
@@ -105,7 +105,7 @@ class CI_Profiler {
{
if ( ! isset($config[$section]))
{
- $this->_compile_{$section} = TRUE;
+ $this->{'_compile_'.$section} = TRUE;
}
}
@@ -135,7 +135,7 @@ class CI_Profiler {
{
if (in_array($method, $this->_available_sections))
{
- $this->_compile_{$method} = ($enable !== FALSE);
+ $this->{'_compile_'.$method} = ($enable !== FALSE);
}
}
}
@@ -554,7 +554,7 @@ class CI_Profiler {
foreach ($this->_available_sections as $section)
{
- if ($this->_compile_{$section} !== FALSE)
+ if ($this->{'_compile_'.$section} !== FALSE)
{
$func = '_compile_'.$section;
$output .= $this->{$func}();
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 08bcec7f7..f5b68e08a 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -72,6 +72,7 @@ Release Date: Not Released
- Added option to change the output filename via the ``new_name`` option when rendering images with ``dynamic_output``.
- Updated to serve multibyte filenames when rendering images with ``dynamic_output``, if possible.
+ - Added WebP image support.
- :doc:`Database <database/index>` changes include:
diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst
index 3bc9ad8fb..a085de293 100644
--- a/user_guide_src/source/database/query_builder.rst
+++ b/user_guide_src/source/database/query_builder.rst
@@ -199,7 +199,7 @@ query.
If you need a specific type of JOIN you can specify it via the third
parameter of the function. Options are: left, right, outer, inner, left
-outer, and right outer.
+outer, right outer and full outer.
::
diff --git a/user_guide_src/source/libraries/parser.rst b/user_guide_src/source/libraries/parser.rst
index c88681c04..43ef5ee56 100644
--- a/user_guide_src/source/libraries/parser.rst
+++ b/user_guide_src/source/libraries/parser.rst
@@ -290,7 +290,7 @@ Class Reference
.. php:method:: parse_string($template, $data[, $return = FALSE])
- :param string $template: Path to view file
+ :param string $template: Content to parse
:param array $data: Variable data
:param bool $return: Whether to only return the parsed template
:returns: Parsed template string