Index: header.php
===================================================================
--- header.php	(revision 3001)
+++ header.php	(revision 3006)
@@ -4,7 +4,7 @@
  * XMB 1.9.12
  *
  * Developed And Maintained By The XMB Group
- * Copyright (c) 2001-2021, The XMB Group
+ * Copyright (c) 2001-2023, The XMB Group
  * https://www.xmbforum2.com/
  *
  * This program is free software; you can redistribute it and/or
@@ -40,12 +40,12 @@
 $versioncompany = 'The XMB Group';
 $versionshort = '1.9.12';
 $versiongeneral = 'XMB 1.9.12';
-$copyright = '2001-2021';
+$copyright = '2001-2023';
 $alpha = '';
 $beta = '';
 $gamma = '';
 $service_pack = '';
-$versionbuild = 20210416;
+$versionbuild = 20230715;
 $mtime = explode(" ", microtime());
 $starttime = $mtime[1] + $mtime[0];
 $onlinetime = time();
Index: include/sql.inc.php
===================================================================
--- include/sql.inc.php	(revision 3001)
+++ include/sql.inc.php	(revision 3006)
@@ -4,7 +4,7 @@
  * XMB 1.9.12
  *
  * Developed And Maintained By The XMB Group
- * Copyright (c) 2001-2021, The XMB Group
+ * Copyright (c) 2001-2023, The XMB Group
  * https://www.xmbforum2.com/
  *
  * This program is free software; you can redistribute it and/or
@@ -1279,12 +1279,13 @@
  * SQL command
  *
  * @since 1.9.12
+ * @param int $tid Thread ID number.
+ * @param bool $quarantine Save this record in a private table for later review?
+ * @return int Poll ID number.
  */
 function addVoteDesc( int $tid, bool $quarantine = false ): int {
     global $db;
 
-    $sqltext = $db->escape( $text );
-
     $table = $quarantine ? X_PREFIX.'hold_vote_desc' : X_PREFIX.'vote_desc';
 
     $db->query( "INSERT INTO $table SET topic_id = $tid" );
@@ -1342,4 +1343,66 @@
     $db->query("INSERT INTO $table (vote_id, vote_option_id, vote_option_text, vote_result) VALUES $sqlrows");
 }
 
+/**
+ * Remove a user's guest record and any other stale records.
+ *
+ * @since 1.9.12.04
+ * @param string $address Current remote IP address.
+ * @param string $username Current user.
+ * @param int $timelimit The timestamp before which all records may be purged.
+ */
+function deleteOldWhosonline( string $address, string $username, int $timelimit ) {
+    global $db;
+
+    $db->escape_fast( $address );
+    $db->escape_fast( $username );
+    
+    $db->query("DELETE FROM ".X_PREFIX."whosonline WHERE ((ip='$address' AND username='xguest123') OR (username='$username') OR (time < $timelimit))");
+}
+
+/**
+ * Add a Who's Online Record
+ *
+ * @since 1.9.12.04
+ * @param string $username Current user.
+ * @param string $address Current remote IP address.
+ * @param int $time The session start timestamp.
+ * @param string $url The relative URL.
+ * @param int $invisible Should be 0 for no or 1 for yes.
+ */
+function addWhosonline( string $address, string $username, int $time, string $url, int $invisible ) {
+    global $db;
+
+    $db->escape_fast( $address );
+    $db->escape_fast( $username );
+    $db->escape_fast( $url );
+
+    $db->query("INSERT INTO ".X_PREFIX."whosonline (username, ip, time, location, invisible) VALUES ('$username', '$address', $time, '$url', $invisible)");
+}
+
+/**
+ * Retrieve the vote_id value based on a tid.
+ *
+ * @since 1.9.12.04
+ * @param int $time The session start timestamp.
+ * @param bool $quarantine Was this record in a private table for later review?
+ * @return int Poll ID number or zero if not found.
+*/
+function getPollId( int $tid, bool $quarantine = false  ) {
+    global $db;
+
+    $table = $quarantine ? X_PREFIX.'hold_vote_desc' : X_PREFIX.'vote_desc';
+
+    $query = $db->query("SELECT vote_id FROM $table WHERE topic_id = $tid");
+    
+    if ( $db->num_rows( $query ) === 0 ) {
+        $id = 0;
+    } else {
+        $id = (int) $db->result($query, 0);
+    }
+    $db->free_result($query);
+    
+    return $id;
+}
+
 return;
