Package: php-net-ftp / 1:1.4.0-2.1

0001-Use-PHP5-style-constructor.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From: Mathieu Parent <math.parent@gmail.com>
Date: Thu, 28 Apr 2016 22:50:02 +0200
Subject: Use PHP5-style constructor

---
 Net_FTP-1.4.0/Net/FTP.php          | 4 ++--
 Net_FTP-1.4.0/Net/FTP/Observer.php | 2 +-
 Net_FTP-1.4.0/example/observer.php | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Net_FTP-1.4.0/Net/FTP.php b/Net_FTP-1.4.0/Net/FTP.php
index d701df4..fe4ba68 100755
--- a/Net_FTP-1.4.0/Net/FTP.php
+++ b/Net_FTP-1.4.0/Net/FTP.php
@@ -707,9 +707,9 @@ class Net_FTP extends PEAR
      * @return void
      * @see Net_FTP::setHostname(), Net_FTP::setPort(), Net_FTP::connect()
      */
-    function Net_FTP($host = null, $port = null, $timeout = 90)
+    function __construct($host = null, $port = null, $timeout = 90)
     {
-        $this->PEAR();
+        parent::__construct();
         if (isset($host)) {
             $this->setHostname($host);
         }
diff --git a/Net_FTP-1.4.0/Net/FTP/Observer.php b/Net_FTP-1.4.0/Net/FTP/Observer.php
index 73580d4..009bd32 100644
--- a/Net_FTP-1.4.0/Net/FTP/Observer.php
+++ b/Net_FTP-1.4.0/Net/FTP/Observer.php
@@ -58,7 +58,7 @@ class Net_FTP_Observer
      * @since 1.3.0
      * @access public
      */
-    function Net_FTP_Observer()
+    function __construct()
     {
         $this->_id = md5(microtime());
     }
diff --git a/Net_FTP-1.4.0/example/observer.php b/Net_FTP-1.4.0/example/observer.php
index 000b93b..2898d59 100644
--- a/Net_FTP-1.4.0/example/observer.php
+++ b/Net_FTP-1.4.0/example/observer.php
@@ -73,10 +73,10 @@ class Observer_ProgressUpload extends Net_FTP_Observer
      *
      * @return void
      */
-    function Observer_ProgressUpload(&$progress)
+    function __construct(&$progress)
     {
         /* Call the base class constructor. */
-        parent::Net_FTP_Observer();
+        parent::__construct();
 
         /**
            Configure the observer:
-- 
2.8.0.rc3