-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
tstarling(a)svn.wikimedia.org wrote:
> - $file = new Image( $title );
> - if ( $file->exists() ) {
> + $file = function_exists( 'wfFindFile' ) ? wfFindFile( $title ) : new Image( $title );
> + if ( $file && $file->exists() ) {
Just a thought -- would it be cleaner to use the old
Image::newFromTitle() factory method for this?
Changing it to call wfFindFile(), it would be backwards-compatible
without making the explicit checks in the extension code.
- -- brion vibber (brion @ wikimedia.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGXIIewRnhpk1wk44RArv8AKDYAhoiZ2yKlFEaEwltgdlrHXNmeACgm/MH
UTxTgyn+im5LQ4sG143Zm9A=
=VxIl
-----END PGP SIGNATURE-----
aaron(a)svn.wikimedia.org wrote:
> Revision: 22496
> Author: aaron
> Date: 2007-05-27 21:23:59 -0700 (Sun, 27 May 2007)
>
> Log Message:
> -----------
> *use /s modifier for parseinline regexp, <p> tags were being left on some messages
>
> Modified Paths:
> --------------
> trunk/phase3/includes/GlobalFunctions.php
> Modified: trunk/phase3/includes/GlobalFunctions.php
> ===================================================================
> --- trunk/phase3/includes/GlobalFunctions.php 2007-05-28 02:57:35 UTC (rev 22495)
> +++ trunk/phase3/includes/GlobalFunctions.php 2007-05-28 04:23:59 UTC (rev 22496)
> @@ -592,7 +592,7 @@
> } elseif ( in_array('parseinline', $options) ) {
> $string = $wgOut->parse( $string, true, true );
> $m = array();
> - if( preg_match( "~^<p>(.*)\n?</p>$~", $string, $m ) ) {
> + if( preg_match( '/^<p>(.*)\n?<\/p>$/s', $string, $m ) ) {
> $string = $m[1];
> }
> } elseif ( in_array('parsemag', $options) ) {
>
This change caused a regression in the watchlist: it added a whitespace in the
page, between "Below are the last x changes..." and "Show last 1 | 2 | 6 | 12
hours...". It is so because the parsed message (rcnote, I think) contains after
the parse a newline mark before the </p> tag, and it is not stripped (because
included in the brackets, thus in $m[1]). Since the "\n" mark (after the
brackets in the regexp) is optional, the regexp engine seems to think the "\n"
char is not the "\n?", but included in "(.*)" (as "." can include a newline).
This should be somehow fixed, as the newline causes this whitespace.
I just noticed this, but the current "User is blocked" content finally
includes the Block's Block ID!
Thanks, developers.
--
-george william herbert
george.herbert(a)gmail.com
I'm writing a ArticleAfterFetchContent hook:
$wgHooks['ArticleAfterFetchContent'][] = 'myArticleAfterFetchContent';
function myArticleAfterFetchContent (&$article) { ... }
Inside myArticleAfterFetchContent, how do I tell if the user is
in edit/view source mode?
A hacky way that almost works: if (isset($article->mMinorEdit)) {...}
This works fine if the user has permission to edit, but not when I'm
using the "view source" hack (user who can't edit can still view the
source):
$wgHooks['userCan'][] = 'fnMyUserCan';
function fnMyUserCan ($title, $user, $action, $result) {
if (($action == 'edit') && $user->isAnon()) {$result = false;}
}
What's the correct way of telling if a user is edit mode, even if he's
viewing the source? I don't want my hook to run in this case, because
I want people to see/edit what's stored in the MySQL backend *before*
my hook processes it.
--
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
Hi, many thanks. I admit I had suspected that indeed. So, I'd have a couple of questions more, please.
1) Does the caching simply imply a delay in the dynamical effects, or rather a chaotic behaviour (for instance, do the dynamic effects depend on the number of users that contact wikipedia on a given day, and so on)?
2) How can I use an "autonomous" bot?
Thank you very much.
Claudi
---------------------------------
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
An automated run of parserTests.php showed the following failures:
This is MediaWiki version 1.11alpha (r22530).
Reading tests from "maintenance/parserTests.txt"...
Reading tests from "extensions/Cite/citeParserTests.txt"...
Reading tests from "extensions/Poem/poemParserTests.txt"...
18 still FAILING test(s) :(
* URL-encoding in URL functions (single parameter) [Has never passed]
* URL-encoding in URL functions (multiple parameters) [Has never passed]
* Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html) [Has never passed]
* Link containing double-single-quotes '' (bug 4598) [Has never passed]
* message transform: <noinclude> in transcluded template (bug 4926) [Has never passed]
* message transform: <onlyinclude> in transcluded template (bug 4926) [Has never passed]
* BUG 1887, part 2: A <math> with a thumbnail- math enabled [Has never passed]
* HTML bullet list, unclosed tags (bug 5497) [Has never passed]
* HTML ordered list, unclosed tags (bug 5497) [Has never passed]
* HTML nested bullet list, open tags (bug 5497) [Has never passed]
* HTML nested ordered list, open tags (bug 5497) [Has never passed]
* Fuzz testing: image with bogus manual thumbnail [Introduced between 08-Apr-2007 07:15:22, 1.10alpha (r21099) and 25-Apr-2007 07:15:46, 1.10alpha (r21547)]
* Inline HTML vs wiki block nesting [Has never passed]
* Mixing markup for italics and bold [Has never passed]
* dt/dd/dl test [Has never passed]
* Images with the "|" character in the comment [Has never passed]
* Parents of subpages, two levels up, without trailing slash or name. [Has never passed]
* Parents of subpages, two levels up, with lots of extra trailing slashes. [Has never passed]
Passed 495 of 513 tests (96.49%)... 18 tests failed!
Hello,
we have tried to extend our local (Lmo) mediawiki to adapt the interface (at least a bit) to dialect variation of the Lombard language.
To be precise, the
http://lmo.wikipedia.org/wiki/mediawiki:sidebar
has been replaced with the template
{{Sidebar {{#expr: {{CURRENTDAY}} mod 2}}}}
which should make the two templates {{Sidebar 0}} and {{Sidebar 1}} appear, the former on even days, the latter on odd days. The sidebar should change accordingly; unfortunately, this does not seem to work:
while
http://lmo.wikipedia.org/wiki/mediawiki:sidebar
displays (as such) a correct alternation of {{Sidebar 0}} and {{Sidebar1}}, the actual sidebar always matches {{Sidebar 1}}. Can you explain this, please? Is perhaps the 0 the cause of this and should we replace {{Sidebar {{#expr: {{CURRENTDAY}} mod 2}}}}
with {{Sidebar {{#expr: {{CURRENTDAY}} mod 2 + 2}}}} and {{Sidebar 0}} and {{Sidebar1}} with {{Sidebar 2}} and {{Sidebar3}}? Or, perhaps, does each item in the menu need its own alternating template?
Thank you.
Cheers,
Claudi
---------------------------------
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
Hi Brion, Tim et al,
Would you do me a favor To pick candidates up from your personal contacts
and http://svn.wikimedia.org/users.php for Wikimania 2007 Hacking Days? For
a small and beauty activity, I guess you won't want more than 20 hackers.
I will provide registration guidance to the candidate who have not
registered yet.
To ensure Wikimania 2007 Hacking Days matching the expectation of you,
we encourage invited hackers propose your 2 days developing plan to Brion
and Tim, and leave logistics issues to Wikimania Preparing Group. Just like
http://wikimania2007.wikimedia.org/wiki/Hacking_days said.
Here's some IRC logs:
04:40 < yurikny> any organizers here?
04:41 * yurikny wonders whom to bug re hacking days
05:41 < b6s> yurikny: hacking days or hacking days extra?
05:42 < b6s> yurikny: hacking days is invited only for mediawiki core
developers. since you're the founder of wikipedai api, i bet
you're in.
05:58 < b6s> yurikny: if you are or anyone who here is interesting in
attending
hacking days, I guess Brion or Tim can decide. For hacking days
extra which is opened to everyone, please contact me.
barabbas_AT_gmail_DOT_com
07:10 < yurikny> b6s: hmm, well i spoke with brion, and he has no clue how
these invite things go :)
07:11 < yurikny> seems like noone has any clue really
07:11 < yurikny> hence - need to find the organizer :)
15:15 < b6s> yurikny: if you, Brion and Tim can decide to invite whom is
in the
list http://svn.wikimedia.org/users.php , we will provide him/her
the guidance of registration. some of them may had already
registered. for the content of hacking day, i guess it will focus
tightly on mediawiki "real" hackings, without or with a few talks.
15:20 < yurikny> thanks b6s
15:17 <yurikny> i will speak with brion in a few days about it
Cheers,
/Mike/
_______________________________________________
Wikimania_lists.wikimedia.de mailing list
wikimania(a)lists.wikimedia.de
http://ml01.ispgateway.de/mailman/listinfo/wikimania_lists.wikimedia.de
On 5/27/07, hashar(a)svn.wikimedia.org <hashar(a)svn.wikimedia.org> wrote:
> Revision: 22473
> Author: hashar
> Date: 2007-05-27 01:22:37 -0700 (Sun, 27 May 2007)
>
> ...
>
> + $wgOut->addHtml( XML::openElement( 'div', array('id' => 'mw-spcontent') ) );
This creates duplicate id's for, e.g., {{Special:Wantedpages}}
{{Special:Wantedpages}}, and probably more plausible input strings as
well. You may want to add the id only if the special page is not
being included in another page.