[Vtigercrm-commits] [vtiger-commits] r7855 - /vtigercrm/trunk/include/RelatedListView.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Jul 5 07:15:51 EDT 2006


Author: richie
Date: Wed Jul  5 05:15:47 2006
New Revision: 7855

Log:
PHP version check made as stripos method exists only in PHP5

Modified:
    vtigercrm/trunk/include/RelatedListView.php

Modified: vtigercrm/trunk/include/RelatedListView.php
==============================================================================
--- vtigercrm/trunk/include/RelatedListView.php (original)
+++ vtigercrm/trunk/include/RelatedListView.php Wed Jul  5 05:15:47 2006
@@ -124,6 +124,14 @@
 		
 	$query .= ' ORDER BY '.$order_by.' '.$sorder;
 	$url_qry .="&order_by=".$order_by;
+	//Added for PHP version less than 5
+	if (!function_exists("stripos"))
+	{
+		function stripos($query,$needle)
+		{
+			return strpos(strtolower($query),strtolower($needle));
+		}
+	}
 	
 	//Retreiving the no of rows
 	$count_query = "select count(*) count ".substr($query, stripos($query,'from'),strlen($query));





More information about the vtigercrm-commits mailing list