r41236 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41235‎ | r41236 | r41237 >
Date:18:40, 24 September 2008
Author:ashley
Status:old
Tags:
Comment:
Modified paths:
  • /trunk/extensions/SocialProfile/SocialProfile.php (modified) (history)
  • /trunk/extensions/SocialProfile/SystemGifts/SystemGifts.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserGifts/Gifts.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/SocialProfile.php
@@ -12,6 +12,7 @@
1313 */
1414 $dir = dirname(__FILE__) . '/';
1515
 16+// Internationalization files
1617 $wgExtensionMessagesFiles['SocialProfileUserBoard'] = $dir . 'UserBoard/UserBoard.i18n.php';
1718 $wgExtensionMessagesFiles['SocialProfileUserProfile'] = $dir . 'UserProfile/UserProfile.i18n.php';
1819 $wgExtensionMessagesFiles['SocialProfileUserRelationship'] = $dir . 'UserRelationship/UserRelationship.i18n.php';
@@ -19,6 +20,7 @@
2021
2122 $wgExtensionAliasesFiles['SocialProfile'] = $dir . 'SocialProfile.alias.php';
2223
 24+// Classes to be autoloaded
2325 $wgAutoloadClasses['SpecialAddRelationship'] = $dir . 'UserRelationship/SpecialAddRelationship.php';
2426 $wgAutoloadClasses['SpecialBoardBlast'] = $dir . 'UserBoard/SpecialSendBoardBlast.php';
2527 $wgAutoloadClasses['SpecialPopulateUserProfiles'] = $dir . 'UserProfile/SpecialPopulateExistingUsersProfiles.php';
@@ -43,6 +45,7 @@
4446 $wgAutoloadClasses['TopUsersPoints'] = $dir. 'UserStats/TopUsers.php';
4547 $wgAutoloadClasses['wAvatar'] = $dir . 'UserProfile/AvatarClass.php';
4648
 49+// New special pages
4750 $wgSpecialPages['AddRelationship'] = 'SpecialAddRelationship';
4851 $wgSpecialPages['PopulateUserProfiles'] = 'SpecialPopulateUserProfiles';
4952 $wgSpecialPages['RemoveAvatar'] = 'RemoveAvatar';
@@ -59,15 +62,26 @@
6063 $wgSpecialPages['ViewRelationshipRequests'] = 'SpecialViewRelationshipRequests';
6164 $wgSpecialPages['ViewRelationships'] = 'SpecialViewRelationships';
6265
63 -//What to display on social profile pages by default?
 66+// Special page groups for MW 1.13+
 67+$wgSpecialPageGroups['AddRelationship'] = 'users';
 68+$wgSpecialPageGroups['RemoveAvatar'] = 'users';
 69+$wgSpecialPageGroups['RemoveRelationship'] = 'users';
 70+$wgSpecialPageGroups['UserBoard'] = 'users';
 71+$wgSpecialPageGroups['ViewRelationshipRequests'] = 'users';
 72+$wgSpecialPageGroups['ViewRelationships'] = 'users';
 73+
 74+// What to display on social profile pages by default?
6475 $wgUserProfileDisplay['board'] = true;
6576 $wgUserProfileDisplay['foes'] = true;
6677 $wgUserProfileDisplay['friends'] = true;
6778
68 -//Should we display UserBoard-related things on social profile pages?
 79+// Should we display UserBoard-related things on social profile pages?
6980 $wgUserBoard = true;
7081
71 -//Extension credits
 82+// Whether to enable friending or not -- this doesn't do very much actually, so don't rely on it
 83+$wgFriendingEnabled = true;
 84+
 85+// Extension credits that show up on Special:Version
7286 $wgExtensionCredits['other'][] = array(
7387 'name' => 'SocialProfile',
7488 'author' => 'Wikia, Inc. (Aaron Wright, David Pean)',
@@ -148,14 +162,15 @@
149163 'description' => 'A special page for viewing all relationships by type',
150164 );
151165
 166+// Some paths used by the extensions
