From 3ebac0167bf20104fb7a2a55934765117760264c Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Mon, 18 Aug 2014 03:53:18 -0400
Subject: [PATCH] Only add zen-mode text labels in compose step

---
 program/lib/Net/Socket.php |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/program/lib/Net/Socket.php b/program/lib/Net/Socket.php
index 669700c..bf1d1bb 100644
--- a/program/lib/Net/Socket.php
+++ b/program/lib/Net/Socket.php
@@ -4,7 +4,7 @@
  *
  * PHP Version 4
  *
- * Copyright (c) 1997-2003 The PHP Group
+ * Copyright (c) 1997-2013 The PHP Group
  *
  * This source file is subject to version 2.0 of the PHP license,
  * that is bundled with this package in the file LICENSE, and is
@@ -23,7 +23,6 @@
  * @author    Chuck Hagenbuch <chuck@horde.org>
  * @copyright 1997-2003 The PHP Group
  * @license   http://www.php.net/license/2_02.txt PHP 2.02
- * @version   CVS: $Id$
  * @link      http://pear.php.net/packages/Net_Socket
  */
 
@@ -100,7 +99,7 @@
      * Connect to the specified port. If called when the socket is
      * already connected, it disconnects and connects again.
      *
-     * @param string  $addr       IP address or host name.
+     * @param string  $addr       IP address or host name (may be with protocol prefix).
      * @param integer $port       TCP port number.
      * @param boolean $persistent (optional) Whether the connection is
      *                            persistent (kept open between requests
@@ -110,7 +109,7 @@
      *
      * @access public
      *
-     * @return boolean | PEAR_Error  True on success or a PEAR_Error on failure.
+     * @return boolean|PEAR_Error  True on success or a PEAR_Error on failure.
      */
     function connect($addr, $port = 0, $persistent = null,
                      $timeout = null, $options = null)
@@ -122,11 +121,10 @@
 
         if (!$addr) {
             return $this->raiseError('$addr cannot be empty');
-        } elseif (strspn($addr, ':.0123456789') == strlen($addr) ||
-                  strstr($addr, '/') !== false) {
-            $this->addr = substr($addr, ':') ? '['.$addr.']' : $addr;
+        } else if (strspn($addr, ':.0123456789') == strlen($addr)) {
+            $this->addr = strpos($addr, ':') !== false ? '['.$addr.']' : $addr;
         } else {
-            $this->addr = @gethostbyname($addr);
+            $this->addr = $addr;
         }
 
         $this->port = $port % 65536;

--
Gitblit v1.9.1