Commit graph

25100 commits

Author SHA1 Message Date
Sam Reed
daa4e524b7 More occurrence typos 2012-03-19 21:40:39 +00:00
Alexandre Emsenhuber
15a4786f2f Make the first line of debug log more consitent between CLI and web call by putting the method and the URL directly on the first line 2012-03-19 20:52:59 +00:00
Jeroen De Dauw
dbf072fa2f make more generic: do not assume we want to add html to the output. Also get rid of action=purge from key args 2012-03-19 20:51:36 +00:00
Jeroen De Dauw
0b77d229d0 fix for r114164 2012-03-19 20:05:11 +00:00
Jeroen De Dauw
ced465ae1e update docs 2012-03-19 19:24:04 +00:00
Jeroen De Dauw
e25c99fdfd some refactoring to allow for nicer usage in deriving classes 2012-03-19 18:40:54 +00:00
Aaron Schulz
7c54a34730 Reverted r113688, r113691 per CR and filed #61440 upstream. 2012-03-19 18:28:47 +00:00
Alexandre Emsenhuber
9402eab438 * Use local context to get message
* Use $this->getTitle() instead of SpecialPage::getTitleFor( 'Preferences' )
2012-03-19 17:09:23 +00:00
Jeroen De Dauw
f8681506e0 Follow up to r114081; address krinkles comment 2012-03-19 16:14:05 +00:00
Krinkle
bc1e6dd08c [Html::namespaceSelector clean up] fix broken html from r114131 2012-03-19 14:34:27 +00:00
Jeroen De Dauw
ca052e9c20 Follow up to r114081; 2012-03-19 13:47:58 +00:00
Alexandre Emsenhuber
f267f37320 Change calls from Xml::namespaceSelector() to Html::namespaceSelector() since the former now throws deprecation warnings... 2012-03-19 12:30:52 +00:00
Christian Aistleitner
0954fc366f Sanitizing already existing use of PHP's assert 2012-03-19 11:14:43 +00:00
Alexandre Emsenhuber
eb5e031f31 * (bug 35303) Make proxy and DNS blacklist blocking work again 2012-03-18 22:19:00 +00:00
Jeroen De Dauw
a8f68c22a1 follow up to r114081: qqq, and to r114082: match rename 2012-03-18 16:27:37 +00:00
Sam Reed
a2dc33a5a3 Trim trailing whitespace
Add/improve documentation

Explicitly define a few variables
2012-03-17 22:52:54 +00:00
Jeroen De Dauw
b2134bbd0e adding special page with scaffolding for caching chunks of HTML 2012-03-17 22:26:02 +00:00
Siebrand Mazeland
7521a3ffa4 Follow-up r113939: Add divs to addWikiText(). 2012-03-17 21:19:31 +00:00
Thomas Gries
c049019039 follow up r113862 . changed public function name extensionTableExists to tableExists 2012-03-17 08:22:58 +00:00
Benny Situ
37f6d5f7fb fix for bug33214 - catch all exceptions in api execute and provides necessary parameters required by the custom printer 2012-03-17 02:23:06 +00:00
Sam Reed
9a4b6317f3 Make UsageException extend MWException 2012-03-16 02:02:41 +00:00
Tim Starling
f15a91f293 In the $clearState=true case, remove strip marker prefixes from the Parser::parse() input. It's only possible for strip markers to be present in this case if the caller manages to guess the output of Parser::getRandomString() in advance. Even if that is possible, it's not recommended as a robust calling procedure.
Also cleaned up some old commented-out code in this area.
2012-03-16 00:29:26 +00:00
Jeroen De Dauw
4febcf9cc1 docs++ 2012-03-15 22:40:27 +00:00
Aaron Schulz
20cba799d7 [FileRepo] Tweaked transformErrorOutput() to allow more useful error output (like backend errors) for problems moving thumbnails into storage. 2012-03-15 20:37:58 +00:00
Aaron Schulz
701152e10f * r113886: use <div> instead of span to wrap element that has p tags.
* Also fixed an older instance of the same problem.
2012-03-15 17:50:55 +00:00
Max Semenik
632c6281c7 Bug 35051 - [Regression] If heading has a trailing space after == then its name is not preloaded into edit summary on section edit. Regression from r105380. 2012-03-15 15:21:46 +00:00
Aaron Schulz
fcaf3f3941 Fixed 'Illegal string offset 'LIMIT' in <b>C:\wamp\www\MediaWiki\includes\db\Database.php</b> on line <b>1462</b>' 2012-03-15 04:34:22 +00:00
Marcin Cieślak
3ebbdc7d0d Followup-To: r113888 Remove extra wfDebug() 2012-03-15 02:00:16 +00:00
Marcin Cieślak
de5222aedf Unbreak maintenance/deleteDefaultMessages.php for PostgreSQL
deleteDefaultMessages.php was failing during upgrade
from MediaWiki 1.7.3 with a databaser error.