\ No newline at end of file
Index: include/functions.inc.php
===================================================================
--- include/functions.inc.php	(revision 3001)
+++ include/functions.inc.php	(revision 3006)
@@ -4,7 +4,7 @@
  * XMB 1.9.12
  *
  * Developed And Maintained By The XMB Group
- * Copyright (c) 2001-2021, The XMB Group
+ * Copyright (c) 2001-2023, The XMB Group
  * https://www.xmbforum2.com/
  *
  * This program is free software; you can redistribute it and/or
@@ -185,10 +185,9 @@
         global $onlineip, $url;
 
         $wollocation = substr($url, 0, $maxurl);
-        $db->escape_fast($wollocation);
         $newtime = $onlinetime - X_ONLINE_TIMER;
-        $db->query("DELETE FROM ".X_PREFIX."whosonline WHERE ((ip='$onlineip' && username='xguest123') OR (username='$xmbuser') OR (time < '$newtime'))");
-        $db->query("INSERT INTO ".X_PREFIX."whosonline (username, ip, time, location, invisible) VALUES ('$onlineuser', '$onlineip', $onlinetime, '$wollocation', '$invisible')");
+        \XMB\SQL\deleteOldWhosonline( $onlineip, $self['username'], $newtime );
+        \XMB\SQL\addWhosonline( $onlineip, $self['username'], $onlinetime, $wollocation, $invisible );
     }
 }
 
Index: member.php
===================================================================
--- member.php	(revision 3001)
+++ member.php	(revision 3006)
@@ -4,7 +4,7 @@
  * XMB 1.9.12
  *
  * Developed And Maintained By The XMB Group
- * Copyright (c) 2001-2021, The XMB Group
+ * Copyright (c) 2001-2023, The XMB Group
  * https://www.xmbforum2.com/
  *
  * This program is free software; you can redistribute it and/or
@@ -123,7 +123,7 @@
                         // Check Google's results
                         $response = postedVar( 'g-recaptcha-response', null, false, false );
                         $ssl_lib = ROOT.'trust.pem';
