aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/avatar
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/avatar')
-rw-r--r--phpBB/includes/avatar/manager.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/phpBB/includes/avatar/manager.php b/phpBB/includes/avatar/manager.php
index da9d843947..51727f242a 100644
--- a/phpBB/includes/avatar/manager.php
+++ b/phpBB/includes/avatar/manager.php
@@ -152,4 +152,30 @@ class phpbb_avatar_manager
return array_combine($keys, $values);
}
+
+ /**
+ * Clean driver names that are returned from template files
+ * Underscores are replaced with dots
+ *
+ * @param string $name Driver name
+ *
+ * @return string Cleaned driver name
+ */
+ public static function clean_driver_name($name)
+ {
+ return str_replace('_', '.', $name);
+ }
+
+ /**
+ * Prepare driver names for use in template files
+ * Dots are replaced with underscores
+ *
+ * @param string $name Clean driver name
+ *
+ * @return string Prepared driver name
+ */
+ public static function prepare_driver_name($name)
+ {
+ return str_replace('.', '_', $name);
+ }
}