1 |
commit: cbb2b1f5e4b53a08bece7af5426468694a4b0922 |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 30 16:36:02 2018 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 30 16:36:02 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/bouncer.git/commit/?id=cbb2b1f5 |
7 |
|
8 |
Remove old references |
9 |
|
10 |
php/lib/csv.php | 18 +++++++++--------- |
11 |
php/lib/util.php | 4 ++-- |
12 |
2 files changed, 11 insertions(+), 11 deletions(-) |
13 |
|
14 |
diff --git a/php/lib/csv.php b/php/lib/csv.php |
15 |
index 12dff67..832866f 100644 |
16 |
--- a/php/lib/csv.php |
17 |
+++ b/php/lib/csv.php |
18 |
@@ -166,7 +166,7 @@ function csv_csv_to_array($string) |
19 |
{ |
20 |
$return = array(); |
21 |
$length = strlen($string); |
22 |
- |
23 |
+ |
24 |
// create a temp file and write the string to it |
25 |
$tmpfname = tempnam('/tmp', 'csvlib'); |
26 |
$fh = fopen($tmpfname, 'w'); |
27 |
@@ -194,23 +194,23 @@ function csv_csv_to_array($string) |
28 |
* @param string $enclosure enclosure character, default to '"' |
29 |
* @return &array the two dimensional array with the csv file content, or an empty if an error occured |
30 |
*/ |
31 |
-function &csv_csv_file_to_array($filepath, $delimiter=',', $enclosure='"') |
32 |
+function csv_csv_file_to_array($filepath, $delimiter=',', $enclosure='"') |
33 |
{ |
34 |
$return = array(); |
35 |
- |
36 |
+ |
37 |
if (!file_exists($filepath) || !is_readable($filepath)) |
38 |
return $return; |
39 |
- |
40 |
- $fh =& fopen($filepath, 'r'); |
41 |
+ |
42 |
+ $fh = fopen($filepath, 'r'); |
43 |
$size = filesize($filepath)+1; |
44 |
|
45 |
- while ($data =& fgetcsv($fh, $size, $delimiter, $enclosure)) |
46 |
+ while ($data = fgetcsv($fh, $size, $delimiter, $enclosure)) |
47 |
{ |
48 |
$return[] = $data; |
49 |
} |
50 |
- |
51 |
+ |
52 |
fclose($fh); |
53 |
- |
54 |
+ |
55 |
return $return; |
56 |
} |
57 |
-?> |
58 |
+ |
59 |
|
60 |
diff --git a/php/lib/util.php b/php/lib/util.php |
61 |
index fa95114..c058e2d 100644 |
62 |
--- a/php/lib/util.php |
63 |
+++ b/php/lib/util.php |
64 |
@@ -311,9 +311,9 @@ function array_order_by(&$array, $key=null, $order=null, $retain_keys=TRUE, $cas |
65 |
foreach($x as $row_key => $uselessvalue) |
66 |
{ |
67 |
if ($retain_keys) |
68 |
- $return_arr[$row_key] =& $array[$row_key]; |
69 |
+ $return_arr[$row_key] = $array[$row_key]; |
70 |
else |
71 |
- $return_arr[] =& $array[$row_key]; |
72 |
+ $return_arr[] = $array[$row_key]; |
73 |
} |
74 |
|
75 |
return $return_arr; |