SOURCES: eventum-ft-enable.patch (NEW) - Added a feature to automa...

glen glen at pld-linux.org
Mon Jun 13 11:26:27 CEST 2005


Author: glen                         Date: Mon Jun 13 09:26:26 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- Added a feature to automatically enable/disable the full-text search feature on the installation procedure

---- Files affected:
SOURCES:
   eventum-ft-enable.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/eventum-ft-enable.patch
diff -u /dev/null SOURCES/eventum-ft-enable.patch:1.1
--- /dev/null	Mon Jun 13 11:26:26 2005
+++ SOURCES/eventum-ft-enable.patch	Mon Jun 13 11:26:20 2005
@@ -0,0 +1,51 @@
+diff -Naru a/setup/config.inc.php b/setup/config.inc.php
+--- a/setup/config.inc.php	2005-06-13 02:18:33 -07:00
++++ b/setup/config.inc.php	2005-06-13 02:18:33 -07:00
+@@ -119,7 +119,7 @@
+ @define("APP_SYSTEM_USER_ID", 1);
+ 
+ // if full text searching is enabled
+- at define("APP_ENABLE_FULLTEXT", false);
++ at define("APP_ENABLE_FULLTEXT", %{APP_ENABLE_FULLTEXT}%);
+ 
+ @define("APP_BENCHMARK", false);
+ if (APP_BENCHMARK) {
+diff -Naru a/setup/index.php b/setup/index.php
+--- a/setup/index.php	2005-06-13 02:18:33 -07:00
++++ b/setup/index.php	2005-06-13 02:18:33 -07:00
+@@ -398,6 +398,17 @@
+         $protocol_type = 'http://';
+     }
+     $config_contents = str_replace("%{PROTOCOL_TYPE}%", $protocol_type, $config_contents);
++    // disable the full-text search feature for certain mysql server users
++    $stmt = "SELECT VERSION();";
++    $res = mysql_query($stmt, $conn);
++    $mysql_version = mysql_result($res, 0, 0);
++    preg_match('/(\d{1,2}\.\d{1,2}\.\d{1,2})/', $mysql_version, $matches);
++    if ($mysql_version > '4.0.23') {
++        $config_contents = str_replace("%{APP_ENABLE_FULLTEXT}%", "true", $config_contents);
++    } else {
++        $config_contents = str_replace("%{APP_ENABLE_FULLTEXT}%", "false", $config_contents);
++    }
++
+     $fp = @fopen('../config.inc.php', 'w');
+     if ($fp === FALSE) {
+         return "Could not open the file 'config.inc.php' for writing. The permissions on the file should be set as to allow the user that the web server runs as to open it. Please correct this problem and try again.";
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+#   2005/06/07 12:29:11-05:00 jpm at mysql.com 
+#   Added a feature to automatically enable/disable the full-text search feature on the installation procedure
+# 
+# ChangeLog
+#   2005/06/07 12:29:10-05:00 jpm at mysql.com +1 -0
+#   Added a feature to automatically enable/disable the full-text search feature on the installation procedure
+# 
+# setup/config.inc.php
+#   2005/06/07 12:29:11-05:00 jpm at mysql.com +1 -1
+#   Added a feature to automatically enable/disable the full-text search feature on the installation procedure
+# 
+# setup/index.php
+#   2005/06/07 12:29:11-05:00 jpm at mysql.com +11 -0
+#   Added a feature to automatically enable/disable the full-text search feature on the installation procedure
+# 
================================================================



More information about the pld-cvs-commit mailing list