Version 3.4.5

This commit is contained in:
Neo committed 2025-12-19 00:38:12 -08:00
1 parent fb6b5baabc
commit e4478369d8
1360 files changed
+228921 -179445

No files matched your search

@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Facilitates reputation plugins
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-03-05 09:42:55 -0500 (Tue, 05 Mar 2013) $
* </pre>
*
* @author Joshua Williams <josh@invisionpower.com>
@@ -192,6 +192,14 @@ class classReputationCache
return false;
}
/* Does the rep item exist? */
if( ! $this->likeItemExists( $app, $type, $type_id ) )
{
/* See ticket #845557 - item may not exist when not in LIKE mode. Need to add functionalty so each app can return boolean if item exists in native tables */
//$this->error_message = $this->lang->words['reputation_invalid'];
//return false;
}
/* Check for existing rating */
$currentRating = $this->getCurrentMemberRating( array( 'app' => $app, 'type' => $type, 'id' => $type_id, 'memberId' => $this->memberData['member_id'] ) );
@@ -328,7 +336,7 @@ class classReputationCache
/* Get authors current rep */
$author_points = $this->DB->buildAndFetch( array( 'select' => 'pp_reputation_points',
'from' => 'profile_portal',
'where' => "pp_member_id={$member_id}" ) );
'where' => "pp_member_id=" . intval($member_id) ) );
/* Figure out new rep */
if( $currentRating['rep_rating'] == -1 )
@@ -824,4 +832,13 @@ class classReputationCache
{
return ( $this->settings['reputation_point_types'] == 'like' ) ? true : false;
}
public function likeItemExists( $app, $type, $type_id )
{
$data = $this->DB->buildAndFetch( array( 'select' => 'id',
'from' => 'reputation_cache',
'where' => "app='{$app}' AND type='$type' AND type_id='$type_id'" ) );
return ( count( $data ) ) ? TRUE : FALSE;
}
}