From 76938a5d9747fdc71075125f633a91259cf8d3ad Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Wed, 7 Aug 2013 21:12:12 +0000
Subject: [PATCH] Avoid extra db query for schema signature

---
 include/class.config.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/class.config.php b/include/class.config.php
index 0a458764f..bf5110013 100644
--- a/include/class.config.php
+++ b/include/class.config.php
@@ -192,7 +192,8 @@ class OsticketConfig extends Config {
 
     function getSchemaSignature($section=null) {
 
-        if (!$section && ($v=$this->get('schema_signature')))
+        if ((!$section || $section == $this->section)
+                && ($v=$this->get('schema_signature')))
             return $v;
 
         // 1.7 after namespaced configuration, other namespace
-- 
GitLab