Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /cowiki/htdocs/setup/class/task/

cowiki
Discussion topic

Back to topic list

CVS update: /cowiki/htdocs/setup/class/task/

Author dgorski
Full name Daniel T. Gorski
Date 2006-01-23 17:01:57 PST
Message User: dgorski
Date: 2006/01/23 17:01:57

Modified:
   cowiki/htdocs/setup/​class/task/class.Tas​kDocumentStorageConn​ector.php

Log:
 Remove the port number from the string returned by SHOW GRANTS FOR

File Changes:

Directory: /cowiki/htdocs/setup​/class/task/
====================​====================​===

File [changed]: class.TaskDocumentSt​orageConnector.php
Url: http://cowiki.tigris​.org/source/browse/c​owiki/htdocs/setup/c​lass/task/class.Task​DocumentStorageConne​ctor.php?r1=1.11​&r2=1.12
Delta lines: +9 -3
-------------------
--- class.TaskDocumentSt​orageConnector.php 29 Jul 2005 20:24:31 -0000 1.11
+++ class.TaskDocumentSt​orageConnector.php 24 Jan 2006 01:01:55 -0000 1.12
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.TaskDocumentSt​orageConnector.php,v​ 1.11 2005/07/29 20:24:31 dgorski Exp $
+ * $Id: class.TaskDocumentSt​orageConnector.php,v​ 1.12 2006/01/24 01:01:55 dgorski Exp $
  *
  * This file is part of coWiki. coWiki is free software under the terms of
  * the GNU General Public License (GPL). Read the LICENSE file. If you did
@@ -17,7 +17,7 @@
  * @author Daniel T. Gorski, <daniel.gorski@de​velnet.org>
  * @copyright (C) Daniel T. Gorski, {@link http://www.develnet.org}
  * @license http://www.gnu.org/l​icenses/gpl.html
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
  *
  */
 
@@ -424,13 +424,19 @@
 
     private function checkMySQLUserPrivil​eges($Storage) {
 
+ $sHost = $Storage->getHostString();
+
+ // Work around the host string that might contain the port number.
+ // Remove the port form that string.
+ $sHost = preg_replace('#:[0-9]+#', '', $sHost);
+
         // Determine required connector user privileges. MySQL
         // unfortunately returns only a string that we have to scan for
         // the right parts.
         $sQuery = 'SHOW GRANTS FOR '
                    . $Storage->getUserName()
                    . '@'
- . $Storage->getHostString();
+ . $sHost;
 
         $rResult = $Storage->query($sQuery);

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /cowiki/htdocs/setup/class/task/ dgorski Daniel T. Gorski 2006-01-23 17:01:57 PST
Messages per page: