<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,22 +1,30 @@
 &lt;?php
 class JsController extends JsAppController {
-  var $name = 'Js';
-  var $uses = array('Js.JsLang');
+	var $name = 'Js';
+	var $uses = array('Js.JsLang');
 
-  function lang() {
-    $cache = true;
-    if (Configure::read('debug')) {
-      $cache = false;
-    }
+	function beforeFilter() {
+		parent::beforeFilter();
+		if(!empty($this-&gt;Auth)) {
+			$this-&gt;Auth-&gt;allow('lang');
+		}
+	}
 
-    if ($js = $this-&gt;JsLang-&gt;i18n($this-&gt;params['pass'], $cache)) {
-      header('Content-type: text/javascript');
-      echo $js;
-      die;
-    } else {
-      $this-&gt;cakeError('error404');
-    }
-  }
+	function lang() {
+		$cache = true;
+		if (Configure::read('debug')) {
+			$cache = false;
+			Configure::write('debug', 0);
+		}
+
+		if ($js = $this-&gt;JsLang-&gt;i18n($this-&gt;params['pass'], $cache)) {
+			header('Content-type: text/javascript');
+			echo $js;
+			die;
+		} else {
+			$this-&gt;cakeError('error404');
+		}
+	}
 }
 
 ?&gt;
\ No newline at end of file</diff>
      <filename>controllers/js_controller.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>53574e907b1fb3f3a8858a954794ce2358ff0154</id>
    </parent>
  </parents>
  <author>
    <name>Matt Curry</name>
    <email>matt@pseudocoder.com</email>
  </author>
  <url>http://github.com/mcurry/js/commit/96b2a85618f82c01597d1c7e85083670899a2d03</url>
  <id>96b2a85618f82c01597d1c7e85083670899a2d03</id>
  <committed-date>2009-09-30T11:44:06-07:00</committed-date>
  <authored-date>2009-09-30T11:44:06-07:00</authored-date>
  <message>updated with suggestions from oscarcarlsson</message>
  <tree>dd6fe6d6a1eb35d5deda776f2564850af717c0dc</tree>
  <committer>
    <name>Matt Curry</name>
    <email>matt@pseudocoder.com</email>
  </committer>
</commit>
