diff options
| -rwxr-xr-x | LibertyTag.php | 12 | ||||
| -rwxr-xr-x | bit_setup_inc.php | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/LibertyTag.php b/LibertyTag.php index a173a1b..6a0244a 100755 --- a/LibertyTag.php +++ b/LibertyTag.php @@ -403,7 +403,6 @@ function tags_content_display( &$pObject ) { * filter the search with pigeonholes * @param $pParamHash['tags']['filter'] - a tag or an array of tags **/ - function tags_content_list_sql( &$pObject, $pParamHash = NULL ) { global $gBitSystem; $ret = array(); @@ -432,6 +431,17 @@ function tags_content_list_sql( &$pObject, $pParamHash = NULL ) { return $ret; } +function tags_content_edit( $pObject=NULL ) { + global $gBitSystem, $gBitSmarty, $gBitUser; + if ( $gBitSystem->isPackageActive( 'tags' ) ) { + $tag = new LibertyTag( $pObject->mContentId ); + if( $gBitUser->hasPermission( 'p_tags_view' ) ) { + if( $tag->load() ) { + $gBitSmarty->assign( 'tagData', !empty( $tag->mInfo['tags'] ) ? $tag->mInfo['tags'] : NULL ); + } + } + } +} /** * @param includeds a string or array of 'tags' and contentid for association. diff --git a/bit_setup_inc.php b/bit_setup_inc.php index d150e27..5fd003d 100755 --- a/bit_setup_inc.php +++ b/bit_setup_inc.php @@ -18,6 +18,7 @@ if( $gBitSystem->isPackageActive( 'tags' ) ) { $gLibertySystem->registerService( LIBERTY_SERVICE_TAGS, TAGS_PKG_NAME, array( 'content_display_function' => 'tags_content_display', + 'content_edit_function' => 'tags_content_edit', 'content_list_sql_function' => 'tags_content_list_sql', 'content_store_function' => 'tags_content_store', 'content_preview_function' => 'tags_content_preview', |
