Index: trunk/core/kernel/globals.php =================================================================== diff -u -N -r3863 -r4216 --- trunk/core/kernel/globals.php (.../globals.php) (revision 3863) +++ trunk/core/kernel/globals.php (.../globals.php) (revision 4216) @@ -449,5 +449,23 @@ $line = $enclosure.implode($enclosure.$delimiter.$enclosure, $data).$enclosure.$recordSeparator; fwrite($filePointer, $line); } + + /** + * Allows to replace #section# within any string with current section + * + * @param string $string + * @return string + */ + function replaceModuleSection($string) + { + $application =& kApplication::Instance(); + $module_section = $application->RecallVar('section'); + if ($module_section) { + // substitute section instead of #section# parameter in title preset name + $module_section = explode(':', $module_section); + $string = str_replace('#section#', strtolower($module_section[1]), $string); + } + return $string; + } ?> \ No newline at end of file