[MediaWiki-CVS] SVN: [60882] trunk/extensions/WikiTextLoggedInOut

2010-01-09 Thread ashley
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60882

Revision: 60882
Author:   ashley
Date: 2010-01-10 01:25:41 + (Sun, 10 Jan 2010)

Log Message:
---
WikiTextLoggedInOut: fixes, fixes

Modified Paths:
--
trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.i18n.php
trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.php

Modified: trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.i18n.php
===
--- trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.i18n.php   
2010-01-10 00:32:50 UTC (rev 60881)
+++ trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.i18n.php   
2010-01-10 01:25:41 UTC (rev 60882)
@@ -1,8 +1,14 @@
  'Two parser hooks, 
 and  to show different text 
depending on the users\' login state',
 );

Modified: trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.php
===
--- trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.php
2010-01-10 00:32:50 UTC (rev 60881)
+++ trunk/extensions/WikiTextLoggedInOut/WikiTextLoggedInOut.php
2010-01-10 01:25:41 UTC (rev 60882)
@@ -5,38 +5,44 @@
  * that will display different output depending if the user
  * is logged in or not.
  *
- * @author Wikia, Inc.
+ * @file
+ * @ingroup Extensions
+ * @author Aaron Wright
+ * @author David Pean
+ * @author Jack Phoenix 
  * @version 1.0
- * @link http://www.mediawiki.org/wiki/Extension:WikiTextLoggedInOut
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
+ * @link http://www.mediawiki.org/wiki/Extension:WikiTextLoggedInOut 
Documentation
  */
 
-$wgHooks['ParserFirstCallInit'][] = 'wfWikiTextLoggedIn';
-$dir = dirname(__FILE__) . '/';
-$wgExtensionMessagesFiles['WikiTextLoginInOut'] = $dir . 
'WikiTextLoggedInOut.i18n.php';
-
+// Extension credits that will show up on Special:Version
 $wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'WikiTextLoggedInOut',
-   'version' => '1.0',
-   'author' => 'Wikia New York Team',
+   'version' => '1.1',
+   'author' => array( 'Aaron Wright', 'David Pean', 'Jack Phoenix' ),
'description' => 'Two parser hooks,  and 
 to show different text depending on the users\' 
login state',
'url' => 'http://www.mediawiki.org/wiki/Extension:WikiTextLoggedInOut',
'descriptionmsg' => 'wikitextloggedinout-desc'
 );
 
+$dir = dirname( __FILE__ ) . '/';
+$wgExtensionMessagesFiles['WikiTextLoginInOut'] = $dir . 
'WikiTextLoggedInOut.i18n.php';
+
+$wgHooks['ParserFirstCallInit'][] = 'wfWikiTextLoggedIn';
 function wfWikiTextLoggedIn( &$parser ) {
$parser->setHook( 'loggedin', 'OutputLoggedInText' );
return true;
 }
 
