fixed a bug in creating session key for memcache

This commit is contained in:
SJ 2013-10-28 13:57:16 +01:00
parent 2e3b00753c
commit 20b6eb7143
2 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<?php
define('BUILD', '2013-10-24 846');
define('BUILD', '2013-10-28 846');
$config = array();

View File

@ -733,7 +733,16 @@ class ModelSearchSearch extends Model {
private function make_cache_file_name($data = array(), $sortorder = '') {
return sha1($_SESSION['email'] . "/" . join("*", $data) . "-" . (NOW - NOW % 3600) . "-" . $sortorder);
$s = '';
while(list($k, $v) = each($data)) {
if($v) {
if(is_array($v)) { $v = join("*", $v); }
$s .= "*$k=$v";
}
}
return sha1($_SESSION['email'] . "/" . $s . "-" . (NOW - NOW % 3600) . "-" . $sortorder);
}
}