15 array(
'oxtitle',
'oxstat', 1, 0, 0),
16 array(
'oxid',
'oxstat', 0, 0, 1)
18 'container2' => array(
19 array(
'oxtitle',
'oxstat', 1, 0, 0),
20 array(
'oxid',
'oxstat', 0, 0, 1)
43 $sStatId = $sSynchId ? $sSynchId : $sOxId;
44 $oStat =
oxNew(
'oxstatistic');
45 $oStat->load($sStatId);
46 $aStatData = unserialize($oStat->oxstatistics__oxvalue->value);
54 $sFilter = (is_array($aFilter) && isset($aFilter[
'_0'])) ? $oStr->preg_replace(
'/^\*/',
'%', $aFilter[
'_0']) : null;
56 foreach ($aReports as $oReport) {
59 if (is_array($aStatData) && in_array($oReport->filename, $aStatData)) {
63 if (!is_array($aStatData) || !in_array($oReport->filename, $aStatData)) {
69 if ($sFilter && !$oStr->preg_match(
"/^" . preg_quote($sFilter) .
"/i", $oReport->name)) {
73 $aData[$iCnt][
'_0'] = $oReport->name;
74 $aData[$iCnt][
'_1'] = $oReport->filename;
81 usort($aData, array($this,
"sortAsc"));
83 usort($aData, array($this,
"sortDesc"));
86 usort($aData, array($this,
"sortAsc"));
89 $aResponse[
'records'] = $aData;
90 $aResponse[
'totalRecords'] = count($aReports);
107 if ($oOne[
'_0'] == $oSec[
'_0']) {
111 return ($oOne[
'_0'] < $oSec[
'_0']) ? -1 : 1;
125 if ($oOne[
'_0'] == $oSec[
'_0']) {
129 return ($oOne[
'_0'] > $oSec[
'_0']) ? -1 : 1;
144 foreach ($aReports as $oRep) {
145 $aStats[] = $oRep->filename;
151 $oStat =
oxNew(
'oxstatistic');
152 if (is_array($aStats) && $oStat->load($soxId)) {
153 $aStatData = $oStat->getReports();
156 foreach ($aReports as $oRep) {
157 if (in_array($oRep->filename, $aStats) && ($iPos = array_search($oRep->filename, $aStatData)) !==
false) {
158 unset($aStatData[$iPos]);
162 $oStat->setReports($aStatData);
178 foreach ($aReports as $oRep) {
179 $aStats[] = $oRep->filename;
185 $oStat =
oxNew(
'oxstatistic');
186 if ($oStat->load($soxId)) {
187 $aStatData = (array) $oStat->getReports();
191 foreach ($aReports as $oRep) {
192 if (in_array($oRep->filename, $aStats) && !in_array($oRep->filename, $aStatData)) {
193 $aStatData[] = $oRep->filename;
197 $oStat->setReports($aStatData);