- if (DI::args()->getArgc()==2) {
- $photos = q("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' ",
- intval(local_user()),
- DBA::escape(Photo::CONTACT_PHOTOS),
- DBA::escape(DI::l10n()->t(Photo::CONTACT_PHOTOS))
- );
+ if (DI::args()->getArgc() == 2) {
+ $photos = DBA::toArray(DBA::p("SELECT distinct(`album`) AS `album` FROM `photo` WHERE `uid` = ? AND NOT `photo-type` IN (?, ?)",
+ local_user(),
+ Photo::CONTACT_AVATAR,
+ Photo::CONTACT_BANNER
+ ));