A stub user:

   $user = User::newFromName( 'MediaWiki default' );

has user ID 0, so that $user->isAnon() is true.

Unfortunately, ManualLogEntry::publish() from r96441
tries to insert $user->getName() ("MediaWiki default")
into rc_ip.

PostgreSQL won't allow this, because rc_ip is of 
Postgres-specific CIDR type.

Traceback:

Checking existence of old default messages...
...deleting old default messages (this may take a long time!)...A database query syntax error has occurred.
The last attempted database query was:
"INSERT INTO "recentchanges" (rc_timestamp,rc_cur_time,rc_namespace,rc_title,rc_type,rc_minor,rc_user,rc_user_text,rc_comment,rc_this_oldid,rc_last_oldid,rc_bot,rc_moved_to_ns,rc_moved_to_title,rc_ip,rc_patrolled,rc_new,rc_old_len,rc_new_len,rc_deleted,rc_logid,rc_log_type,rc_log_action,rc_params,rc_id) VALUES ('2012-03-14 21:51:05 GMT','2012-03-14 21:51:05 GMT','8','1movedto2','3','0','0','MediaWiki default','No longer required','0','0',1,'0','','MediaWiki default','1','0',NULL,NULL,'0','1','delete','delete','a:0:{}','1')"
from within function "RecentChange::save".
MySQL returned error "1: ERROR:  invalid input syntax for type cidr: "MediaWiki default"
LINE 1: ...ki default','No longer required','0','0',1,'0','','MediaWiki...
                                                             ^"
Backtrace:
#0 /usr/home/saper/public_html/pg/w/includes/db/DatabasePostgres.php(332): DatabaseBase->reportQueryError('ERROR:  invalid...', 1, 'INSERT INTO "re...', 'RecentChange::s...', '')
#1 /usr/home/saper/public_html/pg/w/includes/db/Database.php(904): DatabasePostgres->reportQueryError('ERROR:  invalid...', 1, 'INSERT INTO "re...', 'RecentChange::s...', '')
#2 /usr/home/saper/public_html/pg/w/includes/db/DatabasePostgres.php(604): DatabaseBase->query('INSERT INTO "re...', 'RecentChange::s...', '')
#3 /usr/home/saper/public_html/pg/w/includes/RecentChange.php(199): DatabasePostgres->insert('recentchanges', Array, 'RecentChange::s...')
#4 /usr/home/saper/public_html/pg/w/includes/logging/LogEntry.php(479): RecentChange->save('pleasedontudp')
#5 /usr/home/saper/public_html/pg/w/includes/WikiPage.php(2042): ManualLogEntry->publish('1')
#6 /usr/home/saper/public_html/pg/w/includes/WikiPage.php(1937): WikiPage->doDeleteArticleReal('No longer requi...', false, 0, false, '', Object(User))
#7 /usr/home/saper/public_html/pg/w/maintenance/deleteDefaultMessages.php(73): WikiPage->doDeleteArticle('No longer requi...', false, 0, false, '', Object(User))
#8 /usr/home/saper/public_html/pg/w/maintenance/update.php(128): DeleteDefaultMessages->execute()
#9 /usr/home/saper/public_html/pg/w/maintenance/doMaintenance.php(105): UpdateMediaWiki->execute()
#10 /usr/home/saper/public_html/pg/w/maintenance/update.php(151): require_once('/usr/home/saper...')
#11 {main}
2012-03-15 01:52:38 +00:00
Aaron Schulz
428934f41e Add error css to errors like the other file operation pages and actions 2012-03-15 01:42:34 +00:00
Thomas Gries
dd1c93ad1d follow up r113836 typo correction in function header dropExtensionTable 2012-03-14 21:53:30 +00:00
Thomas Gries
2196451495 follow up r113836 added public function extensionTableExists. 2012-03-14 21:41:37 +00:00
Aaron Schulz
9b02dc95fa [FileRepo]
* Added getReadOnlyReason() function to FileRepo to check read-only status. Added such checks to the File object functions that mutate files in storage. This should make read-only mode more tolerable (which is needed at least briefly when switching backends).
* Added lock()/unlock() calls to File restore() function.
* Use proper isOK() accessor for Status objects.
2012-03-14 21:30:26 +00:00
Aaron Schulz
73fa21b00a Fixed comment typo 2012-03-14 21:04:28 +00:00
Marcin Cieślak
8e2da3a4a6 Follow-up to r15791: Rename "user" and "text" when upgrading on PostgreSQL
You can lie to me, but not to your installer.

