70 $this->FileInputAccess =
get_package(
'file_input::file_input_access' ,
'last' , __FILE__ );
71 $this->LinkUtilities =
get_package(
'link::link_utilities' ,
'last' , __FILE__ );
72 $this->ReviewAccess =
get_package(
'review::review_access' ,
'last' , __FILE__ );
73 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
74 $this->UserAlgorithms =
get_package(
'user::user_algorithms' ,
'last' , __FILE__ );
108 $id = $this->Security->get( $id ,
'integer' );
110 $Records = $this->ReviewAccess->unsafe_select( $this->ReviewAccess->NativeTable.
".id = $id" );
112 return( count( $Records ) === 1 );
114 catch( Exception $e )
146 $id = $this->Security->get( $id ,
'integer' );
148 $Records = $this->ReviewAccess->unsafe_select( $this->ReviewAccess->NativeTable.
".id = $id" );
150 if( count( $Records ) == 0 )
152 throw(
new Exception(
'Record was not found' ) );
155 return( $Records[ 0 ] );
157 catch( Exception $e )
193 if( isset( $this->Cache[
"$MasterId.$MasterType" ] ) )
195 return( $this->Cache[
"$MasterId.$MasterType" ] );
198 $this->Cache[
"$MasterId.$MasterType" ] = $this->LinkUtilities->get_dependent_objects(
199 $MasterId , $MasterType ,
'review' , $this->ReviewAccess
202 return( $this->Cache[
"$MasterId.$MasterType" ] );
204 catch( Exception $e )
240 $MasterId = $Options->get_setting(
'master_id' );
241 $MasterType = $Options->get_setting(
'master_type' );
243 return( $this->ReviewAccess->create( $Record ) );
245 catch( Exception $e )
281 $Author = $this->Security->get( $Author ,
'integer' );
282 $Time = $this->Security->get( $Time ,
'integer' );
284 $Records = $this->ReviewAccess->unsafe_select(
285 $this->ReviewAccess->NativeTable.
".author = $Author AND ".
286 "DATE_ADD( creation_date , INTERVAL $Time SECOND ) > NOW()"
291 catch( Exception $e )