https://bugzilla.wikimedia.org/show_bug.cgi?id=20657
Summary: make get_language_name_from_extension() accessible to other extensions Product: MediaWiki extensions Version: any Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: Normal Component: SyntaxHighlight (GeSHi) AssignedTo: soxre...@gmail.com ReportedBy: won...@riseup.net I am writing an extension that creates <source> tags and invokes SyntaxHighlight_GeSHi to highlight source code for various filenames with a range of file types. It needs to call the GeSHi::get_language_name_from_extension() function in order to create a source tag with the correct "lang" attribute given a filename. Currently I have to do some gyration, first calling SyntaxHighlight_GeSHi::hSpecialVersion_GeSHi() as a roundabout way to ensure that geshi/geshi.php is loaded in, then creating a GeSHi object to provide the member function. The php file is probably in $IP/extensions/SyntaxHighlight_GeSHi, it's true, but there's nothing requiring it to be located there. This function could be static, and if either it were moved to the SyntaxHighlight_GeSHi class, or a SyntaxHighlight_GeSHi class function were provided that calls it, it would allow me and others to get the job done without relying on undocumented implementation details. Or failing that, it would be helpful to add the GeSHi class to $wgAutoloadClasses. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l