cvs: pear /I18Nv2 Negotiator.php
| From: | Michael Wallner | Date: | Sun, 14 Mar 2004 15:27:00 +0000 |
| Subject: | cvs: pear /I18Nv2 Negotiator.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-17403@lists.php.net to get a copy of this message | ||
mike Sun Mar 14 10:27:00 2004 EDT
Modified files:
/pear/I18Nv2 Negotiator.php
Log:
* be shure that a country is actually returned
http://cvs.php.net/diff.php/pear/I18Nv2/Negotiator.php?r1=1.3&r2=1.4&ty=u
Index: pear/I18Nv2/Negotiator.php
diff -u pear/I18Nv2/Negotiator.php:1.3 pear/I18Nv2/Negotiator.php:1.4
--- pear/I18Nv2/Negotiator.php:1.3 Sun Mar 14 10:12:06 2004
+++ pear/I18Nv2/Negotiator.php Sun Mar 14 10:27:00 2004
@@ -16,7 +16,7 @@
// | Michael Wallner <mike@iworks.at> |
// +----------------------------------------------------------------------+
//
-// $Id: Negotiator.php,v 1.3 2004/03/14 15:12:06 mike Exp $
+// $Id: Negotiator.php,v 1.4 2004/03/14 15:27:00 mike Exp $
/**
* I18Nv2::Negotiator
@@ -31,7 +31,7 @@
* @author Naoki Shima <murahachibu@php.net>
* @author Wolfram Kriesing <wk@visionp.de>
* @author Michael Wallner <mike@php.net>
-* @version $Revision: 1.3 $
+* @version $Revision: 1.4 $
* @access public
* @package I18Nv2
*/
@@ -265,7 +265,7 @@
{
$lang = $this->_getMatch($langs, $this->_acceptLanguage, $this->_defaultLanguage);
$ctry = $this->_getMatch($countries, @$this->_country[$lang],
$this->_defaultCountry);
- return $lang . '_' . $ctry;
+ return $lang . ($ctry ? '_' . $ctry : '');
}
/**