diff options
| author | Christian Fowler <spider@viovio.com> | 2012-04-18 17:01:20 -0400 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2012-04-18 17:01:20 -0400 |
| commit | c75e4fb47bb6107db848d6cd86f2dfd52419c1c3 (patch) | |
| tree | d6b006a1120813c032a0a52c93d5c6c3e01190ca /BitNewsletterEdition.php | |
| parent | 52b1f33dca309d3d3d38568d7e354b12e9bb7a72 (diff) | |
| download | newsletters-c75e4fb47bb6107db848d6cd86f2dfd52419c1c3.tar.gz newsletters-c75e4fb47bb6107db848d6cd86f2dfd52419c1c3.tar.bz2 newsletters-c75e4fb47bb6107db848d6cd86f2dfd52419c1c3.zip | |
major migration of getDisplayUrl to ->getDisplayUrl and ::getDisplayUrlFromHash
Diffstat (limited to 'BitNewsletterEdition.php')
| -rw-r--r-- | BitNewsletterEdition.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/BitNewsletterEdition.php b/BitNewsletterEdition.php index 3f1ff20..c841ba5 100644 --- a/BitNewsletterEdition.php +++ b/BitNewsletterEdition.php @@ -123,17 +123,14 @@ class BitNewsletterEdition extends LibertyMime { * @param object PostId of the item to use * @return object Url String */ - function getDisplayUrl( $pEditionId=NULL ) { + function getDisplayUrlFromHash( $pHash ) { $ret = NULL; - if( !BitBase::verifyId( $pEditionId ) ) { - $pEditionId = $this->mEditionId; - } global $gBitSystem; - if( BitBase::verifyId( $pEditionId ) ) { + if( BitBase::verifyId( $pHash['edition_id'] ) ) { if( $gBitSystem->isFeatureActive( 'pretty_urls' ) ) { - $ret = NEWSLETTERS_PKG_URL.'edition/'.$pEditionId; + $ret = NEWSLETTERS_PKG_URL.'edition/'.$pHash['edition_id']; } else { - $ret = NEWSLETTERS_PKG_URL.'edition.php?edition_id='.$pEditionId; + $ret = NEWSLETTERS_PKG_URL.'edition.php?edition_id='.$pHash['edition_id']; } } else { $ret = NEWSLETTERS_PKG_URL.'edition.php'; @@ -170,7 +167,7 @@ class BitNewsletterEdition extends LibertyMime { $query_cant = "select count(*) from `".BIT_DB_PREFIX."newsletters` n INNER JOIN `".BIT_DB_PREFIX."newsletters_editions` ne ON(n.`content_id`=ne.`nl_content_id`) $mid"; $ret = $gBitDb->getAssoc( $query, $bindVars, $pListHash['max_records'], $pListHash['offset'] ); foreach( array_keys( $ret ) as $k ) { - $ret[$k]['display_url'] = BitNewsletterEdition::getDisplayUrl( $k ); + $ret[$k]['display_url'] = BitNewsletterEdition::getDisplayUrlFromHash( $ret[$k] ); // remove formating tags $data = preg_replace( '/{[^{}]*}/', '', $ret[$k]['data'] ); // $ret[$k]['parsed'] = BitNewsletterEdition::parseData( $data, $ret[$k]['format_guid'] ); |
