diff options
| author | wjames5 <will@tekimaki.com> | 2010-04-17 04:56:46 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2010-04-17 04:56:46 +0000 |
| commit | 7ae99898bf44cecd28c43c68cd5d40ec19cfb216 (patch) | |
| tree | 4822ead34001340b81f22ac28b16522af399b166 | |
| parent | e6ccc6d9ccb583c7232b44329b4c827655053f6d (diff) | |
| download | stats-7ae99898bf44cecd28c43c68cd5d40ec19cfb216.tar.gz stats-7ae99898bf44cecd28c43c68cd5d40ec19cfb216.tar.bz2 stats-7ae99898bf44cecd28c43c68cd5d40ec19cfb216.zip | |
step three of contenttype name plural - replace all instances where name is accessed though systme hash with get name method call, still no schema change requiredpre_ctype_desc_name_schmeachange
| -rw-r--r-- | Statistics.php | 11 | ||||
| -rw-r--r-- | item_chart.php | 8 |
2 files changed, 10 insertions, 9 deletions
diff --git a/Statistics.php b/Statistics.php index d2bcb78..a7678bd 100644 --- a/Statistics.php +++ b/Statistics.php @@ -1,8 +1,8 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_stats/Statistics.php,v 1.7 2009/11/11 17:38:46 spiderr Exp $ + * $Header: /cvsroot/bitweaver/_bit_stats/Statistics.php,v 1.8 2010/04/17 04:56:46 wjames5 Exp $ * - * $Id: Statistics.php,v 1.7 2009/11/11 17:38:46 spiderr Exp $ + * $Id: Statistics.php,v 1.8 2010/04/17 04:56:46 wjames5 Exp $ * @package stats */ @@ -249,15 +249,16 @@ class Statistics extends BitBase { $ret['data'][0][] = 'a'; foreach( $gLibertySystem->mContentTypes as $contentType ) { if( $gBitSystem->isPackageActive( $contentType['handler_package'] )) { + $guid = $contentType['content_type_guid']; $hits = $this->mDb->getOne( " SELECT SUM(`hits`) FROM `".BIT_DB_PREFIX."liberty_content` lc LEFT OUTER JOIN `".BIT_DB_PREFIX."liberty_content_hits` liberty_content_hits ON (lc.`content_id` = liberty_content_hits.`content_id`) - WHERE content_type_guid=?", array( $contentType['content_type_guid'] ) + WHERE content_type_guid=?", array( $guid ) ); if( !empty( $hits )) { - $ret['legend'][] = tra( $contentType['content_description'] ); + $ret['legend'][] = $gLibertySystem->getContentTypeName( $guid ); $ret['data'][0][] = $hits; } } @@ -294,7 +295,7 @@ class Statistics extends BitBase { ); } $ret['data'][$pContentTypeGuid] = array_chunk( $tmpHash, 40 ); - $ret['title'] = $gLibertySystem->mContentTypes[$pContentTypeGuid]['content_description']; + $ret['title'] = $gLibertySystem->getContentTypeName( $pContentTypeGuid ); } else { foreach( $gLibertySystem->mContentTypes as $contentType ) { $query = " diff --git a/item_chart.php b/item_chart.php index ee772ab..f3a4182 100644 --- a/item_chart.php +++ b/item_chart.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_stats/item_chart.php,v 1.10 2010/02/08 21:27:25 wjames5 Exp $ + * $Header: /cvsroot/bitweaver/_bit_stats/item_chart.php,v 1.11 2010/04/17 04:56:46 wjames5 Exp $ * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -8,7 +8,7 @@ * All Rights Reserved. See below for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details * - * $Id: item_chart.php,v 1.10 2010/02/08 21:27:25 wjames5 Exp $ + * $Id: item_chart.php,v 1.11 2010/04/17 04:56:46 wjames5 Exp $ * @package stats * @subpackage functions */ @@ -45,9 +45,9 @@ foreach( $data['data'] as $guid => $info ) { $graph->SetXLabelAngle( ( count( $info ) > 5 ) ? 90 : 0 ); $graph->SetNewPlotAreaPixels( 75, 30 + ( $i * 390 ), 580, 370 + ( $i * 390 ) ); if( !empty( $_REQUEST['content_type_guid'] ) ) { - $graph->SetYLabel( $gLibertySystem->mContentTypes[$_REQUEST['content_type_guid']]['content_description'].' '.tra( 'Hits' ).' ('.tra( "log" ).')' ); + $graph->SetYLabel( $gLibertySystem->getContentTypeName( $_REQUEST['content_type_guid'] ).' '.tra( 'Hits' ).' ('.tra( "log" ).')' ); } else { - $graph->SetYLabel( $gLibertySystem->mContentTypes[$guid]['content_description'].' '.tra( 'Hits' ).' ('.tra( "log" ).')' ); + $graph->SetYLabel( $gLibertySystem->getContentTypeName( $guid ).' '.tra( 'Hits' ).' ('.tra( "log" ).')' ); } $graph->DrawGraph(); $i++; |