-function OutputLoggedInText( $input, $args, &$parser ) {
-   global $wgUser, $wgOut;
+function OutputLoggedInText( $input, $args, $parser ) {
+   global $wgUser;
 
-   if( $wgUser->isLoggedIn() ){
-   return $parser->recursiveTagParse($input);
+   if( $wgUser->isLoggedIn() ) {
+   return $parser->recursiveTagParse( $input );
}
 
-   return "";
+   return '';
 }
 
 $wgHooks['ParserFirstCallInit'][] = 'wfWikiTextLoggedOut';
@@ -46,12 +52,12 @@
return true;
 }
 
-function OutputLoggedOutText( $input, $args, &$parser ) {
-   global $wgUser, $wgOut;
+function OutputLoggedOutText( $input, $args, $parser ) {
+   global $wgUser;
 
-   if( !$wgUser->isLoggedIn() ){
-   return $parser->recursiveTagParse($input);
+   if( !$wgUser->isLoggedIn() ) {
+   return $parser->recursiveTagParse( $input );
}
 
-   return "";
+   return '';
 }



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


[MediaWiki-CVS] SVN: [60881] trunk/phase3/languages/messages

2010-01-09 Thread shinjiman
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60881

Revision: 60881
Author:   shinjiman
Date: 2010-01-10 00:32:50 + (Sun, 10 Jan 2010)

Log Message:
---
Localisation updates Cantonese, Chinese and Literary Chinese

Modified Paths:
--
trunk/phase3/languages/messages/MessagesLzh.php
trunk/phase3/languages/messages/MessagesYue.php
trunk/phase3/languages/messages/MessagesZh_hans.php
trunk/phase3/languages/messages/MessagesZh_hant.php

Modified: trunk/phase3/languages/messages/MessagesLzh.php
===
--- trunk/phase3/languages/messages/MessagesLzh.php 2010-01-09 21:59:40 UTC 
(rev 60880)
+++ trunk/phase3/languages/messages/MessagesLzh.php 2010-01-10 00:32:50 UTC 
(rev 60881)
@@ -464,6 +464,7 @@
 'nav-login-createaccount'=> '登簿、增簿',
 'loginprompt'=> '登簿{{SITENAME}}須cookies,請准之。',
 'userlogin'  => '登簿、增簿',
+'userloginnocreate'  => '登簿',
 'logout' => '去簿',
 'userlogout' => '去簿',
 'notloggedin'=> '尚未登簿',
@@ -656,6 +657,8 @@
 'nocreatetitle'=> '新題謝焉',
 'nocreatetext' => 
'舊題可修,新題謝焉。[[Special:UserLogin|登簿、增簿]]以逮權也。',
 'nocreate-loggedin'=> '子權未逮,新頁謝焉。',
+'sectioneditnotsupported-title'=> '不纂持節',
+'sectioneditnotsupported-text' => '此頁不持纂節也。',
 'permissionserrors'=> '權未逮也',
 'permissionserrorstext'=> '子權未逮,有{{PLURAL:$1|因|因}}如下:',
 'permissionserrorstext-withaction' => '子權未逮,有{{PLURAL:$1|因|因}}如$2:',
@@ -770,10 +773,13 @@
 *: ''地、號、保等之。''",
 'revdelete-legend'=> '見,規之以',
 'revdelete-hide-text' => '藏審文',
-'revdelete-hide-image'=> '藏檔',
+'revdelete-hide-image'=> '藏檔容',
 'revdelete-hide-comment'  => '藏贊',
 'revdelete-hide-user' => '簿、IP址以藏',
 'revdelete-hide-restricted'   => '廢有秩與簿之事',
+'revdelete-radio-same'=> "(無改)",
+'revdelete-radio-set' => '可',
+'revdelete-radio-unset'   => '否',
 'revdelete-suppress'  => '廢有秩與簿之事',
 'revdelete-unsuppress'=> '復審解限',
 'revdelete-log'   => '誌贊:',
@@ -804,7 +810,7 @@
 'revdelete-modify-missing'=> '錯改項ID $1:失庫!',
 'revdelete-no-change' => '警:於$1 $2之項求示設也。',
 'revdelete-concurrent-change' => '錯改於$1 $2項:眾改之設,乃另之改。查誌。',
-'revdelete-only-restricted'   => '爾無廢有秩見之項,而無選另廢項也。',
+'revdelete-only-restricted'   => '藏期於 $1 $2 之項:爾無廢有秩見之項,而無選另廢項也。',
 'revdelete-reason-dropdown'   => '*常因
 ** 侵權
 ** 無合之人料',
@@ -1508,7 +1514,8 @@
 'ancientpages'=> '陳年',
 'move'=> '遷',
 'movethispage'=> '遷此頁',
-'unusedimagestext'=> '他站可以網址鏈檔,故下列並非盡閒,註記之。',
+'unusedimagestext'=> '下檔存也,未嵌於其頁之。
+他站可以網址鏈檔,故下列並非盡閒,註記之。',
 'unusedcategoriestext'=> '以下空門,無依可活。',
 'notargettitle'   => '落靶',
 'notargettext'=> '簿、頁未定,無可為之。',
@@ -1710,7 +1717,7 @@
 'exblank'=> '缺頁',
 'delete-confirm' => '刪"$1"',
 'delete-legend'  => '刪',
-'historywarning' => '警示,此頁有誌$1:',
+'historywarning' => '警示,此頁約有誌$1:',
 'confirmdeletetext'  => '欲刪此物與誌,知後果、合[[{{MediaWiki:Policy-url}}]]後再為之。',
 'actioncomplete' => '成矣',
 'actionfailed'   => '敗矣',
@@ -1897,6 +1904,7 @@
 
 # Block/unblock
 'blockip' => '禁簿',
+'blockip-title'   => '禁簿',
 'blockip-legend'  => '禁簿',
 'blockiptext' => 
'函下禁纂,簿、址明判;[[{{MediaWiki:Policy-url}}|秉據]]如斯,立法克亂。指罪證行,了冤無憾。',
 'ipaddress'   => 'IP址',
@@ -1988,6 +1996,7 @@
 'ipb_cant_unblock'=> '有誤:禁$1無尋;或早赦矣。',
 'ipb_blocked_as_range'=> '錯:該IP $1 無直禁也,無赦之。唯它在 $2 之範禁內,其範可赦之。',
 'ip_range_invalid'=> 'IP址圍不格',
+'ip_range_toolarge'   => '大於 /$1 之禁段乃無容也。',
 'blockme' => '自禁',
 'proxyblocker'=> '禁Proxy',
 'proxyblocksuccess'   => '成矣。',

Modified: trunk/phase3/languages/messages/MessagesYue.php
===
--- trunk/phase3/languages/messages/MessagesYue.php 2010-01-09 21:59:40 UTC 
(rev 60880)
+++ trunk/phase3/languages/messages/MessagesYue.php 2010-01-10 00:32:50 UTC 
(rev 60881)
@@ -1,5 +1,5 @@
 http://translatewiki.net
@@ -556,6 +556,7 @@
 'nav-login-createaccount'=> '登入/開新戶口',
 'loginprompt'=> '你一定要開咗 cookies 先登入到{{SITENAME}}。',
 'userlogin'  => '登入/開新戶口',
+'userloginnocreate'  => '登入',
 'logout' => '登出',
 'userlogout' => '登出',
 'notloggedin'=> '未登入',
@@ -784,7 +785,7 @@
 'cascadeprotectedwarning'  => 
"'''警告:'''呢一頁已經鎖咗,只有管理員權限嘅用戶先至可以改,因為佢係響以下連串保護嘅{{PLURAL:$1|一|幾}}頁度包含咗:",
 'titleprotectedwarning'=> 
"'''警告:呢一版已經鎖咗,需要一啲[[Special:ListGroupRights|指定權限]]先至可以開到。'''",
 'templatesused'=> '呢版用嘅模{{P

[MediaWiki-CVS] SVN: [60880] trunk/phase3/includes

2010-01-09 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60880

Revision: 60880
Author:   ialex
Date: 2010-01-09 21:59:40 + (Sat, 09 Jan 2010)

Log Message:
---
* Document a bit
* Add new doxygen group "Feed"
* Fix some doxygen warnings

Modified Paths:
--
trunk/phase3/includes/ChangesFeed.php
trunk/phase3/includes/Feed.php
trunk/phase3/includes/FeedUtils.php

Modified: trunk/phase3/includes/ChangesFeed.php
===
--- trunk/phase3/includes/ChangesFeed.php   2010-01-09 21:37:18 UTC (rev 
60879)
+++ trunk/phase3/includes/ChangesFeed.php   2010-01-09 21:59:40 UTC (rev 
60880)
@@ -1,14 +1,31 @@
 format = $format;
$this->type = $type;
}
 
+   /**
+* Get a ChannelFeed subclass object to use
+*
+* @param $title String: feed's title
+* @param $description String: feed's description
+* @return ChannelFeed subclass or false on failure
+*/
public function getFeedObject( $title, $description ) {
global $wgSitename, $wgContLanguageCode, $wgFeedClasses, 
$wgTitle;
$feedTitle = "$wgSitename  - {$title} [$wgContLanguageCode]";
@@ -18,6 +35,18 @@
$feedTitle, htmlspecialchars( $description ), 
$wgTitle->getFullUrl() );
}
 
+   /**
+* Generates feed's content
+*
+* @param $feed ChannelFeed subclass object (generally the one returned 
by getFeedObject())
+* @param $rows ResultWrapper object with rows in recentchanges table
+* @param $limit Integer: number of rows in $rows (only used for the 
cache key)
+* @param $hideminor Boolean: whether to hide minor edits (only used 
for the cache key)
+* @param $lastmod Integer: timestamp of the last item in the 
recentchanges table (only used for the cache key)
+* @param $target String: target's name; for 
Special:RecentChangesLinked (only used for the cache key)
+* @param $namespace Integer: namespace id (only used for the cache key)
+* @return null or true
+*/
public function execute( $feed, $rows, $limit=0, $hideminor=false, 
$lastmod=false, $target='', $namespace='' ) {
global $messageMemc, $wgFeedCacheTimeout;
global $wgSitename, $wgLang;
@@ -52,6 +81,13 @@
return true;
}
 
+   /**
+* Save to feed result to $messageMemc
+*
+* @param $feed String: feed's content
+* @param $timekey String: memcached key of the last modification
+* @param $key String: memcached key of the content
+*/
public function saveToCache( $feed, $timekey, $key ) {
global $messageMemc;
$expire = 3600 * 24; # One day
@@ -59,6 +95,14 @@
$messageMemc->set( $timekey, wfTimestamp( TS_MW ), $expire );
}
 
+   /**
+* Try to load the feed result from $messageMemc
+*
+* @param $lastmod Integer: timestamp of the last item in the 
recentchanges table
+* @param $timekey String: memcached key of the last modification
+* @param $key String: memcached key of the content
+* @return feed's content on cache hit or false on cache miss
+*/
public function loadFromCache( $lastmod, $timekey, $key ) {
global $wgFeedCacheTimeout, $messageMemc;
$feedLastmod = $messageMemc->get( $timekey );
@@ -86,10 +130,10 @@
}
 
/**
-   * Generate the feed items given a row from the database.
-   * @param $rows Database resource with recentchanges rows
-   * @param $feed Feed object
-   */
+* Generate the feed items given a row from the database.
+* @param $rows DatabaseBase resource with recentchanges rows
+* @param $feed Feed object
+*/
public static function generateFeed( $rows, &$feed ) {
wfProfileIn( __METHOD__ );
 

Modified: trunk/phase3/includes/Feed.php
===
--- trunk/phase3/includes/Feed.php  2010-01-09 21:37:18 UTC (rev 60879)
+++ trunk/phase3/includes/Feed.php  2010-01-09 21:59:40 UTC (rev 60880)
@@ -19,13 +19,19 @@
 # http://www.gnu.org/copyleft/gpl.html
 
 /**
+ * @defgroup Feed Feed
+ *
  * Basic support for outputting syndication feeds in RSS, other formats.
  * Contain a feed class as well as classes to build rss / atom ... feeds
  * Available feeds are defined in Defines.php
+ *
+ * @file
  */
 
 /**
  * A base class for basic support for outputting syndication feeds in RSS and 
other formats.
+ *
+ * @ingroup Feed
  */
 class FeedItem {
/*...@+
@@ -39,9 +45,15 @@
var $Author = '';
/*...@-*/
 
-   /*...@+
-* @todo document
-* @param $Url URL uniquely designating the item.
+   /**
+* Constructor
+*
+   

[MediaWiki-CVS] SVN: [60879] trunk/extensions/FlaggedRevs/FlaggedArticleView.php

2010-01-09 Thread aaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60879

Revision: 60879
Author:   aaron
Date: 2010-01-09 21:37:18 + (Sat, 09 Jan 2010)

Log Message:
---
Follow up r60878: same for old reviewed revs.

Modified Paths:
--
trunk/extensions/FlaggedRevs/FlaggedArticleView.php

Modified: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
===
--- trunk/extensions/FlaggedRevs/FlaggedArticleView.php 2010-01-09 21:24:20 UTC 
(rev 60878)
+++ trunk/extensions/FlaggedRevs/FlaggedArticleView.php 2010-01-09 21:37:18 UTC 
(rev 60879)
@@ -424,7 +424,11 @@
$quality = FlaggedRevs::isQuality( $flags );
$pristine = FlaggedRevs::isPristine( $flags );
$text = $frev->getRevText();
-   $parserOut = FlaggedRevs::parseStableText( $this->article, 
$text, $frev->getRevId() );
+   # Check if this is a redirect...
+   $redirHtml = $this->getRedirectHtml( $text );
+   if( $redirHtml == '' ) {
+   $parserOut = FlaggedRevs::parseStableText( 
$this->article, $text, $frev->getRevId() );
+   }
# Construct some tagging for non-printable outputs. Note that 
the pending
# notice has all this info already, so don't do this if we 
added that already.
if( !$wgOut->isPrintable() ) {
@@ -461,7 +465,11 @@
}
# Output HTML
$this->setReviewNotes( $frev );
-   $wgOut->addParserOutput( $parserOut );
+   if( $redirHtml != '' ) {
+   $wgOut->addHtml( $redirHtml );
+   } else {
+   $wgOut->addParserOutput( $parserOut );
+   }
# Index the stable version only
$wgOut->setRobotPolicy( 'noindex,nofollow' );
}
@@ -489,11 +497,10 @@
if( $parserOut == false ) {
$text = $srev->getRevText();
# Check if this is a redirect...
-   $rTarget = $this->article->followRedirectText( $text );
-   if( $rTarget ) {
-   $redirHtml = $this->article->viewRedirect( 
$rTarget );
-   } else {
-   $parserOut = FlaggedRevs::parseStableText( 
$this->article, $text, $srev->getRevId() );
+   $redirHtml = $this->getRedirectHtml( $text );
+   if( $redirHtml == '' ) {
+   $parserOut = FlaggedRevs::parseStableText(
+   $this->article, $text, 
$srev->getRevId() );
# Update the stable version cache
FlaggedRevs::updatePageCache( $this->article, 
$wgUser, $parserOut );
}
@@ -547,6 +554,14 @@
$wgOut->addParserOutput( $parserOut );
}
}
+   
+   protected function getRedirectHtml( $text ) {
+   $rTarget = $this->article->followRedirectText( $text );
+   if( $rTarget ) {
+   return $this->article->viewRedirect( $rTarget );
+   }
+   return '';
+   }
 
/**
* @param FlaggedRevision $srev, stable version



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


[MediaWiki-CVS] SVN: [60878] trunk/extensions/FlaggedRevs

2010-01-09 Thread aaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60878

Revision: 60878
Author:   aaron
Date: 2010-01-09 21:24:20 + (Sat, 09 Jan 2010)

Log Message:
---
* Display redirects normally for redirect=no&stable=1 URLs (bug 22036)
* Unified displayTag() calls to one hook for visual consistency
* Cleaned up/renamed getReviewNotes()
* Tweaked revreview-locked msg
* Removed unused global

Modified Paths:
--
trunk/extensions/FlaggedRevs/FlaggedArticleView.php
trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
trunk/extensions/FlaggedRevs/FlaggedRevs.php
trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php
trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php

Modified: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
===
--- trunk/extensions/FlaggedRevs/FlaggedArticleView.php 2010-01-09 20:19:56 UTC 
(rev 60877)
+++ trunk/extensions/FlaggedRevs/FlaggedArticleView.php 2010-01-09 21:24:20 UTC 
(rev 60878)
@@ -117,7 +117,7 @@
 /**
 * Output review notice
 */
-   protected function displayTag() {
+   public function displayTag() {
global $wgOut, $wgRequest;
$this->load();
// UI may be limited to unobtrusive patrolling system
@@ -232,8 +232,6 @@
if( is_null($frev) ) {
# Add "no reviewed version" tag, but not for printable 
output
$this->showUnreviewedPage( $tag, $prot );
-   # Show notice bar/icon
-   $this->displayTag();
return true;
}
# Get flags and date
@@ -275,8 +273,6 @@
"$tag";
$this->reviewNotice .= $tag;
}
-   # Show notice bar/icon
-   $this->displayTag();
 
return true;
}
@@ -328,7 +324,7 @@
# Get stable version sync status
$synced = FlaggedRevs::stableVersionIsSynced( $srev, 
$this->article );
if( $synced ) {
-   $this->getReviewNotes( $srev ); // Still the same
+   $this->setReviewNotes( $srev ); // Still the same
} else {
$this->maybeShowTopDiff( $srev, $quality ); // user may 
want diff (via prefs)
}
@@ -464,7 +460,7 @@
}
}
# Output HTML
-   $this->getReviewNotes( $frev );
+   $this->setReviewNotes( $frev );
$wgOut->addParserOutput( $parserOut );
# Index the stable version only
$wgOut->setRobotPolicy( 'noindex,nofollow' );
@@ -488,12 +484,19 @@
$quality = FlaggedRevs::isQuality( $flags );
$pristine = FlaggedRevs::isPristine( $flags );
# Get parsed stable version
+   $redirHtml = '';
$parserOut = FlaggedRevs::getPageCache( $this->article, $wgUser 
);
if( $parserOut == false ) {
$text = $srev->getRevText();
-   $parserOut = FlaggedRevs::parseStableText( 
$this->article, $text, $srev->getRevId() );
-   # Update the stable version cache
-   FlaggedRevs::updatePageCache( $this->article, $wgUser, 
$parserOut );
+   # Check if this is a redirect...
+   $rTarget = $this->article->followRedirectText( $text );
+   if( $rTarget ) {
+   $redirHtml = $this->article->viewRedirect( 
$rTarget );
+   } else {
+   $parserOut = FlaggedRevs::parseStableText( 
$this->article, $text, $srev->getRevId() );
+   # Update the stable version cache
+   FlaggedRevs::updatePageCache( $this->article, 
$wgUser, $parserOut );
+   }
}
$synced = FlaggedRevs::stableVersionIsSynced( $srev, 
$this->article, $parserOut, null );
# Construct some tagging
@@ -537,8 +540,12 @@
}
}
# Output HTML
-   $this->getReviewNotes( $srev );
-   $wgOut->addParserOutput( $parserOut );
+   $this->setReviewNotes( $srev );
+   if( $redirHtml != '' ) {
+   $wgOut->addHtml( $redirHtml );
+   } else {
+   $wgOut->addParserOutput( $parserOut );
+   }
}
 
