Subversion Repositories ezapprove2

[/] [ezapprove2/] [ezp4/] [trunk/] [extension/] [ezapprove2/] [collaboration/] [ezapprove2/] [ezapprove2collaborationhandler.php] - Diff between revs 2507 and 2508

Show entire file | Ignore whitespace | Details | Blame | View Log

Rev 2507 Rev 2508
Line 101... Line 101...
    }
    }
 
 
    /*!
    /*!
     \reimp
     \reimp
    */
    */
    function title( &$collaborationItem )
    function title( $collaborationItem )
    {
    {
        return ezi18n( 'kernel/classes', 'Approval v.2' );
        return ezi18n( 'kernel/classes', 'Approval v.2' );
    }
    }
 
 
    /*!
    /*!
Line 154... Line 154...
 
 
    /*!
    /*!
     \reimp
     \reimp
     \return the number of messages for the approve item.
     \return the number of messages for the approve item.
    */
    */
    function messageCount( &$collaborationItem )
    function messageCount( $collaborationItem )
    {
    {
        return eZCollaborationItemMessageLink::fetchItemCount( array( 'item_id' => $collaborationItem->attribute( 'id' ) ) );
        return eZCollaborationItemMessageLink::fetchItemCount( array( 'item_id' => $collaborationItem->attribute( 'id' ) ) );
    }
    }
 
 
    /*!
    /*!
     \reimp
     \reimp
     \return the number of unread messages for the approve item.
     \return the number of unread messages for the approve item.
    */
    */
    function unreadMessageCount( &$collaborationItem )
    function unreadMessageCount( $collaborationItem )
    {
    {
        $lastRead = 0;
        $lastRead = 0;
        $status = $collaborationItem->attribute( 'user_status' );
        $status = $collaborationItem->attribute( 'user_status' );
        if ( $status )
        if ( $status )
            $lastRead = $status->attribute( 'last_read' );
            $lastRead = $status->attribute( 'last_read' );
Line 269... Line 269...
 
 
    /*!
    /*!
     \reimp
     \reimp
     Adds a new comment, approves the item or denies the item.
     Adds a new comment, approves the item or denies the item.
    */
    */
    function handleCustomAction( &$module, &$collaborationItem )
    function handleCustomAction( $module, $collaborationItem )
    {
    {
        $redirectView = 'item';
        $redirectView = 'item';
        $redirectParameters = array( 'full', $collaborationItem->attribute( 'id' ) );
        $redirectParameters = array( 'full', $collaborationItem->attribute( 'id' ) );
        $addComment = false;
        $addComment = false;