diff --git a/include/mysqli.php b/include/mysqli.php
index 4a477bea5b3b5e9d696aaadd25cb30bec65a45d3..8955ea99f335685bba44f0b3570c7715ab39ee49 100644
--- a/include/mysqli.php
+++ b/include/mysqli.php
@@ -40,6 +40,9 @@ function db_connect($host, $user, $passwd, $options = array()) {
 
     $port = ini_get("mysqli.default_port");
     $socket = ini_get("mysqli.default_socket");
+    $persistent = stripos($host, 'p:') === 0;
+    if ($persistent)
+        $host = substr($host, 2);
     if (strpos($host, ':') !== false) {
         list($host, $portspec) = explode(':', $host);
         // PHP may not honor the port number if connecting to 'localhost'
@@ -54,6 +57,9 @@ function db_connect($host, $user, $passwd, $options = array()) {
         }
     }
 
+    if ($persistent)
+        $host = 'p:' . $host;
+
     // Connect
     $start = microtime(true);
     if (!@$__db->real_connect($host, $user, $passwd, null, $port, $socket))
diff --git a/include/staff/templates/user-lookup.tmpl.php b/include/staff/templates/user-lookup.tmpl.php
index e826e738bbf9a53fd54b31a00bf8b25032128f1f..3604ed5a29ddff2246343d69a41a32a9cad810fc 100644
--- a/include/staff/templates/user-lookup.tmpl.php
+++ b/include/staff/templates/user-lookup.tmpl.php
@@ -46,7 +46,7 @@ if ($info['error']) {
 </form>
 </div>
 <div id="new-user-form" style="display:<?php echo $user ? 'none' :'block'; ?>;">
-<form method="post" class="user" action="<?php echo $info['action'] ?  $info['action'] : '#users/lookup/form'; ?>">
+<form method="post" class="user" action="<?php echo $info['action'] ?: '#users/lookup/form'; ?>">
     <table width="100%" class="fixed">
     <?php
         if(!$form) $form = UserForm::getInstance();
diff --git a/setup/inc/class.installer.php b/setup/inc/class.installer.php
index 3912a3a99a8d66049adb9de64b51b49e837c248d..cc18ba3e949ced04453f15205329a297b4315b84 100644
--- a/setup/inc/class.installer.php
+++ b/setup/inc/class.installer.php
@@ -61,6 +61,7 @@ class Installer extends SetupWizard {
         $f['dbuser']        = array('type'=>'string',   'required'=>1, 'error'=>'Username required');
         $f['dbpass']        = array('type'=>'string',   'required'=>1, 'error'=>'password required');
 
+        $vars = array_map('trim', $vars);
 
         if(!Validator::process($f,$vars,$this->errors) && !$this->errors['err'])
             $this->errors['err']='Missing or invalid data - correct the errors and try again.';
diff --git a/setup/test/tests/test.jslint.php b/setup/test/tests/test.jslint.php
new file mode 100644
index 0000000000000000000000000000000000000000..e9fd1bbe07ae64adc56cdb62acf953980ece0f86
--- /dev/null
+++ b/setup/test/tests/test.jslint.php
@@ -0,0 +1,25 @@
+<?php
+require_once "class.test.php";
+
+class JsSyntaxTest extends Test {
+    var $name = "JavaScript Syntax Checks";
+
+    function testLintErrors() {
+        $exit = 0;
+        $root = get_osticket_root_path();
+        foreach (glob_recursive("$root/*.js") as $s) {
+            ob_start();
+            system("jsl -process $s", $exit);
+            $line = ob_get_contents();
+            ob_end_clean();
+            if ($exit == 3)
+                $this->fail($s, 0, $line);
+            else
+                $this->pass();
+        }
+    }
+}
+
+return 'JsSyntaxTest';
+?>
+