Make DatabasePostgres::tableExists to check
for real table names, not faked ones.

DatabasePostgres is currently lying to the rest
of the MediaWiki that "mwuser" table is actually
called "user" and that "pagecontents" is called
"text". While MediaWiki does not care, the
installer (and updater do).

This allows us to overcome first hurdle
in getting MediaWiki 1.7.3 to update to trunk
on PostgreSQL and uncover further bugs.

For this commit to actually do something,
we rename those tables when upgrading to match
what we have in maintenance/postgres/tables.sql

And by the way, tell installer not to check
for "user" table, since most PostgreSQL users
will have "mwuser" instead. Picking "archive"
instead.
2012-03-14 20:20:53 +00:00
Thomas Gries
1fc9bcb398 adding two public convenience function wrappers: dropExtensionField and dropExtensionTable 2012-03-14 20:16:32 +00:00
Aaron Schulz
4630a07741 Reverted r113803: makes already messy class messier (a bit to much) 2012-03-14 17:55:59 +00:00
Max Semenik
5000a2b08f * (bug 34889) User name should be normalized on Special:Contributions. Fixes regression from r103751. 2012-03-14 16:31:52 +00:00
Alexandre Emsenhuber
ffb22c66de We have DatabaseBase::selectRow() to select a single row 2012-03-14 16:18:27 +00:00
Alexandre Emsenhuber
6cc0e69e74 * (bug 34841) Fix for r103502: don't show edit links when display old page versions 2012-03-14 16:04:21 +00:00
Alexandre Emsenhuber
f23a4e1f84 Be consistent in the interface and use Title::quickUserCan() instead of Title::userCan() to show items in the interface so that when the user is blocked or the page is cascade protected there is not a part of the interface saying you can edit the page and another part not. 2012-03-14 10:46:59 +00:00
Alexandre Emsenhuber
0d6b594bf2 Don't create new Revision and Title object if we can use the ones that we already have 2012-03-14 09:52:34 +00:00
Aaron Schulz
024c31d490 (bug 32827) "[Regression] Block log for IP ranges not shown on Special:Block" 2012-03-14 01:42:14 +00:00
Marcin Cieślak
bd7a268e4b Cosmetic improvements to PostreSQL updater output
* Don't WARN on sequences already existing
* Align dots nicely to the rest
2012-03-14 00:36:11 +00:00
Amir E. Aharoni
4b439bb6ad Bug 35034 - moved autocomment-prefix between the prefix and the arrow. Follow up to r109086. 2012-03-13 23:09:06 +00:00
Alexandre Emsenhuber
cf50df76b3 Use local context to get message 2012-03-13 21:30:29 +00:00
Aaron Schulz
0abb52ae76 Reverted r113177 per CR 2012-03-13 20:09:49 +00:00
Alexandre Emsenhuber
a7e20dd87f Move delcaration of User::$mAllowUsertalk out of the "cache variables" block since it's not part of it; also reorder the cache variables for consistency. 2012-03-13 19:03:59 +00:00
Alexandre Emsenhuber
345a593955 Follow-up r113223: set the "interface" flag in Message to true by default and set it to false when the page is included.
The point is to have the fix applied to all usages of IContextSource::msg() calls instead of only SpecialPage.
2012-03-13 18:41:13 +00:00
Aaron Schulz
2f47843602 [FileBackend] r113704: updated FileBackend constructor documentation 2012-03-13 18:30:34 +00:00