Commit graph

1252 commits

Author SHA1 Message Date
awjrichards
c29fd59775 Big oops - merged to wrong branch.
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"

This reverts commit ee0d3d330f
2012-06-05 22:58:54 +00:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
Translation updater bot
4fbe50631e Localisation updates from http://translatewiki.net.
Change-Id: I023836a005656b5232661e21e2849f4de5f154f9
2012-06-03 14:43:26 +00:00
Nikola Smolenski
b5153c2532 Set $wgLanguageConverterCacheType to CACHE_NONE in installer
Change-Id: I03ddd59fe7758032b3faa401ff1b0fa3b459e723
2012-05-11 19:13:13 +02:00
Timo Tijhof
6540260001 (bug 36669) Installer CSS outdated
Change-Id: I7ac606f2e8538eb5fd10a3944cf9d8b42bbc5ed5
2012-05-09 02:20:03 +02:00
Alexandre Emsenhuber
09bb6975c5 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: I1615bf268515ed7169e33173cea6ec30402451dc
2012-05-06 07:50:15 +02:00
Tim Starling
6a79e09d6f Merge "Various updates needed to bump min php version to 5.3.2" 2012-05-04 12:44:57 +00:00
Marc A. Pelletier
7694faf68f (bug 5445) remove autoblocks when user is unblocked
Previously, whenever we blocked a user, its IP address would be
autoblocked whenever he tries to edit a page. Thus when later unblocking
the username, he would be automatically blocked again if we forgot to
clean up is IP.

This patch introduces a the ipb_parent_block_id column in ipblocks table
to track which block triggered the autoblock command. Thus, when deleting
the original block we can easily remove all subsequentautoblocks.

Schema updaters for MySQL, SQLite and postgres have been added to the
patch but not for the other database types such as ibm_db2, mssql and
Oracle.

Change-Id: I4aa820ae9bbd962a12d0b48b6c638a1b6ff4efc9
2012-05-03 12:07:30 +02:00
Reedy
2edbe14e39 Normalising return statements
Add/improve parameter documentation

Change-Id: I4c7fa319be60a47b7fcd81131458577bccb009fb
2012-04-27 16:40:14 +01:00
Demon
242f9021e5 Merge "bug 36087: PostgresUpdater fails on 8.3.14" 2012-04-23 17:18:57 +00:00
devunt
f848a6e6a5 Added more description of Short URL
added description with example

Change-Id: I31668526202c0e13d2a85b2805a959efc249ad0d
2012-04-19 22:43:18 +09:00
saper
557a05f384 bug 36087: PostgresUpdater fails on 8.3.14
PostgresUpdater fails on PostgreSQL 8.3.14:

> Changing 'image.img_metadata' default value
> A database query syntax error has occurred.
> The last attempted database query was:
> "ALTER TABLE image ALTER img_metadata SET DEFAULT '\x'::bytea"
> from within function "".
> Database returned error "22P02: ERROR:  invalid input syntax for type
> bytea"

Patchset 2:

