Package: rtgui / 0.2.81-4

02-fixes-to-update-code-to-run-under-PHP-5.4.diff 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#
# Description: Fixes to update code to run under PHP 5.4. (Closes: #666941)
#              ie: Call to undefined function import_request_variables() 
# Author: Dario Minnucci <midget@debian.org>
# Bug-Debian: http://bugs.debian.org/666941
# Last-Updated: 2012-04-05
#
Index: rtgui/control.php
===================================================================
--- rtgui.orig/control.php	2012-04-05 15:25:28.425370520 +0200
+++ rtgui/control.php	2012-04-05 15:29:26.117896494 +0200
@@ -18,7 +18,10 @@
 
 include "functions.php";
 include "config.php";
-import_request_variables("gp","r_");
+
+foreach ($_POST as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_GET  as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_FILES as $key => $val) { $v = "r_$key"; $$v = $val; }
 
 // Bulk stop/start/delete torrents...
 if (isset($r_bulkaction) && is_array($r_select)) {
Index: rtgui/dirbrowser.php
===================================================================
--- rtgui.orig/dirbrowser.php	2012-04-05 15:16:22.677339943 +0200
+++ rtgui/dirbrowser.php	2012-04-05 15:29:36.749741043 +0200
@@ -16,7 +16,10 @@
 //  You should have received a copy of the GNU General Public License
 //  along with rtGui.  If not, see <http://www.gnu.org/licenses/>.
 
-import_request_variables("gp","r_");
+foreach ($_POST as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_GET  as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_FILES as $key => $val) { $v = "r_$key"; $$v = $val; }
+
 if ($r_dir=="" || !isset($r_dir)) $r_dir="/";
 if (!isset($r_hilitedir)) $r_hilitedir="";
 ?>
Index: rtgui/index.php
===================================================================
--- rtgui.orig/index.php	2012-04-05 15:16:22.681339880 +0200
+++ rtgui/index.php	2012-04-05 15:29:45.273616426 +0200
@@ -20,7 +20,10 @@
 session_start();
 include "config.php";
 include "functions.php";
-import_request_variables("gp","r_");
+
+foreach ($_POST as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_GET  as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_FILES as $key => $val) { $v = "r_$key"; $$v = $val; }
 
 // Try using alternative XMLRPC library from http://sourceforge.net/projects/phpxmlrpc/  (see http://code.google.com/p/rtgui/issues/detail?id=19)
 if(!function_exists('xml_parser_create')) {
Index: rtgui/json.php
===================================================================
--- rtgui.orig/json.php	2012-04-05 15:16:22.681339880 +0200
+++ rtgui/json.php	2012-04-05 15:30:07.717288299 +0200
@@ -19,7 +19,10 @@
 session_start();
 include "config.php";
 include "functions.php";
-import_request_variables("gp","r_");
+
+foreach ($_POST as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_GET  as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_FILES as $key => $val) { $v = "r_$key"; $$v = $val; }
 
 if (!isset($r_view)) $r_view="main";
 $data=get_full_list("$r_view");
Index: rtgui/rssfeed.php
===================================================================
--- rtgui.orig/rssfeed.php	2012-04-05 15:16:22.685339822 +0200
+++ rtgui/rssfeed.php	2012-04-05 15:30:18.221134717 +0200
@@ -29,7 +29,10 @@
 
 include "config.php";
 include "functions.php";
-import_request_variables("gp","r_");
+
+foreach ($_POST as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_GET  as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_FILES as $key => $val) { $v = "r_$key"; $$v = $val; }
 
 if (!isset($r_view)) {
    $r_view="complete";
Index: rtgui/settings.php
===================================================================
--- rtgui.orig/settings.php	2012-04-05 15:16:22.685339822 +0200
+++ rtgui/settings.php	2012-04-05 15:30:32.044932592 +0200
@@ -20,7 +20,10 @@
 $execstart=$start=microtime(true);
 include "functions.php";
 include "config.php";
-import_request_variables("gp","r_");
+
+foreach ($_POST as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_GET  as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_FILES as $key => $val) { $v = "r_$key"; $$v = $val; }
 
 if (!isset($_SESSION['refresh'])) $_SESSION['refresh']=$defaultrefresh;
 if (isset($r_setrefresh)) $_SESSION['refresh']=$r_setrefresh;
Index: rtgui/view.php
===================================================================
--- rtgui.orig/view.php	2012-04-05 15:16:22.685339822 +0200
+++ rtgui/view.php	2012-04-05 15:30:46.840716266 +0200
@@ -19,7 +19,10 @@
 $execstart=$start=microtime(true);
 include "functions.php";
 include "config.php";
-import_request_variables("gp","r_");
+
+foreach ($_POST as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_GET  as $key => $val) { $v = "r_$key"; $$v = $val; }
+foreach ($_FILES as $key => $val) { $v = "r_$key"; $$v = $val; }
 
 if (!isset($r_select)) {
    $r_select="files";