[TEP-COMMIT] [CVS admin] clear the languages cache when updating the languages database table
hpdl-OfajU3CKLf1/[email protected] 29 Nov 2004 00:14:17 -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>admin/admin</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">languages.php</a></tt></td><td align="right" id="added">+11</td><td align="right" id="removed">-9</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/languages.php?rev=1.37&content-type=text/vnd.viewcvs-markup">1.37</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/languages.php.diff?r1=1.37&r2=1.38">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/languages.php?rev=1.38&content-type=text/vnd.viewcvs-markup">1.38</a></td></tr>
</table>
<pre class="comment">
clear the languages cache when updating the languages database table
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a><br /></span>
<div class="fileheader"><big><b>languages.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/languages.php?rev=1.37&content-type=text/vnd.viewcvs-markup">1.37</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/languages.php.diff?r1=1.37&r2=1.38">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/languages.php?rev=1.38&content-type=text/vnd.viewcvs-markup">1.38</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.37 -r1.38
--- languages.php 2004/10/28 18:59:49 1.37
+++ languages.php 2004/11/29 00:14:16 1.38
@@ -46,14 +46,12 @@
</small></pre><pre class="diff" id="context"> $language_id = $_GET['lID'];
} else {
$language_id = $osC_Database->nextID();
</pre><pre class="diff" id="added">+ $default_language = $osC_Language->get(DEFAULT_LANGUAGE);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- include('../includes/classes/language.php');
- $osC_Language = new language();
-
</pre><pre class="diff" id="context"> // create additional categories_description records
$Qcategories = $osC_Database->query('select categories_id, categories_name from :table_categories_description where language_id = :language_id');
$Qcategories->bindTable(':table_categories_description', TABLE_CATEGORIES_DESCRIPTION);
</pre><pre class="diff" id="removed">- $Qcategories->bindInt(':language_id', $osC_Language->catalog_languages[DEFAULT_LANGUAGE]['id']);
</pre><pre class="diff" id="added">+ $Qcategories->bindInt(':language_id', $default_language['id']);
</pre><pre class="diff" id="context"> $Qcategories->execute();
while ($Qcategories->next()) {
</pre><pre class="diff"><small id="info">@@ -74,7 +72,7 @@
</small></pre><pre class="diff" id="context"> // create additional products_description records
$Qproducts = $osC_Database->query('select products_id, products_name, products_description, products_url from :table_products_description where language_id = :language_id');
$Qproducts->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
</pre><pre class="diff" id="removed">- $Qproducts->bindInt(':language_id', $osC_Language->catalog_languages[DEFAULT_LANGUAGE]['id']);
</pre><pre class="diff" id="added">+ $Qproducts->bindInt(':language_id', $default_language['id']);
</pre><pre class="diff" id="context"> $Qproducts->execute();
while ($Qproducts->next()) {
</pre><pre class="diff"><small id="info">@@ -98,7 +96,7 @@
</small></pre><pre class="diff" id="context"> // create additional products_options records
$Qoptions = $osC_Database->query('select products_options_id, products_options_name from :table_products_options where language_id = :language_id');
$Qoptions->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
</pre><pre class="diff" id="removed">- $Qoptions->bindInt(':language_id', $osC_Language->catalog_languages[DEFAULT_LANGUAGE]['id']);
</pre><pre class="diff" id="added">+ $Qoptions->bindInt(':language_id', $default_language['id']);
</pre><pre class="diff" id="context"> $Qoptions->execute();
while ($Qoptions->next()) {
</pre><pre class="diff"><small id="info">@@ -120,7 +118,7 @@
</small></pre><pre class="diff" id="context"> // create additional products_options_values records
$Qvalues = $osC_Database->query('select products_options_values_id, products_options_values_name from :table_products_options_values where language_id = :language_id');
$Qvalues->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
</pre><pre class="diff" id="removed">- $Qvalues->bindInt(':language_id', $osC_Language->catalog_languages[DEFAULT_LANGUAGE]['id']);
</pre><pre class="diff" id="added">+ $Qvalues->bindInt(':language_id', $default_language['id']);
</pre><pre class="diff" id="context"> $Qvalues->execute();
while ($Qvalues->next()) {
</pre><pre class="diff"><small id="info">@@ -142,7 +140,7 @@
</small></pre><pre class="diff" id="context"> // create additional manufacturers_info records
$Qmanufacturers = $osC_Database->query('select manufacturers_id, manufacturers_url from :table_manufacturers_info where languages_id = :languages_id');
$Qmanufacturers->bindTable(':table_manufacturers_info', TABLE_MANUFACTURERS_INFO);
</pre><pre class="diff" id="removed">- $Qmanufacturers->bindInt(':languages_id', $osC_Language->catalog_languages[DEFAULT_LANGUAGE]['id']);
</pre><pre class="diff" id="added">+ $Qmanufacturers->bindInt(':languages_id', $default_language['id']);
</pre><pre class="diff" id="context"> $Qmanufacturers->execute();
while ($Qmanufacturers->next()) {
</pre><pre class="diff"><small id="info">@@ -164,7 +162,7 @@
</small></pre><pre class="diff" id="context"> // create additional orders_status records
$Qstatus = $osC_Database->query('select orders_status_id, orders_status_name from :table_orders_status where language_id = :language_id');
$Qstatus->bindTable(':table_orders_status', TABLE_ORDERS_STATUS);
</pre><pre class="diff" id="removed">- $Qstatus->bindInt(':language_id', $osC_Language->catalog_languages[DEFAULT_LANGUAGE]['id']);
</pre><pre class="diff" id="added">+ $Qstatus->bindInt(':language_id', $default_language['id']);
</pre><pre class="diff" id="context"> $Qstatus->execute();
while ($Qstatus->next()) {
</pre><pre class="diff"><small id="info">@@ -207,6 +205,8 @@
</small></pre><pre class="diff" id="context"> if ($error === false) {
$osC_Database->commitTransaction();
</pre><pre class="diff" id="added">+ osC_Cache::clear('languages');
+
</pre><pre class="diff" id="context"> $osC_MessageStack->add_session('header', SUCCESS_DB_ROWS_UPDATED, 'success');
} else {
$osC_Database->rollbackTransaction();
</pre><pre class="diff"><small id="info">@@ -305,6 +305,8 @@
</small></pre><pre class="diff" id="context">
if ($error === false) {
$osC_Database->commitTransaction();
</pre><pre class="diff" id="added">+
+ osC_Cache::clear('languages');
</pre><pre class="diff" id="context">
$osC_MessageStack->add_session('header', SUCCESS_DB_ROWS_UPDATED, 'success');
} else {
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> 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/