UltrasonicNXT has uploaded a new change for review.
https://gerrit.wikimedia.org/r/181615
Change subject: Remove $wgChatSocialAvatars
......................................................................
Remove $wgChatSocialAvatars
A couple of people have struggled with this, so the software will now
automatically check if SocialProfile is installed, and use social avatars
if it is
Change-Id: I154a3e7f74cb443eb8969fb438c0c303d878bf1f
---
M MediaWikiChat.php
M SpecialChat.php
M api/GetNew.api.php
3 files changed, 5 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiChat
refs/changes/15/181615/1
diff --git a/MediaWikiChat.php b/MediaWikiChat.php
index acb948c..f7471d4 100644
--- a/MediaWikiChat.php
+++ b/MediaWikiChat.php
@@ -16,7 +16,7 @@
$wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
'name' => 'MediaWikiChat',
- 'version' => '2.12.7',
+ 'version' => '2.12.8',
'author' => 'Adam Carter/UltrasonicNXT',
'url' => 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat',
'descriptionmsg' => 'chat-desc',
@@ -57,7 +57,6 @@
// Config vars
$wgChatKicks = false; // allow 'kicking' of users?
-$wgChatSocialAvatars = true; // use SocialProfile avatars?
$wgChatRichMessages = true; // allow the use of wikitext and smileys in chat?
$wgChatSidebarPortlet = true; // show the online users module in the sidebar?
$wgChatOnlineTimeout = 1 * 60 * 100; // how long to wait before a user is
considered ofline? (in 100ths of a second)
diff --git a/SpecialChat.php b/SpecialChat.php
index 7672323..6d1b86c 100644
--- a/SpecialChat.php
+++ b/SpecialChat.php
@@ -15,7 +15,7 @@
* @param $par Mixed: parameter passed to the special page or null
*/
public function execute( $par ) {
- global $wgChatSocialAvatars, $wgChatKicks,
$wgChatLinkUsernames, $wgChatMeCommand, $wgChatMaxMessageLength;
+ global $wgChatKicks, $wgChatLinkUsernames, $wgChatMeCommand,
$wgChatMaxMessageLength;
$out = $this->getOutput();
$user = $this->getUser();
@@ -51,7 +51,7 @@
$out->addJsConfigVars(
array(
'wgChatKicks' => $wgChatKicks,
- 'wgChatSocialAvatars' =>
$wgChatSocialAvatars,
+ 'wgChatSocialAvatars' => class_exists(
'SocialProfileHooks' ), // has SocialProfile been installed?
'wgChatLinkUsernames' =>
$wgChatLinkUsernames,
'wgChatPingMentions' => $mention,
'wgChatPingPMs' => $pm,
diff --git a/api/GetNew.api.php b/api/GetNew.api.php
index 2f08937..05faf7b 100644
--- a/api/GetNew.api.php
+++ b/api/GetNew.api.php
@@ -4,7 +4,7 @@
class ChatGetNewAPI extends ApiBase {
public function execute() {
- global $wgChatSocialAvatars, $wgChatOnlineTimeout;
+ global $wgChatOnlineTimeout;
$result = $this->getResult();
$mName = $this->getModuleName();
@@ -136,7 +136,7 @@
$idString = strval( $id );
$result->addValue( array( $mName, 'users',
$idString ), 'name', $userObject->getName() );
- if ( $wgChatSocialAvatars ) {
+ if ( class_exists( 'SocialProfileHooks' ) ) {
// is SocialProfile installed?
$result->addValue( array( $mName,
'users', $idString ), 'avatar', MediaWikiChat::getAvatar( $id ) );
}
if ( array_key_exists( $id, $onlineUsers ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/181615
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I154a3e7f74cb443eb8969fb438c0c303d878bf1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits