r104804 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104803‎ | r104804 | r104805 >
Date:00:20, 1 December 2011
Author:juliano
Status:deferred
Tags:
Comment:
Sync with trunk. Includes many fixes to make Wikilog work properly with
MediaWiki 1.18.
Modified paths:
  • /branches/REL1_18/extensions/Wikilog (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/README (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/RELEASE-NOTES (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/SpecialWikilog.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/TODO (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/Wikilog.i18n.alias.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/Wikilog.i18n.magic.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/Wikilog.i18n.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/Wikilog.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogComment.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogCommentsPage.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogDefaultSettings.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogFeed.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogHooks.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogItemPage.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogItemPager.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogMainPage.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogParser.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WikilogUtils.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WlFeed.i18n.php (modified) (history)
  • /branches/REL1_18/extensions/Wikilog/WlFeed.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/extensions/Wikilog/WikilogFeed.php
@@ -242,13 +242,7 @@
243243 "too young: age ($age) < timeout ($wgFeedCacheTimeout) " .
244244 "($feedkey; $tsCache; $tsData)\n" );
245245
246 - # NOTE (Mw1.16- COMPAT): OutputPage::setLastModified()
247 - # introduced in Mw1.17. Remove this guard after Wl1.2.
248 - if ( method_exists( $wgOut, 'setLastModified' ) ) {
249 - $wgOut->setLastModified( $tsCache );
250 - } else {
251 - $wgOut->mLastModified = wfTimestamp( TS_RFC2822, $tsCache );
252 - }
 246+ $wgOut->setLastModified( $tsCache );
253247
254248 return $messageMemc->get( $feedkey );
255249 } elseif ( $tsCache >= $tsData ) {
Index: branches/REL1_18/extensions/Wikilog/WikilogItemPager.php
@@ -158,7 +158,7 @@
159159
160160 # Article title heading, with direct link article page and optional
161161 # edit link (if user can edit the article).
162 - $titleText = $item->mName;
 162+ $titleText = Sanitizer::escapeHtmlAllowEntities( $item->mName );
163163 if ( !$item->getIsPublished() )
164164 $titleText .= wfMsgForContent( 'wikilog-draft-title-mark' );
165165 $heading = $skin->link( $item->mTitle, $titleText, array(), array(),
@@ -472,13 +472,13 @@
473473
474474 case 'wlw_title':
475475 $page = $this->mCurrentItem->mParentTitle;
476 - $text = $this->mCurrentItem->mParentName;
 476+ $text = Sanitizer::escapeHtmlAllowEntities( $this->mCurrentItem->mParentName );
477477 return $this->getSkin()->link( $page, $text, array(), array(),
478478 array( 'known', 'noclasses' ) );
479479
480480 case 'wlp_title':
481481 $page = $this->mCurrentItem->mTitle;
482 - $text = $this->mCurrentItem->mName;
 482+ $text = Sanitizer::escapeHtmlAllowEntities( $this->mCurrentItem->mName );
483483 $s = $this->getSkin()->link( $page, $text, array(), array(),
484484 array( 'known', 'noclasses' ) );
485485 if ( !$this->mCurrentRow->wlp_publish ) {
Index: branches/REL1_18/extensions/Wikilog/SpecialWikilog.php
@@ -168,7 +168,7 @@
169169 $article = new Article( $title );
170170 $content = $article->getContent();
171171 $wgOut->setPageTitle( $title->getPrefixedText() );
172 - $wgOut->addWikiTextWithTitle( $content, $title );
 172+ $wgOut->addWikiTextTitle( $content, $title );
173173 }
174174
175175 # Display query options.
Index: branches/REL1_18/extensions/Wikilog/WikilogMainPage.php
@@ -159,7 +159,7 @@
160160 /**
161161 * Returns wikilog description as formatted HTML.
162162 */
163 - protected function formatWikilogDescription( Linker $skin ) {
 163+ protected function formatWikilogDescription( $skin ) {
164164 $this->loadWikilogData();
165165
166166 $s = '';
@@ -188,7 +188,7 @@
189189 /**
190190 * Returns wikilog information as formatted HTML.
191191 */
192 - protected function formatWikilogInformation( Linker $skin ) {
 192+ protected function formatWikilogInformation( $skin ) {
193193 $dbr = wfGetDB( DB_SLAVE );
194194
195195 $row = $dbr->selectRow(
Index: branches/REL1_18/extensions/Wikilog/Wikilog.i18n.alias.php
@@ -43,6 +43,11 @@
4444 'Wikilog' => array( 'ウィキ記録' ),
4545 );
4646
 47+/** Luxembourgish (Lëtzebuergesch) */
 48+$specialPageAliases['lb'] = array(
 49+ 'Wikilog' => array( 'Wiki-Logbicher' ),
 50+);
 51+
4752 /** Macedonian (Македонски) */
4853 $specialPageAliases['mk'] = array(
4954 'Wikilog' => array( 'Викидневник' ),
Index: branches/REL1_18/extensions/Wikilog/WikilogItemPage.php
@@ -48,15 +48,32 @@
4949 * @param $title Article title object.
5050 * @param $wi Wikilog info object.
5151 */
52 - function __construct( &$title, &$wi ) {
 52+ public function __construct( Title $title, WikilogItem $item = null ) {
5353 parent::__construct( $title );
54 - $this->mItem = WikilogItem::newFromInfo( $wi );
 54+ $this->mItem = $item;
5555 }
5656
5757 /**
 58+ * Return the appropriate WikiPage object for WikilogItemPage.
 59+ */
 60+ protected function newPage( Title $title ) {
 61+ return new WikilogWikiItemPage( $title );
 62+ }
 63+
 64+ /**
 65+ * Constructor from a page ID.
 66+ * @param $id Int article ID to load.
 67+ */
 68+ public static function newFromID( $id ) {
 69+ $t = Title::newFromID( $id );
 70+ $i = WikilogItem::newFromID( $id );
 71+ return $t == null ? null : new self( $t, $i );
 72+ }
 73+
 74+ /**
5875 * View page action handler.
5976 */
60 - function view() {
 77+ public function view() {
6178 global $wgOut, $wgUser, $wgContLang, $wgFeed, $wgWikilogFeedClasses;
6279
6380 # Get skin
@@ -97,7 +114,7 @@
98115 $this->mItem->mName,
99116 $this->mItem->mParentTitle->getPrefixedText()
100117 );
101 - $wgOut->setPageTitle( $this->mItem->mName );
 118+ $wgOut->setPageTitle( Sanitizer::escapeHtmlAllowEntities( $this->mItem->mName ) );
102119 $wgOut->setHTMLTitle( wfMsg( 'pagetitle', $fullPageTitle ) );
103120
104121 # Item page footer.
@@ -132,35 +149,62 @@
133150 }
134151
135152 /**
 153+ * Compatibility with MediaWiki 1.17.
 154+ * @todo Remove this in Wl1.3.
 155+ */
 156+ public function preSaveTransform( $text ) {
 157+ return $this->newPage( $this->getTitle() )->preSaveTransform( $text );
 158+ }
 159+}
 160+
 161+/**
 162+ * Wikilog WikiPage class for WikilogItemPage.
 163+ */
 164+class WikilogWikiItemPage
 165+ extends WikiPage
 166+{
 167+ /**
 168+ * Constructor from a page ID.
 169+ * @param $id Int article ID to load.
 170+ */
 171+ public static function newFromID( $id ) {
 172+ $t = Title::newFromID( $id );
 173+ return $t == null ? null : new self( $t );
 174+ }
 175+
 176+ /**
136177 * Override for preSaveTransform. Enables quick post publish by signing
137178 * the article using the standard --~~~~ marker. This causes the signature
138179 * marker to be replaced by a {{wl-publish:...}} parser function call,
139180 * that is then saved to the database and causes the post to be published.
140181 */
141 - function preSaveTransform( $text ) {
 182+ public function preSaveTransform( $text, User $user = null, ParserOptions $popts = null ) {
142183 global $wgParser, $wgUser;
 184+ $user = is_null( $user ) ? $wgUser : $user;
143185
144 - $popt = ParserOptions::newFromUser( $wgUser );
 186+ if ( $popts === null ) {
 187+ $popts = ParserOptions::newFromUser( $user );
 188+ }
145189
146190 $t = WikilogUtils::getPublishParameters();
147 - $date = $t['date'];
148 - $user = $t['user'];
 191+ $date_txt = $t['date'];
 192+ $user_txt = $t['user'];
149193
150194 $sigs = array(
151 - '/\n?(--)?~~~~~\n?/m' => "\n{{wl-publish: {$date} }}\n",
152 - '/\n?(--)?~~~~\n?/m' => "\n{{wl-publish: {$date} | {$user} }}\n",
153 - '/\n?(--)?~~~\n?/m' => "\n{{wl-author: {$user} }}\n"
 195+ '/\n?(--)?~~~~~\n?/m' => "\n{{wl-publish: {$date_txt} }}\n",
 196+ '/\n?(--)?~~~~\n?/m' => "\n{{wl-publish: {$date_txt} | {$user_txt} }}\n",
 197+ '/\n?(--)?~~~\n?/m' => "\n{{wl-author: {$user_txt} }}\n"
154198 );
155199
156200 if ( !StubObject::isRealObject( $wgParser ) ) {
157201 $wgParser->_unstub();
158202 }
159 - $wgParser->startExternalParse( $this->mTitle, $popt, Parser::OT_WIKI );
 203+ $wgParser->startExternalParse( $this->mTitle, $popts, Parser::OT_WIKI );
160204
161205 $text = $wgParser->replaceVariables( $text );
162206 $text = preg_replace( array_keys( $sigs ), array_values( $sigs ), $text );
163207 $text = $wgParser->mStripState->unstripBoth( $text );
164208
165 - return parent::preSaveTransform( $text );
 209+ return parent::preSaveTransform( $text, $user, $popts );
166210 }
167211 }
Index: branches/REL1_18/extensions/Wikilog/WlFeed.i18n.php
@@ -51,6 +51,13 @@
5252 'wlfeed-desc' => 'رتب توليد تلقيم ممددة',
5353 );
5454
 55+/** Asturian (Asturianu)
 56+ * @author Xuacu
 57+ */
 58+$messages['ast'] = array(
 59+ 'wlfeed-desc' => 'Clases de xeneración de canales ameyoraes',
 60+);
 61+
5562 /** Belarusian (Taraškievica orthography) (‪Беларуская (тарашкевіца)‬)
5663 * @author EugeneZelenko
5764 */
@@ -72,6 +79,13 @@
7380 'wlfeed-desc' => 'Napredno generisanje klasa fida',
7481 );
7582
 83+/** Catalan (Català)
 84+ * @author Gemmaa
 85+ */
 86+$messages['ca'] = array(
 87+ 'wlfeed-desc' => 'Realçava tindre una generació classes',
 88+);
 89+
7690 /** Czech (Česky)
7791 * @author Matěj Grabovský
7892 */
@@ -220,6 +234,13 @@
221235 'wlfeed-desc' => 'Подобрени класи на создавање на емитувања на новости',
222236 );
223237
 238+/** Malay (Bahasa Melayu)
 239+ * @author Anakmalaysia
 240+ */
 241+$messages['ms'] = array(
 242+ 'wlfeed-desc' => 'Kelas penjanaan suapan yang dipertingkat',
 243+);
 244+
224245 /** Dutch (Nederlands)
225246 * @author Siebrand
226247 */
@@ -299,14 +320,14 @@
300321 'wlfeed-desc' => 'Izboljšani razredi ustvarjanja virov',
301322 );
302323
303 -/** Serbian Cyrillic ekavian (‪Српски (ћирилица)‬)
 324+/** Serbian (Cyrillic script) (‪Српски (ћирилица)‬)
304325 * @author Михајло Анђелковић
305326 */
306327 $messages['sr-ec'] = array(
307328 'wlfeed-desc' => 'Класе за побољшане фидове',
308329 );
309330
310 -/** Serbian Latin ekavian (‪Srpski (latinica)‬) */
 331+/** Serbian (Latin script) (‪Srpski (latinica)‬) */
311332 $messages['sr-el'] = array(
312333 'wlfeed-desc' => 'Klase za poboljšane fidove',
313334 );
Index: branches/REL1_18/extensions/Wikilog/WikilogDefaultSettings.php
@@ -29,7 +29,7 @@
3030 if ( !defined( 'MEDIAWIKI' ) )
3131 die();
3232
33 -/*
 33+/**
3434 * --- DO NOT MAKE CHANGES TO THESE VALUES ---
3535 *
3636 * In order to configure the extension, copy the variables you want to change
Index: branches/REL1_18/extensions/Wikilog/Wikilog.i18n.magic.php
@@ -128,7 +128,7 @@
129129 'wlk-subtitle' => array( 0, 'ქვესათაური' ),
130130 );
131131
132 -/** ‪Kurdî (latînî)‬ (‪Kurdî (latînî)‬) */
 132+/** Kurdish (Latin script) (‪Kurdî (latînî)‬) */
133133 $magicWords['ku-latn'] = array(
134134 'wlk-subtitle' => array( 0, 'binnav' ),
135135 'wlk-summary' => array( 'kurte' ),
@@ -168,6 +168,14 @@
169169 'wlk-hidden' => array( 0, 'кекшезь' ),
170170 );
171171
 172+/** Nedersaksisch (Nedersaksisch) */
 173+$magicWords['nds-nl'] = array(
 174+ 'wl-publish' => array( 0, 'wl-publiseren' ),
 175+ 'wl-tags' => array( 0, 'wl-etiketten' ),
 176+ 'wlk-icon' => array( 0, 'wlk-ikoon' ),
 177+ 'wlk-hidden' => array( 0, 'verbörgen' ),
 178+);
 179+
172180 /** Dutch (Nederlands) */
173181 $magicWords['nl'] = array(
174182 'wl-settings' => array( 0, 'wl-instellingen' ),
@@ -182,10 +190,10 @@
183191
184192 /** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬) */
185193 $magicWords['no'] = array(
186 - 'wlk-subtitle' => array( 0, 'undertekst', 'subtitle' ),
187 - 'wlk-summary' => array( '1', 'sammendrag', 'summary' ),
188 - 'wlk-hidden' => array( 0, 'gjemt', 'hidden' ),
189 - 'wlk-more' => array( 0, 'mer', 'more' ),
 194+ 'wlk-subtitle' => array( 0, 'undertekst' ),
 195+ 'wlk-summary' => array( 'sammendrag' ),
 196+ 'wlk-hidden' => array( 0, 'gjemt' ),
 197+ 'wlk-more' => array( 0, 'mer' ),
190198 );
191199
192200 /** Oriya (ଓଡ଼ିଆ) */
@@ -198,6 +206,15 @@
199207 'wlk-more' => array( 0, 'ବେଶୀ' ),
200208 );
201209
 210+/** Polish (Polski) */
 211+$magicWords['pl'] = array(
 212+ 'wlk-icon' => array( 0, 'ikonaWL' ),
 213+ 'wlk-subtitle' => array( 0, 'podtytuł' ),
 214+ 'wlk-summary' => array( 'podsumowanie' ),
 215+ 'wlk-hidden' => array( 0, 'ukryty' ),
 216+ 'wlk-more' => array( 0, 'więcej' ),
 217+);
 218+
202219 /** Pashto (پښتو) */
203220 $magicWords['ps'] = array(
204221 'wlk-logo' => array( 0, 'نښه', 'logo' ),
@@ -246,7 +263,7 @@
247264 'wlk-more' => array( 0, 'ещё' ),
248265 );
249266
250 -/** Serbian Cyrillic ekavian (‪Српски (ћирилица)‬) */
 267+/** Serbian (Cyrillic script) (‪Српски (ћирилица)‬) */
251268 $magicWords['sr-ec'] = array(
252269 'wl-settings' => array( 0, 'вл-поставке' ),
253270 'wl-publish' => array( 0, 'вл-објава' ),
@@ -274,7 +291,7 @@
275292 'wlk-more' => array( 0, 'மேலும்' ),
276293 );
277294
278 -/** Татарча (Татарча) */
 295+/** Tatar (Cyrillic script) (Татарча) */
279296 $magicWords['tt-cyrl'] = array(
280297 'wlk-more' => array( 0, 'күбрәк' ),
281298 );
@@ -294,10 +311,10 @@
295312 'wl-author' => array( 0, '作者' ),
296313 'wl-tags' => array( 0, '标签' ),
297314 'wl-info' => array( 0, '信息' ),
298 - 'wlk-icon' => array( 0, '图标' ),
299 - 'wlk-logo' => array( 0, '徽标' ),
300 - 'wlk-subtitle' => array( 0, '小标题' ),
301 - 'wlk-summary' => array( '总结' ),
 315+ 'wlk-icon' => array( 0, '记录图标' ),
 316+ 'wlk-logo' => array( 0, '标志' ),
 317+ 'wlk-subtitle' => array( 0, '子标题' ),
 318+ 'wlk-summary' => array( '概要' ),
302319 'wlk-hidden' => array( 0, '隐藏' ),
303320 'wlk-more' => array( 0, '更多' ),
304321 );
\ No newline at end of file
Index: branches/REL1_18/extensions/Wikilog/Wikilog.php
@@ -29,7 +29,7 @@
3030 if ( !defined( 'MEDIAWIKI' ) )
3131 die();
3232
33 -/*
 33+/**
3434 * General extension information.
3535 */
3636 $wgExtensionCredits['specialpage'][] = array(
@@ -41,7 +41,7 @@
4242 'url' => 'http://www.mediawiki.org/wiki/Extension:Wikilog',
4343 );
4444
45 -/*
 45+/**
4646 * Constant definitions.
4747 */
4848 // For source-code readability. This ought to be defined by MediaWiki (and
@@ -50,12 +50,12 @@
5151 // one globally. It also allows us to keep compatibility.
5252 define( 'WL_NBSP', '&#160;' );
5353
54 -/*
 54+/**
5555 * Dependencies.
5656 */
5757 require_once( dirname( __FILE__ ) . '/WlFeed.php' );
5858
59 -/*
 59+/**
6060 * Messages.
6161 */
6262 $dir = dirname( __FILE__ ) . '/';
@@ -63,7 +63,7 @@
6464 $wgExtensionMessagesFiles['WikilogMagic'] = $dir . 'Wikilog.i18n.magic.php';
6565 $wgExtensionMessagesFiles['WikilogAlias'] = $dir . 'Wikilog.i18n.alias.php';
6666
67 -/*
 67+/**
6868 * Autoloaded classes.
6969 */
7070 $wgAutoloadClasses += array(
@@ -82,7 +82,6 @@
8383 // WikilogParser.php
8484 'WikilogParser' => $dir . 'WikilogParser.php',
8585 'WikilogParserOutput' => $dir . 'WikilogParser.php',
86 - 'WikilogParserCache' => $dir . 'WikilogParser.php',
8786
8887 // WikilogItemPager.php
8988 'WikilogItemPager' => $dir . 'WikilogItemPager.php',
@@ -108,6 +107,7 @@
109108 // Namespace pages
110109 'WikilogMainPage' => $dir . 'WikilogMainPage.php',
111110 'WikilogItemPage' => $dir . 'WikilogItemPage.php',
 111+ 'WikilogWikiItemPage' => $dir . 'WikilogItemPage.php',
112112 'WikilogCommentsPage' => $dir . 'WikilogCommentsPage.php',
113113
114114 // Captcha adapter
@@ -115,13 +115,13 @@
116116 'WlCaptchaAdapter' => $dir . 'WlCaptchaAdapter.php',
117117 );
118118
119 -/*
 119+/**
120120 * Special pages.
121121 */
122122 $wgSpecialPages['Wikilog'] = 'SpecialWikilog';
123123 $wgSpecialPageGroups['Wikilog'] = 'changes';
124124
125 -/*
 125+/**
126126 * Hooks.
127127 */
128128 $wgExtensionFunctions[] = array( 'Wikilog', 'ExtensionInit' );
@@ -158,7 +158,7 @@
159159 $wgHooks['GetLocalURL'][] = 'WikilogParser::GetLocalURL';
160160 $wgHooks['GetFullURL'][] = 'WikilogParser::GetFullURL';
161161
162 -/*
 162+/**
163163 * Added rights.
164164 */
165165 $wgAvailableRights[] = 'wl-postcomment';
@@ -166,12 +166,12 @@
167167 $wgGroupPermissions['user']['wl-postcomment'] = true;
168168 $wgGroupPermissions['sysop']['wl-moderation'] = true;
169169
170 -/*
 170+/**
171171 * Reserved usernames.
172172 */
173173 $wgReservedUsernames[] = 'msg:wikilog-auto';
174174
175 -/*
 175+/**
176176 * Logs.
177177 */
178178 $wgLogTypes[] = 'wikilog';
@@ -180,7 +180,7 @@
181181 $wgLogActions['wikilog/c-approv'] = 'wikilog-log-cmt-approve';
182182 $wgLogActions['wikilog/c-reject'] = 'wikilog-log-cmt-reject';
183183
184 -/*
 184+/**
185185 * Default settings.
186186 */
187187 require_once( dirname( __FILE__ ) . '/WikilogDefaultSettings.php' );
@@ -275,7 +275,8 @@
276276 return true;
277277 }
278278 } elseif ( $wi->isItem() ) {
279 - $article = new WikilogItemPage( $title, $wi );
 279+ $item = WikilogItem::newFromInfo( $wi );
 280+ $article = new WikilogItemPage( $title, $item );
280281 } else {
281282 $article = new WikilogMainPage( $title, $wi );
282283 }
@@ -406,7 +407,7 @@
407408 * namespace, and returns an appropriate WikilogInfo instance if so.
408409 *
409410 * @param $title Article title object.
410 - * @returns WikilogInfo instance, or NULL.
 411+ * @return WikilogInfo instance, or NULL.
411412 */
412413 static function getWikilogInfo( $title ) {
413414 global $wgWikilogNamespaces;
Index: branches/REL1_18/extensions/Wikilog/WlFeed.php
@@ -29,7 +29,7 @@
3030 if ( !defined( 'MEDIAWIKI' ) )
3131 die();
3232
33 -/*
 33+/**
3434 * General extension information.
3535 */
3636 $wgExtensionCredits['other'][] = array(
@@ -41,7 +41,7 @@
4242 'url' => 'http://www.mediawiki.org/wiki/Extension:Wikilog',
4343 );
4444
45 -/*
 45+/**
4646 * Module autoload information.
4747 */
4848
@@ -61,7 +61,7 @@
6262 'WlRSSFeedCompat' => $dir . 'WlFeed.body.php'
6363 );
6464
65 -/*
 65+/**
6666 * Extension setup.
6767 */
6868
Index: branches/REL1_18/extensions/Wikilog/README
@@ -33,7 +33,7 @@
3434
3535 == Requirements ==
3636
37 -* MediaWiki 1.16 or higher.
 37+* MediaWiki 1.17 or higher.
3838 * A MySQL database backend.
3939
4040 == Installation ==
Index: branches/REL1_18/extensions/Wikilog/WikilogCommentsPage.php
@@ -29,12 +29,6 @@
3030 if ( !defined( 'MEDIAWIKI' ) )
3131 die();
3232
33 -# NOTE (Mw1.16- COMPAT): GAID_FOR_UPDATE removed and replaced by
34 -# Title::GAID_FOR_UPDATE in Mw1.17. Remove this define and replace its
35 -# occurrence WikilogCommentsPage::setCommentApproval() in Wl1.3.
36 -if ( !defined( 'GAID_FOR_UPDATE' ) )
37 - define( 'GAID_FOR_UPDATE', Title::GAID_FOR_UPDATE );
38 -
3933 /**
4034 * Wikilog comments namespace handler class.
4135 *
@@ -166,7 +160,8 @@
167161 }
168162
169163 # Add a backlink to the original article.
170 - $link = $this->mSkin->link( $this->mItem->mTitle, $this->mItem->mName );
 164+ $link = $this->mSkin->link( $this->mItem->mTitle,
 165+ Sanitizer::escapeHtmlAllowEntities( $this->mItem->mName ) );
171166 $wgOut->setSubtitle( wfMsg( 'wikilog-backlink', $link ) );
172167
173168 # Retrieve comments (or replies) from database and display them.
@@ -407,7 +402,7 @@
408403 array( 'content', 'parsemag' ),
409404 $comment->mUserText
410405 );
411 - $id = $title->getArticleID( GAID_FOR_UPDATE );
 406+ $id = $title->getArticleID( Title::GAID_FOR_UPDATE );
412407 if ( $this->doDeleteArticle( $reason, false, $id ) ) {
413408 $comment->deleteComment();
414409 $log->addEntry( 'c-reject', $title, '' );
@@ -496,7 +491,7 @@
497492 /**
498493 * Checks if the given comment is valid for posting.
499494 * @param $comment Comment to validate.
500 - * @returns False if comment is valid, error message identifier otherwise.
 495+ * @return False if comment is valid, error message identifier otherwise.
501496 */
502497 protected static function validateComment( WikilogComment &$comment ) {
503498 global $wgWikilogMaxCommentSize;
Index: branches/REL1_18/extensions/Wikilog/WikilogHooks.php
@@ -75,6 +75,17 @@
7676 $item->mParentTitle = $wi->getTitle();
7777 $item->mParent = $item->mParentTitle->getArticleId();
7878
 79+ # Override item name if {{DISPLAYTITLE:...}} was used.
 80+ $dtText = $editInfo->output->getDisplayTitle();
 81+ if ( $dtText ) {
 82+ # Tags are stripped on purpose.
 83+ $dtText = Sanitizer::stripAllTags( $dtText );
 84+ $dtParts = explode( '/', $dtText, 2 );
 85+ if ( count( $dtParts ) > 1 ) {
 86+ $item->mName = $dtParts[1];
 87+ }
 88+ }
 89+
7990 $item->resetID( $article->getId() );
8091
8192 # Check if we have any wikilog metadata available.
@@ -218,6 +229,7 @@
219230 $item = WikilogItem::newFromID( $pageid );
220231 if ( $wi && $wi->isItem() && !$wi->isTalk() && $item ) {
221232 $item->mName = $wi->getItemName();
 233+ # FIXME: need to reparse due to {{DISPLAYTITLE:...}}.
222234 $item->mTitle = $wi->getItemTitle();
223235 $item->mParentName = $wi->getName();
224236 $item->mParentTitle = $wi->getTitle();
@@ -322,32 +334,19 @@
323335 *
324336 * @todo Add support for PostgreSQL and SQLite databases.
325337 */
326 - static function ExtensionSchemaUpdates( $updater = null ) {
 338+ static function ExtensionSchemaUpdates( $updater ) {
327339 $dir = dirname( __FILE__ ) . '/';
328340
329 - if ( $updater === null ) {
330 - global $wgDBtype, $wgExtNewIndexes, $wgExtNewTables;
331 - if ( $wgDBtype == 'mysql' ) {
332 - $wgExtNewTables[] = array( "wikilog_wikilogs", "{$dir}wikilog-tables.sql" );
333 - $wgExtNewIndexes[] = array( "wikilog_comments", "wlc_timestamp", "{$dir}archives/patch-comments-indexes.sql" );
334 - } else {
335 - // TODO: PostgreSQL, SQLite, etc...
336 - print "\n" .
337 - "Warning: There are no table structures for the Wikilog\n" .
338 - "extension other than for MySQL at this moment.\n\n";
339 - }
 341+ if ( $updater->getDB()->getType() == 'mysql' ) {
 342+ $updater->addExtensionUpdate( array( 'addTable', "wikilog_wikilogs",
 343+ "{$dir}wikilog-tables.sql", true ) );
 344+ $updater->addExtensionUpdate( array( 'addIndex', "wikilog_comments",
 345+ "wlc_timestamp", "{$dir}archives/patch-comments-indexes.sql", true ) );
340346 } else {
341 - if ( $updater->getDB()->getType() == 'mysql' ) {
342 - $updater->addExtensionUpdate( array( 'addTable', "wikilog_wikilogs",
343 - "{$dir}wikilog-tables.sql", true ) );
344 - $updater->addExtensionUpdate( array( 'addIndex', "wikilog_comments",
345 - "wlc_timestamp", "{$dir}archives/patch-comments-indexes.sql", true ) );
346 - } else {
347 - // TODO: PostgreSQL, SQLite, etc...
348 - print "\n" .
349 - "Warning: There are no table structures for the Wikilog\n" .
350 - "extension other than for MySQL at this moment.\n\n";
351 - }
 347+ // TODO: PostgreSQL, SQLite, etc...
 348+ print "\n" .
 349+ "Warning: There are no table structures for the Wikilog\n" .
 350+ "extension other than for MySQL at this moment.\n\n";
352351 }
353352 return true;
354353 }
Index: branches/REL1_18/extensions/Wikilog/TODO
@@ -2,11 +2,4 @@
33
44 === Wikilog 1.3.0. ===
55
6 -* Drop support for Mw 1.16 and earlier.
7 -* Remove Mw1.16 compatibility boilerplate in:
8 - - WikilogFeed::loadFromCache() (bug 21916).
9 - - WikilogComment::getCommentArticleTitle() (GAID_FOR_UPDATE).
10 - - WikilogCommentsPage::setCommentApproval() (GAID_FOR_UPDATE).
11 -* Remove deprecated WikilogParserCache:
12 - - WikilogParserCache class definition in WikilogParser.php.
13 - - WikilogUtils::parsedArticle() in WikilogUtils.php.
 6+* Remove WikilogItemPage::preSaveTransform() (Mw 1.17 compatibility).
Index: branches/REL1_18/extensions/Wikilog/RELEASE-NOTES
@@ -4,8 +4,8 @@
55
66 === General notes ===
77
8 -MediaWiki requirement raised to 1.16.0 and later. MediaWiki 1.15 and earlier
9 -are no longer supported in this release.
 8+MediaWiki requirement raised to 1.17.0 and later.
 9+MediaWiki 1.16 and earlier are no longer supported in this release.
1010
1111 === New configuration options ===
1212
@@ -13,13 +13,18 @@
1414
1515 * Article and comment timestamps are now displayed in the wiki timezone
1616 (as defined by $wgLocaltimezone).
 17+* (wl:issue 11) Added support for {{DISPLAYTITLE:...}}, allows the author to
 18+ alter the title of the wikilog article.
1719
1820 === Bug fixes ===
1921
2022 * (mw:bug 27904) Fixed method signature compatibility with Mw1.16 for
2123 WikilogParserCache.
 24+* (wl:issue 12) Fixed calls to $wgParser->clearState() (which is now a private
 25+ function).
 26+* Fixed a crash when creating a new wikilog post as an unlogged user.
 27+* Several fixes for compatibility with MediaWiki 1.18.
2228
23 -
2429 == Wikilog 1.1.0 ==
2530
2631 Aug 8, 2010
Index: branches/REL1_18/extensions/Wikilog/WikilogParser.php
@@ -472,7 +472,7 @@
473473 }
474474
475475 $user = User::newFromName( $name );
476 - if ( !is_null( $user ) ) {
 476+ if ( $user ) {
477477 $parser->mExtWikilog->mAuthors[$user->getName()] = $user->getID();
478478 }
479479 else {
@@ -611,43 +611,3 @@
612612 public function getAuthors() { return $this->mAuthors; }
613613 public function getTags() { return $this->mTags; }
614614 }
615 -
616 -/**
617 - * Since wikilog parses articles with specific options in order to be
618 - * rendered in feeds, it is necessary to store these parsed outputs in
619 - * the cache separately. This derived class from ParserCache overloads the
620 - * getKey() function in order to provide a specific namespace for this
621 - * purpose.
622 - *
623 - * @deprecated In MediaWiki 1.17, in favor of $parserOpt->addExtraKey().
624 - * @note MediaWiki 1.17 completely breaks this hack (in r70783). getKey() has
625 - * different parameters and very different implementation. Current version
626 - * is compatible with 1.16 and should only be used in that version, but may
627 - * issue warnings when used in 1.17. In 1.17, this class should never be
628 - * used due to the branch in WikilogUtils::parsedArticle(). It will be
629 - * removed anyways, as soon as we drop support for 1.16.
630 - * @todo (In Wikilog 1.3.x) Remove this class (see also WikilogUtils::parsedArticle()).
631 - */
632 -class WikilogParserCache
633 - extends ParserCache
634 -{
635 - public static function singleton() {
636 - static $instance;
637 - if ( !isset( $instance ) ) {
638 - global $parserMemc;
639 - $instance = new WikilogParserCache( $parserMemc );
640 - }
641 - return $instance;
642 - }
643 -
644 - public function getKey( $article, $popts ) {
645 - if ( $popts instanceof User ) // API change in MediaWiki 1.15.
646 - $popts = ParserOptions::newFromUser( $popts );
647 -
648 - $user = $popts->mUser;
649 - $pageid = intval( $article->getID() );
650 - $hash = $user->getPageRenderingHash();
651 - $key = wfMemcKey( 'wlcache', 'idhash', "$pageid-$hash" );
652 - return $key;
653 - }
654 -}
Index: branches/REL1_18/extensions/Wikilog/Wikilog.i18n.php
@@ -278,13 +278,16 @@
279279 * $2 is the article's parent wikilog name (optional)
280280 * $3 is a URL formatted link to the article
281281 * $4 is the article title (optional)",
282 - 'wikilog-entry-footer' => 'Has the same parameters of {{msg-mw|wikilog-summary-footer}}.',
283 - 'wikilog-simple-signature' => 'Parameters:
 282+ 'wikilog-entry-footer' => '{{optional}}
 283+Has the same parameters of {{msg-mw|wikilog-summary-footer}}.',
 284+ 'wikilog-simple-signature' => '{{optional}}
 285+Parameters:
284286 * $1 is a link to the commenting user page
285287 * $2 is a link to the commenting user talk page, with {{msg-mw|talkpagelinktext}} as link text',
286288 'wikilog-edit-hint' => 'Parameters:
287289 * $1 is an article title.',
288 - 'wikilog-comment-footer' => 'Parameters:
 290+ 'wikilog-comment-footer' => '{{optional}}
 291+Parameters:
289292 * $1 is the name of the author of the comment (optional)
290293 * $2 is the name of the author or the comment formatted with {{msg-mw|wikilog-simple-signature|notext=1}}
291294 * $3 is the comment date
@@ -312,7 +315,8 @@
313316 'wikilog-comment-autosumm' => 'Parameters:
314317 * $1 is a user name
315318 * $2 is a summary',
316 - 'wikilog-feed-title' => 'Parameters:
 319+ 'wikilog-feed-title' => '{{optional}}
 320+Parameters:
317321 * $1 is a title
318322 * $2 is the content language of the wiki',
319323 'wikilog-feed-ns-title' => 'Parameters:
@@ -621,6 +625,7 @@
622626 /** Arabic (العربية)
623627 * @author Meno25
624628 * @author OsamaK
 629+ * @author روخو
625630 */
626631 $messages['ar'] = array(
627632 'wikilog-desc' => 'يضيف خصائص تدوين، منشئا تهجين ويكي-مدونة',
@@ -681,6 +686,7 @@
682687 'wikilog-edit-signpub' => 'وقع وانشر هذه المقالة',
683688 'wikilog-edit-signpub-tooltip' => 'يسبب هذه المقالة أن يتم توقيعها ونشرها في سجلها للويكي عند حفظها.
684689 لا تعلم على هذا الصندوق لإبقاء المقالة كمسودة.',
 690+ 'wikilog-comment-anonsig' => '$3 (مجهول)',
685691 'wikilog-comment-pending' => 'هذا التعليق بانتظار الموافقة.',
686692 'wikilog-comment-deleted' => 'هذا التعليق تم حذفه.',
687693 'wikilog-comment-autosumm' => 'تعليق جديد بواسطة $1: $2',
@@ -734,7 +740,7 @@
735741 'wikilog-show-published' => 'منشور',
736742 'wikilog-show-drafts' => 'مسودات',
737743 'wikilog-submit' => 'أرسل',
738 - 'wikilog-preview' => 'معاينة',
 744+ 'wikilog-preview' => 'عاين',
739745 'wikilog-edit-lc' => 'عدل',
740746 'wikilog-reply-lc' => 'رد',
741747 'wikilog-delete-lc' => 'احذف',
@@ -871,6 +877,31 @@
872878 'wikilog-doc-import-comment' => 'استورد توثيق سجل الويكي',
873879 );
874880
 881+/** Azerbaijani (Azərbaycanca)
 882+ * @author Cekli829
 883+ */
 884+$messages['az'] = array(
 885+ 'wikilog-pager-next' => 'növbəti',
 886+ 'wikilog-pager-first' => 'birinci',
 887+ 'wikilog-pager-last' => 'sonuncu',
 888+ 'wikilog-author-signature' => '[[{{ns:User}}:$1|$1]] ([[{{ns:User_talk}}:$1|müzakirə]])',
 889+ 'wikilog-title-comments' => 'Şərhlər - $1',
 890+ 'wikilog-form-category' => 'Kateqoriya:',
 891+ 'wikilog-form-name' => 'Ad:',
 892+ 'wikilog-form-author' => 'Müəllif:',
 893+ 'wikilog-form-date' => 'Tarix:',
 894+ 'wikilog-form-status' => 'Status:',
 895+ 'wikilog-form-comment' => 'Şərh:',
 896+ 'wikilog-show-all' => 'Bütün postlar',
 897+ 'wikilog-submit' => 'Təsdiq et',
 898+ 'wikilog-preview' => 'Sınaq göstərişi',
 899+ 'wikilog-edit-lc' => 'redaktə',
 900+ 'wikilog-reply-lc' => 'yenidən',
 901+ 'wikilog-delete-lc' => 'sil',
 902+ 'wikilog-page-lc' => 'səhifə',
 903+ 'wikilog-history-lc' => 'tarix',
 904+);
 905+
875906 /** Belarusian (Беларуская)
876907 * @author Тест
877908 */
@@ -1220,7 +1251,7 @@
12211252 'wikilog-wikilog' => 'Wikilog',
12221253 'wikilog-title' => 'Titl',
12231254 'wikilog-actions' => 'Oberoù',
1224 - 'wikilog-comments' => 'Addisplegoù',
 1255+ 'wikilog-comments' => 'Evezhiadennoù',
12251256 'wikilog-replies' => 'Respontoù',
12261257 'wikilog-view-archives' => 'Dielloù',
12271258 'wikilog-view-summary' => 'Diverradur',
@@ -1902,7 +1933,7 @@
19031934 */
19041935 $messages['de-formal'] = array(
19051936 'wikilog-comment-feed-description' => 'Lesen Sie die neuesten Kommentare dieses Feeds.',
1906 - 'wikilog-posting-anonymously' => 'Sie sind zur Zeit nicht angemeldet; Ihr Kommentar wird anonym versendet, identifiziert durch Ihre Internetverbindungsadresse. Sie sollten oben entweder ein Pseudonym angeben, um den Kommentar zu identifizieren oder sich $1, damit er passend zugeordnet wird.',
 1937+ 'wikilog-posting-anonymously' => 'Sie sind zurzeit nicht angemeldet; Ihr Kommentar wird anonym versendet, identifiziert durch Ihre Internetverbindungsadresse. Sie sollten oben entweder ein Pseudonym angeben, um den Kommentar zu identifizieren oder sich $1, damit er passend zugeordnet wird.',
19071938 'wikilog-anonymous-moderated' => 'Nachdem Sie Ihren Kommentar absenden, wird er nicht sofort auf dieser Seite angezeigt.
19081939 Der Kommentar wird nur erscheinen, nachdem er von einem Moderator freigegeben wurde.',
19091940 );
@@ -3039,6 +3070,7 @@
30403071 'wikilog-form-category' => 'Κατηγορία:',
30413072 'wikilog-form-name' => 'Ὄνομα:',
30423073 'wikilog-form-author' => 'Δημιουργός:',
 3074+ 'wikilog-form-date' => 'Ἡμερομηνία:',
30433075 'wikilog-form-comment' => 'Σχόλιον:',
30443076 'wikilog-edit-lc' => 'μεταγράφειν',
30453077 );
@@ -3880,8 +3912,8 @@
38813913 'wikilog-form-name' => 'Áhạ:',
38823914 'wikilog-form-author' => 'Ọdè ákwúkwó:',
38833915 'wikilog-form-date' => 'Ubọchị:',
3884 - 'wikilog-edit-lc' => 'rüwa',
3885 - 'wikilog-delete-lc' => 'gbakashia',
 3916+ 'wikilog-edit-lc' => 'mèzi',
 3917+ 'wikilog-delete-lc' => 'kàcha',
38863918 'wikilog-page-lc' => 'ihü',
38873919 'wikilog-history-lc' => 'akíkó mbu',
38883920 );
@@ -4335,7 +4367,7 @@
43364368 'wikilog-doc-import-comment' => 'Empoteet Handbooch för {{int:Wikilog-wikilog}}',
43374369 );
43384370
4339 -/** Kurdish (Latin) (Kurdî (Latin))
 4371+/** Kurdish (Latin script) (‪Kurdî (latînî)‬)
43404372 * @author George Animal
43414373 */
43424374 $messages['ku-latn'] = array(
@@ -4662,7 +4694,7 @@
46634695 'wikilog-comment-page' => 'Оди на страницата на овој коментар',
46644696 'wikilog-comment-edit' => 'Уреди го коментаров',
46654697 'wikilog-comment-delete' => 'Избриши го коментаров',
4666 - 'wikilog-comment-history' => 'Види историја на коментарот',
 4698+ 'wikilog-comment-history' => 'Историја на коментирање',
46674699 'wikilog-comment-approve' => 'Одобри го коментарот (делува веднаш)',
46684700 'wikilog-comment-reject' => 'Одбиј го коментарот (делува веднаш)',
46694701 'wikilog-newtalk-text' => '<!-- празна страница создадена од Викидневникот -->',
@@ -4798,15 +4830,25 @@
47994831 'wikilog-authors' => 'Pengarang',
48004832 'wikilog-title' => 'Tajuk',
48014833 'wikilog-actions' => 'Tindakan',
 4834+ 'wikilog-comments' => 'Komen',
48024835 'wikilog-view-summary' => 'Ringkasan',
 4836+ 'wikilog-anonymous-mark' => '(tanpa nama)',
48034837 'wikilog-pager-prev' => 'sebelumnya',
48044838 'wikilog-pager-next' => 'berikutnya',
 4839+ 'wikilog-has-comments' => '{{PLURAL:$1|satu komen|$1 komen}}',
 4840+ 'wikilog-title-comments' => 'Komen - $1',
48054841 'wikilog-form-name' => 'Nama:',
48064842 'wikilog-form-author' => 'Pengarang:',
48074843 'wikilog-form-date' => 'Tarikh:',
 4844+ 'wikilog-form-preview' => 'Pralihat:',
 4845+ 'wikilog-form-comment' => 'Komen:',
 4846+ 'wikilog-submit' => 'Serahkan',
 4847+ 'wikilog-preview' => 'Pralihat',
 4848+ 'wikilog-edit-lc' => 'sunting',
48084849 'wikilog-delete-lc' => 'hapuskan',
48094850 'wikilog-approve-lc' => 'luluskan',
48104851 'wikilog-page-lc' => 'laman',
 4852+ 'wikilog-history-lc' => 'sejarah',
48114853 );
48124854
48134855 /** Nedersaksisch (Nedersaksisch)
@@ -5287,6 +5329,13 @@
52885330 'wikilog-doc-import-comment' => 'Documentacion importada de wikilog',
52895331 );
52905332
 5333+/** Oriya (ଓଡ଼ିଆ)
 5334+ * @author Psubhashish
 5335+ */
 5336+$messages['or'] = array(
 5337+ 'wikilog-title' => 'ଶିରୋନାମା',
 5338+);
 5339+
52915340 /** Deitsch (Deitsch)
52925341 * @author Xqt
52935342 */
@@ -5306,6 +5355,7 @@
53075356 'wikilog-form-comment' => 'Aamaericking:',
53085357 'wikilog-preview' => 'Devor aagucke',
53095358 'wikilog-edit-lc' => 'ennere',
 5359+ 'wikilog-delete-lc' => 'lesche',
53105360 'wikilog-page-lc' => 'Blatt',
53115361 );
53125362
@@ -5602,7 +5652,7 @@
56035653 'wikilog-new-item-go' => 'جوړول',
56045654 'wikilog-item-name' => 'د ليکنې نوم:',
56055655 'wikilog-published' => 'خپاره شوي',
5606 - 'wikilog-updated' => 'اوسمهاله شو',
 5656+ 'wikilog-updated' => 'اوسمهالېدلی',
56075657 'wikilog-draft' => 'مسوده',
56085658 'wikilog-authors' => 'ليکوالان',
56095659 'wikilog-wikilog' => 'ويکي يادښت',
@@ -5630,6 +5680,7 @@
56315681 'wikilog-comment-delete' => 'دا تبصره ړنګول',
56325682 'wikilog-comment-history' => 'د تبصرې پېښليک کتل',
56335683 'wikilog-title-comments' => 'تبصرې - $1',
 5684+ 'wikilog-form-wikilog' => 'ويکي يادښتونه:',
56345685 'wikilog-form-category' => 'وېشنيزه:',
56355686 'wikilog-form-name' => 'نوم:',
56365687 'wikilog-form-author' => 'ليکوال:',
@@ -6483,18 +6534,29 @@
64846535 * @author Dbc334
64856536 */
64866537 $messages['sl'] = array(
 6538+ 'wikilog-desc' => 'Doda zmožnosti bloganja in ustvari križanec med wikijem in blogom',
64876539 'wikilog-auto' => 'Wikilog Samodejno',
64886540 'wikilog-help' => '{{ns:Help}}:Wikilog',
64896541 'right-wl-postcomment' => 'Objavljanje pripomb k člankom wikiloga',
 6542+ 'right-wl-moderation' => 'Upravljanje pripomb člankov wikilog',
64906543 'wikilog-specialwikilog-title' => 'Wikilogi',
64916544 'wikilog-log-pagename' => 'Dnevnik dejanj Wikilog',
64926545 'wikilog-log-pagetext' => 'Spodaj se nahaja seznam dejanj wikiloga.',
6493 - 'wikilog-log-cmt-approve' => 'odobril(-a) pripombo »[[$1]]«',
6494 - 'wikilog-log-cmt-reject' => 'zavrnil(-a) pripombo »[[$1]]«',
 6546+ 'wikilog-log-cmt-approve' => 'je odobril(-a) pripombo »[[$1]]«',
 6547+ 'wikilog-log-cmt-reject' => 'je zavrnil(-a) pripombo »[[$1]]«',
64956548 'wikilog-log-cmt-rejdel' => 'Zavrnjena pripomba wikilog od [[Special:Contributions/$1|$1]]',
64966549 'wikilog-tab' => 'Wikilog',
64976550 'wikilog-tab-title' => 'Dejanja Wikilog',
 6551+ 'wikilog-missing-wikilog' => 'To je stran [[{{int:wikilog-help}}|wikiloga]] za [[{{FULLPAGENAME}}]].
 6552+
 6553+Ta wikilog še ne obstaja.
 6554+Če želite objavljati članke in omogočiti druge zmožnosti wikiloga, ga morate najprej ustvariti.
 6555+
 6556+* <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Ustvari wikilog].</span>',
64986557 'wikilog-information' => 'Informacije wikiloga',
 6558+ 'wikilog-post-count-published' => 'Na tem wikilogu {{PLURAL:$1|je $1 objavljen članek|sta $1 objavljena članka|so $1 objavljeni članki|je $1 objavljenih člankov}}',
 6559+ 'wikilog-post-count-drafts' => '{{PLURAL:$1|Obstaja $1 neobjavljen (osnutek) članka|Obstajata $1 neobjavljena (osnutka) članka|Obstajo $1 neobjavljeni (osnutki) člankov|Obstaja $1 neobjavljenih (osnutkov) člankov}}',
 6560+ 'wikilog-post-count-all' => 'Skupno {{PLURAL:$1|je tukaj $1 članek|sta tukaj $1 članka|so tukaj $1 članki|je tukaj $1 člankov}}.',
64996561 'wikilog-new-item' => 'Ustvari nov članek wikilog',
65006562 'wikilog-new-item-go' => 'Ustvari',
65016563 'wikilog-item-name' => 'Ime članka:',
@@ -6520,6 +6582,8 @@
65216583 'wikilog-pager-empty' => '(ni predmetov)',
65226584 'wikilog-no-comments' => 'ni pripomb',
65236585 'wikilog-has-comments' => '$1 {{PLURAL:$1|pripomba|pripombi|pripombe|pripomb}}',
 6586+ 'wikilog-summary-footer' => '{{PLURAL:$5|Objavil|Objavila|Objavili}} $7 na [[$1|$2]] dne $8 ob $9 ($15), $10.',
 6587+ 'wikilog-summary-footer-single' => '{{PLURAL:$5|Objavil|Objavila|Objavili}} $7 dne $8 ob $9 ($15), $10.',
65246588 'wikilog-summary-uncategorized' => 'Nekategorizirano',
65256589 'wikilog-summary-categories' => 'Vloženo pod $2',
65266590 'wikilog-summary-more' => '[[$3|→ nadaljujte z branjem ...]]',
@@ -6527,6 +6591,8 @@
65286592 'wikilog-edit-hint' => 'Uredi članek wikiloga: $1',
65296593 'wikilog-edit-fieldset-legend' => 'Možnosti wikiloga:',
65306594 'wikilog-edit-signpub' => 'Podpiši in objavi ta članek',
 6595+ 'wikilog-edit-signpub-tooltip' => 'Ob shranitvi povzroči podpis in objavo tega članka na njegovem wikilogu.
 6596+Počistite to polje, da obdržite članek kot osnutek.',
65316597 'wikilog-comment-permalink' => '$1 ob $2',
65326598 'wikilog-comment-note-item' => 'objavljeno na $1',
65336599 'wikilog-comment-note-edited' => 'nazadnje urejeno dne $1 ob $2',
@@ -6559,6 +6625,8 @@
65606626 'wikilog-invalid-file' => 'Neveljavna datoteka: $1',
65616627 'wikilog-file-not-found' => 'Neobstoječa datoteka: $1.',
65626628 'wikilog-not-an-image' => 'Datoteka ni slika: $1.',
 6629+ 'wikilog-out-of-context' => 'Opozorilo: oznake Wikilog uporabljate izven konteksta.
 6630+Uporabljene naj bodo samo v člankih v imenskem prostoru Wikilog.',
65636631 'wikilog-too-many-authors' => 'Opozorilo: V tej objavi wikilog je navedenih preveč avtorjev.',
65646632 'wikilog-too-many-tags' => 'Opozorilo: V tej objavi wikilog je navedenih preveč oznak.',
65656633 'wikilog-comment-is-empty' => 'Objavljena pripomba je prazna.',
@@ -6566,6 +6634,11 @@
65676635 'wikilog-comment-invalid-name' => 'Navedeno ime je neveljavno.',
65686636 'wikilog-no-such-article' => 'Zahtevan članek wikilog ne obstaja.',
65696637 'wikilog-reading-draft' => 'Ta članek wikilog je osnutek; ni še bil objavljen.',
 6638+ 'wikilog-posting-anonymously' => 'Trenutno niste prijavljeni;
 6639+vaš komentar bo objavljen brezimno, identificiran z vašim naslovom internetne povezave.
 6640+Zgoraj raje navedite svoj vzdevek, da identificirate svojo pripombo; če pa želite, da je pravilno pripisana, se morate $1.',
 6641+ 'wikilog-anonymous-moderated' => 'Ko oddate svojo pripombo, ne bo takoj vidna na tej strani.
 6642+Pripomba bo prikazana šele takrat, ko jo pregleda moderator.',
65706643 'wikilog-post-comment' => 'Objavi novo pripombo',
65716644 'wikilog-post-reply' => 'Objavi nov odgovor',
65726645 'wikilog-form-legend' => 'Iskanje objav wikilog',
@@ -6600,7 +6673,7 @@
66016674 'wikilog-form-category' => 'Qeybta:',
66026675 );
66036676
6604 -/** Serbian Cyrillic ekavian (‪Српски (ћирилица)‬)
 6677+/** Serbian (Cyrillic script) (‪Српски (ћирилица)‬)
66056678 * @author Rancher
66066679 * @author Жељко Тодоровић
66076680 * @author Михајло Анђелковић
@@ -6633,7 +6706,10 @@
66346707 'wikilog-summary-footer-single' => 'Послао/-ла $7 ка $8 у $9 ($15), $10.',
66356708 'wikilog-summary-uncategorized' => 'Некатегорисано',
66366709 'wikilog-summary-categories' => 'Заведено под $2',
 6710+ 'wikilog-entry-footer' => '— $7 • $9, $8 • $10',
 6711+ 'wikilog-simple-signature' => '$1 ($2)',
66376712 'wikilog-edit-signpub' => 'Потпиши и објави овај чланак',
 6713+ 'wikilog-comment-footer' => '— $2 • $5 $6',
66386714 'wikilog-comment-permalink' => '$1 у $2',
66396715 'wikilog-comment-note-item' => 'послато на $1',
66406716 'wikilog-comment-note-edited' => 'последње измењен на $1 у $2',
@@ -6645,9 +6721,11 @@
66466722 'wikilog-comment-delete' => 'Обриши овај коментар',
66476723 'wikilog-comment-history' => 'Види историју коментара',
66486724 'wikilog-comment-approve' => 'Одобри овај коментар (моментална акција)',
 6725+ 'wikilog-feed-title' => '{{SITENAME}} – $1 [$2]',
66496726 'wikilog-feed-description' => 'Прочитај најскорије уносе у овом фиду.',
66506727 'wikilog-comment-feed-title1' => 'Коментар од $2 (#$1)',
66516728 'wikilog-comment-feed-title2' => 'Коментар од $2 за $3 (#$1)',
 6729+ 'wikilog-title-item-full' => '$1 – $2',
66526730 'wikilog-title-comments' => 'Коментари - $1',
66536731 'wikilog-invalid-param' => 'Неисправан параметар: $1.',
66546732 'wikilog-invalid-author' => 'Непостојећи аутор: $1.',
@@ -6683,7 +6761,7 @@
66846762 'wikilog-history-lc' => 'историја',
66856763 );
66866764
6687 -/** Serbian Latin ekavian (‪Srpski (latinica)‬)
 6765+/** Serbian (Latin script) (‪Srpski (latinica)‬)
66886766 * @author Rancher
66896767 */
66906768 $messages['sr-el'] = array(
@@ -7228,6 +7306,7 @@
72297307 );
72307308
72317309 /** Turkish (Türkçe)
 7310+ * @author Emperyan
72327311 * @author Homonihilis
72337312 * @author Manco Capac
72347313 * @author Universal Life
@@ -7288,10 +7367,12 @@
72897368 'wikilog-summary-categories' => '$2 altına yerleştirilmiştir',
72907369 'wikilog-summary-more' => '[[$3|→ okumaya devam edin...]]',
72917370 'wikilog-author-signature' => '[[{{ns:User}}:$1|$1]] ([[{{ns:User_talk}}:$1|tartışma]])',
 7371+ 'wikilog-edit-hint' => 'Wikilog maddesini düzenleyin: $1',
72927372 'wikilog-edit-fieldset-legend' => 'Vikikayıt seçenekleri:',
72937373 'wikilog-edit-signpub' => 'Bu maddeyi imzala ve yayınla',
72947374 'wikilog-edit-signpub-tooltip' => 'Kaydedildiğinde bu maddenin imzalanmasını ve vikikaydında yayımlanmasını sağlar.
72957375 Bu maddeyi taslak olarak tutmak için bu kutunun seçimini kaldırın.',
 7376+ 'wikilog-comment-anonsig' => '$3 (anonim)',
72967377 'wikilog-comment-pending' => 'Bu yorum onay beklemektedir.',
72977378 'wikilog-comment-deleted' => 'Bu yorum silindi.',
72987379 'wikilog-comment-autosumm' => '$1 tarafından yapılan yeni yorum: $2',
Index: branches/REL1_18/extensions/Wikilog/WikilogUtils.php
@@ -59,9 +59,6 @@
6060 * parser that we could mess up without interfering with normal page
6161 * rendering, and we can't create a new instance because of too many
6262 * broken extensions around. Check self::parserSanityCheck().
63 - *
64 - * @todo (In Wikilog 1.3.x) Remove deprecated WikilogParserCache
65 - * in favor of ParserOptions::addExtraKey().
6663 */
6764 public static function parsedArticle( Title $title, $feed = false ) {
6865 global $wgWikilogCloneParser;
@@ -84,13 +81,7 @@
8582 if ( $feed ) {
8683 $parserOpt->setEditSection( false );
8784
88 - # NOTE (Mw1.16- COMPAT) ParserOptions::addExtraKey() added in
89 - # MediaWiki 1.17 (r70822) makes WikilogParserCache obsolete.
90 - if ( method_exists( $parserOpt, 'addExtraKey' ) ) {
91 - $parserOpt->addExtraKey( "WikilogFeed" );
92 - } else {
93 - $parserCache = WikilogParserCache::singleton();
94 - }
 85+ $parserOpt->addExtraKey( "WikilogFeed" );
9586 } else {
9687 $parserOpt->enableLimitReport();
9788 }
Index: branches/REL1_18/extensions/Wikilog/WikilogComment.php
@@ -29,12 +29,6 @@
3030 if ( !defined( 'MEDIAWIKI' ) )
3131 die();
3232
33 -# NOTE (Mw1.16- COMPAT): GAID_FOR_UPDATE removed and replaced by
34 -# Title::GAID_FOR_UPDATE in Mw1.17. Remove this define and replace its
35 -# occurrence WikilogComment::getCommentArticleTitle() in Wl1.3.
36 -if ( !defined( 'GAID_FOR_UPDATE' ) )
37 - define( 'GAID_FOR_UPDATE', Title::GAID_FOR_UPDATE );
38 -
3933 /**
4034 * Wikilog article comment database entry.
4135 */
@@ -244,14 +238,12 @@
245239
246240 /**
247241 * Returns comment article title.
248 - * @todo (In Wikilog 1.3.x) Replace GAID_FOR_UPDATE with
249 - * Title::GAID_FOR_UPDATE.
250242 */
251243 public function getCommentArticleTitle() {
252244 if ( $this->mCommentTitle ) {
253245 return $this->mCommentTitle;
254246 } elseif ( $this->mCommentPage ) {
255 - return Title::newFromID( $this->mCommentPage, GAID_FOR_UPDATE );
 247+ return Title::newFromID( $this->mCommentPage, Title::GAID_FOR_UPDATE );
256248 } else {
257249 $it = $this->mItem->mTitle;
258250 return Title::makeTitle(
Property changes on: branches/REL1_18/extensions/Wikilog
___________________________________________________________________
Added: svn:mergeinfo
259251 Merged /trunk/extensions/Wikilog:r92476-104803

Status & tagging log