Skip to content

Commit

Permalink
Removed the method liste_array() of project class. It was not used by
Browse files Browse the repository at this point in the history
core code.
  • Loading branch information
eldy committed Jul 18, 2019
1 parent b5a7d21 commit ddc01b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 44 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WARNING:

Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Properties ->libelle_incoterms were renamed into ->label_incoterms

* Removed the method liste_array() of project class. It was not used by core code.


***** ChangeLog for 10.0.0 compared to 9.0.0 *****
Expand Down
43 changes: 0 additions & 43 deletions htdocs/projet/class/project.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,49 +509,6 @@ public function fetch($id, $ref = '')
}
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of projects
*
* @param int $socid To filter on a particular third party
* @return array List of projects
*/
public function liste_array($socid = '')
{
// phpcs:enable
global $conf;

$projects = array();

$sql = "SELECT rowid, title";
$sql.= " FROM " . MAIN_DB_PREFIX . "projet";
$sql.= " WHERE entity = " . $conf->entity;
if (! empty($socid)) $sql.= " AND fk_soc = " . $socid;

$resql = $this->db->query($sql);
if ($resql)
{
$nump = $this->db->num_rows($resql);

if ($nump)
{
$i = 0;
while ($i < $nump)
{
$obj = $this->db->fetch_object($resql);

$projects[$obj->rowid] = $obj->title;
$i++;
}
}
return $projects;
}
else
{
print $this->db->lasterror();
}
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of elements for type, linked to a project
Expand Down

0 comments on commit ddc01b4

Please sign in to comment.