Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Created IdentifierExists function for Journals.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchisari authored and The Appleseed Project committed Dec 4, 2010
1 parent 3712c73 commit d1959b2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions components/journal/journal.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,21 @@ public function AddToProfileTabs ( $pData = null ) {
return ( $return );
}

public function IdentifierExists ( $pData = null ) {

if ( $this->_Source != 'Component' ) return ( false );

$Identifier = $pData['Identifier'];

$Model = new cModel ( 'JournalEntries' );

$Model->Retrieve ( array ( 'Identifier' => $Identifier ) );

if ( $Model->Get ( 'Total' ) > 0 ) {
return ( true );
}

return ( false );
}

}

0 comments on commit d1959b2

Please sign in to comment.