[TEP-COMMIT] [CVS catalog] add a new global database query debugging parameter to the debug service

hpdl-OfajU3CKLf1/[email protected] 28 Nov 2004 20:04:07 -0000
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>catalog/catalog/includes</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt>classes/database/<a href="#file1">mysql.php</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/database/mysql.php?rev=1.6&amp;content-type=text/vnd.viewcvs-markup">1.6</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/database/mysql.php.diff?r1=1.6&amp;r2=1.7">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/database/mysql.php?rev=1.7&amp;content-type=text/vnd.viewcvs-markup">1.7</a></td></tr>
<tr class="alt"><td><tt>modules/services/<a href="#file2">debug.php</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/debug.php?rev=1.3&amp;content-type=text/vnd.viewcvs-markup">1.3</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/debug.php.diff?r1=1.3&amp;r2=1.4">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/debug.php?rev=1.4&amp;content-type=text/vnd.viewcvs-markup">1.4</a></td></tr>
<tr><td></td><td align="right" id="added">+9</td><td align="right" id="removed">-6</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
add a new global database query debugging parameter to the debug service
module
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes">classes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/database">database</a><br /></span>
<div class="fileheader"><big><b>mysql.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/database/mysql.php?rev=1.6&amp;content-type=text/vnd.viewcvs-markup">1.6</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/database/mysql.php.diff?r1=1.6&amp;r2=1.7">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/classes/database/mysql.php?rev=1.7&amp;content-type=text/vnd.viewcvs-markup">1.7</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- mysql.php	2004/11/28 19:29:24	1.6
+++ mysql.php	2004/11/28 20:04:06	1.7
@@ -92,14 +92,16 @@
</small></pre><pre class="diff" id="context">           $debug = true;
         }
 
</pre><pre class="diff" id="removed">-        if ( ($debug === true) &amp;&amp; ( (isset($osC_Services) === false) || (isset($osC_Services) &amp;&amp; ($osC_Services-&gt;isStarted('debug') === false)) ) ) {
-          $debug = false;
-        }
-
</pre><pre class="diff" id="context">         if (isset($osC_Services) &amp;&amp; $osC_Services-&gt;isStarted('debug')) {
</pre><pre class="diff" id="added">+          if ( ($debug === false) &amp;&amp; (SERVICE_DEBUG_OUTPUT_DB_QUERIES == 'True') ) {
+            $debug = true;
+          }
+
</pre><pre class="diff" id="context">           if (tep_not_null(SERVICE_DEBUG_EXECUTION_TIME_LOG) &amp;&amp; (SERVICE_DEBUG_LOG_DB_QUERIES == 'True')) {
             @error_log('QUERY ' . $query . "\n", 3, SERVICE_DEBUG_EXECUTION_TIME_LOG);
           }
</pre><pre class="diff" id="added">+        } elseif ($debug === true) {
+          $debug = false;
</pre><pre class="diff" id="context">         }
 
         if ($debug === true) {
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog">catalog</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules">modules</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services">services</a><br /></span>
<div class="fileheader"><big><b>debug.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/debug.php?rev=1.3&amp;content-type=text/vnd.viewcvs-markup">1.3</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/debug.php.diff?r1=1.3&amp;r2=1.4">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/catalog/catalog/includes/modules/services/debug.php?rev=1.4&amp;content-type=text/vnd.viewcvs-markup">1.4</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.3 -r1.4
--- debug.php	2004/11/28 18:39:09	1.3
+++ debug.php	2004/11/28 20:04:06	1.4
@@ -14,7 +14,7 @@
</small></pre><pre class="diff" id="context">     var $title = 'Debug',
         $description = 'Display collected debug information.',
         $uninstallable = true,
</pre><pre class="diff" id="removed">-        $depends,
</pre><pre class="diff" id="added">+        $depends = 'language',
</pre><pre class="diff" id="context">         $preceeds;
 
     function start() {
</pre><pre class="diff"><small id="info">@@ -101,6 +101,7 @@
</small></pre><pre class="diff" id="context">       $osC_Database-&gt;simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Page Execution Time Log File', 'SERVICE_DEBUG_EXECUTION_TIME_LOG', '', 'Location of the page execution time log file (eg, /www/log/page_parse.log).', '6', '0', now())");
       $osC_Database-&gt;simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Show The Page Execution Time', 'SERVICE_DEBUG_EXECUTION_DISPLAY', 'True', 'Show the page execution time.', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
       $osC_Database-&gt;simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Log Database Queries', 'SERVICE_DEBUG_LOG_DB_QUERIES', 'False', 'Log all database queries in the page execution time log file.', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
</pre><pre class="diff" id="added">+      $osC_Database-&gt;simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Show Database Queries', 'SERVICE_DEBUG_OUTPUT_DB_QUERIES', 'False', 'Show all database queries made.', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
</pre><pre class="diff" id="context">       $osC_Database-&gt;simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Show Development Version Warning', 'SERVICE_DEBUG_SHOW_DEVELOPMENT_WARNING', 'True', 'Show an osCommerce development version warning message.', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
       $osC_Database-&gt;simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Check Language Locale', 'SERVICE_DEBUG_CHECK_LOCALE', 'True', 'Show a warning message if the set language locale does not exist on the server.', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
       $osC_Database-&gt;simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Check Installation Module', 'SERVICE_DEBUG_CHECK_INSTALLATION_MODULE', 'True', 'Show a warning message if the installation module exists.', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
</pre><pre class="diff"><small id="info">@@ -117,7 +118,7 @@
</small></pre><pre class="diff" id="context">     }
 
     function keys() {
</pre><pre class="diff" id="removed">-      return array('SERVICE_DEBUG_<span id="removedchars">EXECUTION_TIME_LOG',&nbsp;'SERVICE_DEBUG_EXECUTION_DISPLAY',&nbsp;'SERVICE_DEBUG_LOG_DB_QUERIES</span>', 'SERVICE_DEBUG_SHOW_DEVELOPMENT_WARNING', 'SERVICE_DEBUG_CHECK_LOCALE', 'SERVICE_DEBUG_CHECK_INSTALLATION_MODULE', 'SERVICE_DEBUG_CHECK_CONFIGURATION', 'SERVICE_DEBUG_CHECK_SESSION_DIRECTORY', 'SERVICE_DEBUG_CHECK_SESSION_AUTOSTART', 'SERVICE_DEBUG_CHECK_DOWNLOAD_DIRECTORY');
</pre><pre class="diff" id="added">+      return array('SERVICE_DEBUG_<span id="addedchars">OUTPUT_DB_QUERIES',&nbsp;'SERVICE_DEBUG_LOG_DB_QUERIES',&nbsp;'SERVICE_DEBUG_EXECUTION_TIME_LOG',&nbsp;'SERVICE_DEBUG_EXECUTION_DISPLAY</span>', 'SERVICE_DEBUG_SHOW_DEVELOPMENT_WARNING', 'SERVICE_DEBUG_CHECK_LOCALE', 'SERVICE_DEBUG_CHECK_INSTALLATION_MODULE', 'SERVICE_DEBUG_CHECK_CONFIGURATION', 'SERVICE_DEBUG_CHECK_SESSION_DIRECTORY', 'SERVICE_DEBUG_CHECK_SESSION_AUTOSTART', 'SERVICE_DEBUG_CHECK_DOWNLOAD_DIRECTORY');
</pre><pre class="diff" id="context">     }
   }
 ?&gt;
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.9</small></center>
</body></html>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/