> Database returned error "42883: ERROR:  function
> generate_subscripts(int2vector, integer) does not exist
> LINE 7:     (SELECT generate_subscripts(isub.indkey, 1) AS g
>                     ^
> HINT:  No function matches the given name and argument types. You
> might need to add explicit type casts.
> "

Change-Id: I6e1811ded0eedad9c0eb0df715698c45aaf8e3f0
2012-04-19 14:53:08 +02:00
Reedy
f1bec81eba Various updates needed to bump min php version to 5.3.2
Change-Id: I22015387e4ac5839a907059086d787f352746886
2012-04-16 15:38:22 +01:00
saper
91eb34756e Fix broken merge by 0a792a1dcb
Changeset 1 of https://gerrit.wikimedia.org/r/#change,3365:
763b57f9f2af131a2d8e65f520a23c00109be0e1

got mis-merged in changeset 2:
f752cf8042

And introduced into master wth
0a792a1dcb

Also, marking all new functions as @since 1.19
since we want to have them there later.

Patchset 2: whitespace fixes
Patchset 3: Fix <?php
Patchset 4: rebase to current master

Change-Id: Ic7d940dfec8890de20197128505962375fac4f06
2012-04-13 20:55:14 +02:00
saper
f752cf8042 Fix PostgreSQL updater to produce 1.19 schema
* PostgresField now reports column default value
* DatabasePostgres::indexAttributes reports index
  details
* Perform schema update in one transaction

With this change we can sucessfully update
MediaWiki 1.7.3 schema to trunk^Wmaster

Patch set 2: Rebased against master. PLEASE check carefully
to make sure I got those conflicted files right.

Conflicts:

	includes/db/DatabasePostgres.php
	includes/installer/PostgresUpdater.php

Change-Id: Iebb6855e8f6f44470bbb1dc5ab9ac1abb513adfe
2012-04-10 12:59:21 -04:00
Demon
b2a3c87792 Postgres updater: add config table, adjust us_image_bits type
This is a followup to I18e67bcb, that I failed to notice before merging

Change-Id: Ia96f831f279b0f6a348f1db80ecf30298ecf064c
2012-04-04 09:54:53 -04:00
Amir E. Aharoni
82cdfc864c (bug 31236) Refactor CSS loading and apply CSSJanus to all CSS files.
This commit is supposed to fix bug 31236.
Refactored getCSS to load files more generically.
Applied CSSJanus transform to all CSS files.
Updated release notes.

Change-Id: I4418a0dcb40fe181dc62a14a9f65b658e3c0d473
2012-04-03 12:59:05 -07:00
saper
fa6ab16686 (bug 33689) Fix incomplete query on constraints
Upgrade to 1.19 on Postgres fails due to incomplete query when trying to
defer foreign key for externallinks

* FieldInfo::conname() should return NULL not "" when constraint
  is not present
* Re-create missing constraint on schema update

Change-Id: I7ca351e07d228afdf4a5c3bef365f42a27c9ac45
2012-03-28 23:23:13 +02:00
Marcin Cieślak
556c5cf464 Rename "user" and "text" when upgrading on PostgreSQL
Follow-up to r15791.

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.

Patchset2: wrapped commit message at 72 chars

Change-Id: Ic874e92bb1adda3430d3292423d4f3617c25456c
2012-03-24 09:10:59 +01:00
Roan Kattouw
0fca9a7991 Revert r107309, r113601, r113704, r113742, r113792, r113838, r113859, r113893, r113894, r113952, r114047, r114252, r114256, r114257. This reverts the remaining 'new' revisions in core.
All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-21 00:16:50 +00:00
Daniel Friesen
e2ee009e5c Commit the cryptrand project worked on in git:
- MWCryptRand: A new api for generating cryptographic randomness for security tokens. Uses whatever cryptographic source is available and if not falls back to using random state and clock drift.
- wfRandomString - A simple non-cryptographic pesudo-random string generation function to replace wfGenerateToken which was written pretending to be secure when it's really not.
- Core updates to use MWCryptRand in various places:
-- user_token generation (to do this we stop generating user_token implicitly and only generate it when needed to avoid depleting the system's entropy pool by reading random data we'll never use)
-- email confirmation token generation
-- password salt generation
-- temporary password generation
-- Generation of the automatic watchlist token
-- login and create user tokens
-- session ids when php's entropy sources are not set
-- the installer when generating wgSecretKey and the upgrade key
2012-03-20 05:17:40 +00:00
Thomas Gries
c049019039 follow up r113862 . changed public function name extensionTableExists to tableExists 2012-03-17 08:22:58 +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
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
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
Sam Reed
51f400bc93 Documentation, spaces, braces, explicit member variables 2012-03-09 23:33:42 +00:00
Raimond Spekking
7fda665aa0 Localisation updates for core and extension messages from translatewiki.net 2012-03-09 22:30:45 +00:00
Sam Reed
a8d907be93 PHP Fatal error: Call to undefined method DatabasePostgres::getCoreSchea() in /var/lib/jenkins/jobs/MediaWiki-postgres-phpunit/workspace/mw-core/includes/installer/PostgresUpdater.php on line 309
Ping r113487
2012-03-09 19:01:30 +00:00
Marcin Cieślak
cfb8e9a251 Handle PostgreSQL transaction errors and improve schema detection
* Introduce $wgDebugDBTransactions facility to help
  figure out what's going on with transactions.
  Currently PostgreSQL only.

  PostgresTransactionState can be easily be made more general 
  to trace all sorts of state machinery.

* Improve r113408: we don't need to full reconnect on error,
  rollback is enough. 
  
  Rolling back breaks search_path, as PostgreSQL
  can manage sessions settings under transaction therefore
  we need to improve schema sniffing introduced in r82674

* Introduce few schema handling functions. This could
  probably be generalized for other databases like DB2 and Oracle.

* Fix bug 15816 - Add a switch for SETting the search_path

  We try to avoid touching search_path at all unless
  really necessary. Even in this case we append MediaWiki
  core schema to the front of the list.

* No longer add $wgDBmwschema to PostgreSQL role search_path
  in the installer. This is no longer necessary as 
  setting schema on connect should ReallyWorkNow(tm).

* Get rid as much as possible of $wgDBmwschema and
  bring us one step closer to fix bug 16794 (wgSharedDB
  support). 
  
  All references to core MediaWiki schema in PostgreSQL
  specific code should now use Database::getCoreSchema() 
  unless we know what we are doing. 

Followup-To: r113408 r82674
2012-03-09 17:24:57 +00:00
Robin Pepermans
9184dc83d6 Update core usage of getLanguageName[s]. 2012-03-08 20:56:26 +00:00
Raimond Spekking
b6ffd105fa Localisation updates for core and extension messages from translatewiki.net 2012-03-08 20:35:25 +00:00
Raimond Spekking
ee8ea4d04e Localisation updates for core and extension messages from translatewiki.net 2012-03-06 21:18:30 +00:00
Sam Reed
699580ab51 And fix the . from r113110 2012-03-06 00:10:36 +00:00
Sam Reed
921c862c97 Followup r113109, forward port the rest of r25267 for Bug 10788 - Filter page histories by user, or contributions by title 2012-03-06 00:09:18 +00:00
Raimond Spekking
6b04069830 Localisation updates for core and extension messages from translatewiki.net 2012-03-05 21:20:53 +00:00
Raimond Spekking
f98bb701b8 Localisation updates for core and extension messages from translatewiki.net 2012-03-04 20:23:13 +00:00
Raimond Spekking
a8cb48d296 Localisation update for core and extension messages from translatewiki.net 2012-03-03 21:32:20 +00:00
Raimond Spekking
7511cf2abd Localisation update for core and extension messages from translatewiki.net 2012-03-01 22:21:50 +00:00
Sam Reed
ef452df5eb Tidy up return values of envChecks
False is used to to signify a failure mode we need to do stuff for, so returning true is ok in other cases, and makes it explicit
2012-03-01 19:12:07 +00:00
Raimond Spekking
723fc4f39a Localisation update for core and extension messages from translatewiki.net 2012-02-29 12:34:33 +00:00
Raimond Spekking
57f78461e3 Localisation update for core and extension messages from translatewiki.net 2012-02-27 21:36:19 +00:00
Jure Kajzer
e42c970e2d * partly fixes two issues exposed by bug 34280
** forcing recreate if creating user
** parent::createTables was setting DB to a wrong setting
2012-02-27 19:01:10 +00:00
Alexandre Emsenhuber
61a88f8c18 Pass __METHOD__ to DatabaseBase::begin(), DatabaseBase::commit() and DatabaseBase::rollback() 2012-02-26 17:19:11 +00:00
Raimond Spekking
874cc50d64 Localisation updates for core and extension messages from translatewiki.net 2012-02-25 20:36:21 +00:00
Raimond Spekking
aa9ff23ec4 Localisation updates for core and extension messages from translatewiki.net 2012-02-24 21:11:11 +00:00
Sam Reed
c47f83a4d4 More __METHOD__ in our madness 2012-02-24 18:45:24 +00:00
Raimond Spekking
216f14a1ca Localisation updates for core and extension messages from translatewiki.net 2012-02-21 21:17:58 +00:00
Raimond Spekking
66770c7425 Localisation updates for core and extension messages from translatewiki.net 2012-02-19 20:47:51 +00:00