summaryrefslogtreecommitdiff
path: root/program/include/rcube_image.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-04-16 11:59:08 +0000
committeralecpl <alec@alec.pl>2012-04-16 11:59:08 +0000
commitbe98dfc2c0bdc4f911c6daa94e3fddc29afc89a8 (patch)
tree05907bc164d7c41157ad1087be672d7bbcbac980 /program/include/rcube_image.php
parent1aceb9cec82639250a603aa0806f0399f7bae68d (diff)
- Replace some references to rcmail with rcube
Diffstat (limited to 'program/include/rcube_image.php')
-rw-r--r--program/include/rcube_image.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/program/include/rcube_image.php b/program/include/rcube_image.php
index 79dcad691..c42b4af2b 100644
--- a/program/include/rcube_image.php
+++ b/program/include/rcube_image.php
@@ -73,10 +73,10 @@ class rcube_image
*/
public function resize($size, $filename = null)
{
- $result = false;
- $rcmail = rcmail::get_instance();
- $convert = $rcmail->config->get('im_convert_path', false);
- $props = $this->props();
+ $result = false;
+ $rcube = rcube::get_instance();
+ $convert = $rcmail->config->get('im_convert_path', false);
+ $props = $this->props();
if (!$filename) {
$filename = $this->image_file;
@@ -98,7 +98,7 @@ class rcube_image
$p['-opts'] = array('-resize' => $size.'>');
if (in_array($type, explode(',', $p['types']))) { // Valid type?
- $result = rcmail::exec($convert . ' 2>&1 -flatten -auto-orient -colorspace RGB -quality {quality} {-opts} {in} {type}:{out}', $p) === '';
+ $result = rcube::exec($convert . ' 2>&1 -flatten -auto-orient -colorspace RGB -quality {quality} {-opts} {in} {type}:{out}', $p) === '';
}
if ($result) {
@@ -161,11 +161,11 @@ class rcube_image
*/
private function identify()
{
- $rcmail = rcmail::get_instance();
+ $rcube = rcube::get_instance();
- if ($cmd = $rcmail->config->get('im_identify_path')) {
+ if ($cmd = $rcube->config->get('im_identify_path')) {
$args = array('in' => $this->image_file, 'format' => "%m %[fx:w] %[fx:h]");
- $id = rcmail::exec($cmd. ' 2>/dev/null -format {format} {in}', $args);
+ $id = rcube::exec($cmd. ' 2>/dev/null -format {format} {in}', $args);
if ($id) {
return explode(' ', strtolower($id));