From 2f8b1036da42ec3d15a51c6b17a473f9f4df71d3 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <bruederli@kolabsys.com>
Date: Sat, 07 Feb 2015 12:33:24 -0500
Subject: [PATCH] Bump version and copyright year

---
 program/include/rcmail.php |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index a16319f..2327109 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -2284,6 +2284,29 @@
         return $result;
     }
 
+    /**
+     * Get resource file content (with assets_dir support)
+     *
+     * @param string $name File name
+     */
+    public function get_resource_content($name)
+    {
+        if (!strpos($name, '/')) {
+            $name = "program/resources/$name";
+        }
+
+        $assets_dir = $this->config->get('assets_dir');
+
+        if ($assets_dir) {
+            $path = slashify($assets_dir) . $name;
+            if (@file_exists($path)) {
+                $name = $path;
+            }
+        }
+
+        return file_get_contents($name, false);
+    }
+
 
     /************************************************************************
      *********          Deprecated methods (to be removed)          *********

--
Gitblit v1.9.1