Author: t-smw
Description:
Misc patches to solve postgres-specific issues during installation
I've installed mediawiki and smw from the tip of the master branch in git. While installing smw I've encountered multiple problems which I assume is related to the postgres support - I managed to get through the installation process by hacking a bit on the php code. My patches are attached.
Here is the revision info:
Mediawiki core:
commit 3a26db55ab4ba908b76cd9982794d1eeafb4afa0
Merge: 7c9a490 0d086f3
Date: Fri Apr 12 15:02:41 2013 +0000
smw:
commit a33907d0aafe817c628e1715b424d3749299f55e
Merge: 473ebba 197154e
Date: Wed Apr 10 21:29:18 2013 +0000
Problems solved by the patch:
- Index creation:
"CREATE $type $tableName ON $tableName"
Obviously this doesn't work very well, particularly when there are more than one index on a table. I've changed to:
"CREATE $type $indexName ON $tableName"
... but even that didn't work too well because indexName contained some badly placed double quotes. I changed the index name from "{$tableName}_index{$key}" to "{$rawTableName}_index{$key}" and that solved the issue.
- There were multiple references to a non-existent sequence smw_ids_smw_id_seq. I did a search'n'replace to smw_object_ids_smw_id_seq and I hope that's correct.
- Some error message about some variable not beeing a positive non-zero integer. Solved by casting the variable from a string to an int.
I have no experience with neither PHP nor smw, and not much experience with mediawiki neither, so obviously this patch needs some serious code review ;-)
Version: master
Severity: normal
OS: Linux
Platform: PC
Attached: