Looked at the code.

Description

Looks fine so far...

No tabs, pleaseπ

  • please do not use tab-characters but four hard spaces

getXXX ?π

Company::getCompanies() is ok, but it might be better refactored (see refactor Company::getCompanies() for parameter-array). I know this comes a little bit late and streber is pretty inconsistent with those query functions but we should invests some time to make all of those functions work similar.
This could also include to rename them to something like Company::getFromDB() (or fetch, query, etc...).

checking user rightsπ

  • as for checking user-rights, working with the profile is not quiet correct.


from db/class_file.inc.php

		if ($auth->cur_user->profile == PROFILE_ADMIN)
		{
			$str_projectperson = "";
		}
		else
		{
			$str_projectperson = "AND upp.person = {$auth->cur_user->id}";
		}

should be written as...

from db/class_file.inc.php

		if ($auth->cur_user->user_rights & RIGHT_VIEWALL)
		{
			$str_projectperson = "";
		}
		else
		{
			$str_projectperson = "AND upp.person = {$auth->cur_user->id}";
		}

Note that the "profile" is just the default right setting and can be adjusted later. RIGHT_VIEW_ALL is what you want here.

keep others up to dateπ

  • when modifying the Database structure you must increase the version at conf/conf.inc.php. Doing the changes in v0.0681 would automatically updating the other developers database. Do not be affraid forminor version increases. I will adjust your code here, to test you changes.

Naming page-functionsπ

  • when naming page functions please start with the rough and become finer at the end of the name. I would suggest to rename:
  • clientList -> companyListClients
  • prosclientList -> companyListPropective
  • supplierList -> companyListSupplier
and so on...

please change your code at this point


Over all your changes are really excellent. I am honestly surprised that you got into streber's code so quickly. Thank you!