From: "Brian Evans" <grknight@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/bouncer:master commit in: php/lib/
Date: Tue, 30 Jan 2018 18:16:14 +0000 (UTC) [thread overview]
Message-ID: <1517330162.cbb2b1f5e4b53a08bece7af5426468694a4b0922.grknight@gentoo> (raw)
commit: cbb2b1f5e4b53a08bece7af5426468694a4b0922
Author: Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 16:36:02 2018 +0000
Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 16:36:02 2018 +0000
URL: https://gitweb.gentoo.org/proj/bouncer.git/commit/?id=cbb2b1f5
Remove old references
php/lib/csv.php | 18 +++++++++---------
php/lib/util.php | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/php/lib/csv.php b/php/lib/csv.php
index 12dff67..832866f 100644
--- a/php/lib/csv.php
+++ b/php/lib/csv.php
@@ -166,7 +166,7 @@ function csv_csv_to_array($string)
{
$return = array();
$length = strlen($string);
-
+
// create a temp file and write the string to it
$tmpfname = tempnam('/tmp', 'csvlib');
$fh = fopen($tmpfname, 'w');
@@ -194,23 +194,23 @@ function csv_csv_to_array($string)
* @param string $enclosure enclosure character, default to '"'
* @return &array the two dimensional array with the csv file content, or an empty if an error occured
*/
-function &csv_csv_file_to_array($filepath, $delimiter=',', $enclosure='"')
+function csv_csv_file_to_array($filepath, $delimiter=',', $enclosure='"')
{
$return = array();
-
+
if (!file_exists($filepath) || !is_readable($filepath))
return $return;
-
- $fh =& fopen($filepath, 'r');
+
+ $fh = fopen($filepath, 'r');
$size = filesize($filepath)+1;
- while ($data =& fgetcsv($fh, $size, $delimiter, $enclosure))
+ while ($data = fgetcsv($fh, $size, $delimiter, $enclosure))
{
$return[] = $data;
}
-
+
fclose($fh);
-
+
return $return;
}
-?>
+
diff --git a/php/lib/util.php b/php/lib/util.php
index fa95114..c058e2d 100644
--- a/php/lib/util.php
+++ b/php/lib/util.php
@@ -311,9 +311,9 @@ function array_order_by(&$array, $key=null, $order=null, $retain_keys=TRUE, $cas
foreach($x as $row_key => $uselessvalue)
{
if ($retain_keys)
- $return_arr[$row_key] =& $array[$row_key];
+ $return_arr[$row_key] = $array[$row_key];
else
- $return_arr[] =& $array[$row_key];
+ $return_arr[] = $array[$row_key];
}
return $return_arr;
next reply other threads:[~2018-01-30 18:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 18:16 Brian Evans [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-08-19 14:02 [gentoo-commits] proj/bouncer:master commit in: php/lib/ Brian Evans
2018-01-30 18:16 Brian Evans
2018-01-30 18:16 Brian Evans
2018-01-30 18:16 Brian Evans
2018-01-30 18:16 Brian Evans
2018-01-30 18:16 Brian Evans
2018-01-30 18:16 Brian Evans
2018-01-30 18:16 Brian Evans
2018-01-30 18:16 Brian Evans
2018-01-30 18:16 Brian Evans
2018-01-30 18:16 Brian Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517330162.cbb2b1f5e4b53a08bece7af5426468694a4b0922.grknight@gentoo \
--to=grknight@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox