Update of /cvsroot/geshi/geshi-src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27829
Modified Files:
class.geshi.php
Log Message:
Version bump
Index: class.geshi.php
============================================================
=======
RCS file: /cvsroot/geshi/geshi-src/class.geshi.php,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** class.geshi.php 25 Jun 2006 08:57:16 -0000 1.63
--- class.geshi.php 11 Sep 2006 05:00:29 -0000 1.64
***************
*** 43,47 ****
/** GeSHi Version */
! define('GESHI_VERSION', '1.1.2alpha2');
/** Set the correct directory separator */
--- 43,47 ----
/** GeSHi Version */
! define('GESHI_VERSION', '1.1.2alpha3dev');
/** Set the correct directory separator */
***************
*** 319,323 ****
* be close to zero if you are calling this method
after second and subsequent calls
* to { link GeSHi::parseCode()}.</li>
! * <li>If youpass
<b>'parse'</b>, you will get the time it took
to parse the last
* time { link GeSHi::parseCode()} was called.
* </ul>
--- 319,323 ----
* be close to zero if you are calling this method
after second and subsequent calls
* to { link GeSHi::parseCode()}.</li>
! * <li>If you pass
<b>'parse'</b>, you will get the time it took
to parse the last
* time { link GeSHi::parseCode()} was called.
* </ul>
***************
*** 383,386 ****
--- 383,423 ----
// }}}
+ // {{{ getSupportedLanguages()
+
+ /**
+ * todo document this function
+ * todo This and other methods share a lot of directory
traversal
+ * functionality, which could be split out somehow.
+ * todo actually, this should be implemented using a
registry
+ */
+ function getSupportedLanguages ($return_human = false)
+ {
+ $languages = array();
+
+ $ignore = array('.', '..', 'CVS');
+ $dh = opendir(GESHI_LANGUAGES_ROOT);
+ while (false !== ($dir = readdir($dh))) {
+ if (in_array($dir, $ignore) ||
is_file(GESHI_LANGUAGES_ROOT . $dir)) continue;
+ // Check the directory for the dialect files
+ $ldh = opendir(GESHI_LANGUAGES_ROOT . $dir);
+ while (false !== ($file = readdir($ldh))) {
+ if (in_array($file, $ignore) ||
is_dir(GESHI_LANGUAGES_ROOT . "$dir/$file") ||
substr($file, -4) != '.php') continue;
+
+ // Found a language file
+ $file = substr($file, 0, -4);
+ if ('common' == $file || 'class' ==
substr($file, 0, 5)) continue;
+
+ if ($return_human) {
+ $languages["$dir/$file"] =
GeSHi::getHumanLanguageName("$dir/$file");
+ } else {
+ $languages[] =
"$dir/$file";
+ }
+ }
+ }
+
+ return $languages;
+ }
+
+ // }}}
// {{{ getSupportedThemes()
***************
*** 505,508 ****
--- 542,565 ----
// }}}
+ // {{{ getHumanLanguageName()
+
+ /**
+ * Given a language name, return a human version of it
+ *
+ * param string $language The language name to get the
human version of
+ * return string The human language name, or
<kbd>false</kbd> if the
+ * language does not exist
+ * static
+ * todo actually implement this function
+ * since 1.1.2
+ */
+ function getHumanLanguageName ($language)
+ {
+ $human_name = '';
+ $language = GeSHi::_clean($language);
+ return $language;
+ }
+
+ // }}}
// {{{ getHumanThemeName()
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
geshi-cvs mailing list
geshi-cvs lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geshi-cvs
|