[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Call echo related hooks

2016-12-03 Thread Lewis Cawte (Code Review)
Lewis Cawte has submitted this change and it was merged.

Change subject: Call echo related hooks
..


Call echo related hooks

Change-Id: Ib7c49642e164a96fdfd9a502afaded65a5ca1dc5
Follow-up: 278868
---
M SocialProfile.php
1 file changed, 29 insertions(+), 0 deletions(-)

Approvals:
  Lewis Cawte: Verified; Looks good to me, approved



diff --git a/SocialProfile.php b/SocialProfile.php
index f4b722a..605f46c 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -37,6 +37,9 @@
 
 // Classes to be autoloaded
 $wgAutoloadClasses['GenerateTopUsersReport'] = __DIR__ . 
'/UserStats/GenerateTopUsersReport.php';
+$wgAutoloadClasses['EchoUserBoardMessagePresentationModel'] = __DIR__ . 
'/UserBoard/EchoUserBoardMessagePresentationModel.php';
+$wgAutoloadClasses['EchoUserRelationshipPresentationModel'] = __DIR__ . 
'/UserRelationship/EchoUserRelationshipPresentationModel.php';
+$wgAutoloadClasses['EchoUserLevelAdvancePresentationModel'] = __DIR__ . 
'/UserStats/EchoUserLevelAdvancePresentationModel.php';
 $wgAutoloadClasses['SpecialAddRelationship'] = __DIR__ . 
'/UserRelationship/SpecialAddRelationship.php';
 $wgAutoloadClasses['SpecialBoardBlast'] = __DIR__ . 
'/UserBoard/SpecialSendBoardBlast.php';
 $wgAutoloadClasses['SpecialEditProfile'] = __DIR__ . 
'/UserProfile/SpecialEditProfile.php';
@@ -52,9 +55,12 @@
 $wgAutoloadClasses['RemoveAvatar'] = __DIR__ . 
'/UserProfile/SpecialRemoveAvatar.php';
 $wgAutoloadClasses['UpdateEditCounts'] = __DIR__ . 
'/UserStats/SpecialUpdateEditCounts.php';
 $wgAutoloadClasses['UserBoard'] = __DIR__ . '/UserBoard/UserBoardClass.php';
+$wgAutoloadClasses['UserBoardHooks'] = __DIR__ . 
'/UserBoard/UserBoardHooks.php';
 $wgAutoloadClasses['UserProfile'] = __DIR__ . 
'/UserProfile/UserProfileClass.php';
 $wgAutoloadClasses['UserProfilePage'] = __DIR__ . 
'/UserProfile/UserProfilePage.php';
 $wgAutoloadClasses['UserRelationship'] = __DIR__ . 
'/UserRelationship/UserRelationshipClass.php';
+$wgAutoloadClasses['UserRelationshipHooks'] = __DIR__ . 
'/UserRelationship/UserRelationshipHooks.php';
+$wgAutoloadClasses['UserStatsHooks'] = __DIR__ . 
'/UserStats/UserStatsHooks.php';
 $wgAutoloadClasses['UserLevel'] = __DIR__ . '/UserStats/UserStatsClass.php';
 $wgAutoloadClasses['UserStats'] = __DIR__ . '/UserStats/UserStatsClass.php';
 $wgAutoloadClasses['UserStatsTrack'] = __DIR__ . 
'/UserStats/UserStatsClass.php';
@@ -80,6 +86,29 @@
 $wgAutoloadClasses['ApiRelationshipResponse'] = __DIR__ . 
'/UserRelationship/ApiRelationshipResponse.php';
 $wgAPIModules['socialprofile-request-response'] = 'ApiRelationshipResponse';
 
+// Echo (Notifications) stuff
+// UserBoard
+$wgHooks['BeforeCreateEchoEvent'][] = 
'UserBoardHooks::onBeforeCreateEchoEvent';
+$wgHooks['EchoGetDefaultNotifiedUsers'][] = 
'UserBoardHooks::onEchoGetDefaultNotifiedUsers';
+$wgHooks['EchoGetBundleRules'][] = 'UserBoardHooks::onEchoGetBundleRules';
+
+$wgDefaultUserOptions['echo-subscriptions-web-social-msg'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-social-msg'] = false;
+
+// UserRelationship
+$wgHooks['BeforeCreateEchoEvent'][] = 
'UserRelationshipHooks::onBeforeCreateEchoEvent';
+$wgHooks['EchoGetDefaultNotifiedUsers'][] = 
'UserRelationshipHooks::onEchoGetDefaultNotifiedUsers';
+
+$wgDefaultUserOptions['echo-subscriptions-web-social-rel'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-social-rel'] = false;
+
+// UserStats
+$wgHooks['BeforeCreateEchoEvent'][] = 
'UserStatsHooks::onBeforeCreateEchoEvent';
+$wgHooks['EchoGetBundleRules'][] = 'UserStatsHooks::onEchoGetBundleRules';
+
+$wgDefaultUserOptions['echo-subscriptions-web-social-level-up'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-social-level-up'] = false;
+
 // New special pages
 $wgSpecialPages['AddRelationship'] = 'SpecialAddRelationship';
 $wgSpecialPages['EditProfile'] = 'SpecialEditProfile';

-- 
To view, visit https://gerrit.wikimedia.org/r/325141
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7c49642e164a96fdfd9a502afaded65a5ca1dc5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Lewis Cawte 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Lewis Cawte 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Call echo related hooks

2016-12-03 Thread Lewis Cawte (Code Review)
Lewis Cawte has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/325141

Change subject: Call echo related hooks
..

Call echo related hooks

Change-Id: Ib7c49642e164a96fdfd9a502afaded65a5ca1dc5
Follow-up: 278868
---
M SocialProfile.php
1 file changed, 29 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SocialProfile 
refs/changes/41/325141/1

diff --git a/SocialProfile.php b/SocialProfile.php
index f4b722a..605f46c 100644
--- a/SocialProfile.php
+++ b/SocialProfile.php
@@ -37,6 +37,9 @@
 
 // Classes to be autoloaded
 $wgAutoloadClasses['GenerateTopUsersReport'] = __DIR__ . 
'/UserStats/GenerateTopUsersReport.php';
+$wgAutoloadClasses['EchoUserBoardMessagePresentationModel'] = __DIR__ . 
'/UserBoard/EchoUserBoardMessagePresentationModel.php';
+$wgAutoloadClasses['EchoUserRelationshipPresentationModel'] = __DIR__ . 
'/UserRelationship/EchoUserRelationshipPresentationModel.php';
+$wgAutoloadClasses['EchoUserLevelAdvancePresentationModel'] = __DIR__ . 
'/UserStats/EchoUserLevelAdvancePresentationModel.php';
 $wgAutoloadClasses['SpecialAddRelationship'] = __DIR__ . 
'/UserRelationship/SpecialAddRelationship.php';
 $wgAutoloadClasses['SpecialBoardBlast'] = __DIR__ . 
'/UserBoard/SpecialSendBoardBlast.php';
 $wgAutoloadClasses['SpecialEditProfile'] = __DIR__ . 
'/UserProfile/SpecialEditProfile.php';
@@ -52,9 +55,12 @@
 $wgAutoloadClasses['RemoveAvatar'] = __DIR__ . 
'/UserProfile/SpecialRemoveAvatar.php';
 $wgAutoloadClasses['UpdateEditCounts'] = __DIR__ . 
'/UserStats/SpecialUpdateEditCounts.php';
 $wgAutoloadClasses['UserBoard'] = __DIR__ . '/UserBoard/UserBoardClass.php';
+$wgAutoloadClasses['UserBoardHooks'] = __DIR__ . 
'/UserBoard/UserBoardHooks.php';
 $wgAutoloadClasses['UserProfile'] = __DIR__ . 
'/UserProfile/UserProfileClass.php';
 $wgAutoloadClasses['UserProfilePage'] = __DIR__ . 
'/UserProfile/UserProfilePage.php';
 $wgAutoloadClasses['UserRelationship'] = __DIR__ . 
'/UserRelationship/UserRelationshipClass.php';
+$wgAutoloadClasses['UserRelationshipHooks'] = __DIR__ . 
'/UserRelationship/UserRelationshipHooks.php';
+$wgAutoloadClasses['UserStatsHooks'] = __DIR__ . 
'/UserStats/UserStatsHooks.php';
 $wgAutoloadClasses['UserLevel'] = __DIR__ . '/UserStats/UserStatsClass.php';
 $wgAutoloadClasses['UserStats'] = __DIR__ . '/UserStats/UserStatsClass.php';
 $wgAutoloadClasses['UserStatsTrack'] = __DIR__ . 
'/UserStats/UserStatsClass.php';
@@ -80,6 +86,29 @@
 $wgAutoloadClasses['ApiRelationshipResponse'] = __DIR__ . 
'/UserRelationship/ApiRelationshipResponse.php';
 $wgAPIModules['socialprofile-request-response'] = 'ApiRelationshipResponse';
 
+// Echo (Notifications) stuff
+// UserBoard
+$wgHooks['BeforeCreateEchoEvent'][] = 
'UserBoardHooks::onBeforeCreateEchoEvent';
+$wgHooks['EchoGetDefaultNotifiedUsers'][] = 
'UserBoardHooks::onEchoGetDefaultNotifiedUsers';
+$wgHooks['EchoGetBundleRules'][] = 'UserBoardHooks::onEchoGetBundleRules';
+
+$wgDefaultUserOptions['echo-subscriptions-web-social-msg'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-social-msg'] = false;
+
+// UserRelationship
+$wgHooks['BeforeCreateEchoEvent'][] = 
'UserRelationshipHooks::onBeforeCreateEchoEvent';
+$wgHooks['EchoGetDefaultNotifiedUsers'][] = 
'UserRelationshipHooks::onEchoGetDefaultNotifiedUsers';
+
+$wgDefaultUserOptions['echo-subscriptions-web-social-rel'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-social-rel'] = false;
+
+// UserStats
+$wgHooks['BeforeCreateEchoEvent'][] = 
'UserStatsHooks::onBeforeCreateEchoEvent';
+$wgHooks['EchoGetBundleRules'][] = 'UserStatsHooks::onEchoGetBundleRules';
+
+$wgDefaultUserOptions['echo-subscriptions-web-social-level-up'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-social-level-up'] = false;
+
 // New special pages
 $wgSpecialPages['AddRelationship'] = 'SpecialAddRelationship';
 $wgSpecialPages['EditProfile'] = 'SpecialEditProfile';

-- 
To view, visit https://gerrit.wikimedia.org/r/325141
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7c49642e164a96fdfd9a502afaded65a5ca1dc5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: Lewis Cawte 
Gerrit-Reviewer: Jack Phoenix 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits