aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-01-03 20:21:13 +0000
committerrvelices <rv-github@modusoptimus.com>2012-01-03 20:21:13 +0000
commitd0b5df605c98e4c6985d825ab7110d2e3e9cb072 (patch)
treec2679a774a87e8daa6cb36bcd927eb0e8269e5f3 /include/functions.inc.php
parent6c3ff240cba49ff9a8868b13d93b8c8110204217 (diff)
feature 2548 multisize
- rewrote local site sync + metadata sync git-svn-id: http://piwigo.org/svn/trunk@12831 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index afd3ea702..80b25281b 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -731,6 +731,16 @@ function check_theme_installed($theme_id)
return file_exists($conf['themes_dir'].'/'.$theme_id.'/'.'themeconf.inc.php');
}
+/** Transforms an original path to its pwg representative */
+function original_to_representative($path, $representative_ext)
+{
+ $pos = strrpos($path, '/');
+ $path = substr_replace($path, 'pwg_representative/', $pos+1, 0);
+ $pos = strrpos($path, '.');
+ return substr_replace($path, $representative_ext, $pos+1);
+}
+
+
/* 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
* used in the php script, but not sent to the browser.