Project

General

Profile

Bug #22306 » 13876.diff

Administrator Admin, 2010-03-22 14:27

View differences:

typo3/sysext/indexed_search/mod/index.php (working copy)
/**
* Module: Indexing Engine Overview
*
* @author Kasper Sk?rh?j <kasperYYYY@typo3.com>
* @author Kasper Sk�rh�j <kasperYYYY@typo3.com>
*/
/**
* [CLASS/FUNCTION INDEX of SCRIPT]
......
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*) AS pcount,index_phash.*', 'index_phash', 'data_page_id!=0', 'phash_grouping,phash,cHashParams,data_filename,data_page_id,data_page_reg1,data_page_type,data_page_mp,gr_list,item_type,item_title,item_description,item_mtime,tstamp,item_size,contentHash,crdate,parsetime,sys_language_uid,item_crdate,externalUrl,recordUid,freeIndexUid,freeIndexSetId', 'data_page_id');
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$cHash = count(unserialize($row["cHashParams"])) ? $this->formatCHash(unserialize($row["cHashParams"])) : "";
$grListRec = $this->getGrlistRecord($row["phash"]);
$recList[] = array(
$row["data_page_id"].($row["data_page_type"]?"/".$row["data_page_type"]:""),
......
$this->getNumberOfSections($row["phash"])."/".$grListRec[0]["pcount"]."/".$this->getNumberOfFulltext($row["phash"]),
$row["pcount"]."/".$this->formatFeGroup($grListRec),
$row["sys_language_uid"],
$cHash,
$this->getChashDataString($row['cHashParams']),
$row["phash"]
);
......
}
/**
* [Describe function...]
* Creates a key/value pair representation for the passed parameters
*
* @param [type] $arr: ...
* @return [type] ...
* @param array $data
* @return string
*/
function formatCHash($arr) {
reset($arr);
$list=array();
while(list($k,$v)=each($arr)) {
$list[]=$k."=".$v;
protected function formatCHash(array $data) {
foreach ($data as $key => $value) {
$list[] = htmlspecialchars($key) . '=' . htmlspecialchars($value);
}
return implode("<BR>",$list);
return implode('<br />', $list);
}
/**
......
}
return count($items);
}
/**
* Produces cHash information from the serialized cHash data
*
* @param string $serializedData
* @return string
*/
protected function getChashDataString($serializedData) {
$result = '';
$cHashData = @unserialize($serializedData['cHashParams'']);
if (is_array($cHashData)) {
$result = $this->formatCHash($cHashData);
}
return $result;
}
}
    (1-1/1)