Sfoglia il codice sorgente

Ticket #62 - Core changes and fixes.

AntonLV 10 anni fa
parent
commit
1a17bd2882

+ 1 - 1
inc/classes/BxDolPaginate.php

@@ -136,7 +136,7 @@ abstract class BxDolPaginate extends BxDol
         else
             $this->_iNum = 0;
 
-        if ($this->_iNum > $this->_iPerPage)
+        if ($this->_iNum > $this->_iPerPage && $isAutoPopLastElement)
             array_pop($a);
     }
 

+ 1 - 1
inc/classes/BxDolPrivacy.php

@@ -282,7 +282,7 @@ class BxDolPrivacy extends BxDol implements iBxDolFactoryObject
         return isMember();
     }
 
-    public function checkConnections($iOwnerId, $iViewerId)
+    public function checkFriends($iOwnerId, $iViewerId)
     {
         return BxDolConnection::getObjectInstance('sys_profiles_friends')->isConnected($iOwnerId, $iViewerId, true);
     }

+ 8 - 3
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -176,14 +176,18 @@ class BxBaseModGeneralModule extends BxDolModule
     {
     	$sModule = $this->_aModule['name'];
 
+    	$sEventPrivacy = $sModule . '_allow_view_event_to';
+		if(BxDolPrivacy::getObjectInstance($sEventPrivacy) === false)
+			$sEventPrivacy = '';
+
         return array(
             'handlers' => array(
-                array('group' => $sModule . '_object', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'added', 'module_name' => $sModule, 'module_method' => 'get_notifications_post', 'module_class' => 'Module'),
+                array('group' => $sModule . '_object', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'added', 'module_name' => $sModule, 'module_method' => 'get_notifications_post', 'module_class' => 'Module', 'module_event_privacy' => $sEventPrivacy),
                 array('group' => $sModule . '_object', 'type' => 'update', 'alert_unit' => $sModule, 'alert_action' => 'edited'),
                 array('group' => $sModule . '_object', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'deleted'),
-                array('group' => $sModule . '_comment', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'commentPost', 'module_name' => $sModule, 'module_method' => 'get_notifications_comment', 'module_class' => 'Module'),
+                array('group' => $sModule . '_comment', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'commentPost', 'module_name' => $sModule, 'module_method' => 'get_notifications_comment', 'module_class' => 'Module', 'module_event_privacy' => $sEventPrivacy),
                 array('group' => $sModule . '_comment', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'commentRemoved'),
-                array('group' => $sModule . '_vote', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'doVote', 'module_name' => $sModule, 'module_method' => 'get_notifications_vote', 'module_class' => 'Module'),
+                array('group' => $sModule . '_vote', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'doVote', 'module_name' => $sModule, 'module_method' => 'get_notifications_vote', 'module_class' => 'Module', 'module_event_privacy' => $sEventPrivacy),
 				array('group' => $sModule . '_vote', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'undoVote'),
             ),
             'alerts' => array(
@@ -217,6 +221,7 @@ class BxBaseModGeneralModule extends BxDolModule
 			'entry_url' => $sEntryUrl,
 			'entry_caption' => $sEntryCaption,
 			'entry_author' => $aContentInfo[$CNF['FIELD_AUTHOR']],
+			'entry_privacy' => '', //may be empty or not specified. In this case Public privacy will be used.
 			'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
 		);
     }