diff options
| -rw-r--r-- | BitNewsletter.php | 10 | ||||
| -rw-r--r-- | BitNewsletterEdition.php | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/BitNewsletter.php b/BitNewsletter.php index 316704f..75cbda1 100644 --- a/BitNewsletter.php +++ b/BitNewsletter.php @@ -51,7 +51,7 @@ class BitNewsletter extends LibertyContent { $this->mAdminContentPerm = 'p_newsletters_admin'; } - function load( $pUserId = NULL ) { + function load( $pContentId = NULL, $pPluginParams = NULL ) { if( $this->verifyId( $this->mNewsletterId ) || $this->verifyId( $this->mContentId ) ) { global $gBitSystem; @@ -62,12 +62,12 @@ class BitNewsletter extends LibertyContent { $this->getServicesSql( 'content_load_function', $selectSql, $joinSql, $whereSql, $bindVars ); - if( $pUserId ) { +/* if( $pUserId ) { error_log( 'BitNewsleters: user id loading not implemented yet' ); $whereSql = ""; $joinSql = ""; } - +*/ $query = "SELECT * $selectSql FROM `".BIT_DB_PREFIX."newsletters` n INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON( n.`content_id`=lc.`content_id` ) @@ -273,7 +273,7 @@ class BitNewsletter extends LibertyContent { } */ - function getList( &$pListHash ) { + public static function getList( &$pListHash ) { global $gBitDb; if ( empty( $pParamHash["sort_mode"] ) ) { $pListHash['sort_mode'] = 'created_desc'; @@ -379,7 +379,7 @@ class BitNewsletter extends LibertyContent { * @param object $pNewsletterId of the item to use * @return object Url String */ - public static function getDisplayUrlFromHash( $pParamHash ) { + public static function getDisplayUrlFromHash( &$pParamHash ) { global $gBitSystem; $ret = NULL; if( BitBase::verifyId( $pParamHash['nl_id'] ) ) { diff --git a/BitNewsletterEdition.php b/BitNewsletterEdition.php index b16c25a..ab57393 100644 --- a/BitNewsletterEdition.php +++ b/BitNewsletterEdition.php @@ -64,7 +64,7 @@ class BitNewsletterEdition extends LibertyMime { return( count( $this->mErrors ) == 0 ); } - function store( $pParamHash ) { + function store( &$pParamHash ) { if( $this->verify( $pParamHash ) ) { $this->mDb->StartTrans(); if( parent::store( $pParamHash ) ) { @@ -83,7 +83,7 @@ class BitNewsletterEdition extends LibertyMime { return( count( $this->mErrors ) == 0 ); } - function load() { + function load( $pContentId = NULL, $pPluginParams = NULL ) { if( $this->verifyId( $this->mEditionId ) || $this->verifyId( $this->mContentId ) ) { global $gBitSystem; @@ -123,14 +123,14 @@ class BitNewsletterEdition extends LibertyMime { * @param object PostId of the item to use * @return object Url String */ - public static function getDisplayUrlFromHash( $pHash ) { + public static function getDisplayUrlFromHash( &$pParamHash ) { $ret = NULL; global $gBitSystem; - if( BitBase::verifyId( $pHash['edition_id'] ) ) { + if( BitBase::verifyId( $pParamHash['edition_id'] ) ) { if( $gBitSystem->isFeatureActive( 'pretty_urls' ) ) { - $ret = NEWSLETTERS_PKG_URL.'edition/'.$pHash['edition_id']; + $ret = NEWSLETTERS_PKG_URL.'edition/'.$pParamHash['edition_id']; } else { - $ret = NEWSLETTERS_PKG_URL.'edition.php?edition_id='.$pHash['edition_id']; + $ret = NEWSLETTERS_PKG_URL.'edition.php?edition_id='.$pParamHash['edition_id']; } } else { $ret = NEWSLETTERS_PKG_URL.'edition.php'; |
