Skip to content

Commit

Permalink
Revert "The gettext bind methods only need to be called once per page…
Browse files Browse the repository at this point in the history
… access"

This reverts commit ca6c3c4.

Per jan, this isn't worth optimizing due to internal caching
  • Loading branch information
slusarz committed Jan 28, 2014
1 parent 2131367 commit 0b8aa70
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions framework/Core/lib/Horde/Registry.php
Expand Up @@ -124,13 +124,6 @@ class Horde_Registry implements Horde_Shutdown_Task
*/
protected $_args = array();

/**
* Cached textdomain bindings.
*
* @var array
*/
protected $_bindCache = array();

/**
* Cached configuration information.
*
Expand Down Expand Up @@ -2706,17 +2699,12 @@ public function setLanguageEnvironment($lang = null, $app = null)
*/
public function setTextdomain($app, $directory)
{
if (isset($this->_bindCache[$app])) {
textdomain($app);
} else {
bindtextdomain($app, $directory);
textdomain($app);
bindtextdomain($app, $directory);
textdomain($app);

/* The existence of this function depends on the platform. */
if (function_exists('bind_textdomain_codeset')) {
bind_textdomain_codeset($app, 'UTF-8');
}
$this->_bindCache[$app] = true;
/* The existence of this function depends on the platform. */
if (function_exists('bind_textdomain_codeset')) {
bind_textdomain_codeset($app, 'UTF-8');
}
}

Expand Down

0 comments on commit 0b8aa70

Please sign in to comment.