aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-01-05 22:06:21 +0000
committerrvelices <rv-github@modusoptimus.com>2012-01-05 22:06:21 +0000
commit34717c1391166b847e4236cb3e519dfd7b0cbbd1 (patch)
treede9b7c278e78bcef1214d482cd292e9092e3a257 /include/functions.inc.php
parente64ab974df242b25ade46d9795294ae859060355 (diff)
feature 2548 multisize - improved picture.php display (original...) + code cleanup
git-svn-id: http://piwigo.org/svn/trunk@12855 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 80b25281b..0871f8110 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -740,6 +740,20 @@ function original_to_representative($path, $representative_ext)
return substr_replace($path, $representative_ext, $pos+1);
}
+/**
+ * @param element_info array containing element information from db;
+ * at least 'id', 'path' should be present
+ */
+function get_element_path($element_info)
+{
+ $path = $element_info['path'];
+ if ( !url_is_remote($path) )
+ {
+ $path = PHPWG_ROOT_PATH.$path;
+ }
+ return $path;
+}
+
/* Returns the PATH to the thumbnail to be displayed. If the element does not
* have a thumbnail, the default mime image path is returned. The PATH can be