[Fusionforge-commits] FusionForge branch 6.0 updated. 6.0.4-13-g342c31b
Franck Villaume
nerville at libremir.placard.fr.eu.org
Sun Jun 5 21:06:06 CEST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, 6.0 has been updated
via 342c31b6a96246293cd56cc4e41b15d4436a581c (commit)
via e6e526e50906a28e6e84bc9c2ce577a4c9d93eb1 (commit)
from 8c96aabed2bd120b708f65e46062bde39820d54a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=342c31b6a96246293cd56cc4e41b15d4436a581c
commit 342c31b6a96246293cd56cc4e41b15d4436a581c
Author: mirabilos <t.glaser at tarent.de>
Date: Wed Jun 1 10:40:47 2016 +0200
escape all characters illegal in PostgreSQL identifiers [#816]
• probably only works for ASCII, but we have group names as input
so that should be no problem
• $ is special in PostgreSQL but also disallowed by ANSI C
• we need to stay compatible to previous encodings at all cost
• NAMEDATALEN is 64, which could be a problem, we should have
used the numeric ID in the first place, but that’s now not
doable any more to not break existing installations
diff --git a/src/plugins/mediawiki/www/LocalSettings.php b/src/plugins/mediawiki/www/LocalSettings.php
index f860855..2e07bab 100644
--- a/src/plugins/mediawiki/www/LocalSettings.php
+++ b/src/plugins/mediawiki/www/LocalSettings.php
@@ -103,6 +103,9 @@ $wgPasswordSender = forge_get_config('admin_email');
function ff_mw_db_name($s) {
$s = str_replace('-', '_', $s);
+ $s = preg_replace_callback('/[^A-Za-z0-9_]/', function ($match) {
+ return sprintf('$%02X', ord($match[0]));
+ }, $s);
return $s;
}
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=e6e526e50906a28e6e84bc9c2ce577a4c9d93eb1
commit e6e526e50906a28e6e84bc9c2ce577a4c9d93eb1
Author: mirabilos <t.glaser at tarent.de>
Date: Wed Jun 1 10:35:22 2016 +0200
make common function for transliterating DB names; part of [#816] fix
diff --git a/src/plugins/mediawiki/www/LocalSettings.php b/src/plugins/mediawiki/www/LocalSettings.php
index 6b3bdbd..f860855 100644
--- a/src/plugins/mediawiki/www/LocalSettings.php
+++ b/src/plugins/mediawiki/www/LocalSettings.php
@@ -101,6 +101,11 @@ $wgScriptPath = "/plugins/mediawiki/wiki/$fusionforgeproject" ;
$wgEmergencyContact = forge_get_config('admin_email');
$wgPasswordSender = forge_get_config('admin_email');
+function ff_mw_db_name($s) {
+ $s = str_replace('-', '_', $s);
+ return $s;
+}
+
$wgDBtype = "forge";
$wgDBserver = forge_get_config('database_host') ;
if (forge_get_config('mw_dbtype', 'mediawiki')=='mysql'){
@@ -115,8 +120,8 @@ $wgDBpassword = forge_get_config('database_password') ;
$wgDBadminuser = forge_get_config('database_user') ;
$wgDBadminpassword = forge_get_config('database_password') ;
$wgDBport = forge_get_config('database_port') ;
-$wgDBmwschema = str_replace ('-', '_', "plugin_mediawiki_$fusionforgeproject") ;
-$wgDBts2schema = str_replace ('-', '_', "plugin_mediawiki_$fusionforgeproject") ;
+$wgDBmwschema = 'plugin_mediawiki_' . ff_mw_db_name($fusionforgeproject);
+$wgDBts2schema = 'plugin_mediawiki_' . ff_mw_db_name($fusionforgeproject);
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = array();
-----------------------------------------------------------------------
Summary of changes:
src/plugins/mediawiki/www/LocalSettings.php | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list