$lines = split("\n", $data);
$newText = "";
- while (list ($key, $line) = each($lines)) {
+ foreach ($lines as $key => $line) {
// Do not scan lines if they already have hyperlinks.
// Avoid problem with text written with an WYSIWYG HTML editor.
if (eregi('<a ([^>]*)>.*</a>', $line, $linePart)) {
$err .= db_error();
//$err .= "<table>";
-while (list($k,$v) = each($sum_totals)) {
+foreach ($sum_totals as $k => $v) {
$res = db_query_params ('INSERT INTO trove_treesums (trove_cat_id,subprojects)
VALUES ($1,$2)',
array($k,
* Copyright 1999-2001 (c) VA Linux Systems
* Copyright 2010, FusionForge Team
* Copyright (C) 2010-2012 Alain Peyrat - Alcatel-Lucent
- * Copyright 2013,2016, Franck Villaume - TrivialDev
+ * Copyright 2013,2016,2021, Franck Villaume - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
$assoc_open = util_result_columns_to_assoc($result1);
$assoc_all = util_result_columns_to_assoc($result2);
- while (list($key, $val) = each($assoc_all)) {
+ foreach ($assoc_all as $key => $val) {
$titles[] = $key;
$all[] = $val;
if (isset($assoc_open[$key])) {
$allroots = array();
$allroots = getStringFromRequest('root1');
//$eachroot = ;//must make this bypass because it wouldn't compile otherwise
- while (list($rootnode,$value) = each($allroots)) {
+ foreach ($allroots as $rootnode => $value) {
// check for array, then clear each root node for group
db_query_params ('
DELETE FROM trove_group_link
echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 'method' => 'post'));
$CATROOTS = trove_getallroots();
-while (list($catroot,$fullname) = each($CATROOTS)) {
+foreach ($CATROOTS as $catroot => $fullname) {
$title = '';
if ($use_tooltips) {
$res_cat = db_query_params ('SELECT * FROM trove_cat WHERE trove_cat_id=$1', array($catroot));
*
* Copyright 1999-2001 (c) VA Linux Systems
* Copyright 2010 (c) FusionForge Team
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013,2021, Franck Villaume - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
if (!is_array($sum)) {
$sum = array();
}
- while(list($key, $val) = each($add)) {
+ foreach ($add as $key => $val) {
if (!isset($sum[$key])) {
$sum[$key] = 0;
}