-                        $installed = time() < 1639526400; // Expires 2021-12-15 and won't be used until updated.
+                        $installed = time() < 2097705600; // Expires 2036-06-21 and won't be used until updated.
                         $curl = curl_init( 'https://www.google.com/recaptcha/api/siteverify' );
 
                         curl_setopt_array( $curl, array(
Index: quarantine.php
===================================================================
--- quarantine.php	(revision 3001)
+++ quarantine.php	(revision 3006)
@@ -4,7 +4,7 @@
  * XMB 1.9.12
  *
  * Developed And Maintained By The XMB Group
- * Copyright (c) 2001-2021, The XMB Group
+ * Copyright (c) 2001-2023, The XMB Group
  * https://www.xmbforum2.com/
  *
  * This program is free software; you can redistribute it and/or
@@ -131,12 +131,7 @@
             $vote_id = $voted = 0;
 
             if ( '1' === $thread['pollopts'] ) {
-                $query = $db->query("SELECT vote_id FROM ".X_PREFIX."hold_vote_desc WHERE topic_id='$tid'");
-                if ($query) {
-                    $vote_id = $db->fetch_array($query);
-                    $vote_id = (int) $vote_id['vote_id'];
-                }
-                $db->free_result($query);
+                $vote_id = \XMB\SQL\getPollId( $tid, true );
             }
 
             if ($vote_id > 0) {
@@ -609,17 +604,19 @@
             $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum+1 WHERE username='$member'");
             \XMB\Attach\approve( $oldpid, $newpid );
             if (intval($thread['pollopts']) != 0) {
-                $oldpoll = $db->result($db->query("SELECT vote_id FROM ".X_PREFIX."hold_vote_desc WHERE topic_id = {$thread['tid']}"), 0);
-                $db->query("INSERT INTO ".X_PREFIX."vote_desc SET topic_id = $newtid");
-                $newpoll = $db->insert_id();
-                $db->query(
-                    "INSERT INTO ".X_PREFIX."vote_results " .
-                    "      ( vote_id, vote_option_id, vote_option_text, vote_result) " .
-                    "SELECT $newpoll, vote_option_id, vote_option_text, vote_result " .
-                    "FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll"
-                );
-                $db->query("DELETE FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll");
-                $db->query("DELETE FROM ".X_PREFIX."hold_vote_desc WHERE vote_id = $oldpoll");
+                $oldpoll = \XMB\SQL\getPollId( $thread['tid'], true );
+                if ( $oldpoll !== 0 ) {
+                    $db->query("INSERT INTO ".X_PREFIX."vote_desc SET topic_id = $newtid");
+                    $newpoll = $db->insert_id();
+                    $db->query(
+                        "INSERT INTO ".X_PREFIX."vote_results " .
+                        "      ( vote_id, vote_option_id, vote_option_text, vote_result) " .
+                        "SELECT $newpoll, vote_option_id, vote_option_text, vote_result " .
+                        "FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll"
+                    );
+                    $db->query("DELETE FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll");
+                    $db->query("DELETE FROM ".X_PREFIX."hold_vote_desc WHERE vote_id = $oldpoll");
+                }
             }
             $count2 = (int) $db->result($db->query("SELECT COUNT(*) FROM ".X_PREFIX."hold_favorites WHERE tid={$thread['tid']} AND username='$member' AND type='subscription'"), 0);
             if ($count2 != 0) {
@@ -711,9 +708,11 @@
             $oldpid = $db->result($db->query("SELECT pid FROM ".X_PREFIX."hold_posts WHERE newtid = {$thread['tid']}"), 0);
             $db->query("DELETE FROM ".X_PREFIX."hold_attachments WHERE pid = $oldpid");
             if (intval($thread['pollopts']) != 0) {
-                $oldpoll = $db->result($db->query("SELECT vote_id FROM ".X_PREFIX."hold_vote_desc WHERE topic_id = {$thread['tid']}"), 0);
-                $db->query("DELETE FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll");
-                $db->query("DELETE FROM ".X_PREFIX."hold_vote_desc WHERE vote_id = $oldpoll");
+                $oldpoll = \XMB\SQL\getPollId( $thread['tid'], true );
+                if ( $oldpoll !== 0 ) {
+                    $db->query("DELETE FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll");
+                    $db->query("DELETE FROM ".X_PREFIX."hold_vote_desc WHERE vote_id = $oldpoll");
+                }
             }
             $db->query("DELETE FROM ".X_PREFIX."hold_favorites WHERE tid={$thread['tid']}");
             $db->query("DELETE FROM ".X_PREFIX."hold_posts WHERE pid = $oldpid");
@@ -776,22 +775,24 @@
     $db->query("UPDATE ".X_PREFIX."members SET postnum=postnum+1 WHERE username='$member'");
     \XMB\Attach\approve( $oldpid, $newpid );
     if (intval($thread['pollopts']) != 0) {
-        $oldpoll = $db->result($db->query("SELECT vote_id FROM ".X_PREFIX."hold_vote_desc WHERE topic_id = {$thread['tid']}"), 0);
-        $db->query(
-            "INSERT INTO ".X_PREFIX."vote_desc " .
-            "      (topic_id) " .
-            "SELECT  $newtid " .
-            "FROM ".X_PREFIX."hold_vote_desc WHERE topic_id = {$thread['tid']}"
-        );
-        $newpoll = $db->insert_id();
-        $db->query(
-            "INSERT INTO ".X_PREFIX."vote_results " .
-            "      ( vote_id, vote_option_id, vote_option_text, vote_result) " .
-            "SELECT $newpoll, vote_option_id, vote_option_text, vote_result " .
-            "FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll"
-        );
-        $db->query("DELETE FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll");
-        $db->query("DELETE FROM ".X_PREFIX."hold_vote_desc WHERE vote_id = $oldpoll");
+        $oldpoll = \XMB\SQL\getPollId( $thread['tid'], true );
+        if ( $oldpoll !== 0 ) {
+            $db->query(
+                "INSERT INTO ".X_PREFIX."vote_desc " .
+                "      (topic_id) " .
+                "SELECT  $newtid " .
+                "FROM ".X_PREFIX."hold_vote_desc WHERE topic_id = {$thread['tid']}"
+            );
+            $newpoll = $db->insert_id();
+            $db->query(
+                "INSERT INTO ".X_PREFIX."vote_results " .
+                "      ( vote_id, vote_option_id, vote_option_text, vote_result) " .
+                "SELECT $newpoll, vote_option_id, vote_option_text, vote_result " .
+                "FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll"
+            );
+            $db->query("DELETE FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll");
+            $db->query("DELETE FROM ".X_PREFIX."hold_vote_desc WHERE vote_id = $oldpoll");
+        }
     }
     $count2 = (int) $db->result($db->query("SELECT COUNT(*) FROM ".X_PREFIX."hold_favorites WHERE tid={$thread['tid']} AND username='$member' AND type='subscription'"), 0);
     if ($count2 != 0) {
@@ -891,9 +892,11 @@
     $oldpid = $db->result($db->query("SELECT pid FROM ".X_PREFIX."hold_posts WHERE newtid = {$thread['tid']}"), 0);
     $db->query("DELETE FROM ".X_PREFIX."hold_attachments WHERE pid = $oldpid");
     if (intval($thread['pollopts']) != 0) {
-        $oldpoll = $db->result($db->query("SELECT vote_id FROM ".X_PREFIX."hold_vote_desc WHERE topic_id = {$thread['tid']}"), 0);
-        $db->query("DELETE FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll");
-        $db->query("DELETE FROM ".X_PREFIX."hold_vote_desc WHERE vote_id = $oldpoll");
+        $oldpoll = \XMB\SQL\getPollId( $thread['tid'], true );
+        if ( $oldpoll !== 0 ) {
+            $db->query("DELETE FROM ".X_PREFIX."hold_vote_results WHERE vote_id = $oldpoll");
+            $db->query("DELETE FROM ".X_PREFIX."hold_vote_desc WHERE vote_id = $oldpoll");
+        }
     }
     $db->query("DELETE FROM ".X_PREFIX."hold_favorites WHERE tid={$thread['tid']}");
     $db->query("DELETE FROM ".X_PREFIX."hold_posts WHERE pid = $oldpid");
Index: viewthread.php
===================================================================
--- viewthread.php	(revision 3001)
+++ viewthread.php	(revision 3006)
@@ -4,7 +4,7 @@
  * XMB 1.9.12
  *
  * Developed And Maintained By The XMB Group
- * Copyright (c) 2001-2021, The XMB Group
+ * Copyright (c) 2001-2023, The XMB Group
  * https://www.xmbforum2.com/
  *
  * This program is free software; you can redistribute it and/or
@@ -379,12 +379,7 @@
     $vote_id = $voted = 0;
 
     if ( '1' === $thread['pollopts'] ) {
-        $query = $db->query("SELECT vote_id FROM ".X_PREFIX."vote_desc WHERE topic_id='$tid'");
-        if ($query) {
-            $vote_id = $db->fetch_array($query);
-            $vote_id = (int) $vote_id['vote_id'];
-        }
-        $db->free_result($query);
+        $vote_id = \XMB\SQL\getPollId( $tid );
     }
 
     if ($vote_id > 0) {
Index: vtmisc.php
===================================================================
--- vtmisc.php	(revision 3001)
+++ vtmisc.php	(revision 3006)
@@ -4,7 +4,7 @@
  * XMB 1.9.12
  *
  * Developed And Maintained By The XMB Group
- * Copyright (c) 2001-2021, The XMB Group
+ * Copyright (c) 2001-2023, The XMB Group
  * https://www.xmbforum2.com/
  *
  * This program is free software; you can redistribute it and/or
@@ -163,15 +163,11 @@
 
     // Does a poll exist for this thread?
     $tid = intval($tid);
-    $query = $db->query("SELECT vote_id FROM ".X_PREFIX."vote_desc WHERE topic_id=$tid");
-    if ($query === false) {
+    $vote_id = \XMB\SQL\getPollId( $tid );
+    if ( $vote_id === 0 ) {
         error($lang['pollvotenotselected'], false);
     }
 
-    $vote_id = $db->fetch_array($query);
-    $vote_id = $vote_id['vote_id'];
-    $db->free_result($query);
-
     // does the poll option exist?
     $query = $db->query("SELECT COUNT(vote_option_id) FROM ".X_PREFIX."vote_results WHERE vote_id=$vote_id AND vote_option_id=$postopnum");
     $vote_result = intval($db->result($query, 0)); //Aggregate functions with no grouping always return 1 row.
Index: trust.pem
===================================================================
--- trust.pem	(revision 3001)
+++ trust.pem	(revision 3006)
@@ -1,60 +1,48 @@
-##expires2021-12-15
-##https://curl.haxx.se/docs/caextract.html
-## Bundle of CA Root Certificates
-##
-## Certificate data from Mozilla as of: Wed Jul 22 03:12:14 2020 GMT
-##
-## This is a bundle of X.509 certificates of public Certificate Authorities
-## (CA). These were automatically extracted from Mozilla's root certificates
-## file (certdata.txt).  This file can be found in the mozilla source tree:
-## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
-##
-## It contains the certificates in PEM format and therefore
-## can be directly used with curl / libcurl / php_curl, or with
-## an Apache+mod_ssl webserver for SSL client authentication.
-## Just configure this file as the SSLCACertificateFile.
-##
-
-
-GlobalSign Root CA - R2
-=======================
------BEGIN CERTIFICATE-----
-MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv
-YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
-bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
-aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
-bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6
-ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp
-s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN
-S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL
-TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C
-ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
-FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i
-YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN
-BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp
-9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu
-01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7
-9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
-TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
------END CERTIFICATE-----
-
-GeoTrust Global CA
-==================
------BEGIN CERTIFICATE-----
-MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
-Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw
-MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j
-LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
-CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo
-BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet
-8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc
-T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU
-vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD
-AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk
-DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q
-zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4
-d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2
-mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p
-XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm
-Mw==
------END CERTIFICATE-----
\ No newline at end of file
+##expires2036-06-21
+##https://curl.se/docs/caextract.html
+## Bundle of CA Root Certificates
+##
+## Certificate data from Mozilla as of: Tue May 30 03:12:04 2023 GMT
+##
+## This is a bundle of X.509 certificates of public Certificate Authorities
+## (CA). These were automatically extracted from Mozilla's root certificates
+## file (certdata.txt).  This file can be found in the mozilla source tree:
+## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
+##
+## It contains the certificates in PEM format and therefore
+## can be directly used with curl / libcurl / php_curl, or with
+## an Apache+mod_ssl webserver for SSL client authentication.
+## Just configure this file as the SSLCACertificateFile.
+##
+
+
+GTS Root R1
+===========
+-----BEGIN CERTIFICATE-----
+MIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQswCQYDVQQGEwJV
+UzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3Qg
+UjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UE
+ChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaM
+f/vo27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7wCl7raKb0
+xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjwTcLCeoiKu7rPWRnWr4+w
+B7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0PfyblqAj+lug8aJRT7oM6iCsVlgmy4HqMLnXW
+nOunVmSPlk9orj2XwoSPwLxAwAtcvfaHszVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk
+9+aCEI3oncKKiPo4Zor8Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zq
+kUspzBmkMiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92wO1A
+K/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70paDPvOmbsB4om3xPX
+V2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrNVjzRlwW5y0vtOUucxD/SVRNuJLDW
+cfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0T
+AQH/BAUwAwEB/zAdBgNVHQ4EFgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQAD
+ggIBAJ+qQibbC5u+/x6Wki4+omVKapi6Ist9wTrYggoGxval3sBOh2Z5ofmmWJyq+bXmYOfg6LEe
+QkEzCzc9zolwFcq1JKjPa7XSQCGYzyI0zzvFIoTgxQ6KfF2I5DUkzps+GlQebtuyh6f88/qBVRRi
+ClmpIgUxPoLW7ttXNLwzldMXG+gnoot7TiYaelpkttGsN/H9oPM47HLwEXWdyzRSjeZ2axfG34ar
+J45JK3VmgRAhpuo+9K4l/3wV3s6MJT/KYnAK9y8JZgfIPxz88NtFMN9iiMG1D53Dn0reWVlHxYci
+NuaCp+0KueIHoI17eko8cdLiA6EfMgfdG+RCzgwARWGAtQsgWSl4vflVy2PFPEz0tv/bal8xa5me
+LMFrUKTX5hgUvYU/Z6tGn6D/Qqc6f1zLXbBwHSs09dR2CQzreExZBfMzQsNhFRAbd03OIozUhfJF
+fbdT6u9AWpQKXCBfTkBdYiJ23//OYb2MI3jSNwLgjt7RETeJ9r/tSQdirpLsQBqvFAnZ0E6yove+
+7u7Y/9waLd64NnHi/Hm3lCXRSHNboTXns5lndcEZOitHTtNCjv0xyBZm2tIMPNuzjsmhDYAPexZ3
+FL//2wmUspO8IFgV6dtxQ/PeEMMA3KgqlbbC1j+Qa3bbbP6MvPJwNQzcmRk13NfIRmPVNnGuV/u3
+gm3c
+-----END CERTIFICATE-----
+
Index: templates.xmb
===================================================================
--- templates.xmb	(revision 3001)
+++ templates.xmb	(revision 3006)
@@ -1453,7 +1453,7 @@
 [$lang[textserverload] <strong>$load[0]</strong>]
 
 |#*XMB TEMPLATE FILE*#|footer_phpsql|#*XMB TEMPLATE*#|
-[$lang[textphp] <strong>${php_duration}%</strong> - $lang[textsql] <strong>${db_duration}%</strong>]
+[$lang[textphp] <strong>$php_duration%</strong> - $lang[textsql] <strong>$db_duration%</strong>]
 
 |#*XMB TEMPLATE FILE*#|footer_querynum|#*XMB TEMPLATE*#|
 [$lang[queries]: <strong>$querynum</strong>]
Index: cp2.php
===================================================================
--- cp2.php	(revision 3001)
+++ cp2.php	(revision 3006)
@@ -2050,7 +2050,7 @@
         <tr bgcolor="<?php echo $altbg2?>">
         <td align="center">
         <form method="post" action="cp2.php?action=templates&amp;tid=new">
-        <input type="hidden" name="token" value="<?php echo \XMB\Token\create( 'Control Panel/Templates/New', $newtemplatename, X_NONCE_FORM_EXP ); ?>" />
+        <input type="hidden" name="token" value="<?php echo \XMB\Token\create( 'Control Panel/Templates/Add', $newtemplatename, X_NONCE_FORM_EXP ); ?>" />
         <table cellspacing="0" cellpadding="0" border="0" width="550" align="center">
         <tr>
         <td bgcolor="<?php echo $bordercolor?>">
