[TEP-COMMIT] [CVS catalog] updates for the new service modules
anonymous-OfajU3CKLf1/[email protected] 13 Apr 2004 08:10:18 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit in catalog/catalog/includes/functions on MAIN
compatibility.php +15 1.20 -> 1.21
general.php +6 -12 1.238 -> 1.239
html_output.php +3 -3 1.59 -> 1.60
+24 -15
3 modified files
updates for the new service modules
----------
catalog /catalog /includes /functions
compatibility.php 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- compatibility.php 2003/11/17 17:39:00 1.20
+++ compatibility.php 2004/04/13 08:10:15 1.21
@@ -73,4 +73,19 @@
return $tmp_array;
}
}
+
+ if (!function_exists('array_search')) {
+ function array_search($needle, $haystack) {
+ $match = false;
+
+ foreach ($haystack as $key => $value) {
+ if ($value == $needle) {
+ $match = $key;
+ break;
+ }
+ }
+
+ return $match;
+ }
+ }
?>
----------
catalog /catalog /includes /functions
general.php 1.238 -> 1.239
diff -u -r1.238 -r1.239
--- general.php 2004/04/13 07:59:08 1.238
+++ general.php 2004/04/13 08:10:15 1.239
@@ -11,27 +11,21 @@
*/
////
-// Stop from parsing any further PHP code
- function tep_exit() {
- global $osC_Session;
-
- $osC_Session->close();
-
- exit();
- }
-
-////
// Redirect to another page or site
function tep_redirect($url) {
- if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
+ global $osC_Services, $request_type;
+
+ if ( (ENABLE_SSL == true) && ($request_type == 'SSL') ) { // We are loading an SSL page
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
}
}
header('Location: ' . $url);
+
+ $osC_Services->stopServices();
- tep_exit();
+ exit;
}
////
----------
catalog /catalog /includes /functions
html_output.php 1.59 -> 1.60
diff -u -r1.59 -r1.60
--- html_output.php 2003/12/17 15:30:01 1.59
+++ html_output.php 2004/04/13 08:10:15 1.60
@@ -13,7 +13,7 @@
////
// The HTML href link wrapper function
function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
- global $request_type, $osC_Session, $SID;
+ global $request_type, $osC_Session, $SID, $osC_Services;
if (!tep_not_null($page)) {
die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
@@ -42,7 +42,7 @@
while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);
// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
- if ( ($add_session_id == true) && ($osC_Session->is_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
+ if ( ($add_session_id == true) && ($osC_Session->is_started == true) && (SERVICE_SESSION_FORCE_COOKIE_USAGE == 'False') ) {
if (tep_not_null($SID)) {
$_sid = $SID;
} elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
@@ -52,7 +52,7 @@
}
}
- if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
+ if ( ($search_engine_safe == true) && $osC_Services->isStarted('sefu')) {
while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);
$link = str_replace('?', '/', $link);
CVSspam 0.2.8
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click