[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [websites/wiki-kde-org/develop] extensions/CleanChanges: Update CleanChanges extension
From:       Sayak Banerjee <sayakb () kde ! org>
Date:       2012-07-24 18:44:10
Message-ID: 20120724184410.64F1DA6094 () git ! kde ! org
[Download RAW message or body]

Git commit 9e4167940864a3e6c0030dcea5f8b88c74842b7f by Sayak Banerjee.
Committed on 24/07/2012 at 20:43.
Pushed by sayakb into branch 'develop'.

Update CleanChanges extension

M  +123  -32   extensions/CleanChanges/CleanChanges.i18n.php
M  +14   -3    extensions/CleanChanges/CleanChanges.php
M  +34   -68   extensions/CleanChanges/CleanChanges_body.php
M  +0    -3    extensions/CleanChanges/Filters.php
M  +19   -23   extensions/CleanChanges/cleanchanges.js

http://commits.kde.org/websites/wiki-kde-org/9e4167940864a3e6c0030dcea5f8b88c74842b7f

diff --git a/extensions/CleanChanges/CleanChanges.i18n.php \
b/extensions/CleanChanges/CleanChanges.i18n.php old mode 100644
new mode 100755
index 4789161..7e9ac60
--- a/extensions/CleanChanges/CleanChanges.i18n.php
+++ b/extensions/CleanChanges/CleanChanges.i18n.php
@@ -79,6 +79,7 @@ $messages['ar'] = array(
  */
 $messages['arc'] = array(
 	'cleanchanges-desc' => '[[Special:RecentChanges|ܫܘܚ ܦ̈ܐ \
ܚܕ̈ܬܐ]]ܚܙܝܬܐ ܙܥܘܪܬܐ ܕ', +	'cleanchanges-language' => ' ܫܢܐ:',
 	'cleanchanges-language-na' => 'ܟ ',
 	'cleanchanges-showuserlinks' => 'ܚܘܝ ܐܣܘܪ̈ܐ ܕܡܦ ܚܢܐ',
 );
@@ -98,14 +99,25 @@ $messages['arz'] = array(
 
 /** Asturian (Asturianu)
  * @author Esbardu
+ * @author Xuacu
  */
 $messages['ast'] = array(
 	'cleanchanges-changerightslink' => 'camudar grupos',
 	'cleanchanges-desc' => 'Vísualización más compacta de la \
[[Special:RecentChanges|llista de cambeos recientes]]',  'cleanchanges-language' => \
'Llingua:', +	'cleanchanges-language-na' => 'Toos',
+	'cleanchanges-users' => 'Usuarios (Sep: |):',
+	'cleanchanges-showuserlinks' => "Amosar enllaces d'usuariu",
+);
+
+/** Azerbaijani (Azərbaycanca)
+ * @author Cekli829
+ */
+$messages['az'] = array(
+	'cleanchanges-language-na' => 'Hamısı',
 );
 
-/** Bashkir (Башҡорт)
+/** Bashkir (Башҡортса)
  * @author Assele
  */
 $messages['ba'] = array(
@@ -117,7 +129,7 @@ $messages['ba'] = array(
 	'cleanchanges-showuserlinks' => ' атнашыусы һылтанмаларын \
күрһәтергә',  );
 
-/** Belarusian (Taraškievica orthography) (Беларуская \
(тарашкевіца)) +/** Belarusian (Taraškievica orthography) \
                (‪Беларуская (тарашкевіца)‬)
  * @author EugeneZelenko
  * @author Jim-by
  */
@@ -144,11 +156,16 @@ $messages['bg'] = array(
 );
 
 /** Bengali (বাংলা)
+ * @author Wikitanvir
  * @author Zaheen
  */
 $messages['bn'] = array(
 	'cleanchanges-changerightslink' => 'দল পরিবর্তন করুন',
 	'cleanchanges-desc' => '[[Special:RecentChanges|সাম্প্রতিক \
পরিবর্তনসমূহের তালিকার]] আরও \
সংহত প্রদর্শন', +	'cleanchanges-language' => 'ভাষা:',
+	'cleanchanges-language-na' => 'সকল',
+	'cleanchanges-users' => 'ব্যবহারকারী \
(পার্থক্যকারী: |):', +	'cleanchanges-showuserlinks' => \
'ব্যবহারকারী লিংকগুলো দেখাও',  );
 
 /** Breton (Brezhoneg)
@@ -176,14 +193,17 @@ $messages['bs'] = array(
 );
 
 /** Catalan (Catal )
+ * @author El libre
  * @author SMP
  * @author Solde
  */
 $messages['ca'] = array(
 	'cleanchanges-changerightslink' => 'canvia els grups',
+	'cleanchanges-desc' => 'Versió més compacta de la [[Special:RecentChanges|llista \
de canvis recents]]',  'cleanchanges-language' => 'Idioma:',
 	'cleanchanges-language-na' => 'Tot',
 	'cleanchanges-users' => 'Usuaris (Separador: |):',
+	'cleanchanges-showuserlinks' => "Mostra els enllaços de l'usuari/a",
 );
 
 /** Chechen (Нохчийн)
@@ -243,6 +263,13 @@ $messages['de'] = array(
 	'cleanchanges-showuserlinks' => 'Zeige Benutzer-Links',
 );
 
+/** Zazaki (Zazaki)
+ * @author Erdemaslancan
+ */
+$messages['diq'] = array(
+	'cleanchanges-users' => 'Karberi (duri fi: |):',
+);
+
 /** Lower Sorbian (Dolnoserbski)
  * @author Michawiki
  */
@@ -371,7 +398,7 @@ $messages['frp'] = array(
 	'cleanchanges-language' => 'Lengoua :',
 	'cleanchanges-language-na' => 'Tôs',
 	'cleanchanges-users' => 'Utilisators (sèp. per |) :',
-	'cleanchanges-showuserlinks' => 'Fâre vêre los lims a l'utilisator',
+	'cleanchanges-showuserlinks' => 'Fâre vêre los lims a l'usanciér',
 );
 
 /** Western Frisian (Frysk)
@@ -405,7 +432,7 @@ $messages['gl'] = array(
 	'cleanchanges-desc' => 'Unha mostra máis compacta da [[Special:RecentChanges|lista \
de cambios recentes]]',  'cleanchanges-language' => 'Lingua:',
 	'cleanchanges-language-na' => 'Todas',
-	'cleanchanges-users' => 'Usuarios (separados por: |):',
+	'cleanchanges-users' => 'Usuarios (separados por |):',
 	'cleanchanges-showuserlinks' => 'Mostrar as ligazóns de usuario',
 );
 
@@ -633,7 +660,17 @@ $messages['ksh'] = array(
 	'cleanchanges-showuserlinks' => 'Links op Metmaacher zeije',
 );
 
-/** Cornish (Kernewek)
+/** Kurdish (Latin script) (‪Kurdî (latînî)‬)
+ * @author George Animal
+ */
+$messages['ku-latn'] = array(
+	'cleanchanges-language' => 'Ziman:',
+	'cleanchanges-language-na' => 'Hemû',
+	'cleanchanges-users' => 'Bikarhêner (Sep: |):',
+	'cleanchanges-showuserlinks' => 'Lînkên bikarhêneran nîşan bide',
+);
+
+/** Cornish (Kernowek)
  * @author Kw-Moon
  */
 $messages['kw'] = array(
@@ -665,6 +702,23 @@ $messages['li'] = array(
 	'cleanchanges-showuserlinks' => 'Gebroekersverwiezinge betrachte',
 );
 
+/** Lithuanian (Lietuvių)
+ * @author Eitvys200
+ */
+$messages['lt'] = array(
+	'cleanchanges-changerightslink' => 'pakeisti grupes',
+	'cleanchanges-language' => 'Kalba:',
+	'cleanchanges-language-na' => 'Visi',
+	'cleanchanges-showuserlinks' => 'Rodyti vartotojo nuorodas',
+);
+
+/** Latgalian (Latgaļu)
+ * @author Dark Eagle
+ */
+$messages['ltg'] = array(
+	'cleanchanges-language-na' => 'Vysi',
+);
+
 /** Eastern Mari (Олык Марий)
  * @author Сай
  */
@@ -717,11 +771,16 @@ $messages['mr'] = array(
 );
 
 /** Malay (Bahasa Melayu)
+ * @author Anakmalaysia
  * @author Emrrans
  */
 $messages['ms'] = array(
+	'cleanchanges-changerightslink' => 'tukar kumpulan',
+	'cleanchanges-desc' => 'Pemaparan [[Special:RecentChanges|senarai perubahan \
terkini]] yang lebih padat',  'cleanchanges-language' => 'Bahasa:',
+	'cleanchanges-language-na' => 'Semua',
 	'cleanchanges-users' => 'Pengguna (Sep: |):',
+	'cleanchanges-showuserlinks' => 'Tunjukkan pautan pengguna',
 );
 
 /** Maltese (Malti)
@@ -743,10 +802,28 @@ $messages['myv'] = array(
 
 /** Nahuatl (Nāhuatl)
  * @author Fluence
+ * @author Teòtlalili
  */
 $messages['nah'] = array(
-	'cleanchanges-language' => 'Tlahtōlli:',
-	'cleanchanges-language-na' => 'Mochīntīn',
+	'cleanchanges-changerightslink' => 'tlátlasèntl lìlpátlalòs',
+	'cleanchanges-desc' => 'Monèxtìs okachi tepitòn in [[Special:RecentChanges|welok \
tlapátlalli p mitl]]', +	'cleanchanges-language' => 'Tlâtòlli:',
+	'cleanchanges-language-na' => 'Mochtìn',
+	'cleanchanges-users' => 'Motekìuhti nimë (Sep: |):',
+	'cleanchanges-showuserlinks' => 'M  monèxti ìnetzòwìlw n in motekìuhti ni',
+);
+
+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
+ * @author Jon Harald Søby
+ * @author Nghtwlkr
+ */
+$messages['nb'] = array(
+	'cleanchanges-changerightslink' => 'endre grupper',
+	'cleanchanges-desc' => 'Mer kompakt visning av [[Special:RecentChanges|siste \
endringer]]', +	'cleanchanges-language' => 'Språk:',
+	'cleanchanges-language-na' => 'Alle',
+	'cleanchanges-users' => 'Brukere (separer med |):',
+	'cleanchanges-showuserlinks' => 'Vis brukerlenker',
 );
 
 /** Dutch (Nederlands)
@@ -763,29 +840,17 @@ $messages['nl'] = array(
 
 /** Norwegian Nynorsk (‪Norsk (nynorsk)‬)
  * @author Harald Khan
+ * @author Njardarlogar
  */
 $messages['nn'] = array(
 	'cleanchanges-changerightslink' => 'endra grupper',
 	'cleanchanges-desc' => 'Meir kompakt vising av [[Special:RecentChanges|siste \
endringar]]',  'cleanchanges-language' => 'Språk:',
 	'cleanchanges-language-na' => 'Alle',
-	'cleanchanges-users' => "Brukarar (separer med '|'):",
+	'cleanchanges-users' => 'Brukarar (separer med |):',
 	'cleanchanges-showuserlinks' => 'Vis brukarlenkjer',
 );
 
-/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
- * @author Jon Harald Søby
- * @author Nghtwlkr
- */
-$messages['no'] = array(
-	'cleanchanges-changerightslink' => 'endre grupper',
-	'cleanchanges-desc' => 'Mer kompakt visning av [[Special:RecentChanges|siste \
                endringer]]',
-	'cleanchanges-language' => 'Språk:',
-	'cleanchanges-language-na' => 'Alle',
-	'cleanchanges-users' => 'Brukere (separer med |):',
-	'cleanchanges-showuserlinks' => 'Vis brukerlenker',
-);
-
 /** Occitan (Occitan)
  * @author Cedric31
  */
@@ -798,6 +863,23 @@ $messages['oc'] = array(
 	'cleanchanges-showuserlinks' => "Afichar los ligams d'aqueste utilizaire",
 );
 
+/** Oriya (ଓଡ଼ିଆ)
+ * @author Jnanaranjan Sahu
+ * @author Odisha1
+ */
+$messages['or'] = array(
+	'cleanchanges-language' => 'ଭାଷା:',
+	'cleanchanges-language-na' => 'ସବୁ',
+	'cleanchanges-showuserlinks' => 'ବ୍ୟବହାରକାରୀ ଲିଙ୍କ \
ଦେଖାନ୍ତୁ', +);
+
+/** Ossetic (Ирон)
+ * @author Amikeco
+ */
+$messages['os'] = array(
+	'cleanchanges-language' => 'Æвзаг:',
+);
+
 /** Punjabi (ਪੰਜਾਬੀ)
  * @author Gman124
  */
@@ -930,11 +1012,14 @@ $messages['ru'] = array(
  * @author Gazeb
  */
 $messages['rue'] = array(
+	'cleanchanges-changerightslink' => 'змінити ґрупы',
 	'cleanchanges-language' => 'Язык:',
 	'cleanchanges-language-na' => 'Вшыткы',
+	'cleanchanges-users' => 'Хоснователї (Оддїлёвач |):',
+	'cleanchanges-showuserlinks' => 'Указати одказы \
хоснователя',  );
 
-/** Yakut (Саха тыла)
+/** Sakha (Саха тыла)
  * @author HalanTul
  */
 $messages['sah'] = array(
@@ -977,7 +1062,8 @@ $messages['sl'] = array(
 	'cleanchanges-showuserlinks' => 'Prikaži uporabniške povezave',
 );
 
-/** Serbian Cyrillic ekavian (Српски (ћирилица))
+/** Serbian (Cyrillic script) (‪Српски (ћирилица)‬)
+ * @author Rancher
  * @author Sasa Stefanovic
  * @author Михајло Анђелковић
  */
@@ -986,19 +1072,20 @@ $messages['sr-ec'] = array(
 	'cleanchanges-desc' => 'Компактнији приказ списка \
[[Special:RecentChanges|скорашњих измена]]',  'cleanchanges-language' \
=> 'Језик:',  'cleanchanges-language-na' => 'Све',
-	'cleanchanges-users' => 'Корисници ( аздв: |):',
-	'cleanchanges-showuserlinks' => 'Покажи корисничке линкове',
+	'cleanchanges-users' => 'Корисници (раздв. |):',
+	'cleanchanges-showuserlinks' => 'Прикажи корисничке везе',
 );
 
-/** Serbian Latin ekavian (Srpski (latinica))
+/** Serbian (Latin script) (‪Srpski (latinica)‬)
  * @author Michaello
+ * @author Rancher
  */
 $messages['sr-el'] = array(
 	'cleanchanges-changerightslink' => 'promeni grupe',
 	'cleanchanges-desc' => 'Kompaktniji prikaz spiska \
[[Special:RecentChanges|skorašnjih izmena]]',  'cleanchanges-language' => 'Jezik:',
 	'cleanchanges-language-na' => 'Sve',
-	'cleanchanges-users' => 'Korisnici (Razdv: |):',
+	'cleanchanges-users' => 'Korisnici (razdv. |):',
 	'cleanchanges-showuserlinks' => 'Pokaži korisničke linkove',
 );
 
@@ -1081,7 +1168,7 @@ $messages['tet'] = array(
 	'cleanchanges-language-na' => 'Hotu',
 );
 
-/** Tajik (Cyrillic) (Тоҷикӣ (Cyrillic))
+/** Tajik (Cyrillic script) (Тоҷикӣ)
  * @author Ibrahim
  */
 $messages['tg-cyrl'] = array(
@@ -1090,7 +1177,7 @@ $messages['tg-cyrl'] = array(
 	'cleanchanges-language-na' => 'Ҳама',
 );
 
-/** Tajik (Latin) (Тоҷикӣ (Latin))
+/** Tajik (Latin script) (tojikī)
  * @author Liangent
  */
 $messages['tg-latn'] = array(
@@ -1139,7 +1226,7 @@ $messages['tr'] = array(
 	'cleanchanges-showuserlinks' => 'Kullanıcı bağlantılarını göster',
 );
 
-/** Tatar (Cyrillic) (Татарча/Tatarça (Cyrillic))
+/** Tatar (Cyrillic script) (Татарча)
  * @author  ашат Якупов
  */
 $messages['tt-cyrl'] = array(
@@ -1151,14 +1238,14 @@ $messages['tt-cyrl'] = array(
 	'cleanchanges-showuserlinks' => 'Катнашучылар сылтамаларын \
күрсәтү',  );
 
-/** ئۇيغۇرچە (ئۇيغۇرچە)
+/** Uyghur (Arabic script) (ئۇيغۇرچە)
  * @author Alfredie
  */
 $messages['ug-arab'] = array(
 	'cleanchanges-language' => 'تىل:',
 );
 
-/** Uighur (Latin) (ئۇيغۇرچە / Uyghurche‎ (Latin))
+/** Uyghur (Latin script) (Uyghurche‎)
  * @author Jose77
  */
 $messages['ug-latn'] = array(
@@ -1249,10 +1336,14 @@ $messages['zh-hans'] = array(
 /** Traditional Chinese (‪中文(繁體)‬)
  * @author Alexsh
  * @author Liangent
+ * @author Mark85296341
  */
 $messages['zh-hant'] = array(
 	'cleanchanges-changerightslink' => '更改群組',
 	'cleanchanges-desc' => \
'更簡潔的顯示[[Special:RecentChanges|最近更改清單]]',  \
'cleanchanges-language' => '語言:', +	'cleanchanges-language-na' => '全部',
+	'cleanchanges-users' => '用戶 (Sep: |):',
+	'cleanchanges-showuserlinks' => '顯示用戶連結',
 );
 
diff --git a/extensions/CleanChanges/CleanChanges.php \
b/extensions/CleanChanges/CleanChanges.php old mode 100644
new mode 100755
index 02d3d5a..7c3aded
--- a/extensions/CleanChanges/CleanChanges.php
+++ b/extensions/CleanChanges/CleanChanges.php
@@ -8,7 +8,7 @@ if (!defined('MEDIAWIKI')) die();
  * @ingroup Extensions
  *
  * @author Niklas Laxström
- * @copyright Copyright   2008, Niklas Laxström
+ * @copyright Copyright   2008-2012, Niklas Laxström
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or \
                later
  */
 
@@ -26,10 +26,10 @@ $wgHooks['MakeGlobalVariablesScript'][] = \
'NCL::addScriptVariables';  $wgExtensionCredits['other'][] = array(
 	'path' => __FILE__,
 	'name' => 'Clean Changes',
-	'version' => '2008-10-16',
+	'version' => '2012-01-30',
 	'author' => 'Niklas Laxström',
 	'descriptionmsg' => 'cleanchanges-desc',
-	'url' => 'http://www.mediawiki.org/wiki/Extension:CleanChanges',
+	'url' => 'https://www.mediawiki.org/wiki/Extension:CleanChanges',
 );
 
 $wgCCUserFilter = true;
@@ -50,3 +50,14 @@ function ccSetupFilters() {
 		$wgHooks['SpecialRecentChangesPanel'][] = 'CCFilters::trailerForm';
 	}
 }
+
+$resourcePaths = array(
+	'localBasePath' => dirname( __FILE__ ),
+	'remoteExtPath' => 'CleanChanges'
+);
+
+// Client-side resource modules
+$wgResourceModules['ext.cleanchanges'] = array(
+	'scripts' => 'cleanchanges.js',
+) + $resourcePaths;
+
diff --git a/extensions/CleanChanges/CleanChanges_body.php \
b/extensions/CleanChanges/CleanChanges_body.php old mode 100644
new mode 100755
index 7a3620f..473e9cb
--- a/extensions/CleanChanges/CleanChanges_body.php
+++ b/extensions/CleanChanges/CleanChanges_body.php
@@ -8,7 +8,7 @@ class NCL extends EnhancedChangesList {
 	/**
 	 * Determines which version of changes list to provide, or none.
 	 */
-	public static function hook( &$user, &$skin, &$list ) {
+	public static function hook( $user, &$skin, &$list ) {
 		$list = null;
 
 		/* allow override */
@@ -28,8 +28,8 @@ class NCL extends EnhancedChangesList {
 		}
 
 		if ( $list instanceof NCL ) {
-			global $wgOut, $wgExtensionAssetsPath;
-			$wgOut->addScriptFile( "$wgExtensionAssetsPath/CleanChanges/cleanchanges.js" );
+			global $wgOut;
+			$wgOut->addModules( 'ext.cleanchanges' );
 		}
 
 		/* If some list was specified, stop processing */
@@ -56,7 +56,6 @@ class NCL extends EnhancedChangesList {
 	protected $direction = true;
 
 	public function __construct( $skin ) {
-		wfLoadExtensionMessages( 'CleanChanges' );
 		global $wgLang;
 		parent::__construct( $skin );
 		$this->direction = !$wgLang->isRTL();
@@ -78,61 +77,19 @@ class NCL extends EnhancedChangesList {
 	}
 
 	function isLog( $rc ) {
-		if ( $rc->getAttribute( 'rc_namespace ' ) == NS_SPECIAL ) {
-			return 1;
-		} elseif ( $rc->getAttribute( 'rc_type' ) == RC_LOG ) {
+		if ( $rc->getAttribute( 'rc_type' ) == RC_LOG ) {
 			return 2;
 		} else {
 			return 0;
 		}
 	}
 
-	function getLogTitle( $type, $rc ) {
-		if ( $type === 1 ) {
-			$title = $rc->getAttribute( 'rc_title' );
-			list( $specialName, $logtype ) = SpecialPage::resolveAliasWithSubpage( $title );
-
-			if ( $specialName === 'Log' ) {
-				$titleObj = $rc->getTitle();
-				$logname = LogPage::logName( $logtype );
-				return '(' . $this->skin->makeKnownLinkObj( $titleObj, $logname ) . ')';
-			} else {
-				throw new MWException( "Unknown special page name $specialName ($title). Log \
                expected." );
-			}
-		} elseif ( $type === 2 ) {
-			$logtype = $rc->getAttribute( 'rc_log_type' );
-			$logname = LogPage::logName( $logtype );
-			$titleObj = SpecialPage::getTitleFor( 'Log', $logtype );
-			return '(' . $this->skin->makeKnownLinkObj( $titleObj, $logname ) . ')';
-		} else {
-			throw new MWException( 'Unknown type' );
-		}
-	}
-
-	protected function getLogAction( $rc ) {
-		global $wgUser;
-
-		$priviledged = $wgUser->isAllowed('deleterevision');
-		$deleted = $this->isDeleted($rc, LogPage::DELETED_ACTION);
-
-		if ( $deleted && !$priviledged ) {
-			return $this->XMLwrapper( 'history-deleted', wfMsg('rev-deleted-event') );
-		} else {
-			$action = LogPage::actionText(
-				$rc->getAttribute('rc_log_type'),
-				$rc->getAttribute('rc_log_action'),
-				$rc->getTitle(),
-				$this->skin,
-				LogPage::extractParams( $rc->getAttribute('rc_params') ),
-				true,
-				true
-			);
-			if ( $deleted ) {
-				$class = array( 'class' => 'history-deleted' );
-				$action = Xml::tags( 'span', $class, $action );
-			}
-			return $action;
-		}
+	function getLogTitle( $rc ) {
+		$logtype = $rc->getAttribute( 'rc_log_type' );
+		$logpage = new LogPage( $logtype );
+		$logname = $logpage->getName()->escaped();
+		$titleObj = SpecialPage::getTitleFor( 'Log', $logtype );
+		return '(' . $this->skin->makeKnownLinkObj( $titleObj, $logname ) . ')';
 	}
 
 	/**
@@ -157,7 +114,7 @@ class NCL extends EnhancedChangesList {
 
 		$logEntry = $this->isLog( $rc );
 		if( $logEntry ) {
-			$clink = $this->getLogTitle( $logEntry, $rc );
+			$clink = $this->getLogTitle( $rc );
 		} elseif( $rc->unpatrolled && $rc->getAttribute( 'rc_type' ) == RC_NEW ) {
 			# Unpatrolled new page, give rc_id in query
 			$clink = $this->skin->makeKnownLinkObj( $titleObj, '', "rcid={$rc_id}" );
@@ -182,7 +139,9 @@ class NCL extends EnhancedChangesList {
 			$rc->getAttribute( 'rc_user_text' ) );
 		$rc->_userInfo = $stuff[0];
 
-		$rc->_comment = $this->getComment( $rc );
+		if ( !$this->isLog( $rc ) ) {
+			$rc->_comment = $this->getComment( $rc );
+		}
 
 		$rc->_watching = $this->numberofWatchingusers( $baseRC->numberofWatchingusers );
 
@@ -200,7 +159,7 @@ class NCL extends EnhancedChangesList {
 		# Put accumulated information into the cache, for later display
 		# Page moves go on their own line
 		if ( $logEntry ) {
-			$secureName = $this->getLogTitle( $logEntry, $rc );
+			$secureName = $this->getLogTitle( $rc );
 		} else {
 			$secureName = $titleObj->getPrefixedDBkey();
 		}
@@ -363,9 +322,14 @@ class NCL extends EnhancedChangesList {
 			}
 
 			$items[] = $this->userSeparator;
-			$items[] = $rcObj->_user;
-			$items[] = $rcObj->_userInfo;
-			$items[] = $rcObj->_comment;
+
+			if ( $this->isLog( $rcObj ) ) {
+				$items[] = $this->insertLogEntry( $rcObj );
+			} else {
+				$items[] = $rcObj->_user;
+				$items[] = $rcObj->_userInfo;
+				$items[] = $rcObj->_comment;
+			}
 
 			$lines .= '<div>' . implode( " {$this->dir}", $items ) . "</div>\n";
 		}
@@ -400,10 +364,15 @@ class NCL extends EnhancedChangesList {
 		}
 
 		$items[] = $this->userSeparator;
-		$items[] = $rcObj->_user;
-		$items[] = $rcObj->_userInfo;
-		$items[] = $rcObj->_comment;
-		$items[] = $rcObj->_watching;
+
+		if ( $this->isLog( $rcObj ) ) {
+			$items[] = $this->insertLogEntry( $rcObj );
+		} else {
+			$items[] = $rcObj->_user;
+			$items[] = $rcObj->_userInfo;
+			$items[] = $rcObj->_comment;
+			$items[] = $rcObj->_watching;
+		}
 
 		return '<div>' . implode( " {$this->dir}", $items ) . "</div>\n";
 
@@ -413,8 +382,6 @@ class NCL extends EnhancedChangesList {
 		global $wgUser;
 		$comment = $rc->getAttribute( 'rc_comment' );
 		$action = '';
-		if ( $this->isLog($rc) ) $action = $this->getLogAction( $rc );
-
 		if ( $comment === '' ) {
 			return $action;
 		} elseif ( $this->isDeleted( $rc, LogPage::DELETED_COMMENT ) ) {
@@ -433,9 +400,8 @@ class NCL extends EnhancedChangesList {
 	 * Enhanced user tool links, with javascript functionality.
 	 */
 	public function userToolLinks( $userId, $userText ) {
-		global $wgUser, $wgDisableAnonTalk, $wgSysopUserBans;
+		global $wgUser, $wgDisableAnonTalk;
 		$talkable = !( $wgDisableAnonTalk && 0 == $userId );
-		$blockable = ( $wgSysopUserBans || 0 == $userId );
 
 		/*
 		 * Assign each different user a running id. This is used to show user tool
@@ -484,7 +450,7 @@ class NCL extends EnhancedChangesList {
 			$items[] = $this->skin->makeKnownLinkObj( $targetPage,
 				wfMsgHtml( 'contribslink' ) );
 		}
-		if( $blockable && $wgUser->isAllowed( 'block' ) ) {
+		if( $wgUser->isAllowed( 'block' ) ) {
 			$items[] = $this->skin->blockLink( $userId, $userText );
 		}
 		if( $userId ) {
diff --git a/extensions/CleanChanges/Filters.php \
b/extensions/CleanChanges/Filters.php old mode 100644
new mode 100755
index 840bf59..cc79d55
--- a/extensions/CleanChanges/Filters.php
+++ b/extensions/CleanChanges/Filters.php
@@ -26,7 +26,6 @@ class CCFilters {
 	}
 
 	public static function userForm( &$items, $opts ) {
-		wfLoadExtensionMessages( 'CleanChanges' );
 		$opts->consumeValue( 'users' );
 		global $wgRequest;
 
@@ -50,8 +49,6 @@ class CCFilters {
 	}
 
 	public static function trailerForm( &$items, $opts ) {
-		wfLoadExtensionMessages( 'CleanChanges' );
-
 		$opts->consumeValue( 'trailer' );
 
 		global $wgRequest;
diff --git a/extensions/CleanChanges/cleanchanges.js \
b/extensions/CleanChanges/cleanchanges.js old mode 100644
new mode 100755
index 5163abd..a185f64
--- a/extensions/CleanChanges/cleanchanges.js
+++ b/extensions/CleanChanges/cleanchanges.js
@@ -1,25 +1,21 @@
-/*
- * Adapted from monobook, with possibility to set display to block or inline.
- */
-function toggleVisibilityE(_levelId, _otherId, _linkId, _type) {
-	var thisLevel = document.getElementById(_levelId);
-	var otherLevel = document.getElementById(_otherId);
-	var linkLevel = document.getElementById(_linkId);
-	if (thisLevel.style.display == 'none') {
-		thisLevel.style.display = _type;
-		otherLevel.style.display = 'none';
-		linkLevel.style.display = 'inline';
-	} else {
-		thisLevel.style.display = 'none';
-		otherLevel.style.display = 'inline';
-		linkLevel.style.display = 'none';
+(function ( $ ) {
+	window.toggleVisibilityE = function ( _levelId, _otherId, _linkId, _type ) {
+		var thisLevel = document.getElementById( _levelId );
+		var otherLevel = document.getElementById( _otherId );
+		var linkLevel = document.getElementById( _linkId );
+		if (thisLevel.style.display == 'none') {
+			thisLevel.style.display = _type;
+			otherLevel.style.display = 'none';
+			linkLevel.style.display = 'inline';
+		} else {
+			thisLevel.style.display = 'none';
+			otherLevel.style.display = 'inline';
+			linkLevel.style.display = 'none';
+		}
+	}
+	
+	window.showUserInfo = function ( sourceVar, targetId ) {
+		$( '#' + targetId ).html( mw.config.get( sourceVar ) );
 	}
-}
 
-/*
- * Simple function to add user information inline.
- */
-function showUserInfo( sourceVar, targetId ) {
-	var targetElement = document.getElementById(targetId);
-	targetElement.innerHTML = eval( sourceVar );
-}
+} )( jQuery );
\ No newline at end of file


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic