From: Carsten K. <car...@us...> - 2002-12-31 20:53:44
|
Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory sc8-pr-cvs1:/tmp/cvs-serv4146 Modified Files: PhpWeather.php Log Message: Bugfixes: Fixed menu language selection (incorrect parameters to $w->get_languages_select() & form input 'language' instead of 'lang'). Index: PhpWeather.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/PhpWeather.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -2 -b -p -d -r1.6 -r1.7 --- PhpWeather.php 29 Dec 2002 03:16:42 -0000 1.6 +++ PhpWeather.php 31 Dec 2002 20:53:40 -0000 1.7 @@ -12,7 +12,7 @@ rcs_id('$Id PhpWeather.php 2002-08-26 15 * <?plugin PhpWeather menu=true ?> * <?plugin PhpWeather icao=KJFK ?> - * <?plugin PhpWeather lang=en ?> + * <?plugin PhpWeather language=en ?> * <?plugin PhpWeather units=only_metric ?> - * <?plugin PhpWeather icao||=CYYZ lang||=en menu=true ?> + * <?plugin PhpWeather icao||=CYYZ cc||=CA language||=en menu=true ?> * * If you want a menu, and you also want to change the default station @@ -50,5 +50,5 @@ extends WikiPlugin return array('icao' => 'EKAH', 'cc' => 'DK', - 'lang' => 'en', + 'language' => 'en', 'menu' => false, 'units' => 'both_metric'); @@ -84,12 +84,12 @@ extends WikiPlugin /* We check and correct the language if necessary: */ - //if (!in_array($lang, array_keys($w->get_languages('text')))) { - if (!in_array($lang, array_keys(get_languages('text')))) { + //if (!in_array($language, array_keys($w->get_languages('text')))) { + if (!in_array($language, array_keys(get_languages('text')))) { trigger_error(sprintf(_("%s does not know about the language '%s', using 'en' instead."), - $this->getName(), $lang), E_USER_NOTICE); - $lang = 'en'; + $this->getName(), $language), E_USER_NOTICE); + $language = 'en'; } - $class = "pw_text_$lang"; + $class = "pw_text_$language"; require_once(PHPWEATHER_BASE_DIR . "/output/$class.php"); @@ -133,6 +133,6 @@ extends WikiPlugin /* We want to save the language: */ $p1->pushContent(HTML::input(array('type' => 'hidden', - 'name' => 'lang', - 'value' => $lang))); + 'name' => 'language', + 'value' => $language))); /* And also the ICAO: */ $p1->pushContent(HTML::input(array('type' => 'hidden', @@ -157,7 +157,7 @@ extends WikiPlugin $p2->pushContent(new RawXml(get_stations_select($w, $cc, $icao))); - $p2->pushContent(new RawXml(get_languages_select($w, $lang))); + $p2->pushContent(new RawXml(get_languages_select($language))); $p2->pushContent(HTML::input(array('type' => 'submit', - 'value' => 'Submit location'))); + 'value' => _("Submit location")))); $html->pushContent(HTML::form($form_arg, $p2)); @@ -170,4 +170,12 @@ extends WikiPlugin } }; + +/** + $Log$ + Revision 1.7 2002/12/31 20:53:40 carstenklapp + Bugfixes: Fixed menu language selection (incorrect parameters to + $w->get_languages_select() & form input 'language' instead of 'lang'). + + */ // For emacs users |