152167 $wgUserProfileDirectory = "$IP/extensions/SocialProfile/UserProfile";
153168
154169 $wgUserBoardScripts = "$wgScriptPath/extensions/SocialProfile/UserBoard";
155170 $wgUserProfileScripts = "$wgScriptPath/extensions/SocialProfile/UserProfile";
156171 $wgUserRelationshipScripts = "$wgScriptPath/extensions/SocialProfile/UserRelationship";
157172
158 -require_once("$IP/extensions/SocialProfile/YUI/YUI.php"); //YUI stand-alone library
159 -require_once("{$wgUserProfileDirectory}/UserProfile.php"); //Profile page configuration loader file
160 -require_once("$IP/extensions/SocialProfile/UserGifts/Gifts.php"); //UserGifts (user-to-user gifting functionality) loader file
161 -require_once("$IP/extensions/SocialProfile/SystemGifts/SystemGifts.php"); //SystemGifts (awards functionality) loader file
162 -$wgFriendingEnabled = true; //Whether to enable friending or not -- this doesn't do very much actually, so don't rely on it
\ No newline at end of file
 173+// Loader files
 174+require_once("$IP/extensions/SocialProfile/YUI/YUI.php"); // YUI stand-alone library
 175+require_once("{$wgUserProfileDirectory}/UserProfile.php"); // Profile page configuration loader file
 176+require_once("$IP/extensions/SocialProfile/UserGifts/Gifts.php"); // UserGifts (user-to-user gifting functionality) loader file
 177+require_once("$IP/extensions/SocialProfile/SystemGifts/SystemGifts.php"); // SystemGifts (awards functionality) loader file
\ No newline at end of file
Index: trunk/extensions/SocialProfile/SystemGifts/SystemGifts.php
@@ -4,7 +4,6 @@
55 $wgGroupPermissions['awardsmanage']['awardsmanage'] = true;
66 $wgGroupPermissions['staff']['awardsmanage'] = true;
77 $wgGroupPermissions['sysop']['awardsmanage'] = true;
8 -$wgGroupPermissions['janitor']['awardsmanage'] = true;
98
109 $wgSystemGiftsDirectory = "$IP/extensions/SocialProfile/SystemGifts";
1110 $wgSystemGiftsScripts = "$wgScriptPath/extensions/SocialProfile/SystemGifts";
Index: trunk/extensions/SocialProfile/UserGifts/Gifts.php
@@ -8,34 +8,41 @@
99 $wgUserGiftsDirectory = "$IP/extensions/SocialProfile/UserGifts";
1010 $wgUserGiftsScripts = "$wgScriptPath/extensions/SocialProfile/UserGifts";
1111
12 -//Special Pages etc.
 12+// Special Pages etc.
1313 $wgAutoloadClasses['Gifts'] = "{$wgUserGiftsDirectory}/GiftsClass.php";
1414 $wgAutoloadClasses['UserGifts'] = "{$wgUserGiftsDirectory}/UserGiftsClass.php";
1515
1616 $wgAutoloadClasses['GiveGift'] = "{$wgUserGiftsDirectory}/SpecialGiveGift.php";
1717 $wgSpecialPages['GiveGift'] = 'GiveGift';
 18+$wgSpecialPageGroups['GiveGift'] = 'users';
1819
1920 $wgAutoloadClasses['ViewGifts'] = "{$wgUserGiftsDirectory}/SpecialViewGifts.php";
2021 $wgSpecialPages['ViewGifts'] = 'ViewGifts';
 22+$wgSpecialPageGroups['ViewGifts'] = 'users';
2123
2224 $wgAutoloadClasses['ViewGift'] = "{$wgUserGiftsDirectory}/SpecialViewGift.php";
2325 $wgSpecialPages['ViewGift'] = 'ViewGift';
 26+$wgSpecialPageGroups['ViewGift'] = 'users';
2427
2528 $wgAutoloadClasses['GiftManager'] = "{$wgUserGiftsDirectory}/SpecialGiftManager.php";
2629 $wgSpecialPages['GiftManager'] = 'GiftManager';
 30+$wgSpecialPageGroups['GiftManager'] = 'wiki';
2731
2832 $wgAutoloadClasses['GiftManagerLogo'] = "{$wgUserGiftsDirectory}/SpecialGiftManagerLogo.php";
2933 $wgSpecialPages['GiftManagerLogo'] = 'GiftManagerLogo';
 34+$wgSpecialPageGroups['GiftManagerLogo'] = 'wiki';
3035
3136 $wgAutoloadClasses['RemoveMasterGift'] = "{$wgUserGiftsDirectory}/SpecialRemoveMasterGift.php";
3237 $wgSpecialPages['RemoveMasterGift'] = 'RemoveMasterGift';
 38+$wgSpecialPageGroups['RemoveMasterGift'] = 'wiki';
3339
3440 $wgAutoloadClasses['RemoveGift'] = "{$wgUserGiftsDirectory}/SpecialRemoveGift.php";
3541 $wgSpecialPages['RemoveGift'] = 'RemoveGift';
 42+$wgSpecialPageGroups['RemoveGift'] = 'users';
3643
3744 $wgExtensionMessagesFiles['UserGifts'] = $wgUserGiftsDirectory . '/UserGifts.i18n.php';
3845
39 -//Credits
 46+// Credits
4047 $wgExtensionCredits['specialpage'][] = array(
4148 'name' => 'GiftManager',
4249 'version' => '1.0',