Преглед на файлове

#193 Fixed regression due to the usage of gzcompress/gzuncompress

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@634 a333f486-631f-4898-b8df-5754b55c2be0
romainq преди 15 години
родител
ревизия
93d7570398
променени са 1 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 5 2
      core/dbobjectsearch.class.php

+ 5 - 2
core/dbobjectsearch.class.php

@@ -493,13 +493,16 @@ class DBObjectSearch
 	public function serialize()
 	public function serialize()
 	{
 	{
 		$sOql = $this->ToOql();
 		$sOql = $this->ToOql();
-		return base64_encode(gzcompress($sOql));
+		return base64_encode($sOql);
 	}
 	}
 	
 	
 	static public function unserialize($sValue)
 	static public function unserialize($sValue)
 	{
 	{
 		$sOql = base64_decode($sValue);
 		$sOql = base64_decode($sValue);
-		return self::FromOQL(gzuncompress($sOql));
+		// We've tried to use gzcompress/gzuncompress, but for some specific queries
+		// it was not working at all (See Trac #193)
+		// gzuncompress was issuing a warning "data error" and the return object was null
+		return self::FromOQL($sOql);
 	}
 	}
 
 
 	// SImple BUt Structured Query Languag - SubuSQL
 	// SImple BUt Structured Query Languag - SubuSQL