AntonLV 9 tahun lalu
induk
melakukan
31a3bc50b6
2 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 2 0
      template/scripts/BxBaseCmts.php
  2. 1 1
      template/scripts/BxBaseCmtsServices.php

+ 2 - 0
template/scripts/BxBaseCmts.php

@@ -326,6 +326,8 @@ class BxBaseCmts extends BxDolCmts
     function getNotification($iCountOld = 0, $iCountNew = 0)
     function getNotification($iCountOld = 0, $iCountNew = 0)
     {
     {
     	$iCount = (int)$iCountNew - (int)$iCountOld;
     	$iCount = (int)$iCountNew - (int)$iCountOld;
+    	if($iCount < 0)
+    	    return '';
 
 
 		$aComments = $this->_oQuery->getCommentsBy(array('type' => 'latest', 'object_id' => $this->_iId, 'author' => $this->_getAuthorId(), 'others' => 1, 'start' => '0', 'per_page' => $iCount));
 		$aComments = $this->_oQuery->getCommentsBy(array('type' => 'latest', 'object_id' => $this->_iId, 'author' => $this->_getAuthorId(), 'others' => 1, 'start' => '0', 'per_page' => $iCount));
 		if(empty($aComments) || !is_array($aComments))
 		if(empty($aComments) || !is_array($aComments))

+ 1 - 1
template/scripts/BxBaseCmtsServices.php

@@ -41,7 +41,7 @@ class BxBaseCmtsServices extends BxDol
     		return false;
     		return false;
 
 
 		$iCountNew = $oCmts->getCommentsCount($iContentId, -1, BX_CMT_FILTER_OTHERS);
 		$iCountNew = $oCmts->getCommentsCount($iContentId, -1, BX_CMT_FILTER_OTHERS);
-		if($iCountNew <= $iCount)
+		if($iCountNew == $iCount)
 			return false;
 			return false;
 
 
     	return array(
     	return array(