Bug (approved)

Projects undefined company are not listed in project lists


Sep 27, 2006
Oct 13, 2006
Sep 27, 2006 / pixtur
Oct 13, 2006 / pixtur

Attached files

No files uploaded
This is probably caused by incorrect SQL-querry.

Issue report

Have not tried
WinXP / safari


pixtur:Fixed in rev122, but...

12 years ago (2. update 12 years ago)

This fix is ugly, because it requires DISTINCT SELECT

Hi Burger, could you probably have a look at the code?


12 years ago

Maybe another solution is to have a company with id = 0.

To implement like:

from install/db_updates.inc.php

if($db_version < 0.0685) {
$update_queries[]="INSERT INTO `{$db_table_prefix}company` (`id`,`name`,`tagline`, `short`, `phone`, `fax`, `street`, `zipcode`, `homepage`, `intranet`, `email`, `comments`, `state`, `category`, `pub_level`)
VALUES (0, 'undefined', '', '', '', '', '', '', '', '', '', '', 1, 0, 4);";

If you add this company then you don't have to change the code at db/class_project.inc.php.

What do you think?


12 years ago

I don't like the dummy-company solution for several reasons:
  1. Its a hack
  2. in a few weeks nobody would remember what this company was for, and if it could ever be deleted
  3. Exporting the SQL-creation structure from mySQLAdmin would require data to be exported.
I am sure there is another solution. But my SQL is not good enough.

burger:No problem ... :-)

12 years ago

But he problem with your solution is that it isn't possible to order by company name, so we found another solution and we already committed the new version (revision 125).

Maybe you can check it?

pixtur:I will have a look at it...

12 years ago