14 array(
'oxtitle',
'oxstat', 1, 0, 0 ),
15 array(
'oxid',
'oxstat', 0, 0, 1 )
17 'container2' => array(
18 array(
'oxtitle',
'oxstat', 1, 0, 0 ),
19 array(
'oxid',
'oxstat', 0, 0, 1 )
42 $sStatId = $sSynchId?$sSynchId:$sOxId;
43 $oStat =
oxNew(
'oxstatistic' );
44 $oStat->load( $sStatId );
45 $aStatData = unserialize( $oStat->oxstatistics__oxvalue->value );
53 $sFilter = (is_array( $aFilter ) && isset( $aFilter[
'_0'] ) )? $oStr->preg_replace(
'/^\*/',
'%', $aFilter[
'_0'] ) : null;
55 foreach ( $aReports as $oReport ) {
58 if ( is_array($aStatData) && in_array( $oReport->filename, $aStatData ) )
61 if ( !is_array( $aStatData ) || !in_array( $oReport->filename, $aStatData ) )
66 if ( $sFilter && !$oStr->preg_match(
"/^" . preg_quote( $sFilter ) .
"/i", $oReport->name) ) {
70 $aData[$iCnt][
'_0'] = $oReport->name;
71 $aData[$iCnt][
'_1'] = $oReport->filename;
78 usort( $aData, array( $this,
"sortAsc" ) );
80 usort( $aData, array( $this,
"sortDesc" ) );
82 usort( $aData, array( $this,
"sortAsc" ) );
85 $aResponse[
'records'] = $aData;
86 $aResponse[
'totalRecords'] = count( $aReports );
103 if ( $oOne[
'_0'] == $oSec[
'_0'] ) {
106 return ( $oOne[
'_0'] < $oSec[
'_0'] ) ? -1 : 1;
120 if ( $oOne[
'_0'] == $oSec[
'_0'] ) {
123 return ( $oOne[
'_0'] > $oSec[
'_0'] ) ? -1 : 1;
140 foreach ( $aReports as $oRep ) {
141 $aStats[] = $oRep->filename;
147 $oStat =
oxNew(
'oxstatistic' );
148 if ( is_array( $aStats ) && $oStat->load( $soxId ) ) {
149 $aStatData = $oStat->getReports();
152 foreach ( $aReports as $oRep ) {
153 if ( in_array( $oRep->filename, $aStats ) && ($iPos = array_search( $oRep->filename, $aStatData ) ) !==
false )
154 unset( $aStatData[$iPos] );
157 $oStat->setReports( $aStatData );
175 foreach ( $aReports as $oRep ) {
176 $aStats[] = $oRep->filename;
182 $oStat =
oxNew(
'oxstatistic' );
183 if ( $oStat->load( $soxId ) ) {
184 $aStatData = (array) $oStat->getReports();
188 foreach ( $aReports as $oRep ) {
189 if ( in_array( $oRep->filename, $aStats ) && !in_array( $oRep->filename, $aStatData ) )
190 $aStatData[] = $oRep->filename;
193 $oStat->setReports( $aStatData );