/**
@@ -1033,16 +1040,15 @@
 * @param FlaggedRevision $frev
 * @return string, revision review notes
 */
-   public function getReviewNotes( $frev ) {
+   public function 

[MediaWiki-CVS] SVN: [60876] trunk/phase3

2010-01-09 Thread aaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60876

Revision: 60876
Author:   aaron
Date: 2010-01-09 20:18:41 + (Sat, 09 Jan 2010)

Log Message:
---
bug 21411 'Add a new message rev-suppressed-no-diff for diff without entry in 
public log'

Modified Paths:
--
trunk/phase3/includes/diff/DifferenceInterface.php
trunk/phase3/languages/messages/MessagesEn.php

Modified: trunk/phase3/includes/diff/DifferenceInterface.php
===
--- trunk/phase3/includes/diff/DifferenceInterface.php  2010-01-09 20:17:54 UTC 
(rev 60875)
+++ trunk/phase3/includes/diff/DifferenceInterface.php  2010-01-09 20:18:41 UTC 
(rev 60876)
@@ -377,9 +377,10 @@
$multi = $this->getMultiNotice();
$wgOut->addHTML( $this->addHeader( '', $oldHeader, 
$newHeader, $multi ) );
if( !$allowed ) {
+   $msg = $suppressed ? 'rev-suppressed-no-diff' : 
'rev-deleted-no-diff';
# Give explanation for why revision is not 
visible
$wgOut->wrapWikiMsg( "\n$1\n",
-   array( 'rev-deleted-no-diff' ) );
+   array( $msg ) );
} else {
# Give explanation and add a link to view the 
diff...
$link = $this->mTitle->getFullUrl( array(

Modified: trunk/phase3/languages/messages/MessagesEn.php
===
--- trunk/phase3/languages/messages/MessagesEn.php  2010-01-09 20:17:54 UTC 
(rev 60875)
+++ trunk/phase3/languages/messages/MessagesEn.php  2010-01-09 20:18:41 UTC 
(rev 60876)
@@ -1431,29 +1431,30 @@
 'rev-deleted-event'   => '(log action removed)',
 'rev-deleted-user-contribs'   => '[username or IP address removed - edit 
hidden from contributions]',
 'rev-deleted-text-permission' => "This page revision has been '''deleted'''.
-There may be details in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].",
+Details can be found in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].",
 'rev-deleted-text-unhide' => "This page revision has been '''deleted'''.
-There may be details in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].
+Details can be found in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].
 As an administrator you can still [$1 view this revision] if you wish to 
proceed.",
 'rev-suppressed-text-unhide'  => "This page revision has been '''suppressed'''.
-There may be details in the 
[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE suppression log].
+Details can be found in the 
[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE suppression log].
 As an administrator you can still [$1 view this revision] if you wish to 
proceed.",
 'rev-deleted-text-view'   => "This page revision has been '''deleted'''.
-As an administrator you can view it; there may be details in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].",
+As an administrator you can view it; details can be found in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].",
 'rev-suppressed-text-view'=> "This page revision has been '''suppressed'''.
-As an administrator you can view it; there may be details in the 
[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE suppression 
log].",
+As an administrator you can view it; details can be found in the 
[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE suppression 
log].",
 'rev-deleted-no-diff' => "You cannot view this diff because one of the 
revisions has been '''deleted'''.
-There may be details in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].",
+Details can be found in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].",
+'rev-suppressed-no-diff' => "You cannot view this diff because one of 
the revisions has been '''deleted'''.",
 'rev-deleted-unhide-diff' => "One of the revisions of this diff has been 
'''deleted'''.
-There may be details in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].
+Details can be found in the 
[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE deletion log].
 As an administrator you can still [$1 view this diff] if you wish to proceed.",
 'rev-suppressed-unhide-diff'  => "One of the revisions of this diff has been 
'''suppressed'''.
-There may be details in the 
[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE suppression log].
+Details can be found in the 
[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE suppression log].
 As an administrator you can still 

[MediaWiki-CVS] SVN: [60875] trunk/phase3/includes/specials/SpecialUpload.php

2010-01-09 Thread btongminh
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60875

Revision: 60875
Author:   btongminh
Date: 2010-01-09 20:17:54 + (Sat, 09 Jan 2010)

Log Message:
---
Fix use of an array for no apparent reason. 
SpecialUpload::getExistsWarning now no longer encapsulates its results in 
Further minor cleanup

Modified Paths:
--
trunk/phase3/includes/specials/SpecialUpload.php

