Fixed a few warnings + layout glitch

Fixed two warnings and a css-glitch that caused the entire form for
configuration to turn red if one of the fields has an illegal value
Strict standards warning

Got rid of a 'strict standards' warning due to a pass by reference.
Modified some queries to improve performance

Changed some uneccesary LEFT JOINs to JOINs and removed a few tables
from the query, for a 40x performance increase.
Changed forgotten function rename

get_people_select_array() -> person::getSelectArray()
added variable declaration

to get rid of some warnings
Fixed constant name
Fixed automatic query builder

fixed a problem where the automated query builder to sometimes create an
SQL query with "WHERE AND" in it.
Fixed erronous function call

missing () after function call
Fixed error in error message

wrong variable echoed in error message
Removed forgotten rating setting on photo object
Fixed error in error message

wrong variable echoed in error message
whitespace fix