[TEP-COMMIT] [CVS admin] updates for the new language class structure

hpdl-OfajU3CKLf1/[email protected] 24 Nov 2004 15:56:45 -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/includes</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">application_top.php</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-13</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php?rev=1.181&amp;content-type=text/vnd.viewcvs-markup">1.181</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php.diff?r1=1.181&amp;r2=1.182">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php?rev=1.182&amp;content-type=text/vnd.viewcvs-markup">1.182</a></td></tr>
<tr class="alt"><td><tt>functions/<a href="#file2">general.php</a></tt></td><td align="right" id="added">+14</td><td></td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php?rev=1.176&amp;content-type=text/vnd.viewcvs-markup">1.176</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php.diff?r1=1.176&amp;r2=1.177">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php?rev=1.177&amp;content-type=text/vnd.viewcvs-markup">1.177</a></td></tr>
<tr><td></td><td align="right" id="added">+20</td><td align="right" id="removed">-13</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
updates for the new language class structure
</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>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a><br /></span>
<div class="fileheader"><big><b>application_top.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php?rev=1.181&amp;content-type=text/vnd.viewcvs-markup">1.181</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php.diff?r1=1.181&amp;r2=1.182">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/application_top.php?rev=1.182&amp;content-type=text/vnd.viewcvs-markup">1.182</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.181 -r1.182
--- application_top.php	2004/11/20 02:16:48	1.181
+++ application_top.php	2004/11/24 15:56:41	1.182
@@ -92,29 +92,22 @@
</small></pre><pre class="diff" id="context"> 
 // set the language
   require('../includes/classes/language.php');
</pre><pre class="diff" id="removed">-  $osC_Language = new <span id="removedchars">l</span>anguage();
</pre><pre class="diff" id="added">+  $osC_Language = new <span id="addedchars">osC_L</span>anguage();
</pre><pre class="diff" id="context"> 
   if (isset($_GET['language']) &amp;&amp; !empty($_GET['language'])) {
</pre><pre class="diff" id="removed">-    $osC_Language-&gt;set_language($_GET['language']);
-  } elseif ($osC_Session-&gt;exists('language') == false) {
-    $osC_Language-&gt;get_browser_language();
</pre><pre class="diff" id="added">+    $osC_Language-&gt;set($_GET['language']);
</pre><pre class="diff" id="context">   }
 
</pre><pre class="diff" id="removed">-  if ( ($osC_Session-&gt;exists('language') == false) || ($osC_Session-&gt;value('language') != $osC_Language-&gt;language['directory']) ) {
-    $osC_Session-&gt;set('language', $osC_Language-&gt;language['directory']);
-    $osC_Session-&gt;set('languages_id', $osC_Language-&gt;language['id']);
-  }
-
</pre><pre class="diff" id="context">   require('includes/languages/' . $osC_Session-&gt;value('language') . '.php');
 
</pre><pre class="diff" id="added">+  header('Content-Type: text/html; charset=' . CHARSET);
+
+  setlocale(LC_TIME, LANGUAGE_LOCALE);
+
</pre><pre class="diff" id="context">   $current_page = basename($PHP_SELF);
   if (file_exists('includes/languages/' . $osC_Session-&gt;value('language') . '/' . $current_page)) {
     include('includes/languages/' . $osC_Session-&gt;value('language') . '/' . $current_page);
   }
</pre><pre class="diff" id="removed">-
-  header('Content-Type: text/html; charset=' . CHARSET);
-
-  setlocale(LC_TIME, LANGUAGE_LOCALE);
</pre><pre class="diff" id="context"> 
 // define our localization functions
   require('includes/functions/localization.php');
</pre></div>
<hr /><a name="file2" /><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>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions">functions</a><br /></span>
<div class="fileheader"><big><b>general.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php?rev=1.176&amp;content-type=text/vnd.viewcvs-markup">1.176</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php.diff?r1=1.176&amp;r2=1.177">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/functions/general.php?rev=1.177&amp;content-type=text/vnd.viewcvs-markup">1.177</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.176 -r1.177
--- general.php	2004/11/20 02:16:48	1.176
+++ general.php	2004/11/24 15:56:42	1.177
@@ -1459,4 +1459,18 @@
</small></pre><pre class="diff" id="context"> 
     return $new_array;
   }
</pre><pre class="diff" id="added">+
+  function tep_setcookie($name, $value = '', $expire = 0, $path = false, $domain = false, $secure = false) {
+    global $request_type;
+
+    if ($path === false) {
+      $path = ($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH;
+    }
+
+    if ($domain === false) {
+      $domain = ($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN;
+    }
+
+    return setcookie($name, $value, $expire, $path, $domain, $secure);
+  }
</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/