Modified: trunk/phase3/includes/specials/SpecialUpload.php
===
--- trunk/phase3/includes/specials/SpecialUpload.php2010-01-09 20:03:16 UTC 
(rev 60874)
+++ trunk/phase3/includes/specials/SpecialUpload.php2010-01-09 20:17:54 UTC 
(rev 60875)
@@ -315,7 +315,7 @@
foreach( $warnings as $warning => $args ) {
$msg = '';
if( $warning == 'exists' ) {
-   $msg = self::getExistsWarning( $args );
+   $msg = "\t" . 
self::getExistsWarning( $args ) . "\n";
} elseif( $warning == 'duplicate' ) {
$msg = self::getDupeWarning( $args );
} elseif( $warning == 'duplicate-archive' ) {
@@ -323,7 +323,7 @@
array( 
Title::makeTitle( NS_FILE, $args )->getPrefixedText() ) )
. "\n";
} else {
-   if ( is_bool( $args ) )
+   if ( $args === true )
$args = array();
elseif ( !is_array( $args ) )
$args = array( $args );
@@ -569,7 +569,6 @@
 *
 * @param array $exists The result of UploadBase::getExistsWarning
 * @return string Empty string if there is no warning or an HTML 
fragment
-* consisting of one or more  elements if there is a warning.
 */
public static function getExistsWarning( $exists ) {
global $wgUser, $wgContLang;
@@ -579,30 +578,30 @@
 
$file = $exists['file'];
$filename = $file->getTitle()->getPrefixedText();
-   $warning = array();
+   $warning = '';
 
$sk = $wgUser->getSkin();
 
if( $exists['warning'] == 'exists' ) {
// Exact match
-   $warning[] = '' . wfMsgExt( 'fileexists', 
'parseinline', $filename ) . '';
+   $warning = wfMsgExt( 'fileexists', 'parseinline', 
$filename );
} elseif( $exists['warning'] == 'page-exists' ) {
// Page exists but file does not
-   $warning[] = '' . wfMsgExt( 'filepageexists', 
'parseinline', $filename ) . '';
+   $warning = wfMsgExt( 'filepageexists', 'parseinline', 
$filename );
} elseif ( $exists['warning'] == 'exists-normalized' ) {
-   $warning[] = '' . wfMsgExt( 'fileexists-extension', 
'parseinline', $filename,
-   
$exists['normalizedFile']->getTitle()->getPrefixedText() ) . '';
+   $warning = wfMsgExt( 'fileexists-extension', 
'parseinline', $filename,
+   
$exists['normalizedFile']->getTitle()->getPrefixedText() );
} elseif ( $exists['warning'] == 'thumb' ) {
// Swapped argument order compared with other messages 
for backwards compatibility
-   $warning[] = '' . wfMsgExt( 
'fileexists-thumbnail-yes', 'parseinline',
-   
$exists['thumbFile']->getTitle()->getPrefixedText(), $filename ) . '';
+   $warning = wfMsgExt( 'fileexists-thumbnail-yes', 
'parseinline',
+   
$exists['thumbFile']->getTitle()->getPrefixedText(), $filename );
} elseif ( $exists['warning'] == 'thumb-name' ) {
// Image w/o '180px-' does not exists, but we do not 
like these filenames
$name = $file->getName();
$badPart = substr( $name, 0, strpos( $name, '-' ) + 1 );
-   $warning[] = '' . wfMsgExt( 'file-thumbnail-no', 
'parseinline', $badPart ) . '';
+   $warning = wfMsgExt( 'file-thumbnail-no', 
'parseinline', $badPart );
} elseif ( $exists['warning'] == 'bad-prefix' ) {
-   $warning[] = '' . wfMsgExt( 'filename-bad-prefix', 
'parseinline', $exists['prefix'] ) . '';
+   $warning = wfMsgExt( 'filename-bad-prefix', 
'parseinline', $exists['prefix'] );
} elseif ( $exists['warning'] == 'was-deleted' ) {
# If th

[MediaWiki-CVS] SVN: [60877] trunk/phase3/maintenance/language/messages.inc

2010-01-09 Thread aaron
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60877

Revision: 60877
Author:   aaron
Date: 2010-01-09 20:19:56 + (Sat, 09 Jan 2010)

Log Message:
---
Update for r60876 

Modified Paths:
--
trunk/phase3/maintenance/language/messages.inc

Modified: trunk/phase3/maintenance/language/messages.inc
===
--- trunk/phase3/maintenance/language/messages.inc  2010-01-09 20:18:41 UTC 
(rev 60876)
+++ trunk/phase3/maintenance/language/messages.inc  2010-01-09 20:19:56 UTC 
(rev 60877)
@@ -669,6 +669,7 @@
'rev-deleted-text-view',
'rev-suppressed-text-view',
'rev-deleted-no-diff',
+   'rev-suppressed-no-diff',
'rev-deleted-unhide-diff',
'rev-suppressed-unhide-diff',
'rev-deleted-diff-view',



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


[MediaWiki-CVS] SVN: [60874] trunk/tools/wikibugs/wikibugs

2010-01-09 Thread maxsem
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60874

Revision: 60874
Author:   maxsem
Date: 2010-01-09 20:03:16 + (Sat, 09 Jan 2010)

Log Message:
---
Follow-up to r60873: forgot to remove another instance of priority

Modified Paths:
--
trunk/tools/wikibugs/wikibugs

Modified: trunk/tools/wikibugs/wikibugs
===
--- trunk/tools/wikibugs/wikibugs   2010-01-09 19:30:44 UTC (rev 60873)
+++ trunk/tools/wikibugs/wikibugs   2010-01-09 20:03:16 UTC (rev 60874)
@@ -89,11 +89,10 @@
my $product = $mail->header( 'X-Bugzilla-Product' );
my $component = $mail->header( 'X-Bugzilla-Component' );
my $severity = $mail->header( 'X-Bugzilla-Severity' );
-   my $priority = $mail->header( 'X-Bugzilla-Priority' );
## Doesn't seem to be sent as a header.
my $reporter = $1 if $body =~ /ReportedBy: 
(.*)\...@.*$/m;
 
-   $output .= "$severity; $priority; \002$product\002\: 
$component; (\002$reporter\002)\n";
+   $output .= "$severity; \002$product\002\: $component; 
(\002$reporter\002)\n";
}
else
{



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


[MediaWiki-CVS] SVN: [60873] trunk/tools/wikibugs/wikibugs

2010-01-09 Thread maxsem
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60873

Revision: 60873
Author:   maxsem
Date: 2010-01-09 19:30:44 + (Sat, 09 Jan 2010)

Log Message:
---
wikibugs: removed priority since it has been banished from Bugzilla

Modified Paths:
--
trunk/tools/wikibugs/wikibugs

Modified: trunk/tools/wikibugs/wikibugs
===
--- trunk/tools/wikibugs/wikibugs   2010-01-09 19:27:24 UTC (rev 60872)
+++ trunk/tools/wikibugs/wikibugs   2010-01-09 19:30:44 UTC (rev 60873)
@@ -24,14 +24,6 @@
'blocker' => "\00304\002BLOCKER\002\003"
 };
 
-my $phash = { 
-   'Highest' => "highest",
-   'High' => "high",
-   'Normal' => "normal", 
-   'Low' => "low",
-   'Lowest' => "lowest"
-};
-
 my $rhash = {
'WORKSFORME' => "\00314(WFM)\003", 
'INVALID' => "\00314(INVALID)\003",
@@ -126,9 +118,6 @@
if ($body =~ /Severity\|(\w+)\s+\|(\w+)/m) {
push @outputs, 
"$shash->{$1}\->$shash->{$2}";
}
-   if ($body =~ /Priority\|(\w+)\s+\|(\w+)/m) {
-   push @outputs, 
"$phash->{$1}\->$phash->{$2}";
-   }
if ($body =~ /Keywords\|.*$/s) {
my @lines = split (/\n/, $&);
my $added = '';



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


[MediaWiki-CVS] SVN: [60871] trunk/phase3

2010-01-09 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60871

Revision: 60871
Author:   siebrand
Date: 2010-01-09 19:14:43 + (Sat, 09 Jan 2010)

Log Message:
---
Revert 60864: "Use wfClientAcceptsGzip() in wfGzipHandler." Causes PHP Notice:  
Undefined index:  HTTP_ACCEPT_ENCODING in GlobalFunctions.php on line 1175

Modified Paths:
--
trunk/phase3/RELEASE-NOTES
trunk/phase3/includes/GlobalFunctions.php
trunk/phase3/includes/OutputHandler.php

Modified: trunk/phase3/RELEASE-NOTES
===
--- trunk/phase3/RELEASE-NOTES  2010-01-09 19:04:35 UTC (rev 60870)
+++ trunk/phase3/RELEASE-NOTES  2010-01-09 19:14:43 UTC (rev 60871)
@@ -19,7 +19,6 @@
 it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 
 === Configuration changes in 1.16 ===
-
 * (bug 18222) $wgMinimalPasswordLength default is now 1
 * $wgSessionHandler can be used to configure session.save_handler
 * $wgLocalFileRepo/$wgForeignFileRepos now have a 'fileMode' parameter to
@@ -82,12 +81,12 @@
   similarly to the category namespace.
 * $wgEnableSorbs renamed to $wgDnsBlacklistUrls ($wgEnableSorbs kept for
   backward compatibility)
-* $wgUploadNavigationUrl now also affects images inline images that do not
-  exist. In that case the URL will get (?|&)wpDestFile= appended to
+* $wgUploadNavigationUrl now also affects images inline images that do not 
+  exist. In that case the URL will get (?|&)wpDestFile= appended to 
   it as appropriate.
 * If $wgLocaltimezone is null, use the server's timezone as the default for
   signatures. This was always the behaviour documented in DefaultSettings.php
-  but has not been the actual behaviour for some time: instead, UTC was used
+  but has not been the actual behaviour for some time: instead, UTC was used 
   by default.
 
 
@@ -660,10 +659,10 @@
   only displayed to the users that have "editinterface" right
 * (bug 21740) Attempting to protect a page that doesn't exist (salting) returns
   "unknown error"
-* (bug 18762) both redirects and links get fixed one after another if
+* (bug 18762) both redirects and links get fixed one after another if 
   redirects-only switch is not present
 * (bug 20159) thumbnails rerendered if older that $wgThumbnailEpoch
-* Fixed a bug which in some situations causes the job queue to grow forever,
+* Fixed a bug which in some situations causes the job queue to grow forever, 
   due to an infinite loop of job requeues.
 * (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have
   the page selector when they have only one page
@@ -694,8 +693,6 @@
 * (bug 2658) Don't attempt to set the TZ environment variable.
 * (bug 9794) User rights log entries for foreign user now links to the foreign
   user's page if possible
-* (bug 22034) Use wfClientAcceptsGzip() in wfGzipHandler instead of
-  reimplementing it.
 
 == API changes in 1.16 ==
 
@@ -766,8 +763,8 @@
 * (bug 21441) meta=userinfo&uiprop=options no longer returns default options
   for logged-in users under certain circumstances
 * (bug 21945) Add chomp control in YAML
-* Expand the thumburl to an absolute url to make it consistent with url and
-  descriptionurl
+* Expand the thumburl to an absolute url to make it consistent with url and 
+  descriptionurl 
 * (bug 20233) ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS
 
 === Languages updated in 1.16 ===

Modified: trunk/phase3/includes/GlobalFunctions.php
===
--- trunk/phase3/includes/GlobalFunctions.php   2010-01-09 19:04:35 UTC (rev 
60870)
+++ trunk/phase3/includes/GlobalFunctions.php   2010-01-09 19:14:43 UTC (rev 
60871)
@@ -1168,15 +1168,17 @@
  */
 function wfClientAcceptsGzip() {
global $wgUseGzip;
-   # FIXME: we may want to blacklist some broken browsers
-   $m = array();
-   if( preg_match(
-   '/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/',
-   $_SERVER['HTTP_ACCEPT_ENCODING'],
-   $m ) ) {
-   if( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 ) ) 
return false;
-   wfDebug( " accepts gzip\n" );
-   return true;
+   if( $wgUseGzip ) {
+   # FIXME: we may want to blacklist some broken browsers
+   $m = array();
+   if( preg_match(
+   '/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/',
+   $_SERVER['HTTP_ACCEPT_ENCODING'],
+   $m ) ) {
+   if( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 
) ) return false;
+   wfDebug( " accepts gzip\n" );
+   return true;
+   }
}
return false;
 }

Modified: trunk/phase3/includes/OutputHandler.php
===
--- trunk/phase3/includes/OutputHandler.php 2010-01-09 19:04:35 UTC (rev 
60870)
++

[MediaWiki-CVS] SVN: [60870] trunk/extensions/CanonicalHref/CanonicalHref.php

2010-01-09 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60870

Revision: 60870
Author:   siebrand
Date: 2010-01-09 19:04:35 + (Sat, 09 Jan 2010)

Log Message:
---
(bug 21173) Provide rel="canonical" for funky URL parameters and other things 
beyond redirects. Patch contributed by Jools Wills.

Comment in report: CanonicalHref does not work with the 1.16alpha skins. This 
patch makes it work. Changed the hook and used wgOut->addLink instead of 
$template->set('headlinks', $template->data['headlinks'] ... );

Modified Paths:
--
trunk/extensions/CanonicalHref/CanonicalHref.php

Modified: trunk/extensions/CanonicalHref/CanonicalHref.php
===
--- trunk/extensions/CanonicalHref/CanonicalHref.php2010-01-09 18:43:34 UTC 
(rev 60869)
+++ trunk/extensions/CanonicalHref/CanonicalHref.php2010-01-09 19:04:35 UTC 
(rev 60870)
@@ -11,7 +11,7 @@
  * https://wikia-code.com/wikia/trunk/extensions/wikia/HardRedirectsWithJSText/
  */
 
-$wgHooks['SkinTemplateOutputPageBeforeExec'][] = "canonicalHref";
+$wgHooks['BeforePageDisplay'][] = "canonicalHref";
 
 $wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
@@ -21,13 +21,13 @@
 );
 
 
-function canonicalHref(&$skin, &$template){
-$link = Xml::element("link", array(
-'rel' => 'canonical',
-'href' => $skin->mTitle->getFullURL()
+function canonicalHref(&$out, &$skin){
+$out->addLink(
+array(
+'rel' => 'canonical',
+'href' => $skin->mTitle->getFullURL()
 )
 );
-$template->set('headlinks', $template->data['headlinks'] . "\n" . 
$link . "\n");
 return true;
 }
 



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


[MediaWiki-CVS] SVN: [60869] trunk/extensions/SpamBlacklist/SpamBlacklist_body.php

2010-01-09 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60869

Revision: 60869
Author:   siebrand
Date: 2010-01-09 18:43:34 + (Sat, 09 Jan 2010)

Log Message:
---
(bug 21387) Make $ regex work for the URLs. Patch contributed by Platonides.

Bug comment: Set PCRE_MULTILINE on spamblacklist regexes. $ on spam blacklist 
regex should match the end of the url (not of the text) so it can be used to 
match only the mainpage. Since the candidate urls are already joined with a 
new-line separator, it's just setting PCRE_MULTILINE on the regex.

Modified Paths:
--
trunk/extensions/SpamBlacklist/SpamBlacklist_body.php

Modified: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php
===
--- trunk/extensions/SpamBlacklist/SpamBlacklist_body.php   2010-01-09 
18:39:26 UTC (rev 60868)
+++ trunk/extensions/SpamBlacklist/SpamBlacklist_body.php   2010-01-09 
18:43:34 UTC (rev 60869)
@@ -386,10 +386,10 @@
# Make regex
# It's faster using the S modifier even though it will usually 
only be run once
//$regex = 'https?://+[a-z0-9_\-.]*(' . implode( '|', $lines ) 
. ')';
-   //return '/' . str_replace( '/', '\/', preg_replace('|\\\*/|', 
'/', $regex) ) . '/Si';
+   //return '/' . str_replace( '/', '\/', preg_replace('|\\\*/|', 
'/', $regex) ) . '/Sim';
$regexes = array();
$regexStart = '/https?:\/\/+[a-z0-9_\-.]*(';
-   $regexEnd = ($batchSize > 0 ) ? ')/Si' : ')/i';
+   $regexEnd = ($batchSize > 0 ) ? ')/Sim' : ')/im';
$build = false;
foreach( $lines as $line ) {
if( substr( $line, -1, 1 ) == "\\" ) {



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


[MediaWiki-CVS] SVN: [60868] trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php

2010-01-09 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60868

Revision: 60868
Author:   siebrand
Date: 2010-01-09 18:39:26 + (Sat, 09 Jan 2010)

Log Message:
---
(bug 21496) Make WikiArticleFeed work with MediaWiki 1.16alpha. Patch by Jools 
Wills.

Comment by submitter: "I have simplified many of the regular expressions, 
although they should be enough to match only what they are supposed to. This 
patch includes making the extraction of the author/date/time work, with a 
simple -- or  signature."

Modified Paths:
--
trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php

Modified: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php
===
--- trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php  2010-01-09 
18:34:41 UTC (rev 60867)
+++ trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php  2010-01-09 
18:39:26 UTC (rev 60868)
@@ -2,7 +2,7 @@
 /*
  * WikiArticleFeeds.php - A MediaWiki extension for converting regular pages 
into feeds.
  * @author Jim R. Wilson
- * @version 0.6.3
+ * @version 0.6.5
  * @copyright Copyright (C) 2007 Jim R. Wilson
  * @license The MIT License - 
http://www.opensource.org/licenses/mit-license.php 
  * ---
@@ -35,6 +35,8 @@
  * {{#itemTags:dogs, cats}}
  * {{#itemTags:dogs|cats}}
  * Version Notes:
+ * version 0.6.5:
+ * Simplified many regular expression to get it working on MW 1.16
  * version 0.6.4:
  * Small fix for MW 1.14 in which section header anchors changed 
format.
  * First version to be checked into wikimedia SVN.
@@ -454,17 +456,19 @@
if ( $match < $lvl ) $lvl = $match;
}
 
+   $sectionRegExp = '#\s*\s*(.*?)\s*\s*#m';
+
# Determine the item titles and default item links
preg_match_all(
-  
'/]*\\s+name=([\'"])(.*?)\\1[^>]*><\\/a>\\s*(.*?)\\s*<\\/h' 
. $lvl . '>/m',
-  $feedContent,
+  $sectionRegExp,
+  $feedContent, 
   $matches
   );
-   $itemLinks = $matches[2];
-   $itemTitles = $matches[3];
+   $itemLinks = $matches[1];
+   $itemTitles = $matches[2];
 
# Split content into segments
-   $segments = preg_split( '/<\\/a>.*?<\\/h' . $lvl . '>/m', $feedContent );
+   $segments = preg_split( $sectionRegExp, $feedContent );
$segDesc = trim( strip_tags( array_shift( $segments ) ) );
if ( $segDesc ) {
if ( !$feedDescription ) {
@@ -505,26 +509,13 @@
# Determine the item author and date
$author = null;
$date = null;
-
+   $signatureRegExp = '#(.*?) (\d\d):(\d\d), (\d+) ([a-z]+) (\d{4}) \([A-Z]+\)#im';
# Look for a regular  sig
-   $isAttributable = preg_match(
-   
 '%]*href=([\'"])' . preg_quote( $wgScript ) . 
'(/|\\?title=)User:.*?\\1[^>]*>(.*?) (\\d\\d):(\\d\\d), (\\d+) 
([A-z][a-z]+) (\\d{4}) \\([A-Z]+\\)%m',
-   
 $seg,
-   
 $matches
-   
 );
+   $isAttributable = preg_match($signatureRegExp, $seg, 
$matches );
 
-   # As a fallback - look for a -- like sig with a 
user page outside the User NS
-   if ( !$isAttributable ) {
-   $isAttributable = preg_match(
-   
 '%--]*href=([\'"])' . preg_quote( $wgScript ) . 
'(/|\\?title=).*?\\1[^>]*>(.*?) (\\d\\d):(\\d\\d), (\\d+) ([A-z][a-z]+) 
(\\d{4}) \\([A-Z]+\\)%m',
-   
 $seg,
-   
 $matches
-   
 );
-   }
-
# Parse it out - if we can
if ( $isAttributable ) {
-   list( $author, $hour, $min, $day, $monthName, 
$year ) = array_slice( $matches, 3 );
+   list( $author, $hour, $min, $day, $monthName, 
$year ) = array_slice( $matches, 1 );
   

[MediaWiki-CVS] SVN: [60867] trunk/extensions/SemanticMediaWiki

2010-01-09 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60867

Revision: 60867
Author:   siebrand
Date: 2010-01-09 18:34:41 + (Sat, 09 Jan 2010)

Log Message:
---
(bug 21568) Add  Adding "before" and "after" hook for updateData and 
deleteSubject. Patch contributed by Roi Avinoam.

Modified Paths:
--
trunk/extensions/SemanticMediaWiki/README
trunk/extensions/SemanticMediaWiki/RELEASE-NOTES
trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php

Modified: trunk/extensions/SemanticMediaWiki/README
===
--- trunk/extensions/SemanticMediaWiki/README   2010-01-09 18:21:24 UTC (rev 
60866)
+++ trunk/extensions/SemanticMediaWiki/README   2010-01-09 18:34:41 UTC (rev 
60867)
@@ -47,7 +47,7 @@
 * Code has been contributed by (in no particular order) Kai Hüner, Fernando 
Correia,
   Yaron Koren, Nick Grandy, Jörg Heizmann, Daniel Herzig, Nikolas Iwan, Tobias 
Matzner,
   Thomas Bleher, Felix Kratzer, Frank Dengler, Nathan R. Yergler, Daniel 
Friesen,
-  Fabian Howahl, Jie Bao, Marcel Gsteiger
+  Fabian Howahl, Jie Bao, Marcel Gsteiger, Roi Avinoam
 
 * The new logo and related artwork for Semantic MediaWiki (see semanticweb.org)
   has been designed and realised by Rozana Vrandecic.

Modified: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES
===
--- trunk/extensions/SemanticMediaWiki/RELEASE-NOTES2010-01-09 18:21:24 UTC 
(rev 60866)
+++ trunk/extensions/SemanticMediaWiki/RELEASE-NOTES2010-01-09 18:34:41 UTC 
(rev 60867)
@@ -23,6 +23,7 @@
 for the selected format's parameters, and to use Ajax where possible
 * To that end, each format's query printer now includes a getParameters()
 function that supplies the name and attributes of each the format's parameters
+* "before" and "after" hooks for updateData and deleteSubject were added.
 
 == SMW 1.4.3 ==
 

Modified: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
===
--- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php   
2010-01-09 18:21:24 UTC (rev 60866)
+++ trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php   
2010-01-09 18:34:41 UTC (rev 60867)
@@ -585,6 +585,7 @@
 
public function deleteSubject(Title $subject) {
wfProfileIn('SMWSQLStore2::deleteSubject (SMW)');
+   wfRunHooks( 'SMWSQLStore2::deleteSubjectBefore', array( $this, 
$subject ) );

$this->deleteSemanticData(SMWWikiPageValue::makePageFromTitle($subject));
$this->updateRedirects($subject->getDBkey(), 
$subject->getNamespace()); // also delete redirects, may trigger update jobs!
if ($subject->getNamespace() == SMW_NS_CONCEPT) { // make sure 
to clear caches
@@ -597,11 +598,13 @@
///TODO: who is responsible for these updates? Some update jobs 
are currently created in SMW_Hooks, some internally in the store
///TODO: Possibly delete ID here (at least for 
non-properties/categories, if not used in any place in rels2)
///FIXME: clean internal caches here
+   wfRunHooks( 'SMWSQLStore2::deleteSubjectAfter', array( $this, 
$subject ) );
wfProfileOut('SMWSQLStore2::deleteSubject (SMW)');
}
 
public function updateData(SMWSemanticData $data) {
wfProfileIn("SMWSQLStore2::updateData (SMW)");
+   wfRunHooks( 'SMWSQLStore2::updateDataBefore', array( $this, 
$data ) );
$subject = $data->getSubject();
$this->deleteSemanticData($subject);
$redirects = 
$data->getPropertyValues(SMWPropertyValue::makeProperty('_REDI'));
@@ -662,6 +665,7 @@
// Finally update caches (may be important if jobs are directly 
following this call)
$this->m_semdata[$sid] = clone $data;
$this->m_sdstate[$sid] = 
array_keys(SMWSQLStore2::getPropertyTables()); // everything that one can know
+   wfRunHooks( 'SMWSQLStore2::updateDataAfter', array( $this, 
$data ) );
wfProfileOut("SMWSQLStore2::updateData (SMW)");
}
 



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


[MediaWiki-CVS] SVN: [60866] trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar. php

2010-01-09 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60866

Revision: 60866
Author:   siebrand
Date: 2010-01-09 18:21:24 + (Sat, 09 Jan 2010)

Log Message:
---
(bug 21754) Pass the event date to the template when used in format=calendar. 
Patch contributed by Jack D. Pond.

Modified Paths:
--
trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php

Modified: trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php
===
--- trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php
2010-01-09 18:14:51 UTC (rev 60865)
+++ trunk/extensions/SemanticResultFormats/Calendar/SRF_Calendar.php
2010-01-09 18:21:24 UTC (rev 60866)
@@ -341,7 +341,7 @@
list($event_title, $other_text, $event_date, 
$color) = $event;
if ($event_date == $date_str) {
if ($this->mTemplate != '') {
-   $templatetext = '{{' . 
$this->mTemplate . $other_text . '}}';
+   $templatetext = '{{' . 
$this->mTemplate . $other_text .'|thisdate=' . $date_str . '}}';
$templatetext = 
$wgParser->replaceVariables($templatetext);
$templatetext = 
$wgParser->recursiveTagParse($templatetext);
$text .= $templatetext;



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


[MediaWiki-CVS] SVN: [60865] trunk/extensions/DoubleWiki/DoubleWiki.php

2010-01-09 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60865

Revision: 60865
Author:   siebrand
Date: 2010-01-09 18:14:51 + (Sat, 09 Jan 2010)

Log Message:
---
(bug 21827) Make DoubleWiki output appropriate lang attributes for languages. 
Patch by Bawolff.

Modified Paths:
--
trunk/extensions/DoubleWiki/DoubleWiki.php

Modified: trunk/extensions/DoubleWiki/DoubleWiki.php
===
--- trunk/extensions/DoubleWiki/DoubleWiki.php  2010-01-09 18:10:11 UTC (rev 
60864)
+++ trunk/extensions/DoubleWiki/DoubleWiki.php  2010-01-09 18:14:51 UTC (rev 
60865)
@@ -92,7 +92,7 @@
 
#do the job
$text = matchColumns ( $text, $myLanguage, 
$myURL , 
-  $translation, 
$languageName, $url );
+  $translation, 
$languageName, $url, $wgContLanguageCode, $match_request );
}
return true;
}
@@ -106,7 +106,7 @@
  * Text is split into slices based on title tags
  */
 
-function matchColumns( $left_text, $left_title, $left_url, $right_text, 
$right_title, $right_url ){
+function matchColumns( $left_text, $left_title, $left_url, $right_text, 
$right_title, $right_url, $left_lang_code, $right_lang_code ){
 
# note about emdedding: 
# text is split only at a single level. 
@@ -251,12 +251,12 @@
if( ( ($left_nesting == $left_splitlevel) 
  && ($right_nesting == $right_splitlevel) 
) || $the_end)  {
$body .= 
-   ""
+   ""
."\n"

.$left_prefix.$left_bits[$l].$left_suffix
.""
 
-   ."\n"
+   ."\n"
."\n"

.$right_prefix.$right_bits[$l].$right_suffix
.""
@@ -286,9 +286,9 @@
$head = 
 "
 
-
+
 {$left_title}
-
+
 {$right_title}
 \n";
return $head.$body."" ;



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


[MediaWiki-CVS] SVN: [60864] trunk/phase3

2010-01-09 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60864

Revision: 60864
Author:   siebrand
Date: 2010-01-09 18:10:11 + (Sat, 09 Jan 2010)

Log Message:
---
(bug 22034) Use wfClientAcceptsGzip() in wfGzipHandler. Patch by Platonides.

wfGzipHandler should use wfClientAcceptsGzip() instead of reimplementing it. 
Patch does this and removes the $wgUseGzip check on wfClientAcceptsGzip() since 
HTMLFileCache (the only wfClientAcceptsGzip() user) already checked that before 
calling it. This way $wgUseGzip stays applying only for file cache, and 
$wgDisableOutputCompression for output handler.

Modified Paths:
--
trunk/phase3/RELEASE-NOTES
trunk/phase3/includes/GlobalFunctions.php
trunk/phase3/includes/OutputHandler.php

Modified: trunk/phase3/RELEASE-NOTES
===
--- trunk/phase3/RELEASE-NOTES  2010-01-09 18:02:57 UTC (rev 60863)
+++ trunk/phase3/RELEASE-NOTES  2010-01-09 18:10:11 UTC (rev 60864)
@@ -19,6 +19,7 @@
 it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 
 === Configuration changes in 1.16 ===
+
 * (bug 18222) $wgMinimalPasswordLength default is now 1
 * $wgSessionHandler can be used to configure session.save_handler
 * $wgLocalFileRepo/$wgForeignFileRepos now have a 'fileMode' parameter to
@@ -81,12 +82,12 @@
   similarly to the category namespace.
 * $wgEnableSorbs renamed to $wgDnsBlacklistUrls ($wgEnableSorbs kept for
   backward compatibility)
-* $wgUploadNavigationUrl now also affects images inline images that do not 
-  exist. In that case the URL will get (?|&)wpDestFile= appended to 
+* $wgUploadNavigationUrl now also affects images inline images that do not
+  exist. In that case the URL will get (?|&)wpDestFile= appended to
   it as appropriate.
 * If $wgLocaltimezone is null, use the server's timezone as the default for
   signatures. This was always the behaviour documented in DefaultSettings.php
-  but has not been the actual behaviour for some time: instead, UTC was used 
+  but has not been the actual behaviour for some time: instead, UTC was used
   by default.
 
 
@@ -659,10 +660,10 @@
   only displayed to the users that have "editinterface" right
 * (bug 21740) Attempting to protect a page that doesn't exist (salting) returns
   "unknown error"
-* (bug 18762) both redirects and links get fixed one after another if 
+* (bug 18762) both redirects and links get fixed one after another if
   redirects-only switch is not present
 * (bug 20159) thumbnails rerendered if older that $wgThumbnailEpoch
-* Fixed a bug which in some situations causes the job queue to grow forever, 
+* Fixed a bug which in some situations causes the job queue to grow forever,
   due to an infinite loop of job requeues.
 * (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have
   the page selector when they have only one page
@@ -693,6 +694,8 @@
 * (bug 2658) Don't attempt to set the TZ environment variable.
 * (bug 9794) User rights log entries for foreign user now links to the foreign
   user's page if possible
+* (bug 22034) Use wfClientAcceptsGzip() in wfGzipHandler instead of
+  reimplementing it.
 
 == API changes in 1.16 ==
 
@@ -763,8 +766,8 @@
 * (bug 21441) meta=userinfo&uiprop=options no longer returns default options
   for logged-in users under certain circumstances
 * (bug 21945) Add chomp control in YAML
-* Expand the thumburl to an absolute url to make it consistent with url and 
-  descriptionurl 
+* Expand the thumburl to an absolute url to make it consistent with url and
+  descriptionurl
 * (bug 20233) ApiLogin::execute() doesn't handle LoginForm :: RESET_PASS
 
 === Languages updated in 1.16 ===

Modified: trunk/phase3/includes/GlobalFunctions.php
===
--- trunk/phase3/includes/GlobalFunctions.php   2010-01-09 18:02:57 UTC (rev 
60863)
+++ trunk/phase3/includes/GlobalFunctions.php   2010-01-09 18:10:11 UTC (rev 
60864)
@@ -1168,17 +1168,15 @@
  */
 function wfClientAcceptsGzip() {
global $wgUseGzip;
-   if( $wgUseGzip ) {
-   # FIXME: we may want to blacklist some broken browsers
-   $m = array();
-   if( preg_match(
-   '/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/',
-   $_SERVER['HTTP_ACCEPT_ENCODING'],
-   $m ) ) {
-   if( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 
) ) return false;
-   wfDebug( " accepts gzip\n" );
-   return true;
-   }
+   # FIXME: we may want to blacklist some broken browsers
+   $m = array();
+   if( preg_match(
+   '/\bgzip(?:;(q)=([0-9]+(?:\.[0-9]+)))?\b/',
+   $_SERVER['HTTP_ACCEPT_ENCODING'],
+   $m ) ) {
+   if( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 ) ) 
return false;
+   wfDebug( " accept

[MediaWiki-CVS] SVN: [60863] trunk/extensions/timeline/Timeline.php

2010-01-09 Thread siebrand
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60863

Revision: 60863
Author:   siebrand
Date: 2010-01-09 18:02:57 + (Sat, 09 Jan 2010)

Log Message:
---
(bug 21948) Cached timelines have the wrong links between secure server and 
normal. Patch by Platonides.

Modified Paths:
--
trunk/extensions/timeline/Timeline.php

Modified: trunk/extensions/timeline/Timeline.php
===
--- trunk/extensions/timeline/Timeline.php  2010-01-09 15:23:27 UTC (rev 
60862)
+++ trunk/extensions/timeline/Timeline.php  2010-01-09 18:02:57 UTC (rev 
60863)
@@ -44,8 +44,10 @@
 }
 
 function renderTimeline( $timelinesrc ){
-   global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, 
$wgArticlePath, $wgTmpDirectory;
+   global $wgUploadDirectory, $wgUploadPath, $IP, $wgTimelineSettings, 
$wgArticlePath, $wgTmpDirectory, $wgRenderHashAppend;
$hash = md5( $timelinesrc );
+   if ($wgRenderHashAppend != "")
+   $hash = md5( $hash . $wgRenderHashAppend );
$dest = $wgUploadDirectory."/timeline/";
if ( ! is_dir( $dest ) ) { mkdir( $dest, 0777 ); }
if ( ! is_dir( $wgTmpDirectory ) ) { mkdir( $wgTmpDirectory, 0777 ); }
@@ -102,7 +104,7 @@
$map = "{$map}";
$map = easyTimelineFixMap( $map );
 
-   if( substr( php_uname(), 0, 7 ) == "Windows" ) {
+   if (wfIsWindows()) {
$ext = "gif";
} else {
$ext = "png";
@@ -110,7 +112,7 @@
 
$url = "{$wgUploadPath}/timeline/{$hash}.{$ext}";
$txt = $map .
-   "";
 
if( $expired ) {



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


[MediaWiki-CVS] SVN: [60862] trunk/phase3

2010-01-09 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60862

Revision: 60862
Author:   ialex
Date: 2010-01-09 15:23:27 + (Sat, 09 Jan 2010)

Log Message:
---
* (bug 9794) User rights log entries for foreign user now links to the foreign 
user's page if possible

Modified Paths:
--
trunk/phase3/RELEASE-NOTES
trunk/phase3/includes/LogPage.php
trunk/phase3/includes/WikiMap.php

Modified: trunk/phase3/RELEASE-NOTES
===
--- trunk/phase3/RELEASE-NOTES  2010-01-09 15:05:14 UTC (rev 60861)
+++ trunk/phase3/RELEASE-NOTES  2010-01-09 15:23:27 UTC (rev 60862)
@@ -691,6 +691,8 @@
 * (bug 20115) Special:Userlogin title says "Log in / create account" even if 
the
   user can't create an account
 * (bug 2658) Don't attempt to set the TZ environment variable.
+* (bug 9794) User rights log entries for foreign user now links to the foreign
+  user's page if possible
 
 == API changes in 1.16 ==
 

Modified: trunk/phase3/includes/LogPage.php
===
--- trunk/phase3/includes/LogPage.php   2010-01-09 15:05:14 UTC (rev 60861)
+++ trunk/phase3/includes/LogPage.php   2010-01-09 15:23:27 UTC (rev 60862)
@@ -291,7 +291,7 @@
}

protected static function getTitleLink( $type, $skin, $title, &$params 
) {
-   global $wgLang, $wgContLang;
+   global $wgLang, $wgContLang, $wgUserrightsInterwikiDelimiter;
if( !$skin ) {
return $title->getPrefixedText();
}
@@ -327,6 +327,13 @@
break;
case 'rights':
$text = $wgContLang->ucfirst( $title->getText() 
);
+   $parts = explode( 
$wgUserrightsInterwikiDelimiter, $text, 2 );
+   if ( count( $parts ) == 2 ) {
+   $titleLink = WikiMap::foreignUserLink( 
$parts[1], $parts[0],
+   htmlspecialchars( 
$title->getPrefixedText() ) );
+   if ( $titleLink !== false )
+   break;
+   }
$titleLink = $skin->link( Title::makeTitle( 
NS_USER, $text ) );
break;
case 'merge':

Modified: trunk/phase3/includes/WikiMap.php
===
--- trunk/phase3/includes/WikiMap.php   2010-01-09 15:05:14 UTC (rev 60861)
+++ trunk/phase3/includes/WikiMap.php   2010-01-09 15:23:27 UTC (rev 60862)
@@ -33,18 +33,22 @@
return $wiki_id;
}

-   static function foreignUserLink( $wiki_id, $user ) {
-   return self::makeForeignLink( $wiki_id, "User:$user" );
+   static function foreignUserLink( $wiki_id, $user, $text=null ) {
+   return self::makeForeignLink( $wiki_id, "User:$user", $text );
}

static function makeForeignLink( $wiki_id, $page, $text=null ) {
global $wgUser;
$sk = $wgUser->getSkin();
-   
-   if (!$text)
+
+   if ( !$text )
$text=$page;
-   
-   return $sk->makeExternalLink( self::getForeignURL( $wiki_id, 
$page ) , $text );
+
+   $url = self::getForeignURL( $wiki_id, $page );
+   if ( $url === false )
+   return false;
+
+   return $sk->makeExternalLink( $url, $text );
}

static function getForeignURL( $wiki_id, $page ) {



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


[MediaWiki-CVS] SVN: [60860] trunk/phase3/includes

2010-01-09 Thread maxsem
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60860

Revision: 60860
Author:   maxsem
Date: 2010-01-09 14:30:55 + (Sat, 09 Jan 2010)

Log Message:
---
Severely refactored the SearchResultSet descendants system, consolidating most 
od the code into one class. Ping r58322.

Modified Paths:
--
trunk/phase3/includes/AutoLoader.php
trunk/phase3/includes/search/SearchEngine.php
trunk/phase3/includes/search/SearchIBM_DB2.php
trunk/phase3/includes/search/SearchMySQL.php
trunk/phase3/includes/search/SearchOracle.php
trunk/phase3/includes/search/SearchPostgres.php
trunk/phase3/includes/search/SearchSqlite.php

Modified: trunk/phase3/includes/AutoLoader.php
===
--- trunk/phase3/includes/AutoLoader.php2010-01-09 13:53:57 UTC (rev 
60859)
+++ trunk/phase3/includes/AutoLoader.php2010-01-09 14:30:55 UTC (rev 
60860)
@@ -466,9 +466,7 @@
'MWTidy' => 'includes/parser/Tidy.php',
 
# includes/search
-   'IBM_DB2SearchResultSet' => 'includes/search/SearchIBM_DB2.php',
'MySQLSearchResultSet' => 'includes/search/SearchMySQL.php',
-   'OracleSearchResultSet' => 'includes/search/SearchOracle.php',
'PostgresSearchResult' => 'includes/search/SearchPostgres.php',
'PostgresSearchResultSet' => 'includes/search/SearchPostgres.php',
'SearchEngineDummy' => 'includes/search/SearchEngine.php',
@@ -486,6 +484,7 @@
'SearchUpdate' => 'includes/search/SearchUpdate.php',
'SearchUpdateMyISAM' => 'includes/search/SearchUpdate.php',
'SqliteSearchResultSet' => 'includes/search/SearchSqlite.php',
+   'SqlSearchResultSet' => 'includes/search/SearchEngine.php',
 
# includes/specials
'SpecialAllmessages' => 'includes/specials/SpecialAllmessages.php',

Modified: trunk/phase3/includes/search/SearchEngine.php
===
--- trunk/phase3/includes/search/SearchEngine.php   2010-01-09 13:53:57 UTC 
(rev 60859)
+++ trunk/phase3/includes/search/SearchEngine.php   2010-01-09 14:30:55 UTC 
(rev 60860)
@@ -512,7 +512,38 @@
}
 }
 
+/**
+ * This class is used for different SQL-based search engines shipped with 
MediaWiki
+ */
+class SqlSearchResultSet extends SearchResultSet {
+   function __construct( $resultSet, $terms ) {
+   $this->mResultSet = $resultSet;
+   $this->mTerms = $terms;
+   }
 
+   function termMatches() {
+   return $this->mTerms;
+   }
+
+   function numRows() {
+   return $this->mResultSet->numRows();
+   }
+
+   function next() {
+   if ($this->mResultSet === false )
+   return false;
+
+   $row = $this->mResultSet->fetchObject();
+   if ($row === false)
+   return false;
+   return new SearchResult($row);
+   }
+
+   function free() {
+   $this->mResultSet->free();
+   }
+}
+
 /**
  * @ingroup Search
  */

Modified: trunk/phase3/includes/search/SearchIBM_DB2.php
===
--- trunk/phase3/includes/search/SearchIBM_DB2.php  2010-01-09 13:53:57 UTC 
(rev 60859)
+++ trunk/phase3/includes/search/SearchIBM_DB2.php  2010-01-09 14:30:55 UTC 
(rev 60860)
@@ -35,22 +35,22 @@
 * Perform a full text search query and return a result set.
 *
 * @param $term String: raw search term
-* @return IBM_DB2SearchResultSet
+* @return SqlSearchResultSet
 */
function searchText( $term ) {
$resultSet = 
$this->db->resultObject($this->db->query($this->getQuery($this->filter($term), 
true)));
-   return new IBM_DB2SearchResultSet($resultSet, 
$this->searchTerms);
+   return new SqlSearchResultSet($resultSet, $this->searchTerms);
}
 
/**
 * Perform a title-only search query and return a result set.
 *
 * @param $term String: taw search term
-* @return IBM_DB2SearchResultSet
+* @return SqlSearchResultSet
 */
function searchTitle($term) {
$resultSet = 
$this->db->resultObject($this->db->query($this->getQuery($this->filter($term), 
false)));
-   return new MySQLSearchResultSet($resultSet, $this->searchTerms);
+   return new SqlSearchResultSet($resultSet, $this->searchTerms);
}
 
 
@@ -222,28 +222,3 @@
array());
}
 }
-
-/**
- * @ingroup Search
- */
-class IBM_DB2SearchResultSet extends SearchResultSet {
-   function __construct($resultSet, $terms) {
-   $this->mResultSet = $resultSet;
-   $this->mTerms = $terms;
-   }
-
-   function termMatches() {
-   return $this->mTerms;
-   }
-
-   function numRows() {
-  

[MediaWiki-CVS] SVN: [60859] trunk

2010-01-09 Thread ialex
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60859

Revision: 60859
Author:   ialex
Date: 2010-01-09 13:53:57 + (Sat, 09 Jan 2010)

Log Message:
---
svn:eol-style native

Property Changed:

trunk/extensions/SemanticTasks/SemanticTasks.classes.php
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.core.js
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.datepicker.js
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.dialog.js
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.draggable.js
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.resizable.js
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.tabs.js
trunk/phase3/tests/LanguageConverterTest.php


Property changes on: trunk/extensions/SemanticTasks/SemanticTasks.classes.php
___
Added: svn:eol-style
   + native


Property changes on: 
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.core.js
___
Added: svn:eol-style
   + native


Property changes on: 
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.datepicker.js
___
Added: svn:eol-style
   + native


Property changes on: 
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.dialog.js
___
Added: svn:eol-style
   + native


Property changes on: 
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.draggable.js
___
Added: svn:eol-style
   + native


Property changes on: 
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.resizable.js
___
Added: svn:eol-style
   + native


Property changes on: 
trunk/extensions/UsabilityInitiative/js/js2stopgap/ui.tabs.js
___
Added: svn:eol-style
   + native


Property changes on: trunk/phase3/tests/LanguageConverterTest.php
___
Added: svn:eol-style
   + native



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