summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorxue <>2006-04-20 17:39:13 +0000
committerxue <>2006-04-20 17:39:13 +0000
commitc0da54ed28e4ed6d465286788de47c9af388c414 (patch)
tree4bc7dd6388d2b97809bb81de9d79a32c1e433d25 /framework/Web/UI
parent5d02ac2219c95459afb8f7dc7a0457b5c0e98fd0 (diff)
Some optimization of THtmlArea.
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/WebControls/THtmlArea.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/framework/Web/UI/WebControls/THtmlArea.php b/framework/Web/UI/WebControls/THtmlArea.php
index 038c7368..7e47d638 100644
--- a/framework/Web/UI/WebControls/THtmlArea.php
+++ b/framework/Web/UI/WebControls/THtmlArea.php
@@ -33,7 +33,7 @@ Prado::using('System.Web.UI.WebControls.TTextBox');
* under the situation.
*
* The default editor gives only the basic tool bar. To change or add
- * additional tool bars, use the Options property to add additional
+ * additional tool bars, use the {@link setOptions Options} property to add additional
* editor options with each options on a new line.
* See http://tinymce.moxiecode.com/tinymce/docs/index.html
* for a list of options. The options can be change/added as shown in the
@@ -79,7 +79,7 @@ Prado::using('System.Web.UI.WebControls.TTextBox');
class THtmlArea extends TTextBox
{
// Qiang: need to clean up the following (too inefficient)
- private $langs = array(
+ private static $_langs = array(
'da' => array('da'),
'fa' => array('fa'),
'hu' => array('hu'),
@@ -307,17 +307,21 @@ class THtmlArea extends TTextBox
{
$app = $this->getApplication()->getGlobalization();
if(empty($culture) && !is_null($app))
- $culture = $app->getCulture();
+ $culture = $app->getCulture();
$variants = array();
if(!is_null($app))
$variants = $app->getCultureVariants($culture);
//default the variant to "en"
if(count($variants) == 0)
- $variants[] = empty($culture) ? 'en' : strtolower($culture);
+ {
+ if($empty($culture))
+ return 'en';
+ $variants[] = strtolower($culture);
+ }
// TODO: triple loops???
- foreach($this->langs as $js => $langs)
+ foreach(self::$_langs as $js => $langs)
{
foreach($variants as $variant)
{